query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Run the database seeds.
public function run() { DB::statement('SET FOREIGN_KEY_CHECKS=0;'); Departamento::truncate(); DB::statement('SET FOREIGN_KEY_CHECKS=1;'); for ($i=0; $i < 5; $i++) { Departamento::create([ 'departamento_uid' => $i, 'nome_exibicao' => "departamento exemplo{$i}" ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::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 < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::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 < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::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\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::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 Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::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 News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\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 Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
return elapsed time so far, as text in microseconds, or blank if zero
function eQTimeElapsed() { if ($GLOBALS['qTimeTotal']) { return number_format($GLOBALS['qTimeTotal']*1000000.0,1); } else { return ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function time()\n {\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n }", "public function getTime()\n {\n return (float)sprintf(\"%.1f\", 1000*(microtime(true) - $this->startTime));\n }", "protected function getElapsedTimeInMs()\n {\n return (microtime(true) - $this->start) * 1000;\n }", "public static function ms(): int\n {\n return round((static::elapsed() * 1000), 0);\n }", "static public function get_time() {\n // By Zach Buller ([email protected])\n $time1 = \\microtime();\n \\settype($time1, 'string'); //convert to string to keep trailing zeroes\n $time2 = explode(\" \", $time1);\n $sub_secs = \\preg_replace('/0./', '', $time2[0], 1);\n $time3 = ($time2[1].$sub_secs)/100;\n return $time3;\n }", "protected function time()\n {\n $time = microtime();\n $time = explode(' ', $time);\n $time = $time[1] + $time[0];\n return $time;\n }", "function getTime() {\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n}", "private function milliseconds()\n {\n $mt = explode(' ', microtime());\n return bcadd($mt[1], $mt[0], 8);\n }", "function time_elapsed_string($ptime)\n{\n if (empty($ptime)) {\n return \"No Time\";\n }\n $etime = time() - $ptime;\n\n if ($etime < 1) {\n return '0 seconds';\n }\n\n $a = array(365 * 24 * 60 * 60 => 'year',\n 30 * 24 * 60 * 60 => 'month',\n 24 * 60 * 60 => 'day',\n 60 * 60 => 'hour',\n 60 => 'min',\n 1 => 'sec'\n );\n $a_plural = array('year' => 'years',\n 'month' => 'months',\n 'day' => 'days',\n 'hour' => 'hours',\n 'min' => 'min',\n 'sec' => 'secs'\n );\n\n foreach ($a as $secs => $str) {\n $d = $etime / $secs;\n if ($d >= 1) {\n $r = round($d);\n return $r . ' ' . ($r > 1 ? $a_plural[$str] : $str) . '';\n }\n }\n}", "static function ts(){\r\n $dt = microtime(true) - self::$starttime;\r\n return self::mtformat($dt);\r\n }", "private function getTime() {\n // Get the current microtime string as `microseconds seconds`\n $time_arr = microtime();\n // Add the two numbers together\n $time = array_sum(explode(' ', $time_arr));\n // Multiply by 1000 and return a 13 digit timestamp\n $microtime = $time * 1000;\n return substr($microtime, 0, 13); \n }", "public function get_duration() {\n\t\t$a = explode (' ',microtime()); \n \t$this->stop_time = (double) $a[0] + $a[1];\n \t$this->duration = number_format(($this->stop_time - $this->start_time),2);\n\n\t\treturn sprintf('<h2>%s</h2><div class=\"summarize-posts-errors\">%s</div>'\n\t\t\t, __('Execution Time', CCTM_TXTDOMAIN)\n\t\t\t, sprintf(__('%s seconds', CCTM_TXTDOMAIN), $this->duration));\n\t}", "public function timestamp()\n {\n list($uSecond, $second) = explode(' ', microtime());\n return (string) ($second + ($uSecond * 1000000));\n }", "static function getTimeInMs() {\n\t\treturn round(microtime(true) * 1000);\n\t}", "public static function uptime() {\n return sprintf ( '%.6f', microtime ( true ) - microtime(true) );\n }", "static function microtime ()\n\t{\n\t\tlist ($usec, $sec) = explode(' ', microtime());\n\t\t$result = ((float) $usec + (float) $sec) * 1000;\n\t\t\n\t\tstatic $microtime_start;\n\t\tif (empty($microtime_start)) {\n\t\t\t$microtime_start = $result;\n\t\t}\n\t\treturn $result - $microtime_start;\n\t}", "public function getElapsedTimeInMillisecs()\n {\n $seconds = $this->getElapsedTimeInSeconds();\n $milliSeconds = $seconds * self::MILLISEC_PER_SECOND;\n\n return round($milliSeconds, 1);\n }", "function getMilliSecond() {\n\tlist($s1, $s2) = explode(' ', microtime());\n\treturn (float)sprintf('%.0f', (floatval($s1) + floatval($s2)) * 1000);\n}", "private function _getMillisecond()\n {\n\n list($s1, $s2) = explode(' ', microtime());\n return (float)sprintf('%.0f', (floatval($s1) + floatval($s2)) * 1000);\n }", "function GetuTime()\n{\n\tlist($uSec, $Sec)=explode(\" \", microtime()); \n\treturn((float)$uSec+(float)$Sec); \n}", "public static function getTimeFromStart()\n {\n return sprintf('%.0f', (microtime(true) - dm::getStartTime()) * 1000);\n }", "public function elapsedtime() {\n return fmod(floatval($this->servertime()),$this->waitingtime());\n\t}", "public function getMicrotime(){\n\t\t$time = microtime();\n\t\t$time = explode(' ', $time);\n\t\treturn $time[1] + $time[0];\n\t}", "public function getElapsedTime();", "public function getTime()\n {\n return $this->platformSupportsNanoseconds()\n ? hrtime(true)\n : microtime(true);\n }", "public static function currentTimeMillis()\n {\n return microtime(true) * 10000;\n }", "public function getTotalTime()\n {\n return $this->info->total_time * 1000;\n }", "public static function get_elapsed_time()\n {\n return microtime( true ) - $_SESSION['time']['script_start_time'];\n }", "function utime(bool $string = false): float|string\n{\n $time = microtime(true);\n\n return !$string ? $time : sprintf('%.6F', $time);\n}", "public static function totalDuration()\n {\n return microtime(true) - static::initialTime();\n }", "function getMicroTime() {\n list($usec, $sec) = explode(\" \", microtime());\n return ((float) $usec + (float) $sec);\n }", "function microtime(bool $get_as_float = false): string|float {}", "public function microtime();", "public function getRawTime(): float\n {\n return $this->endTime - $this->startTime;\n }", "static private function getmicrotime()\n\t{\n\t\t\tlist($usec, $sec) = explode(\" \",microtime());\n\t\t\treturn ((float)$usec + (float)$sec); \n\t}", "public function execTimeStr()\n {\n $execTime = $this->execTime();\n\n if ($execTime >= 1) {\n return round($execTime, 1).'s';\n } else {\n return round($execTime * 1000, 2).'ms';\n }\n }", "public function time() {\n return $this->info['total_time'];\n }", "public static function milliseconds() {}", "public function getElapsed() {\n if ($this->hasStarted() && $this->hasStopped()) {\n return number_format($this->stoppedAt - $this->startedAt, 7);\n }\n throw new StopwatchException('Cannot get elapsed time, insufficient data');\n }", "function mstime ()\r\n{\r\n\t$t = explode (' ', microtime ());\r\n\treturn (int) (($t[0] + $t[1]) * 1000);\r\n}", "public function getElapsedTimeInSeconds()\n {\n if(!$this->_timeStartInMicroSeconds)\n {\n return 0;\n }\n\n $microSecsStart = $this->_timeStartInMicroSeconds;\n $microSecsStop = $this->_timeStopInMicroSeconds;\n\n if($microSecsStop == 0)\n {\n // The function stopTimer was not called.\n $microSecsStop = microtime(true);\n }\n\n $seconds = $microSecsStop - $microSecsStart;\n\n return round($seconds, 4);\n }", "public function getTimePassed(): float\n {\n if ($this->started) {\n return microtime(true) - $this->start_time;\n } else {\n return $this->stop_time - $this->start_time;\n }\n }", "protected function nowInMilliseconds(): int\n {\n $mt = explode(' ', microtime());\n return ((int) $mt[1]) * 1000 + ((int) round((int) $mt[0] * 1000));\n }", "function getmicrotime() {\n list($usec, $sec) = explode(\" \",microtime());\n return ((float)$usec + (float)$sec);\n }", "private function getMicrotime()\n {\n $mtime = microtime();\n $mtime = explode(\" \",$mtime);\n $mtime = $mtime[1] + $mtime[0];\n\n return $mtime;\n }", "public static function time() {\n if (is_null(self::$_time)) {\n self::$_time = microtime(true);\n } else {\n echo 'Time-Consumed:- ' . (microtime(true) - self::$_time) . PHP_EOL;\n }\n }", "function getSystemTime()\n{\n $time = @gettimeofday();\n $resultTime = $time['sec'] * 1000;\n $resultTime += floor($time['usec'] / 1000);\n return $resultTime;\n}", "function microtime_diff($message, $start, $end = null)\n{\n if (!$end) {\n $end = microtime();\n }\n\n list($start_usec, $start_sec) = explode(\" \", $start);\n list($end_usec, $end_sec) = explode(\" \", $end);\n $diff_sec = intval($end_sec) - intval($start_sec);\n $diff_usec = floatval($end_usec) - floatval($start_usec);\n $value = floatval($diff_sec) + $diff_usec;\n echo $message . ' ' . $value;\n echo PHP_EOL . PHP_EOL;\n}", "protected function getTotalTime()\n {\n return (string) round(array_sum(array_column($this->pdo->getLog(), 'time')), 4);\n }", "public function getTime(): float\n {\n return $this->time;\n }", "public function getTimeElapsed(): string\n {\n $now = new DateTime('now');\n $ago = new DateTime($this->datetime);\n $diff = $ago->diff($now);\n if (!empty($diff->y)) {\n $age = $diff->y . 'year';\n $age = $age . ($diff->y > 1 ? 's' : '');\n } elseif ($diff->m > 0) {\n $age = $diff->m . 'month';\n $age = $age . ($diff->m > 1 ? 's' : '');\n } elseif ($diff->d > 0) {\n $age = $diff->d . 'day';\n $age = $age . ($diff->d > 1 ? 's' : '');\n } elseif ($diff->h > 0) {\n $age = $diff->h . 'hour';\n $age = $age . ($diff->h > 1 ? 's' : '');\n } elseif ($diff->i > 0) {\n $age = $diff->i . 'minute';\n $age = $age . ($diff->i > 1 ? 's' : '');\n } else {\n $age = $diff->s . 'second';\n $age = $age . ($diff->s > 1 ? 's' : '');\n }\n $ageWithPostfix = $age . ' ago';\n return $ageWithPostfix;\n }", "public function getElapsedTime() {\n\t\treturn self::$elapsedTime;\n\t}", "public function totalTimer() {\n return \"It took \" . $this->getTime() . \" seconds to run \" . $this->getName() . \" <br>\";\n }", "function process_time(){\n $time = number_format( microtime(true) - LIM_START_MICROTIME, 6);\n return($time);\n}", "function getTime(){\n\t\t$mtime = microtime();//print(\"\\n time : \" . $mtime);\n\t\t$mtime = explode(' ', $mtime);\n\t\t$mtime = $mtime[1] + $mtime[0];\n\t\treturn $mtime;\n\t}", "function milliseconds()\n{\n $mt = explode(' ', microtime());\n return ((int)$mt[1]) * 1000 + ((int)round($mt[0] * 1000));\n}", "public function microtime()\n\t{\n\t\treturn microtime(true);\n\t}", "function elapsedSeconds() {\n if (null === $this->startMicrotime) {\n throw new InvalidArgumentException(\"Start time was not marked\");\n }\n if (null === $this->endMicrotime) {\n // Not stopped so return time from start to now\n return microtime(true) - $this->startMicrotime;\n }\n // Stopped so show total elapsed time between start and stop\n return $this->endMicrotime - $this->startMicrotime;\n }", "protected function getTime() {\n return microtime(true);\n }", "public static function get_miliseconds_now()\n {\n $milliseconds = round(microtime(true) * 1000);\n return $milliseconds;\n }", "private function getCurrentTime()\n {\n return microtime(true);\n }", "public static function nowInMs(): int\n {\n return ceil(microtime(true) * 1000);\n }", "public function runtime()\n {\n return sprintf('%.5f', ($this->endTime-$this->startTime));\n }", "protected function getTime()\n {\n return microtime(true);\n }", "private function getCurrentTime() {\n return microtime( true );\n }", "public function getTotalSeconds(): float\n {\n return $this->getTotalMilliseconds() / 1000;\n }", "protected function getMicrotimeFloat()\n {\n list ($usec, $sec) = explode(' ', microtime());\n\n return ((float)$usec + (float)$sec);\n }", "static function ms(){\r\n $dm = memory_get_usage() - self::$startmem;\r\n return self::memformat($dm);\r\n }", "public function time()\n\t{\n\t\treturn $this->endTimer-$this->startTimer;\n\t}", "public static function getMicrotime()\n {\n return microtime(true);\n }", "public function duration()\n\t{\n\t\t$dif = $this->runEnd->difference( $this->runStart );\n\n\t\t$minutes = (int) $dif->getMinutes( true );\n\t\t$seconds = $dif->getSeconds( true );\n\n\t\t// Since $seconds includes the minutes, calc the extra\n\t\t$seconds = $seconds - ( $minutes * 60 );\n\n\t\treturn str_pad( (string) $minutes, 2, '0', STR_PAD_LEFT ) . ':' . str_pad( (string) $seconds, 2, '0', STR_PAD_LEFT );\n\t}", "function get_microtime() {\n\t$microtime = microtime();\n\t$microtime = explode(' ', $microtime);\n\t$microtime = $microtime[1] + $microtime[0];\n\treturn $microtime;\n}", "public static function getMicrotime(){\n\t\t$time\t= microtime(true);\n\t\t$micro\t= sprintf('%06d', ($time - floor($time)) * 1000000);\n\t\t$date\t= new DateTime(date('Y-m-d H:i:s.'.$micro, $time));\n\n\t\treturn $date->format('Y-m-d H:i:s.u');\n\t}", "private function elapsed($timer = 'default', $stop = true)\r\n\t{\r\n\t\treturn sprintf($this->getFormat(), static::elapsedRaw($timer, $stop));\r\n\t}", "public function cChrono(){\n\t\treturn round(getMicrotime()-PLX_MICROTIME,3).'s';\n\t}", "public function format(): string\n {\n foreach ($this->times as $unit => $value) {\n if ($this->time >= $value) {\n $time = floor($this->time / $value * 100) / 100;\n return \"{$time} {$unit}\";\n }\n }\n\n return round($this->time * 1000) . \" ms\";\n }", "function getElapsedSeconds() {\n\t\treturn $this->time;\n\t}", "function floattime()\n{\n\tlist($usec, $sec) = explode(\" \", microtime());\n\treturn ((float)$usec + (float)$sec);\n}", "function etime($time_start){\n $time_end = microtime(true);\n $execution_time = ($time_end - $time_start);\n\n return number_format((float) $execution_time, 1);\n}", "public function getTotalTime() {\n return (float) $this->profile->userTotals->totalDuration;\n }", "function getmicrotime(){\r\r\n list($usec, $sec) = explode(\" \",microtime());\r\r\n return ((float)$usec + (float)$sec);\r\r\n}", "function getmicrotime()\n{\n\tlist($usec, $sec) = explode(' ',microtime());\n\treturn ((float)$usec + (float)$sec);\n}", "function getmicrotime(){\r\n\tlist($usec, $sec) = explode(\" \",microtime());\r\n\treturn ((float)$usec + (float)$sec);\r\n}", "public static function timeSinceStart(): float\n {\n return \\microtime(true) - self::getRequestTime();\n }", "protected static function getMicrotime() {\n\t\treturn microtime(true);\n\t}", "abstract public function toMilliseconds();", "public function getTimeDiff()\n {\n $start = ServiceUtil::getManager()->getArgument('debug.toolbar.panel.rendertime.start');\n $end = microtime(true);\n\n $diff = $end - $start;\n return $diff;\n }", "public function getElapsed()\n {\n $elapsedTime = array_sum($this->_totalTime);\n\n // No elapsed time or currently running? take/add current running time\n if ($this->_start !== null) {\n $elapsedTime += microtime(true) - $this->_start;\n }\n\n return $elapsedTime;\n }", "public function getTime()\n {\n $time = 0;\n foreach ($this->data['calls'] as $call) {\n $time += $call['time'];\n }\n\n return $time;\n }", "function timestamp()\n {\n return microtime(true);\n }", "function humanTiming ($time){\n $time = (time()- 2*60*60)- $time; // to get the time since that moment\n $time = ($time<1)? 1 : $time;\n $tokens = array (\n 31536000 => 'year',\n 2592000 => 'month',\n 604800 => 'week',\n 86400 => 'day',\n 3600 => 'hour',\n 60 => 'minute',\n 1 => 'second'\n );\n\n foreach ($tokens as $unit => $text) {\n if ($time < $unit) continue;\n $numberOfUnits = floor($time / $unit);\n return $numberOfUnits.' '.$text.(($numberOfUnits>1)?'s':'');\n }\n }", "public function getTotalTime()\n {\n return 0; //@todo\n }", "public function getTotalRawTime()\n {\n return floatval(\n round($this->start->diffInMinutes($this->end) / 60, 5)\n );\n }", "function getTimeDuration();", "function microtime_float(){\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);}", "function timer(){\n static $start;\n\n if (is_null($start))\n {\n $start = microtime(true);\n }\n else\n {\n $diff = round((microtime(true) - $start), 4);\n $start = null;\n return $diff;\n }\n}", "public function time(): string\n {\n return $this->time;\n }", "function _get_time()\n{\n $_mtime = microtime();\n $_mtime = explode(\" \", $_mtime);\n\n return (double) ($_mtime[1]) + (double) ($_mtime[0]);\n}", "public function nowMicros() {\n // microsecond accuracy (not the current time in microseconds!).\n return floor(microtime(TRUE) * 1000.0 * 1000.0);\n }", "public function microtime_float()\n {\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n }" ]
[ "0.7481391", "0.7460592", "0.74230224", "0.73629326", "0.71875054", "0.71714705", "0.71142924", "0.7083627", "0.704292", "0.7037006", "0.70314384", "0.70150477", "0.69790256", "0.6960451", "0.6941851", "0.6940625", "0.69194883", "0.6918831", "0.6917576", "0.6903698", "0.6892388", "0.6838503", "0.6838077", "0.6826722", "0.68150073", "0.67983675", "0.67789537", "0.676466", "0.67346305", "0.67286545", "0.6718228", "0.6711644", "0.6698927", "0.6680642", "0.6646083", "0.66261417", "0.66241074", "0.6619964", "0.66105676", "0.6585464", "0.65622616", "0.6560844", "0.6553173", "0.65490526", "0.6547903", "0.65360075", "0.65272295", "0.652187", "0.6515448", "0.65143895", "0.6514073", "0.6498521", "0.6488905", "0.64799154", "0.6469314", "0.6466136", "0.6457799", "0.6447736", "0.6444742", "0.64429533", "0.6440922", "0.6427419", "0.6422871", "0.6420597", "0.6414025", "0.6408719", "0.6402962", "0.6400161", "0.6395077", "0.639194", "0.63892853", "0.63783455", "0.6364438", "0.6357576", "0.6355557", "0.6355061", "0.63483137", "0.6347244", "0.63460755", "0.6339876", "0.6339744", "0.63322437", "0.63236547", "0.6323524", "0.6321395", "0.6312525", "0.6306922", "0.6301567", "0.6300532", "0.62841606", "0.62782854", "0.6274734", "0.6259506", "0.6258368", "0.62503654", "0.62395287", "0.6238447", "0.6231002", "0.6229458", "0.62265515" ]
0.73058224
4
Build the main Schema instance that represents the final schema for this endpoint
public function schema() { $queryType = new ObjectType([ 'name' => 'Query', 'fields' => $this->queries, ]); $mutationType = new ObjectType([ 'name' => 'Mutation', 'fields' => $this->mutations, ]); return new Schema([ 'query' => $queryType, 'mutation' => $mutationType, // usually inferred from 'query', but required for polymorphism on InterfaceType-based query results 'types' => $this->types, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function buildSchema()\n {\n $this->setEntityClass('\\\\LogEntries');\n return (new GDS\\Schema('LogEntries'))\n\t\t\t->addString('subject')\n ->addString('severity')\n ->addDatetime('timestamp')\n ->addString('x_details');\n }", "protected function _buildSchema(Schema $schema)\n {\n return $schema;\n }", "public function getSchema() {}", "protected function _buildSchema(Schema $schema)\n {\n return $schema->addField('url', 'string')\n ->addField('webroot', ['type' => 'string'])\n ->addField('force', ['type' => 'boolean']);\n }", "public static function getSchemaBuilder()\n {\n }", "protected function buildSchema(Schema $schema): Schema\n {\n $schema\n ->addField(self::FIELD_NEW_PASSWORD, 'string')\n ->addField(self::FIELD_CONFIRM_PASSWORD, 'string')\n ->addField(self::FIELD_POSTCODE, 'string');\n\n return $schema;\n }", "public function generateSchema(): array\n {\n if (! $this->context->get('is_entry')) {\n return [];\n }\n\n // Site owner: Organization/Person.\n $siteOwner = $this->generateOwnerSchema();\n\n // WebSite.\n $website = $this->generateWebSiteSchema();\n $website->addData('publisher', ['@id' => $siteOwner->getData('@id')]);\n\n // WebPage.\n $webpage = $this->generateWebPageSchema();\n $webpage->addData('isPartOf', ['@id' => $website->getData('@id')]);\n $webpage->addData('about', ['@id' => $siteOwner->getData('@id')]);\n\n // Article (Posts collection only).\n $article = null;\n\n if ($this->context->get('collection')->handle() === 'posts') {\n $article = $this->generateArticleSchema();\n $article->addData('mainEntityOfPage', ['@id' => $webpage->getData('@id')]);\n $article->addData('publisher', ['@id' => $siteOwner->getData('@id')]);\n }\n\n // Featured image.\n $primaryImage = $this->generateFeaturedImageSchema();\n\n // Schema Graph\n $schema = new Schema();\n $schema->addGraph($siteOwner);\n $schema->addGraph($website);\n $schema->addGraph($webpage);\n $schema->addGraph($article);\n\n if ($primaryImage) {\n $webpage->addData('primaryImageOfPage', ['@id' => $primaryImage->getData('@id')]);\n $article->addData('image', ['@id' => $primaryImage->getData('@id')]);\n\n $schema->addGraph($primaryImage);\n }\n\n return array_filter([\n $schema->generate(),\n $this->getAdditionalSchema()\n ]);\n }", "public static function getSchema()\n {\n }", "public function build()\n {\n return $this->schema->toArray();\n }", "public function getSchema(): Schema;", "public function schema();", "public function getSchemaBuilder()\n {\n return new Schema\\Builder($this);\n }", "public function compileSchema();", "public function getSchema();", "public function getSchema();", "public function getSchema();", "public function getSchema()\n {\n $schema = new Schema();\n\n $table = $schema->createTable('shop_products');\n\n foreach ($this->fields as $metadata) {\n $table->addColumn($metadata['column'], $metadata['type'], array(\n 'notnull' => $metadata['notnull'],\n 'autoincrement' => ($metadata['column'] === 'p_id')\n ));\n }\n\n $table->setPrimaryKey(array('p_id'));\n $table->addIndex(array('p_category'));\n\n $table = $schema->createTable('shop_bepado_attributes');\n $table->addColumn('p_id', 'integer');\n $table->addColumn('sba_bepado_shop_id', 'string');\n $table->addColumn('sba_bepado_source_id', 'string');\n $table->setPrimaryKey(array('p_id'));\n $table->addIndex(array('sba_bepado_shop_id', 'sba_bepado_source_id'));\n\n $table = $schema->createTable('shop_bepado_exported');\n $table->addColumn('p_id', 'integer');\n $table->setPrimaryKey(array('p_id'));\n\n return $schema;\n }", "public function getSchema(): Schema\n {\n if ($this->_schema === null) {\n $this->_schema = $this->_initializeSchema($this->getWebservice()->describe($this->getName()));\n }\n\n return $this->_schema;\n }", "protected function postSchema() {\n return $this->schemaPoster->postSchema($this->configuration['schema']);\n }", "public static function get_schema()\n {\n }", "private function makeSchema() {\n return (new Schema('reviews'))\n ->addInteger('id')\n ->addInteger('toyId')\n ->addInteger('userid')\n ->addString('username')\n ->addString('reviewText')\n ->addInteger('rating')\n ;\n }", "private function resolveSchema() : Schema\n {\n return resolve('Schema');\n }", "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "protected function createSchema()\n {\n $schema = new ModelSchema(\"Rental\");\n $schema->addColumn(\n new AutoIncrementColumn(\"RentalID\"),\n new ForeignKeyColumn(\"ClientID\")\n );\n return $schema;\n }", "public function fullSchema() {\n if (!isset($this->fullSchema)) {\n $this->fullSchema = $this->schema([\n 'accessTokenID:i' => 'The unique numeric ID.',\n 'name:s|n' => 'A user-specified label.',\n 'dateInserted:dt' => 'When the token was generated.'\n ], 'Token');\n }\n return $this->fullSchema;\n }", "public abstract function getSchemaListToGenerate();", "private function createSchema()\n {\n $tool = new SchemaTool($this->container->get('models'));\n $classes = [\n $this->container->get('models')->getClassMetadata(Store::class),\n ];\n $tool->updateSchema($classes, true);\n }", "public function get_schema()\n {\n }", "public function getSchema(): Schema\n {\n if ($this->schema === null) {\n $this->schema = new Schema($this);\n }\n\n return $this->schema;\n }", "public function create(): ISchema;", "function raptor_scheduling_schema()\n{\n $schema = array();\n\n $oSH = new \\raptor_sched\\DBScheduleSchema();\n $oSH->addToSchema($schema);\n \n return $schema;\n}", "public function getSchemaBuilder()\n {\n $builder = parent::getSchemaBuilder();\n $builder->blueprintResolver(function($table, $callback){\n return new Blueprint($table, $callback);\n });\n return $builder;\n }", "public function createSchema() : string;", "public static function get_static_schema()\n {\n }", "protected function schemaDefinition() {\n $schema = parent::schemaDefinition();\n\n $schema['views_test_data']['fields']['uid'] = [\n 'description' => \"The {users}.uid of the author of the beatle entry.\",\n 'type' => 'int',\n 'unsigned' => TRUE,\n 'not null' => TRUE,\n 'default' => 0,\n ];\n\n return $schema;\n }", "protected function createSchema()\n {\n $schema = new ModelSchema(\"Contact\");\n $schema->addColumn(\n new AutoIncrementColumn(3),\n new StringColumn( \"Name\", 100 ),\n new DateColumn( \"DateOfBirth\" ),\n new ForeignKeyColumn( \"OrganisationID\" )\n );\n\n $schema->labelColumnName = \"Name\";\n\n return $schema;\n }", "public static function build(array $introspectionQuery, array $options = []) : \\GraphQL\\Type\\Schema\n {\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schema;\n }", "protected function updateSchema() {\n $params = array();\n if(self::$schemaLanguage != null) {\n $params['language'] = self::$schemaLanguage;\n }\n $result = WebApi::getJSONData('ITFItems_440', 'GetSchema', 1, $params);\n\n self::$attributeSchema = array();\n foreach($result->attributes->attribute as $attributeData) {\n self::$attributeSchema[$attributeData->name] = $attributeData;\n }\n\n self::$itemSchema = array();\n foreach($result->items->item as $itemData) {\n self::$itemSchema[$itemData->defindex] = $itemData;\n }\n\n self::$qualities = array();\n foreach($result->qualities as $quality => $id) {\n self::$qualities[$id] = $quality;\n }\n }", "public static function schemaDef()\n {\n return array(\n 'description' => 'Record of answers to questions',\n 'fields' => array(\n 'id' => array(\n 'type' => 'char',\n 'length' => 36,\n 'not null' => true, 'description' => 'UUID of the response'),\n 'uri' => array(\n 'type' => 'varchar',\n 'length' => 255,\n 'not null' => true,\n 'description' => 'UUID to the answer notice'\n ),\n 'question_id' => array(\n 'type' => 'char',\n 'length' => 36,\n 'not null' => true,\n 'description' => 'UUID of question being responded to'\n ),\n 'content' => array('type' => 'text'), // got a better name?\n 'best' => array('type' => 'int', 'size' => 'tiny'),\n 'revisions' => array('type' => 'int'),\n 'profile_id' => array('type' => 'int'),\n 'created' => array('type' => 'datetime', 'not null' => true),\n ),\n 'primary key' => array('id'),\n 'unique keys' => array(\n 'question_uri_key' => array('uri'),\n 'question_id_profile_id_key' => array('question_id', 'profile_id'),\n ),\n 'indexes' => array(\n 'profile_id_question_id_index' => array('profile_id', 'question_id'),\n )\n );\n }", "public function getSchema()\n {\n return $this->get(self::SCHEMA);\n }", "public function getSchema()\n {\n if (empty($this->schema)) {\n return 'public';\n } else {\n return $this->schema;\n }\n }", "public function get_instance_schema()\n {\n }", "public function get_instance_schema()\n {\n }", "public function get_instance_schema()\n {\n }", "public function get_instance_schema()\n {\n }", "public function get_instance_schema()\n {\n }", "function schema_build($entity_type) {\n $instanceArgs = array(\n 'entity_type' => $entity_type,\n );\n $factoryArgs = array(\n 'entity_type' => $entity_type,\n 'instance_args' => $instanceArgs\n );\n $builder = hook_get_builder('schema', $factoryArgs);\n\n return $builder->build();\n}", "public function createSchema(): OpenApi\n {\n }", "public function createSchema(){\n //meta Data\n $this->rowNames = array_merge($this->rowNames,array(\n array(\"name\" => \"timestamp\" , \"type\" => \"timestamp\" ),\n array(\"name\" => \"user_id\" , \"type\" => \"number\" ),\n array(\"name\" => \"status\" , \"type\" => \"number\" ),\n array(\"name\" => \"checked_by_user\" , \"type\" => \"number\" )\n \n ));\n\n \t//geo Data\n $this->rowNames = array_merge($this->rowNames,array(\n array(\"name\" => \"_div\" , \"type\" => \"number\" ),\n array(\"name\" => \"_dist\" , \"type\" => \"number\" ),\n array(\"name\" => \"_upz\" , \"type\" => \"number\" ),\n array(\"name\" => \"_union\" , \"type\" => \"number\" ),\n array(\"name\" => \"_geoProxy\" , \"type\" => \"text\" )\n ));\n \n \n //form Data\n foreach ($this->keys as $key => $value) {\n //if not array simple\n if($value[\"type\"]!=\"textarray\"){\n $row = [];\n $row[\"name\"] = $key;\n $row[\"type\"] = $value[\"type\"];\n $this->rowNames[]=$row;\n }\n else{\n $types = explode(\"~\",$value[\"subtype\"]);\n for ($i=0; $i<$value[\"size\"]; $i++){\n $row=[];\n $row[\"name\"] = $key . \"_\" . $i;\n $row[\"type\"] = (isset($types[$i])? $types[$i] : $types[0]);\n $this->rowNames[]=$row;\n }\n }\n }\n \n \n// var_dump($this->rowNames);\n }", "public function schema()\n\t{\n\t\treturn $this->schema;\n\t}", "abstract protected function getSchema(): string;", "protected static function generateSchema()\n {\n if (!static::$kernel instanceof \\Symfony\\Component\\HttpKernel\\KernelInterface) {\n static::$kernel = static::createKernel();\n }\n\n /**\n * @var \\Doctrine\\ORM\\EntityManager\n */\n $em = static::$kernel->getContainer()->get('doctrine.orm.entity_manager');\n\n // Get the metadata of the application to create the schema.\n $metadata = $em->getMetadataFactory()->getAllMetadata();\n\n if (!empty($metadata)) {\n // Create SchemaTool\n $tool = new SchemaTool($em);\n $tool->dropDatabase();\n $tool->createSchema($metadata);\n } else {\n throw new SchemaException('No Metadata Classes to process.');\n }\n }", "public function getSchema(): SchemaInterface;", "public function getSchema()\n {\n if ($this->schema) {\n return $this->schema;\n }\n\n return $this->schema = resolve(Bakery::getModelSchema($this));\n }", "public function get_schema() {\n\t\treturn $this->schema;\n\t}", "public function set(){\n\n /**\n * New Schema or Connect to existing schema\n */\n\n $schema = new Schema('Staff');\n $schema->destroy('id');\n $schema->build('id')->Primary()->Integer()->AutoIncrement();\n $schema->build('firstname')->String();\n $schema->build('lastname')->String();\n $schema->build('email')->String()->Unique();\n $schema->build('password')->String();\n $schema->build('IPPIS_NO')->String()->Unique(); \n $schema->build('religion')->String();\n $schema->build('denomination')->String();\n $schema->build('residential_address')->String();\n $schema->build('oauth_file_no')->String();\n $schema->build('Staff_rank')->String();\n $schema->build('department')->String();\n $schema->build('last_seen')->Timestamp();\n $schema->build('created_at')->Timestamp();\n }", "public function createSchema($schemaName = 'public');", "private function assignSchema(): void\n {\n $action = strtolower($this->route->getAction());\n $crudActions = ['index','add','view','edit'];\n\n if (!$this->schema || $this->operation->hasSuccessResponseCode() || !in_array($action, $crudActions)) {\n return;\n }\n\n $response = (new Response())->setCode('200');\n\n foreach ($this->config->getResponseContentTypes() as $mimeType) {\n $schema = $this->getMimeTypeSchema($mimeType, $action);\n $response->pushContent(\n (new Content())\n ->setSchema($schema)\n ->setMimeType($mimeType)\n );\n }\n\n $this->operation->pushResponse($response);\n }", "function getToSchema() {\n\t\treturn $this->_toSchema;\n\t}", "protected function _getSchema() {\n\t\treturn $this->__schema;\n\t}", "public function getExpectedDatabaseSchema() {}", "public function getSchema()\n {\n return $this->source;\n }", "protected function createSchema()\n {\n $schema = new ModelSchema(\"Manufacturer\");\n $schema->addColumn(\n new AutoIncrementColumn(\"ManufacturerID\"),\n new StringColumn(\"ManufacturerName\", 30)\n );\n $schema->labelColumnName = \"ManufacturerName\";\n return $schema;\n }", "function exportSchema(){\n\t\t\t$this->exportsSchema=true;\n\t\t\t$this->slugField='slug';\n\t\t\t$this->spaceCharacter='-';\n\t\t}", "public function buildSchema()\n {\n $tables['create_function'] = [\n 'civicrm_contact' => [\n 'name' => 'civicrm_contact',\n 'fields' => [\n 'civicrm_strip_non_numeric' => [\n 'name' => 'civicrm_strip_non_numeric',\n 'sql_up' => \"\n CREATE FUNCTION civicrm_strip_non_numeric(input VARCHAR(255) CHARACTER SET utf8)\n RETURNS VARCHAR(255) CHARACTER SET utf8\n DETERMINISTIC\n NO SQL\n BEGIN\n DECLARE output VARCHAR(255) CHARACTER SET utf8 DEFAULT '';\n DECLARE iterator INT DEFAULT 1;\n WHILE iterator < (LENGTH(input) + 1) DO\n IF SUBSTRING(input, iterator, 1) IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9') THEN\n SET output = CONCAT(output, SUBSTRING(input, iterator, 1));\n END IF;\n SET iterator = iterator + 1;\n END WHILE;\n RETURN output;\n END;\n \",\n 'sql_down' => \"DROP FUNCTION IF EXISTS civicrm_strip_non_numeric;\",\n ]\n ]\n ]\n ];\n \n return $tables;\n }", "public function getSchemaBuilder() : BuilderInterface;", "public function getDBAMLSchemaObj(\\Utopia\\Components\\DataModel\\DataSchema $schema) {\n $Schema = new Schema();\n $tables = array();\n $entities = $schema->getEntityNames();\n\n //FIELDS\n foreach($entities as $entity) {\n if (in_array($entity, array('types', 'options'))) {\n continue;\n }\n\n $rec = $schema->getSchema($entity);\n $tables[$entity] = $Schema->createTable($schema->getTableName($entity));\n\n //FIXME: not working: add table options\n foreach ($schema->getSchemaOptions() as $key => $val) {\n $tables[$entity]->addOption($key, $val);\n }\n\n $primary = array();\n $index = array();\n $uniqueindex = array();\n\n foreach ($rec['fields'] as $name => $spec) {\n preg_match_all('/(\\w*)(\\((\\d*)\\))?/', $spec['type'], $arr, PREG_PATTERN_ORDER);\n $type = $arr[1][0];\n\n //column\n $opts = isset($spec['opts'])? $spec['opts']: array();\n //length\n if (isset($arr[3][0]) && !empty($arr[3][0])) {\n $opts['length'] = $arr[3][0];\n }\n //null\n if (isset($spec['req']) && $spec['req']==true) {\n $opts['notnull'] = true;\n } else {\n $opts['notnull'] = false;\n }\n //unsigned\n if (isset($spec['unsigned'])) {\n $opts['unsigned'] = $spec['unsigned'];\n }\n //fixed\n if (isset($spec['fixed'])) {\n $opts['fixed'] = $spec['fixed'];\n }\n //def\n if (isset($spec['def'])) {\n $opts['default'] = $spec['def'];\n }\n //autoincrement (not working)\n if (isset($spec['autoincrement']) && $spec['autoincrement']==true) {\n $opts['autoincrement'] = true;\n $tables[$entity]->setIdGeneratorType(\\Doctrine\\DBAL\\Schema\\Table::ID_IDENTITY);\n }\n\n $tables[$entity]->addColumn($name, $type, $opts);\n\n //primary\n if (isset($spec['primary']) && $spec['primary']==true) {\n $primary[] = $name;\n }\n\n //uniqueindex\n if (isset($spec['uniqueindex']) && $spec['uniqueindex']==true) {\n $uniqueindex[] = $name;\n }\n\n //index\n if (isset($spec['index']) && $spec['index']==true) {\n $index[] = $name;\n }\n }\n\n if (!empty($primary)) {\n $tables[$entity]->setPrimaryKey($primary);\n }\n if (!empty($uniqueindex)) {\n $tables[$entity]->addUniqueIndex($uniqueindex);\n }\n if (!empty($index)) {\n $tables[$entity]->addIndex($index);\n }\n }\n\n //RELATIONSHIPS\n foreach($entities as $entity) {\n if (in_array($entity, array('types', 'options'))) {\n continue;\n }\n\n $rec = $schema->getSchema($entity);\n foreach ($rec['relationships'] as $field => $spec) {\n $tables[$entity]->addForeignKeyConstraint($tables[$spec['foreigntable']], array($field), array($spec['foreignfield']), array(\"onUpdate\" => \"CASCADE\"));\n }\n }\n return $Schema;\n }", "protected function createSchema()\n {\n if (!$this->loadSchema()) {\n return $this;\n }\n\n static::$application->run(new ArrayInput([\n 'command' => 'doctrine:database:drop',\n '--no-interaction' => true,\n '--force' => true,\n '--quiet' => true,\n ]));\n\n static::$application->run(new ArrayInput([\n 'command' => 'doctrine:database:create',\n '--no-interaction' => true,\n '--quiet' => true,\n ]));\n\n static::$application->run(new ArrayInput([\n 'command' => 'doctrine:schema:create',\n '--no-interaction' => true,\n '--quiet' => true,\n ]));\n\n $this->loadFixtures();\n\n return $this;\n }", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) {\n $this->useDefaultSchemaGrammar();\n }\n\n return new SchemaBuilder($this);\n }", "public function getSchemaBuilder()\n\t{\n return $this->neoeloquent->getSchemaBuilder();\n\t}", "public function getSchema() {\n\t\tif (empty($this->mSchema['subproject_content_data'])) {\n\n\t \t\t/* Schema for subproject_content_id */\n\t\t\t$this->mSchema['subproject_content_data']['subproject_content_id'] = array(\n\t\t\t\t'name' => 'subproject_content_id',\n\t\t\t\t'type' => 'reference',\n\t\t\t\t'label' => 'Sub Projects',\n\t\t\t\t'help' => 'Select the sub-projects this content belongs to',\n\t\t\t\t'table' => 'liberty_content',\n\t\t\t\t'column' => 'content_id',\n\t\t\t\t'required' => '1'\n\t\t\t);\n\t\t}\n\n\n\t\treturn $this->mSchema;\n\t}", "protected function makeModelSchemas()\n {\n $modelSchemas = new ModelSchemas();\n\n $this->modelReflections()->each(function(MezzoModelReflection $modelReflection) use ($modelSchemas){\n $modelSchemas->addSchema($modelReflection->schema());\n });\n\n\n return $modelSchemas;\n }", "public function getSchema(): string;", "public function getSchema(): string;", "final public static function getSchema()\n\t{\n\t\t$definition = static::define();\n\n\t\tforeach ( static::$id as $property )\n\t\t\tif ( !array_key_exists( $property, $definition ) ) {\n\t\t\t\tif ( $property === 'id' )\n\t\t\t\t\t// apply property \"id\" implicitly here\n\t\t\t\t\t// (don't rely on connection adding implicitly\n\t\t\t\t\t// here for keeping this code independent from that code)\n\t\t\t\t\t$definition['id'] = 'INTEGER NOT NULL';\n\t\t\t\telse\n\t\t\t\t\tthrow new model_exception( 'missing ID property in schema definition' );\n\t\t\t}\n\n\t\treturn $definition;\n\t}", "protected function _initDbSchema() {\n\t\tif (!empty($this->schema)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t#################################################################\n\t\t#\n\t\t# TABLE: feed\n\t\t#\n\t\t\n\t\t$this->schema['feed']['create'] = <<<SQL\nCREATE TABLE IF NOT EXISTS `feed` (\n\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n\turl VARCHAR(255) UNIQUE,\n\ttitle VARCHAR(255),\n\t\n\ttype VARCHAR(1),\n\tstatus VARCHAR(1),\n\tcreated DATETIME,\n\tlastUpdated DATETIME,\n\n\tlastPolled DATETIME,\n\tnextPoll DATETIME\n);\nSQL;\n\n\t\t$this->schema['feed']['add'] = <<<SQL\nINSERT INTO `feed` \n(id, url, title, type, status, created, lastUpdated, lastPolled, nextPoll)\nVALUES\n(NULL, :url, :title, :type, :status, \n :created, :lastUpdated, :lastPolled, :nextPoll);\nSQL;\n\n\t\t$this->schema['feed']['updatePoll'] = <<<SQL\nUPDATE `feed` \nSET\n\tlastUpdated = :lastUpdated,\n\tlastPolled = :lastPolled\nWHERE\n\tid = :id\nSQL;\n\n\t\t$this->schema['feed']['getAll'] = <<<SQL\nSELECT * FROM `feed`;\nSQL;\n\n\t\t$this->schema['feed']['getById'] = <<<SQL\nSELECT * FROM `feed`\nWHERE\n\tid = :id;\nSQL;\n\n\t\t$this->schema['feed']['getByUrl'] = <<<SQL\nSELECT * FROM `feed`\nWHERE\n\turl = :url;\nSQL;\n\n\t\t$this->schema['feed']['deleteById'] = <<<SQL\nDELETE FROM `feed`\nWHERE\n\tid = :id;\nSQL;\n\n\t\t$this->schema['feed']['deleteByUrl'] = <<<SQL\nDELETE FROM `feed`\nWHERE\n\turl = :url;\nSQL;\n\n\t\t#################################################################\n\t\t#\n\t\t# TABLE: author\n\t\t#\n\n\t\t$this->schema['author']['create'] = <<<SQL\nCREATE TABLE IF NOT EXISTS `author` (\n\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n\tname VARCHAR(255),\n\turl VARCHAR(255),\n\temail VARCHAR(255),\n\t\n\tUNIQUE(name, url)\n);\nSQL;\n\n\t\t$this->schema['author']['add'] = <<<SQL\nINSERT INTO `author`\n(id, name, url, email)\nVALUES\n(NULL, :name, :url, :email)\nSQL;\n\n\t\t$this->schema['author']['getAll'] = <<<SQL\nSELECT * FROM `author`;\nSQL;\n\n\t\t$this->schema['author']['getByName'] = <<<SQL\nSELECT * FROM `author`\nWHERE\n\tname = :name;\nSQL;\n\n\t\t$this->schema['author']['getById'] = <<<SQL\nSELECT * FROM `author`\nWHERE\n\tid = :id;\nSQL;\n\n\t\t$this->schema['author']['deleteByName'] = <<<SQL\nDELETE FROM `author`\nWHERE\n\tname = :name;\nSQL;\n\n\t\t$this->schema['author']['deleteById'] = <<<SQL\nDELETE FROM `author`\nWHERE\n\tid = :id;\nSQL;\n\n\n\t\t#################################################################\n\t\t#\n\t\t# TABLE: entry\n\t\t#\n\t\t\n\t\t$this->schema['entry']['create'] = <<<SQL\nCREATE TABLE IF NOT EXISTS `entry` (\n\trow_id INTEGER PRIMARY KEY AUTOINCREMENT,\n\turl VARCHAR(255),\n\ttitle VARCHAR(255),\n\tid VARCHAR(255) UNIQUE,\n\tauthor_id INTEGER,\n\tsummary TEXT,\n\tcontent TEXT,\n\tpublished DATETIME,\n\tupdated DATETIME\n\n);\nSQL;\n\n\t\t$this->schema['entry']['add'] = <<<SQL\nINSERT INTO `entry`\n(row_id, url, title, id, author_id, summary, content, published, updated)\nVALUES\n(NULL, :url, :title, :id, :author_id, :summary, :content, :published, :updated)\nSQL;\n\n\t\t$this->schema['entry']['getAll'] = <<<SQL\nSELECT * FROM `entry`;\nSQL;\n\n\t\t// TODO: Add join for author id\n\t\t$this->schema['entry']['getById'] = <<<SQL\nSELECT * FROM `entry`\nWHERE\n\trow_id = :row_id;\nSQL;\n\n\t\t// TODO: Add join for author id\n\t\t$this->schema['entry']['getByAtomId'] = <<<SQL\nSELECT * FROM `entry`\nWHERE\n\tid = :id;\nSQL;\n\n\t\t$this->schema['entry']['deleteById'] = <<<SQL\nDELETE FROM `entry`\nWHERE\n\trow_id = :row_id;\nSQL;\n\n\t\t$this->schema['entry']['deleteByAtomId'] = <<<SQL\nDELETE FROM `entry`\nWHERE\n\tid = :id;\nSQL;\n\n\n\n\t\t#################################################################\n\t\t#\n\t\t# TABLE: feedentry\n\t\t#\n\t\t\n\t\t$this->schema['feedentry']['create'] = <<<SQL\nCREATE TABLE IF NOT EXISTS `feedentry` (\n\tfeed_id INTEGER,\n\tentry_id INTEGER,\n\tcreated DATETIME,\n\n\tPRIMARY KEY(feed_id, entry_id)\t\n);\nSQL;\n\n\t$this->schema['feedentry']['add'] = <<<SQL\nINSERT INTO `feedentry`\n(feed_id, entry_id, created)\nVALUES\n(:feed_id, :entry_id, :created)\nSQL;\n\n\t$this->schema['feedentry']['getByFeedUrl'] = <<<SQL\nSELECT \n\trow_id, entry.url, entry.title, entry.id, \n\tauthor_id, summary, content,\n\tentry.published, entry.updated\nFROM entry\nLEFT JOIN feedentry ON entry.row_id = feedentry.entry_id\nLEFT JOIN feed ON feedentry.feed_id = feed.id\nWHERE\n\tfeed.url = :feed_url\nORDER BY entry.published DESC\nSQL;\n\n\n\t}", "public function initialize(){\n $this->setSchema(\"\");\n }", "public function parse(): ResponseSchema\n {\n return new ResponseSchema();\n }", "protected function accountGetAdHocSchemaRequest()\n {\n\n $resourcePath = '/Account/$adHocSchema';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "function schema_alter_build(&$schema, $entity_type) {}", "public function createSchema()\n {\n $this->schema()->create('users', function ($table) {\n $table->increments('id');\n $table->string('email')->unique();\n $table->timestamps();\n });\n\n $this->schema()->create('users_created_at', function ($table) {\n $table->increments('id');\n $table->string('email')->unique();\n $table->string('created_at');\n });\n\n $this->schema()->create('users_updated_at', function ($table) {\n $table->increments('id');\n $table->string('email')->unique();\n $table->string('updated_at');\n });\n }", "public function getSchema()\r\n {\r\n // if existed (like post): begiresh va be view pass bede\r\n // if not (like blog,index): default schema template\r\n // include schema.view\r\n }", "public function getSchemaBuilder()\n {\n if ( is_null ( $this->schemaGrammar ) ) {\n $this->useDefaultSchemaGrammar ();\n }\n return new Schema\\Builder ( $this );\n }", "public function get_field_schema()\n {\n }", "function getBodySchema()\r\n {\r\n }", "protected function makeRelationSchemas()\n {\n $modelSchemas = $this->makeModelSchemas();\n\n }", "public static function schemaDef()\n {\n return array(\n 'fields' => array(\n 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'),\n 'context' => array('type' => 'varchar','length' => 128, 'description' => 'string context'),\n 'str' => array('type' => 'varchar','length' => 128, 'not null' => true, 'description' => 'string to be translated'),\n 'lang' => array('type' => 'varchar', 'not null' => true, 'length' => 2, 'description' => 'string lang'),\n 'translation' => array('type' => 'varchar', 'not null' => true, 'length' => 4000, 'description' => 'translated string'),\n 'original_text' => array('type' => 'varchar', 'not null' => true, 'length' => 4000, 'description' => 'original string'),\n 'translated' => array('type'=>'tinyint','length'=>'1','description'=>'Stringa tradotta'),\n 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),\n 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified')\n ),\n 'primary key' => array('id'),\n 'unique keys' => array('lang_str'=>array('lang','context', 'str'))\n \n );\n }", "public static function schema() {\n\t\treturn array(\n\t\t\t'type' => 'object',\n\t\t\t'properties' => array(\n\t\t\t\t'attributes' => array(\n\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t'additionalProperties' => array(\n\t\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t\t'properties' => array(\n\t\t\t\t\t\t\t'attribute' => array(\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'multiline' => array(\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'query' => array(\n\t\t\t\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'selector' => array(\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'source' => array(\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t'enum' => array( 'attribute', 'text', 'html', 'query' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'type' => array(\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t'enum' => array( 'null', 'boolean', 'object', 'array', 'number', 'string', 'integer' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'required' => array( 'type' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'category' => array(\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t),\n\t\t\t\t'comment' => array(\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t),\n\t\t\t\t'description' => array(\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t),\n\t\t\t\t'editorScript' => array(\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'pattern' => '\\.js$',\n\t\t\t\t),\n\t\t\t\t'editorStyle' => array(\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'pattern' => '\\.css$',\n\t\t\t\t),\n\t\t\t\t'example' => array(\n\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t'additionalProperties' => array(\n\t\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'icon' => array(\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t),\n\t\t\t\t'keywords' => array(\n\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t'items' => array(\n\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'name' => array(\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t),\n\t\t\t\t'parent' => array(\n\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t'items' => array(\n\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'script' => array(\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'pattern' => '\\.js$',\n\t\t\t\t),\n\t\t\t\t'style' => array(\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'pattern' => '\\.css$',\n\t\t\t\t),\n\t\t\t\t'styles' => array(\n\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t'items' => array(\n\t\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t\t'properties' => array(\n\t\t\t\t\t\t\t'isDefault' => array(\n\t\t\t\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'label' => array(\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'name' => array(\n\t\t\t\t\t\t\t\t'type' => 'string',\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'supports' => array(\n\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t'properties' => array(\n\t\t\t\t\t\t'align' => array(\n\t\t\t\t\t\t\t'type' => array( 'boolean', 'array' ),\n\t\t\t\t\t\t\t'items' => array(\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t'enum' => array( 'left', 'center', 'right', 'wide', 'full' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'alignWide' => array(\n\t\t\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'anchor' => array(\n\t\t\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'className' => array(\n\t\t\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'customClassName' => array(\n\t\t\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'html' => array(\n\t\t\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'inserter' => array(\n\t\t\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'multiple' => array(\n\t\t\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'reusable' => array(\n\t\t\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'textdomain' => array(\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t),\n\t\t\t\t'title' => array(\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'required' => array( 'name', 'title' ),\n\t\t\t'additionalProperties' => false,\n\t\t);\n\t}", "public function schema()\n {\n return [\n 'post' => [\n 'name' => 'string', \n 'surname' => 'string', \n 'description' => 'string', \n 'gender' => 'string[male|female]', \n 'phone' => 'string', \n 'email' => 'string[email]', \n 'pobox' => 'string', \n 'group_id' => 'number',\n 'address' => [\n 'billing' => [\n 'name' => 'string',\n 'surname' => 'string',\n 'phone' => 'string',\n 'address_1' => 'string',\n 'address_2' => 'string',\n 'country' => 'string',\n 'city' => 'string',\n 'pobox' => 'string',\n 'company' => 'string',\n ], \n 'shipping' => [\n 'name' => 'string',\n 'surname' => 'string',\n 'phone' => 'string',\n 'address_1' => 'string',\n 'address_2' => 'string',\n 'country' => 'string',\n 'city' => 'string',\n 'pobox' => 'string',\n 'company' => 'string',\n ]\n ]\n ], \n 'put' => [\n 'name' => 'string', \n 'surname' => 'string', \n 'description' => 'string', \n 'gender' => 'string[male|female]', \n 'phone' => 'string', \n 'email' => 'string[email]', \n 'pobox' => 'string', \n 'group_id' => 'number'\n ]\n ];\n }", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) {\n $this->useDefaultSchemaGrammar();\n }\n\n $builder = new SQLiteBuilder($this);\n $builder->blueprintResolver(function ($table, $callback) {\n return new ExtendedBlueprint($table, $callback);\n });\n\n return $builder;\n }", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) { $this->useDefaultSchemaGrammar(); }\n\n //return new Schema\\Builder($this);\n return new FBBuilder($this);\n }", "function __initTransSchema() {\n\t\t$fields = $this->settings[$this->model->alias]['fields'];\n\t\t$primary = $this->model->primaryKey;\n\t\t$results = array();\n\t\t$schema = $this->model->_schema;\n\t\t$results = am($results, $this->__setSchemaField($primary, $schema[$primary]));\n\t\tforeach ($schema as $fieldname => $descArray) {\n\t\t\tif (!empty($fields)) {\n\t\t\t\tif (array_key_exists($fieldname, $fields)) {\n\t\t\t\t\t$results = am($results, $this->__setSchemaField($fieldname, $descArray));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($fieldname !== $primary) {\n\t\t\t\t\t$results = am($results, $this->__setSchemaField($fieldname, $descArray));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->__transSchema = $results;\n\t}" ]
[ "0.6815099", "0.6651779", "0.657816", "0.65757114", "0.6536738", "0.6489927", "0.6483348", "0.647897", "0.6416798", "0.64158356", "0.63528144", "0.6348826", "0.6330172", "0.6278713", "0.6278713", "0.6278713", "0.6277286", "0.62501186", "0.6221811", "0.61739635", "0.6163045", "0.61452246", "0.6139291", "0.6139291", "0.6139291", "0.61298084", "0.61095315", "0.61024946", "0.60583866", "0.6031892", "0.59798896", "0.597355", "0.595667", "0.59196407", "0.59043807", "0.5895193", "0.58784753", "0.5856094", "0.5842529", "0.58312434", "0.58312434", "0.58312434", "0.58312434", "0.58312434", "0.58312434", "0.58307564", "0.58255196", "0.58015877", "0.5797451", "0.5793248", "0.5793248", "0.5793248", "0.5793248", "0.5793248", "0.5792137", "0.5781684", "0.5779039", "0.5764906", "0.5754768", "0.57522404", "0.573874", "0.57362986", "0.5686476", "0.5683098", "0.56751925", "0.5653213", "0.56516767", "0.5631918", "0.56291354", "0.5617949", "0.5614069", "0.56005204", "0.56002307", "0.55816233", "0.5567241", "0.5556836", "0.55555224", "0.5554036", "0.5541757", "0.55304873", "0.55302024", "0.55302024", "0.5529475", "0.5528632", "0.55228007", "0.55227524", "0.55110437", "0.5489524", "0.547219", "0.54703367", "0.5469582", "0.545506", "0.54529554", "0.54431576", "0.5442487", "0.5442285", "0.54394096", "0.543816", "0.5436817", "0.54294276" ]
0.67535627
1
Execute an arbitrary operation (mutation / query) on this schema
public function query($query, $params = []) { $executionResult = $this->queryAndReturnResult($query, $params); if (!empty($executionResult->errors)) { return [ 'data' => $executionResult->data, 'errors' => array_map($this->errorFormatter, $executionResult->errors), ]; } else { return [ 'data' => $executionResult->data, ]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function executeOperation(\\GraphQL\\Server\\ServerConfig $config, \\GraphQL\\Server\\OperationParams $op)\n {\n }", "public function operation($operation);", "abstract public function exec($query='');", "public function execute(): Statement;", "public function execute($query);", "abstract public function execute($query);", "public static function execute(\\GraphQL\\Type\\Schema $schema, \\GraphQL\\Language\\AST\\DocumentNode $documentNode, $rootValue = null, $contextValue = null, $variableValues = null, $operationName = null, ?callable $fieldResolver = null)\n {\n }", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public static function executeQuery(\\GraphQL\\Type\\Schema $schema, $source, $rootValue = null, $contextValue = null, $variableValues = null, ?string $operationName = null, ?callable $fieldResolver = null, ?array $validationRules = null) : \\GraphQL\\Executor\\ExecutionResult\n {\n }", "private function executeOperation(\\GraphQL\\Language\\AST\\OperationDefinitionNode $operation, $rootValue)\n {\n }", "public abstract function execute();", "public abstract function execute();", "public abstract function execute();", "abstract public function execute() ;", "abstract function execute();", "abstract function execute();", "public function execute() \n\t{\n\t\t// execute general act without input & without entity - e.g : publishAll()\n\t\tif(!$this->entity && !$this->input) \n\t\t{\n\t\t\t$this->{$this->act}(); \n\t\t}\t\n\n\t\t// execute general act with input & without entity - e.g : storeBatch($categories)\n\t\tif(!$this->entity && $this->input) \n\t\t{\n\t\t\t$this->{$this->act}($this->input); \n\t\t}\t\t\t\t\n\n\t\t// execute custom act on entity, without input - e.g: activate($entity), publish($entity)\n\t\tif($this->entity && !$this->input) \n\t\t{\n\t\t\t$this->{$this->act}($this->entity);\n\t\t}\n\n\t\t// execute update act on entity, with input - e.g: update($entity, $updates) \n\t\tif($this->entity && $this->input) \n\t\t{\n\t\t\t$this->{$this->act}($this->entity, $this->input); \n\t\t}\t\n\n\t\treturn static::$self;\t\t\n\t}", "abstract public function execute();", "abstract public function execute();", "abstract public function execute();", "abstract public function execute();", "public function execute(QueryObject $query);", "public function execute($query)\n {\n }", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "abstract public function exec($sql);", "abstract function execute ();", "public function apply($query);", "public function do_operation($operation, $class = NULL)\r\n\t{\r\n\t\t$result = mysqli_query($this->cn, $operation) ;\r\n\t\tif(!$result) {$this->throw_sql_exception($class);}\t\r\n\t}", "public function execute(): void;", "public function exec()\n {\n switch ($this->oper)\n {\n case 'add':\n $this->answer = ($this->num1+$this->num2);\n $this->summary = $this->num1 . ' + ' . $this->num2 . ' = ' . $this->answer;\n break;\n\n case 'sub':\n $this->answer = ($this->num1-$this->num2);\n $this->summary = $this->num1 . ' - ' . $this->num2 . ' = ' . $this->answer;\n break;\n\n case 'mul':\n $this->answer = ($this->num1*$this->num2);\n $this->summary = $this->num1 . ' * ' . $this->num2 . ' = ' . $this->answer;\n break;\n\n case 'div':\n $this->answer = ($this->num1/$this->num2);\n $this->summary = $this->num1 . ' / ' . $this->num2 . ' = ' . $this->answer;\n break;\n\n default:\n throw new InvalidArgumentException(sprintf('\"%s\" is an invalid operation.', str_replace('_', '', $this->oper)));\n }\n }", "protected abstract function executeQuery($query);", "public abstract function execute(Discord $discord, OperationEskimoDiscord $operationEskimoDiscord);", "function do_graphql_request($query, $operation_name = '', $variables = [])\n {\n }", "public function executeStatement()\n {\n \n }", "abstract public function executeS($query, $array = true);", "private function func_execute () {\n $this -> connection = parent::func_query ($this -> query, $this -> query_data);\n }", "public function __invoke()\n {\n $this->execute();\n }", "abstract public function Execute();", "public function dbAnalysisStoreExec() {}", "public function testExecute()\n {\n $protocolMock = $this->getMockBuilder(Protocolx::class)\n ->disableOriginalConstructor()\n ->getMock();\n $sqlResultMock = $this->getMockBuilder(DocResult::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $protocolMock->expects($this->once())\n ->method('crudFind')\n ->with(\n $this->equalTo(\n 'test_schema'\n ),\n $this->equalTo(\n 'test_collection'\n ),\n $this->equalTo(\n []\n ),\n $this->equalTo(\n null\n ),\n $this->equalTo(\n null\n )\n )->will(\n $this->returnValue($sqlResultMock)\n );\n\n $findOperation = new Find(\n $protocolMock,\n 'test_schema',\n 'test_collection',\n []\n );\n\n $operationResult = $findOperation->execute();\n\n $this->assertInstanceOf(DocResult::class, $operationResult);\n }", "abstract public function query();", "public function execute() {\n\t\t\t$connection = \\Leap\\Core\\DB\\Connection\\Pool::instance()->get_connection($this->data_source);\n\t\t\tif ($this->before !== NULL) {\n\t\t\t\tcall_user_func_array($this->before, array($connection));\n\t\t\t}\n\t\t\t$connection->execute($this->command());\n\t\t\tif ($this->after !== NULL) {\n\t\t\t\tcall_user_func_array($this->after, array($connection));\n\t\t\t}\n\t\t}", "public function operations();", "public abstract function execute($sql);", "public function execute($sql);", "public function execute($sql);", "function _execute($sql) {\n\t\t$result = sqlite_query($this->connection, $sql);\n\n\t\tif (preg_match('/^(INSERT|UPDATE|DELETE)/', $sql)) {\n\t\t\t$this->resultSet($result);\n\t\t\tlist($this->_queryStats) = $this->fetchResult();\n\t\t}\n\t\treturn $result;\n\t}", "function executeQuery($query);", "abstract public function execute($sql);", "function queryRun() {\n $action = $this ->widget_vars[\"args\"][1];\n $query = $this ->widget_vars[\"args\"][2];\n //dump($query);\n switch ($action) {\n case \"delete\":\n deleteQuery( $query );\n break;\n case \"run\":\n runQuery( $query );\n break;\n }\n cli_text(\"Ending parse at \".formatDate(null,\"pretty\"),\"blue\",\"white\");\n \n }", "function execute ($sql)\n {\n return pg_query($this->_conn, $sql);\n }", "public function execute () {\n $this->query->execute();\n }", "abstract public function query(Query $query): Result;", "public function Execute($sql) {\r\n return $this->_connection->query($sql);\r\n }", "public function work(Builder $schema, array $args);", "function execute();", "private function executeQuery($action, $statement, $executeArg){\n\t// statemet = je sql statement\n\t// executeArg = array met daarin de key, value pairs die je meegeeft\n\t\t//begin the transaction\n\t\t$this->db->beginTransaction();\n\t\t$result = null;\n\t\t\n\t\t$stmt = $this->db->prepare($statement);\n\t\t$stmt->execute($executeArg);\n\n\t\t\n\t\tswitch ($action) {\n\t\t\tcase 'insert':\n\t\t\t\t$this->db->commit();\n\t\t\t\treturn;\n\n\t\t\tcase 'select':\n\t\t\t\t$result = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\tbreak;\n\n\t\t\t\t//todo: wat moet deze functie doen voor update /delete\n\t\n\t\t}\n\n\t\treturn $result;\n\n\n\t}", "final public function execute()\n {\n return $this\n ->finalize()\n ->getDB()\n ->execute($this);\n }", "public function execute() { }", "private function ExecuteQuery()\n\t{\n\t\tswitch($this->querytype)\n\t\t{\n\t\t\tcase \"SELECT\":\n\t\t\t{\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$this->querydata = $this->stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"INSERT\":\n\t\t\tcase \"UPDATE\":\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$this->beginTransaction();\n\t\t\t\t\t$this->stmt->execute();\n\t\t\t\t\t$this->commit();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcatch (PDOException $e)\n\t\t\t\t{\n\t\t\t\t\t$this->rollBack();\n\t\t\t\t\techo(\"Query failed: \" . $e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function run(){\n $sql = $this->sql();\n return $this->query($sql,$this->args);\n }", "function execute()\n {\n }", "public function query();", "public function query();", "public function query();", "public function apply(QueryBuilder $query): void;", "public function Execute()\r\n {\r\n $this->PREPARE_STATEMENT($this->sql);\r\n return $this->EXECUTE_STATEMENT($this->statement);\r\n \r\n }" ]
[ "0.5976857", "0.5822814", "0.57272446", "0.56743884", "0.56255466", "0.5608098", "0.5574592", "0.55559886", "0.55559886", "0.55559886", "0.55559886", "0.55559886", "0.55559886", "0.55559886", "0.55559886", "0.55559886", "0.55559886", "0.55559886", "0.55559886", "0.55559886", "0.55559886", "0.55559886", "0.5517905", "0.5511843", "0.5502198", "0.5502198", "0.5502198", "0.5489624", "0.548061", "0.548061", "0.547558", "0.54745805", "0.54745805", "0.54745805", "0.54745805", "0.5467297", "0.54651046", "0.54261714", "0.54261714", "0.54261714", "0.54261714", "0.54261714", "0.54261714", "0.5426022", "0.5426022", "0.5425323", "0.5425323", "0.5425323", "0.5425323", "0.5425323", "0.5425323", "0.5425323", "0.5425323", "0.5425323", "0.5425323", "0.5425323", "0.5425323", "0.5425323", "0.53734666", "0.53543437", "0.53474283", "0.533694", "0.5311804", "0.5307671", "0.5300282", "0.5296202", "0.5265952", "0.5260816", "0.52585065", "0.5242907", "0.5228894", "0.5225582", "0.52238995", "0.5213895", "0.519935", "0.5187265", "0.51707774", "0.5154773", "0.5114899", "0.5114899", "0.5114674", "0.50995415", "0.50992703", "0.5090831", "0.50687873", "0.5068025", "0.5062906", "0.5035372", "0.50345814", "0.50260776", "0.5025368", "0.5020895", "0.5020682", "0.5019446", "0.5012023", "0.50112706", "0.50081116", "0.50081116", "0.50081116", "0.5002154", "0.4998372" ]
0.0
-1
Register a new type
public function addType(Type $type, $name = '') { if (!$name) { $name = (string)$type; } $this->types[$name] = $type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function register_type();", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "private static function registerType(IType $type)\n {\n self::$types[$type->getName()] = $type;\n }", "function registerFieldType($name, $type);", "public static function addType($name)\n {\n if (is_null(self::$registry)) {\n self::registerType(new $name());\n return;\n }\n self::registerType(new $name(self::$registry));\n }", "public function addType($type);", "public function register_type(string $type_name, $config)\n {\n }", "public function register()\n {\n foreach ($this->types as $type) {\n if (!class_exists($type)) {\n trigger_error('Missing post type class: ' . $type . '.');\n continue;\n }\n $typeInstance = with(new $type)->init();\n $this->resolvedAlias[$type] = $this->resolvedTypes[$typeInstance->id] = $typeInstance;\n }\n }", "public function register_object_type(string $type_name, array $config)\n {\n }", "abstract public function register();", "abstract public function register();", "abstract public function register();", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "function register_field_type($class)\n {\n }", "abstract public function register ( );", "public function register(){}", "public function register(): void {\n\t\tif ( $this->type === 'script' ) {\n\t\t\t$this->register_script();\n\t\t}\n\n\t\tif ( $this->type === 'style' ) {\n\t\t\t$this->register_style();\n\t\t}\n\t}", "public function register()\n {\n $args = apply_filters( $this->name.'_post_type_config', $this->config );\n $args['labels'] = apply_filters( $this->name.'_post_type_labels', $this->labels);\n\n register_post_type( $this->name, $args );\n }", "public function register($class);", "public function register(): void;", "public static function registerType($name, $class)\n {\n self::$typesMap[$name] = $class;\n }", "public static function registerType(string $name, string $class): void\n {\n self::$typesMap[$name] = $class;\n }", "function register_graphql_object_type(string $type_name, array $config)\n {\n }", "public function register() {}", "public function AddType($type) {\n $this->Types[] = $type;\n }", "function register_graphql_type(string $type_name, array $config)\n {\n }" ]
[ "0.9019146", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.877948", "0.7490072", "0.74606305", "0.74585325", "0.7421524", "0.73495287", "0.7169334", "0.7055136", "0.69898254", "0.69898254", "0.69898254", "0.6964031", "0.6964031", "0.6964031", "0.6964031", "0.6964031", "0.6964031", "0.6964031", "0.6964031", "0.6964031", "0.6964031", "0.6964031", "0.6964031", "0.6964031", "0.6964031", "0.6964031", "0.6964031", "0.6964031", "0.6964031", "0.6964031", "0.6964031", "0.6964031", "0.695378", "0.695378", "0.695378", "0.695378", "0.695378", "0.695378", "0.695378", "0.695378", "0.69444793", "0.6938811", "0.69345415", "0.69269556", "0.6900556", "0.68617326", "0.68612325", "0.68360627", "0.6781822", "0.66607124", "0.6657562", "0.6634604", "0.66216135" ]
0.0
-1
Return a type definition by name
public function getType($name) { if (isset($this->types[$name])) { return $this->types[$name]; } else { throw new \InvalidArgumentException("Type '$name' is not a registered GraphQL type"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getType($name);", "public function getType(string $name): ?Definition;", "public function getType(): TypeDefinition;", "public function getTypeFor(string $name): string\n {\n return $this->checkExist($name)->fieldDefinitions[$name];\n }", "public static function getType($name)\n {\n $pkg = self::$pkg;\n if (!isset(self::$types[$name])) {\n if (class_exists(\"\\\\{$pkg}\\\\Model\\\\Type\\\\{$name}Type\")) {\n self::addType(\"\\\\{$pkg}\\\\Model\\\\Type\\\\{$name}Type\");\n } elseif (class_exists(\"\\\\Pearly\\\\Model\\\\Type\\\\{$name}Type\")) {\n self::addType(\"\\\\Pearly\\\\Model\\\\Type\\\\{$name}Type\");\n }\n }\n return isset(self::$types[$name]) ? self::$types[$name] : self::$types['string'];\n }", "private function getClassFor($name)\n {\n $test = strtolower($name);\n foreach ($this->types as $class => $matchers) {\n foreach ($matchers as $matcher) {\n if ($test === $matcher) {\n return $class;\n }\n }\n }\n return $this->genericType;\n }", "public function get_type(string $type_name)\n {\n }", "public function GetType($name){\r\n\t\tself::Debug('Find type '.$name);\r\n\t\t$i=-1;\r\n\t\t$len=sizeof($this->Types);\r\n\t\twhile(++$i<$len)\r\n\t\t\tif($this->Types[$i]->Name==$name){\r\n\t\t\t\tself::Debug('Found type at index '.$i);\r\n\t\t\t\treturn $this->Types[$i];\r\n\t\t\t}\r\n\t\treturn null;\r\n\t}", "public function getType(string $name) : ?\\GraphQL\\Type\\Definition\\Type\n {\n }", "public function type()\n\t{\n\t\treturn $this->definition->name;\n\t}", "public function objectTypeDefinition(string $name)\n {\n return $this->objectTypeDefinitions()\n ->first(function (ObjectTypeDefinitionNode $objectType) use ($name) {\n return $objectType->name->value === $name;\n });\n }", "function culturefeed_get_searchable_type($name) {\n $options = culturefeed_get_searchable_types();\n return isset($options[$name]) ? $options[$name] : NULL;\n}", "public function getByName($name)\n\t{\n\t\t# Structure doesn't exists yet, create it.\n\t\tif(!isset($this->_structures[$name]))\n\t\t{\n\t\t\t$this->add(YaPhpDoc_Token_Abstract::getToken($this->_parser,\n\t\t\t\t$this->_type, $this->_parser->getRoot(), $name));\n\t\t}\n\t\t\n\t\treturn $this->_structures[$name];\n\t}", "public function getDefinitionInstanceByType($a_type)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_type, \"Definition\");\t\t\r\n\t\treturn new $class();\t\t\r\n\t}", "public function getTypeName(): string;", "function get_field_type($name)\n {\n }", "public function get(string $className): Type\n {\n if (!isset($this->types[$className])) {\n $instance = $this->createInstance($className);\n $this->types[$className] = $instance;\n }\n\n return $this->types[$className];\n }", "public function getType($name)\n {\n if (!isset($this->_types[$name])) {\n /** @var $type Minkasu_Wallet_Model_Api_Type_Abstract */\n $type = Mage::getSingleton(\"minkasu_wallet/api_type_{$name}\", array($this));\n\n if (false === $type || !$type instanceof Minkasu_Wallet_Model_Api_Type_Abstract) {\n Mage::throwException(\"Type '{$name}' not found.\");\n }\n $this->setType($name, $type);\n }\n\n return $this->_types[$name];\n }", "function TestPlan_lookup_type_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.lookup_type_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getMatchingTypeName();", "protected function getInterfaceDefinition($name) {\n return 'Webforge\\Types\\Interfaces\\\\'.$name;\n }", "protected function _getType($name)\n {\n $this->_checkTagDeclaration($name);\n\n return $this->_tags[$name]['type'];\n }", "public static function addType($name)\n {\n if (is_null(self::$registry)) {\n self::registerType(new $name());\n return;\n }\n self::registerType(new $name(self::$registry));\n }", "function getType(): string;", "function getType(): string;", "public static function getTypeName($id){\n return Types::findOne($id);\n }", "public static function set($name, ckXsdType $type = null)\r\n {\r\n self::$typeRegistry[$name] = $type;\r\n\r\n return $type;\r\n }", "public function getTypeDefinition($typeId, $options = array ()) { // Nice to have\n\t\t$varmap = $options;\n\t\t$varmap[\"id\"] = $typeId;\n\t\t$myURL = $this->processTemplate($this->workspace->uritemplates['typebyid'], $varmap);\n\t\t$ret = $this->doGet($myURL);\n\t\t$obj = $this->extractTypeDef($ret->body);\n\t\t$this->cacheTypeInfo($obj);\n\t\treturn $obj;\n\t}", "public function get_type();", "abstract public function getTypeName(): string;", "public function getClassDefinition();", "public function findByName($name)\n {\n return \\SOE\\DB\\AssignmentType::where('name', '=', $name)->first();\n }", "public function fetchMailTypeByName(string $name): IMailType;", "public static function fromName(string $fullname): Type\n {\n $parts = Vector::new(explode('\\\\', $fullname))\n ->skipWhile(fn($x) => $x === ''); // First element will be empty if leading '\\' given.\n return new Type($parts->skipLast(1), $parts->last());\n }", "function getType();", "function getType();", "function getType();", "function getType();", "function getType();", "public function type();", "public function type();", "public function type();", "public function type();", "public function hasType($name);", "public function getUserTypeByName($name){\n\t\t\treturn $this->searchUserType('name', $name);\n\t\t}", "function registerFieldType($name, $type);", "abstract public function getTypeName();", "private function retrieveClassName($name)\r\n {\r\n switch($name){\r\n case self::LABEL:\r\n case self::INPUT:\r\n case self::SUBIMIT:\r\n return 'Model\\\\Form\\\\Field' . ucfirst($name);\r\n default:\r\n throw new \\InvalidArgumentException(\"The $name field type does not exists\");\r\n }\r\n }", "protected function objectTypeOrDefault(string $name): ObjectTypeDefinitionNode\n {\n return $this->objectTypeDefinition($name)\n ?? PartialParser::objectTypeDefinition(\"type $name{}\");\n }", "public function getDefinition(): string {\n return \"`{$this->name}` {$this->type}\";\n }", "static public function get($name)\n {\n\n if (!isset(self::$aInstances[$name]))\n {\n // echo \" returning new definition\\n\";\n self::$aInstances[$name] = new DataModel_Definition($name);\n }\n else\n // {\n // echo \" returning existing definition\\n\";\n // }\n // echo \" Count of definitions: \" . count(self::$aInstances) . \"\\n\";\n constraint_modelMustBeCalled(self::$aInstances[$name], $name);\n return self::$aInstances[$name];\n }", "function getType() ;", "public function getAdTypeByName($type_name)\n {\n $query = \"SELECT ALL FROM adv_type WHERE name = $type_name\";\n return $this->getQueryData($query, $this->getConnection());\n }", "function getType() ;", "function getType() ;", "public function typeOfName($fileName);", "public abstract function type();", "public abstract function type();", "public function getType()\n {\n $explode = explode('.', $this->name);\n return $type = array_first($explode);\n }", "public function typParsera($name){\n if ($name==\"PokerStars\"){ return \"pokerstars\"; }\n if ($name==\"PartyPoker\"){ return \"partypoker\"; }\n if ($name==\"HoldemManager\"){ return \"holdemmanager\"; }\n return $name;\n }", "public function hasType(string $name): bool;", "abstract public function type();", "abstract public function type();", "public function getClass($name = null);", "function acf_get_field_type($name)\n{\n}", "public static function get_type($type = \"Posts\") {\r\n\t\t$_type = \"\\\\ESWP\\\\MyTypes\\\\\".\"$type\";\r\n\t\treturn new $_type();\r\n\t}", "public function createType()\n {\n $o = new TypeSelector();\n $this->appendSelector($o);\n\n return $o;\n }", "public function type()\n\t{\n\t\treturn self::lookup($this->file);\n\t}", "public function getTypeNameAttribute();", "private function get_type() {\n\n\t}", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();" ]
[ "0.7420581", "0.7382615", "0.68574065", "0.67550504", "0.6623441", "0.6503038", "0.6403751", "0.6360316", "0.6166353", "0.6080261", "0.59680474", "0.5928665", "0.59203035", "0.591931", "0.59100807", "0.58990496", "0.5822061", "0.5821335", "0.5811858", "0.5802108", "0.58002484", "0.5787404", "0.5694541", "0.5679489", "0.5679489", "0.56787455", "0.5655632", "0.56357265", "0.5628629", "0.562734", "0.55842525", "0.55714804", "0.5557503", "0.5545325", "0.55236983", "0.55236983", "0.55236983", "0.55236983", "0.55236983", "0.5519724", "0.5519724", "0.5519724", "0.5519724", "0.5510876", "0.5507475", "0.5497014", "0.5483732", "0.5473052", "0.54666084", "0.5453273", "0.54324263", "0.54114026", "0.5411188", "0.54104155", "0.5410092", "0.54007137", "0.5381699", "0.5381699", "0.5380964", "0.5369268", "0.5365474", "0.5363075", "0.5363075", "0.536253", "0.53608865", "0.53534377", "0.53479624", "0.53335726", "0.5325693", "0.532372", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108", "0.5313108" ]
0.5782936
22
Register a new Query
public function addQuery($query, $name) { $this->queries[$name] = $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addQuery() {}", "public function registerQuery($name, Horde_Kolab_Storage_Query $query)\n {\n $this->_list->registerQuery($name, $query);\n }", "public function newQuery();", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "abstract public function newQuery();", "public function setQuery($query);", "function createQuery() ;", "protected function registerQuery($event)\n\t{\n\t\t$trace = StackTrace::get([ 'arguments' => $this->detectDuplicateQueries ])->resolveViewName();\n\n\t\tif ($this->detectDuplicateQueries) $this->detectDuplicateQuery($trace);\n\n\t\t$query = [\n\t\t\t'query' => $this->createRunnableQuery($event->sql, $event->bindings, $event->connectionName),\n\t\t\t'duration' => $event->time,\n\t\t\t'connection' => $event->connectionName,\n\t\t\t'time' => microtime(true) - $event->time / 1000,\n\t\t\t'trace' => (new Serializer)->trace($trace),\n\t\t\t'model' => $this->nextQueryModel,\n\t\t\t'tags' => $this->slowThreshold !== null && $event->time > $this->slowThreshold ? [ 'slow' ] : []\n\t\t];\n\n\t\t$this->nextQueryModel = null;\n\n\t\tif (! $this->passesFilters([ $query, $trace ], 'early')) return;\n\n\t\t$this->incrementQueryCount($query);\n\n\t\tif (! $this->collectQueries || ! $this->passesFilters([ $query, $trace ])) return;\n\n\t\t$this->queries[] = $query;\n\t}", "public function createQuery(): QueryInterface;", "public function query($query)\n {\n }", "public function query($query)\n {\n }", "public function query($query)\n {\n }", "public function query($query)\n {\n }", "public function query($query)\n {\n }", "public function query($query)\n {\n }", "public function query($query);", "public function query($query);", "public function query($query);", "public function setQuery( $query ){\n \n $this->query = $query;\n \n }", "public function query(IQuery $query);", "public function withQuery($query)\n {\n }", "function query() {\n }", "public function setQuery($query) {\r\n $this->query = $query;\r\n }", "abstract protected function initQuery(): void;", "function set_query($query) {\n\t\t\t// it just sets the query with which to get a recordset\n\t\t\t$this->query = $query;\n\t\t}", "public function setQuery($query)\n {\n $this->query = $query;\n }", "public function createNamedQuery($queryName);", "public function hook_query(&$query)\n {\n \n }", "public function hook_query(&$query)\n {\n \n }", "function query() {}", "public function query();", "public function query();", "public function query();", "public function query($query, $time = 0)\n\t{\n\t\t$this->queries[] = compact('query', 'time');\n\t}", "public function setQuery($query)\n {\n $this->parameters['query'] = $query;\n }", "public function setQuery(Query $query) \n\t{\n\t\t$this->query = $query;\n\t}", "public function query() {\n $this->field_alias = $this->real_field;\n if (isset($this->definition['trovequery'])) {\n $this->query->add_where('', $this->definition['trovequery']['arg'], $this->definition['trovequery']['value']);\n }\n }", "public function withQuery($query)\n {\n // TODO: Implement withQuery() method.\n }", "public function hook_query(&$query) {\n\n\t\t }", "public function hook_query(&$query) {\n\n\t\t }", "public function hook_query(&$query) {\n\n\t\t }", "public function hook_query(&$query) {\n\n\t\t }", "public function query(): QueryInterface;", "function query() {\n $this->add_additional_fields();\n }", "public static function NewQuery()\r\n\t{\r\n\t\treturn new QSqlQuery();\r\n\t}", "public function createQueryApi(): QueryApi;", "public static function query();", "public function query($q = null);", "function addQuery($sql, $error = null, $errno = null)\n {\n //if ( $this->activated ) $this->queries[] = array('sql' => $sql, 'error' => $error, 'errno' => $errno);\n }", "public function query(QueryObject $query);", "function addToQuery(&$query, $tablename=\"\", $fieldaliasprefix=\"\", $rec=\"\", $level, $mode)\n {\n }", "public static function query()\n {\n }", "public function withQuery(array $query);", "public function query()\n {\n }", "public function query()\n {\n }", "function customQuery($query) \t{\n $res = $this->execute($query);\n\t\t return $res;\n\t}", "abstract protected function initQuery(Query $query): Query;", "function addToQuery(&$query, $tablename=\"\", $fieldaliasprefix=\"\", $rec, $level, $mode)\n {\n }", "public static function setQuery(string $query)\n {\n self::$__query = $query;\n }", "public function __construct($query = '')\n {\n }", "private function q($query) {\n $this->last_query = $query;\n $this->result = mysql_query($query,$this->link) or $this->err(mysql_error());\n $this->queries++;\n $this->affected_rows = mysql_affected_rows($this->link);\n if(is_resource($this->result)) {\n $this->num_rows = mysql_num_rows($this->result);\n } else {\n $this->num_rows = 0;\n }\n \n $this->insert_id = mysql_insert_id($this->link); // <-- Ugly sollution, I know\n }", "public function setQuery(array $query);", "public function __construct($query)\n\t{\n $this->query = $query;\n }", "public function query($query) {\n $this->result = $this->dbHandler->prepare($query);\n }", "public function setQuery($query){\n\t $this->instance->setQuery($query);\n\t\treturn true;\n\t}", "public function addSql(string $query)\n {\n $this->query = $query;\n $this->runScript();\n }", "public function _query()\n {\n }", "public function runCustomQuery($query, Database_Config $databaseConfig = NULL);", "public function newQuery()\n {\n return $this->registerGlobalScopes($this->newQueryWithoutScopes());\n }", "public function setQUERY($QUERY)\n {\n $this->QUERY = $QUERY;\n }", "public function createQuery($data);", "public function addQuery($sql, $error = null, $errno = null, $query_time = null)\n {\n if ($this->activated) {\n $this->queries[] = array(\n 'sql' => $sql, 'error' => $error, 'errno' => $errno, 'query_time' => $query_time\n );\n }\n }", "public function query() {\n\n }", "public function __construct(Query $query)\n {\n $this->query = $query;\n }", "public function query() {\n $this->field_alias = $this->real_field;\n }", "public function addNewInsertQuery(){\r\n $query = new SQLInsertQuery();\r\n $this->add($query);\r\n return $query;\r\n }", "abstract public function query();", "public function query()\n\t{\n\t\t\n\t}", "abstract public function query(Query $query): Result;", "public static function enableQueryLog()\n {\n }", "function query() {\n $this->field_alias = $this->real_field;\n }", "function query() {\n $this->field_alias = $this->real_field;\n }", "public static function query()\n {\n return (new static)->newQuery();\n }", "public static function query()\n {\n return (new static)->newQuery();\n }", "public function newModelQuery();", "public function setQuery($query)\n {\n $this->query = $query;\n return $this;\n }", "public function create($query, array $options = [])\n\t{\n\t}", "public function set_default_query($query){\n $this->default_query = $query;\n }", "public function setQuery($query)\n {\n throw new Exception('The setQuery() method is not supported by ' . get_class($this));\n }", "public function create($query, array $options = [])\n {\n }", "public function set_simple_query($query) {\n $this->query = \"\";\n $this->query = $query;\n //print $this->query;\n $this->execute_single_query();\n if(empty($this->err)):\n $this->err = 6;\n $this->msj = \"La transaccion se registro correctamente. \";\n endif; \n \n }", "protected function set_query($query, $q) {\n // Set hightlighting.\n $query->setHighlight(true);\n foreach ($this->highlightfields as $field) {\n $query->addHighlightField($field);\n }\n $query->setHighlightFragsize(static::FRAG_SIZE);\n $query->setHighlightSimplePre(self::HIGHLIGHT_START);\n $query->setHighlightSimplePost(self::HIGHLIGHT_END);\n $query->setHighlightMergeContiguous(true);\n\n $query->setQuery($q);\n\n // A reasonable max.\n $query->setRows(static::QUERY_SIZE);\n }", "public function Query() {\n \n }", "public function queryAll($query);", "public function locate(Query $query) : QueryHandler;", "function query($query=\"\")\n\t{\n\t\t$start = $this->getTime();\n\t\tif($query)\n\t\t{\n // debug(\"query\",$query);\n\t\t\t$this->_result_id=mysql_query($query,$this->_link_id);\n\t\t\t$this->_mysql_errno=mysql_errno($this->_link_id);\n\t\t\tif(!$this->_mysql_errno)\n\t\t\t{\n\t\t\t\tif(ereg(\"^insert\", strtolower($query)))\n\t\t\t\t{\n\t\t\t\t\t// twas an insert type query\n\t\t\t\t\t$this->_query_type=4;\n\t\t\t\t}\n\t\t\t\telseif(ereg(\"^select\", strtolower($query)) || ereg(\"^show\",strtolower($query)))\n\t\t\t\t{\n\t\t\t\t\t// twas a select or show query type\n\t\t\t\t\t$this->_query_type=1;\n\t\t\t\t}\n\t\t\t\telseif(ereg(\"^delete\", strtolower($query)))\n\t\t\t\t{\n\t\t\t\t\t// twas a delete query type\n\t\t\t\t\t$this->_query_type=3;\n\t\t\t\t}\n\t\t\t\telseif(ereg(\"^update\", strtolower($query)))\n\t\t\t\t{\n\t\t\t\t\t// twas a update query type\n\t\t\t\t\t$this->_query_type=2;\n\t\t\t\t}\n elseif(ereg(\"^create\",strtolower($query)))\n {\n $this->_query_type=5;\n }\n elseif(ereg(\"^drop\",strtolower($query)))\n {\n $this->_query_type=6;\n }\n\n\t\t\t\tif($this->_query_type>0)\n\t\t\t\t{\n\t\t\t\t\tif($this->_query_type>1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_num_rows=mysql_affected_rows();\n\t\t\t\t\t}elseif($this->_query_type<5){\n if(is_resource($this->_result_id)){\n $this->_num_rows=mysql_num_rows($this->_result_id);\n }else{\n $this->_num_rows=0;\n }\n\t\t\t\t\t}\n\t\t\t\t\tif($this->_query_type==4)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_insert_id=mysql_insert_id();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->_mysql_error=mysql_error();\n\t\t\t}\n\t\t}\n if($this->error_text()){\n Debug(\"Query\",$query);\n Debug(\"Error\",$this->error_text());\n }\n $this->logquery($query,$start);\n\t\treturn $this->_query_type;\n\t}", "public function query($query){\n\t\t$this->lastQuery = $query;\n\t\treturn $this->connection->query($query);\n\t}" ]
[ "0.78446454", "0.7461842", "0.73028415", "0.7207438", "0.7207438", "0.7207438", "0.72058386", "0.7165653", "0.70037687", "0.68799454", "0.68313706", "0.67929655", "0.6773756", "0.6773756", "0.6773712", "0.6773712", "0.6773712", "0.6773712", "0.67436063", "0.67436063", "0.67436063", "0.6645892", "0.6556351", "0.65521926", "0.65051186", "0.64952683", "0.64515895", "0.6441687", "0.6431335", "0.6386144", "0.63411224", "0.63411224", "0.6337279", "0.6322568", "0.6322568", "0.6322568", "0.631785", "0.6310353", "0.6297662", "0.629504", "0.62395275", "0.623292", "0.623292", "0.623292", "0.623292", "0.6222802", "0.61999726", "0.6198494", "0.61666816", "0.61522204", "0.615148", "0.61488175", "0.61291414", "0.6107097", "0.61036086", "0.61029947", "0.60913676", "0.60913676", "0.6073907", "0.6072993", "0.606981", "0.60683614", "0.6058606", "0.6056594", "0.60503733", "0.60379416", "0.60243154", "0.6011548", "0.5993599", "0.59879214", "0.5975464", "0.59744793", "0.59560406", "0.5947185", "0.59280294", "0.5922042", "0.5910615", "0.58758634", "0.58741", "0.58702856", "0.5869237", "0.58398765", "0.58382064", "0.58361346", "0.58361346", "0.58253545", "0.58253545", "0.58184326", "0.5814665", "0.58094114", "0.5800518", "0.57977724", "0.5794087", "0.5793122", "0.57900244", "0.57895297", "0.5784765", "0.5775384", "0.5760078", "0.5758217" ]
0.7253591
3
Get a query by name
public function getQuery($name) { return $this->queries[$name]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getQuery($name = null);", "public\tfunction\tgetQuery($name)\n\t\t{\n\t\t\tif(!isset(self::$_queries[$this->_class][$name])) {\n\t\t\t\tif($name == 'find')\t\treturn\t$this->_prepareFindQuery();\n\t\t\t\tif($name == 'save')\t\treturn\t$this->_prepareSaveQuery();\n\t\t\t\tif($name == 'filter')\treturn\t$this->_prepareFilterQuery();\n\t\t\t}\n\t\t\t\n\t\t\treturn\tisset(self::$_queries[$this->_class][$name])\n\t\t\t\t?\tself::$_queries[$this->_class][$name]\n\t\t\t\t:\tNULL;\n\t\t}", "public function get($name=null) {\n $query = Core::system()->bootInfo('query');\n \n if($name !== null)\n return $query[$name] ?? null;\n else\n return $query;\n }", "public function getQuery($name = null)\n {\n return $this->_list->getQuery($name);\n }", "abstract public function\r\n\t\tget_query_for_something();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getClause($name);", "public abstract function get_query();", "public\tfunction\tgetQuery($name, $id = 0)\n\t\t{\n\t\t\tif(!isset(self::$_queries[$this->_class][$name])) {\n\t\t\t\tif($name === 'find') {\n\t\t\t\t\t$select\t=\t'SELECT';\n\t\t\t\t\t$from\t=\t'FROM '.$this->_table.' t'.$id;\n\t\t\t\t\t$i\t\t=\t0;\n\t\t\t\t\t\n\t\t\t\t\tforeach($this->_fields as $offset => $field) {\n\t\t\t\t\t\t$select\t.=\t$i != 0 ? ',' : ' ';\n\t\t\t\t\t\t$select\t.=\t'`t'.$id.'`.`'.$offset.'`';\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$relations\t=\t$this->_relations;\n\t\t\t\t\twhile($relations) {\n\t\t\t\t\t\t$relation\t=\tarray_shift($relations);\n\t\t\t\t\t\t$select\t.=\t'.``t'.$relation->_aliasID.'`.`'\n\t\t\t\t\t\t\t\t.\timplode('.``t'.$relation->_aliasID.'`.`', array_keys($relation->_fields))\n\t\t\t\t\t\t\t\t.\t'`';\n\t\t\t\t\t\t\t\tvar_dump($relation->_relations);\n\t\t\t\t\t\t$relations\t=\tarray_merge($relations, $relation->_relations);\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tforeach($this->_relations as $offset => $relation) {\n\t\t\t\t\t\t$from\t.=\t' LEFT JOIN '.$relation->_table.' t'.$relation->_aliasID;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tself::$_queries[$this->_class][$name]\t=\t$select.' '.$from;\n\t\t\t\t\treturn\t$select.' '.$from;\n\t\t\t\t} elseif($name === 'save') {\n\t\t\t\t\t\n\t\t\t\t} elseif($name === 'filter') {\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function query($name)\n\t{\n\t\t$obj = new PacoQuery($this, $name);\n\n\t\t// key always sent\n\t\t$obj->add('api_key', \t$this->api_key);\n\t\t$obj->add('method', \t'bucket.query');\n\n\t\t// return instance of the data object\n\t\treturn $obj;\n\t}", "public function searchByName($query);", "public static function query();", "static public function getOneByName($name) {\n $name = htmlspecialchars($name);\n $name = mb_strtolower($name);\n\n $query = self::getBaseQuery();\n $query.= \" WHERE LOWER(name) = '{$name}'\";\n\n return PDOManipulator::create()\n ->query($query);\n }", "public abstract function getQuery();", "public function seachByName($query)\n {\n return $this->model->where('name', 'like', \"%\" . $query . \"%\");\n }", "public function query(): QueryInterface;", "public function get($queryName)\n {\n return $this->data->get($queryName);\n }", "public function createNamedQuery($queryName);", "protected function getQuery($name, $default = null)\n {\n return Yii::app()->getRequest()->getQuery($name, $default);\n }", "public function __get($name)\n {\n if ($name == 'query') {\n if (!isset($this->query) || $this->query === null) {\n if (method_exists($this, 'query')) {\n return $this->query();\n }\n return $this->model;\n }\n return $this->model;\n }\n return $this->model;\n }", "public function query($name = null, $default = null) {\n return $this->request->query($name, $default);\n }", "public function getQueryCommand();", "abstract protected function getQuery();", "protected static function name(): mixed\n\t{\n\t\treturn self::$query->name;\n\t}", "public function getQuery($name = null, $default = null)\n {\n if ($this->queryParams === null) {\n $this->queryParams = new Parameters();\n }\n\n if ($name === null) {\n return $this->queryParams;\n }\n\n return $this->queryParams->get($name, $default);\n }", "public function getQuery()\n {\n return $this->get(self::_QUERY);\n }", "public function scopeName($query, $name)\n {\n if($name)\n return $query->where('IAP_DESC', 'LIKE', \"%$name%\");\n }", "function query() {}", "protected function _getQuery()\n {\n return $this->_queryFactory->get();\n }", "function getQuery() ;", "public function fetch($name);", "public function getByName($name) {\n $query = \"SELECT * FROM \" . self::$TABLE . \" WHERE name = '$name' LIMIT 1\";\n $resultSet = parent::executeQuery($query);\n \n $array = $this->getRecordAsArray($resultSet);\n return $this->arrayToObject($array);\n }", "public static function query()\n {\n return (new static)->newQuery();\n }", "public static function query()\n {\n return (new static)->newQuery();\n }", "public static function get_query()\n\t{\n\t\treturn self::new_instance_records()->get_query();\n\t}", "private function getQuery()\n {\n return $this->connection->table($this->table);\n }", "public function getQuery() {}", "public function getQuery() {}", "public function findByName($name);", "public function findByName($name);", "public function findByName($name);", "public function query();", "public function query();", "public function query();", "public function query($q = null);", "public function getInstanceQuery()\n {\n return $this->get(self::_INSTANCE_QUERY);\n }", "public function get_by_name(string $name)\n {\n if(!empty($name)){\n $result = $this->where('name', $name)->first();\n // $result = $this->builder->where('name', $name)->get(1);\n if($result){\n return $result;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "public function newQuery($action,$name=null){\n $name = isset($name) ? $name : count($this->querys);\n $this->querys[$name] = new ECP_DatabaseQuery($action,$this->_conf);\n return $this->querys[$name];\n }", "public function getByName($name) {\n return $this->getBy($name, \"name\");\n }", "public function scopeName($query, $name)\n {\n return $query->orWhere('name', 'LIKE', '%'.$name.'%');\n }", "public function getQuery($queryId);", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function createQuery(): QueryInterface;", "public function query($query);", "public function query($query);", "public function query($query);", "protected function getQuery()\n {\n return $this->connection->table(\n $this->config['table']\n );\n }", "public static function getQuery($objectName)\n {\n $objectName = \\is_object($objectName) ? \\get_class($objectName) : $objectName;\n /** @var PersistenceManagerInterface $manager */\n static $manager = null;\n if ($manager == null) {\n $manager = GeneralUtility::makeInstance(ObjectManager::class)->get(PersistenceManagerInterface::class);\n }\n\n return $manager->createQueryForType($objectName);\n }", "public function getQUERY()\n {\n return $this->QUERY;\n }", "public function findByName(String $name);", "public function getQuery(): string {\n\t\t// Store previous output before changing to temp\n\t\t$output = $this->get('output');\n\t\t\n\t\ttry {\n\t\t\t$this->set('output', SqlAdapter::SQL_QUERY);\n\t\t\t$result = $this->run();\n\t\t} finally {\n\t\t\t$this->set('output', $output);\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function findCommand($name) {\n $query = $this->pdo->prepare('SELECT * FROM yubnub.commands WHERE lowercase_name = :lowercaseName');\n $query->bindValue(':lowercaseName', mb_strtolower($name), PDO::PARAM_STR);\n $query->execute();\n if ($query->rowCount() > 0) {\n $row = $query->fetch(PDO::FETCH_ASSOC);\n return $this->createCommand($row);\n }\n return null;\n }", "public function __get ($name) {\n\t\t$this->query .= strtoupper($name) . \" \";\n\t\treturn $this;\n\t}", "public static function getQuery($objectName)\n {\n $objectName = \\is_object($objectName) ? \\get_class($objectName) : $objectName;\n /** @var PersistenceManagerInterface $manager */\n static $manager = null;\n if (null === $manager) {\n $manager = GeneralUtility::makeInstance(ObjectManager::class)->get(PersistenceManagerInterface::class);\n }\n\n return $manager->createQueryForType($objectName);\n }", "public function from($name=NULL, $quot='`'){\r\n\t\t$this->check_table_name($name);\r\n\t\t$this->parent->add_sql(' FROM '.$quot.$name.$quot);\r\n\t\treturn new object_sql_query(NULL, $this->parent);\r\n\t}", "protected function getQuery()\n {\n return $this->connection->table($this->table);\n }", "public function getQueryAnalysis()\n {\n foreach ($this->items as $item) {\n if ('query' == $item->getName()) {\n return $item;\n }\n }\n }", "public function query(): string;", "public function __get($name)\n {\n return $this->select($name);\n }", "public function getQuery($name = null, $default = null)\n {\n return !$name ? $_GET : (isset($_GET[$name]) ? $_GET[$name] : $default);\n }", "public function getConnection($name = ''): QueryBuilderInterface\n\t{\n\t\t// If the parameter is a string, use it as an array index\n\t\tif (is_scalar($name) && isset($this->connections[$name]))\n\t\t{\n\t\t\treturn $this->connections[$name];\n\t\t}\n\t\telse if (empty($name) && ! empty($this->connections)) // Otherwise, return the last one\n\t\t{\n\t\t\treturn end($this->connections);\n\t\t}\n\n\t\t// You should actually connect before trying to get a connection...\n\t\tthrow new InvalidArgumentException('The specified connection does not exist');\n\t}", "function runQuery()\n\t{\n\t\treturn $this->query;\n\t}", "public function query(): QueryBuilder;", "public function get_query_var(string $name)\n {\n }", "public function query(string $name, $default = null): self\n\t{\n\t\t$this->addToCheck($_GET, $name, $default);\n\n\t\treturn $this;\n\t}", "public static function getByName($name) {\n\t\treturn self::getByField('name', $name);\n\t}", "public function Query(){\r\n\t\treturn self::get_query();\r\n\t}", "public static function getQuery()\n {\n return self::$__query;\n }", "public function getQuery($time);", "public function query() {\n $this->field_alias = $this->real_field;\n if (isset($this->definition['trovequery'])) {\n $this->query->add_where('', $this->definition['trovequery']['arg'], $this->definition['trovequery']['value']);\n }\n }", "abstract public function selectDatabase($name);", "public static function findByName($name)\n {\n return static::find()->where(['name' => $name])->one();\n }", "function createQuery() ;", "public function getQueryBuilder();" ]
[ "0.79219747", "0.7721535", "0.74441946", "0.7069631", "0.65908015", "0.6569983", "0.6569983", "0.6569983", "0.6569983", "0.6569983", "0.6569983", "0.6569983", "0.6569983", "0.6569983", "0.6501993", "0.64948213", "0.64644706", "0.64537424", "0.6396004", "0.6382031", "0.6359556", "0.63547933", "0.63470423", "0.63308185", "0.6277641", "0.62705886", "0.62631816", "0.62377894", "0.6231578", "0.62291074", "0.622438", "0.62221956", "0.6192564", "0.6150483", "0.61490834", "0.61437654", "0.6141749", "0.610258", "0.6082724", "0.60773736", "0.6076208", "0.6076208", "0.60741377", "0.60740364", "0.6066798", "0.6066798", "0.6059747", "0.6059747", "0.6059747", "0.60385704", "0.60385704", "0.60385704", "0.60342896", "0.6024553", "0.60192615", "0.60083073", "0.59899735", "0.5987973", "0.59596854", "0.5936204", "0.5936204", "0.5936204", "0.5936204", "0.5936204", "0.5936204", "0.5936204", "0.5936204", "0.5936204", "0.5926651", "0.58965784", "0.58965784", "0.58965784", "0.5883816", "0.58791775", "0.5874092", "0.58732384", "0.58714366", "0.5868429", "0.58682144", "0.5862487", "0.58598936", "0.58595115", "0.58587456", "0.5839617", "0.5834987", "0.5818146", "0.5818115", "0.5809135", "0.5808987", "0.58071715", "0.57886726", "0.577453", "0.57730263", "0.57727456", "0.57018596", "0.5699385", "0.56947225", "0.5694312", "0.56922853", "0.5686462" ]
0.82968616
0
Register a new mutation
public function addMutation($mutation, $name) { $this->mutations[$name] = $mutation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation() {\n\t\tregister_graphql_mutation(\n\t\t\t'createUser',\n\t\t\t[\n\t\t\t\t'inputFields' => array_merge(\n\t\t\t\t\t[\n\t\t\t\t\t\t'username' => [\n\t\t\t\t\t\t\t'type' => [\n\t\t\t\t\t\t\t\t'non_null' => 'String',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t// translators: the placeholder is the name of the type of post object being updated\n\t\t\t\t\t\t\t'description' => __( 'A string that contains the user\\'s username for logging in.', 'wp-graphql' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\tself::get_input_fields()\n\t\t\t\t),\n\t\t\t\t'outputFields' => self::get_output_fields(),\n\t\t\t\t'mutateAndGetPayload' => self::mutate_and_get_payload(),\n\t\t\t]\n\t\t);\n\t}", "public static function register_mutation() {\n\t\tregister_graphql_mutation(\n\t\t\t'updateSettings',\n\t\t\t[\n\t\t\t\t'inputFields' => self::get_input_fields(),\n\t\t\t\t'outputFields' => self::get_output_fields(),\n\t\t\t\t'mutateAndGetPayload' => self::mutate_and_get_payload(),\n\t\t\t]\n\t\t);\n\t}", "public static function register_mutation() {\n\t\tregister_graphql_mutation(\n\t\t\t'updateMediaItem',\n\t\t\t[\n\t\t\t\t'inputFields' => self::get_input_fields(),\n\t\t\t\t'outputFields' => self::get_output_fields(),\n\t\t\t\t'mutateAndGetPayload' => self::mutate_and_get_payload(),\n\t\t\t]\n\t\t);\n\t}", "public function register_mutation($mutation_name, $config)\n {\n }", "function register_graphql_mutation(string $mutation_name, array $config)\n {\n }", "public static function register_mutation(\\WP_Taxonomy $taxonomy)\n {\n }", "public static function register_mutation(\\WP_Taxonomy $taxonomy)\n {\n }", "public static function register_mutation(\\WP_Taxonomy $taxonomy)\n {\n }", "public function mutation(string $name, ?string $alias = null): MutationBuilder;", "public function addMutation ($callback) {\n $this->mutate = $callback;\n\n return $this;\n }", "public function addMutations(\\google\\bigtable\\v1\\Mutation $value){\n return $this->_add(2, $value);\n }", "public function addMutations(\\google\\bigtable\\v1\\Mutation $value){\n return $this->_add(3, $value);\n }", "public static function register_mutation(\\WP_Post_Type $post_type_object)\n {\n }", "public static function register_mutation(\\WP_Post_Type $post_type_object)\n {\n }", "public static function register_mutation(\\WP_Post_Type $post_type_object)\n {\n }", "function get_graphql_register_action()\n {\n }", "public static function mutate_and_get_payload(\\WP_Taxonomy $taxonomy, string $mutation_name)\n {\n }", "public static function mutate_and_get_payload(\\WP_Taxonomy $taxonomy, string $mutation_name)\n {\n }", "public static function mutate_and_get_payload(\\WP_Taxonomy $taxonomy, $mutation_name)\n {\n }", "public static function register_mutation( WP_Post_Type $post_type_object ) {\n\t\t$mutation_name = 'delete' . ucwords( $post_type_object->graphql_single_name );\n\n\t\tregister_graphql_mutation(\n\t\t\t$mutation_name,\n\t\t\t[\n\t\t\t\t'inputFields' => self::get_input_fields( $post_type_object ),\n\t\t\t\t'outputFields' => self::get_output_fields( $post_type_object ),\n\t\t\t\t'mutateAndGetPayload' => self::mutate_and_get_payload( $post_type_object, $mutation_name ),\n\t\t\t]\n\t\t);\n\t}", "public function addTrueMutations(\\google\\bigtable\\v1\\Mutation $value){\n return $this->_add(4, $value);\n }", "public function mutationTypeDefinition(): ObjectTypeDefinitionNode\n {\n return $this->objectTypeOrDefault('Mutation');\n }", "public function register(): void;", "public function testMutationSchema()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $schema = newSchema([\n 'mutation' => $this->blogMutation,\n ]);\n\n $this->assertEquals($this->blogMutation, $schema->getMutationType());\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $writeArticleField = $this->blogMutation->getFields()['writeArticle'];\n\n $this->assertEquals($this->blogArticle, $writeArticleField->getType());\n $this->assertSame('Article', $writeArticleField->getType()->getName());\n $this->assertSame('writeArticle', $writeArticleField->getName());\n }", "abstract public function getMutation(array $tokens, $index);", "abstract public function getMutation(array $tokens, $index);", "public function register(){}", "public function register(){\n $this->registration->execute([], $this);\n }", "public function register(): void\n {\n //\n }", "public function register(): void\n {\n //\n }", "public function register(): void\n {\n //\n }", "public function register(): void\n {\n //\n }", "public function register(): void\n {\n //\n }", "public function register(): void\n {\n\n }", "public function register() {}", "public function register(): void\n {\n }", "public function register(): void\n {\n }", "public function register(): void\n {\n }", "public function register(): void\n {\n }", "public function register(): void\n {\n }", "public function setMutationRegistrar(MutationRegistrar $registrar)\n {\n $this->mutationRegistrar = $registrar->setSchema($this);\n }", "public function getMutationType() : ?\\GraphQL\\Type\\Definition\\Type\n {\n }", "public static function prepare_user_object($input, $mutation_name)\n {\n }", "public function hasMutations(){\n return $this->_has(2);\n }", "public function getMutation($name)\n {\n return $this->mutations[$name];\n }", "public function register()\n {\n $this->registration->execute([],$this);\n }", "public function postCreate(TransmutationRequest $transmutation_request) {\n\n $transmutation = new Transmutation();\n $transmutation -> perfect_score = $transmutation_request->perfect_score;\n $transmutation -> score = $transmutation_request->score;\n $transmutation -> equivalent = $transmutation_request->equivalent;\n $transmutation -> created_by_id = Auth::id();\n $transmutation -> save();\n\n $success = \\Lang::get('transmutation.create_success').' '.$transmutation->perfect_score. \", Score of \".$transmutation->score.\" and the Equivalent Grade is \".$transmutation->equivalent. \".\";\n return redirect('transmutation/create')->withSuccess( $success);\n }", "function register_graphql_scalar(string $type_name, array $config)\n {\n }", "public function hasMutations(){\n return $this->_has(3);\n }", "public static function update_additional_user_object_data($user_id, $input, $mutation_name, \\WPGraphQL\\AppContext $context, \\GraphQL\\Type\\Definition\\ResolveInfo $info)\n {\n }", "public function testSetType()\n {\n $this->response->setClientMutationId('id');\n $this->assertEquals('id', $this->response->getClientMutationId());\n }", "abstract public function register();", "abstract public function register();", "abstract public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "function register_graphql_type(string $type_name, array $config)\n {\n }", "public function onRegister();", "public function register()\r\n {\r\n // Mock で実行したい場合はコメントアウト\r\n $this->registerForInMemory();\r\n\r\n // Mock で実行したい場合はコメント外す\r\n// $this->registerForMock();\r\n }", "abstract public function register ( );", "public function testCreateIssueMutation()\n {\n $query = file_get_contents(__DIR__ . '/Issue/Mutation/createIssueMutation.gql');\n $base64 =$this->getBase64ImageString();\n $headers = $this->getRandomUserHeaders();\n $variables = [\n \"title\" => \"创建一个问题\",\n \"background\" => \"HelloWorld\",\n ];\n\n $this->runGuestGQL($query, $variables, $headers);\n\n //创建戴图片的问题\n $variables = [\n \"title\" => \"创建一个问题\",\n \"background\" => \"HelloWorld\",\n 'cover_image'=>$base64\n ];\n\n $this->runGuestGQL($query, $variables, $headers);\n }", "protected static function set_object_terms(int $post_id, array $input, \\WP_Post_Type $post_type_object, string $mutation_name)\n {\n }", "public static function mutate_and_get_payload( WP_Post_Type $post_type_object, string $mutation_name ) {\n\t\treturn function( $input ) use ( $post_type_object ) {\n\n\t\t\t/**\n\t\t\t * Get the ID from the global ID\n\t\t\t */\n\t\t\t$id_parts = Relay::fromGlobalId( $input['id'] );\n\n\t\t\t/**\n\t\t\t * Stop now if a user isn't allowed to delete a post\n\t\t\t */\n\t\t\tif ( ! isset( $post_type_object->cap->delete_post ) || ! current_user_can( $post_type_object->cap->delete_post, absint( $id_parts['id'] ) ) ) {\n\t\t\t\t// translators: the $post_type_object->graphql_plural_name placeholder is the name of the object being mutated\n\t\t\t\tthrow new UserError( sprintf( __( 'Sorry, you are not allowed to delete %1$s', 'wp-graphql' ), $post_type_object->graphql_plural_name ) );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Check if we should force delete or not\n\t\t\t */\n\t\t\t$force_delete = ! empty( $input['forceDelete'] ) && true === $input['forceDelete'];\n\n\t\t\t/**\n\t\t\t * Get the post object before deleting it\n\t\t\t */\n\t\t\t$post_before_delete = get_post( absint( $id_parts['id'] ) );\n\n\t\t\tif ( empty( $post_before_delete ) ) {\n\t\t\t\tthrow new UserError( __( 'The post could not be deleted', 'wp-graphql' ) );\n\t\t\t}\n\n\t\t\t$post_before_delete = new Post( $post_before_delete );\n\n\t\t\t/**\n\t\t\t * If the post is already in the trash, and the forceDelete input was not passed,\n\t\t\t * don't remove from the trash\n\t\t\t */\n\t\t\tif ( 'trash' === $post_before_delete->post_status ) {\n\t\t\t\tif ( true !== $force_delete ) {\n\t\t\t\t\t// Translators: the first placeholder is the post_type of the object being deleted and the second placeholder is the unique ID of that object\n\t\t\t\t\tthrow new UserError( sprintf( __( 'The %1$s with id %2$s is already in the trash. To remove from the trash, use the forceDelete input', 'wp-graphql' ), $post_type_object->graphql_single_name, $input['id'] ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Delete the post\n\t\t\t */\n\t\t\t$deleted = wp_delete_post( $id_parts['id'], $force_delete );\n\n\t\t\t/**\n\t\t\t * If the post was moved to the trash, spoof the object's status before returning it\n\t\t\t */\n\t\t\t$post_before_delete->post_status = ( false !== $deleted && true !== $force_delete ) ? 'trash' : $post_before_delete->post_status;\n\n\t\t\t/**\n\t\t\t * Return the deletedId and the object before it was deleted\n\t\t\t */\n\t\t\treturn [\n\t\t\t\t'postObject' => $post_before_delete,\n\t\t\t];\n\t\t};\n\t}", "abstract public function onRegister(): void;", "public static function mutate_and_get_payload(\\WP_Post_Type $post_type_object, string $mutation_name)\n {\n }", "function register_graphql_field(string $type_name, string $field_name, array $config)\n {\n }", "public static function mutate_and_get_payload() {\n\t\treturn function( $input, AppContext $context, ResolveInfo $info ) {\n\t\t\tif ( ! current_user_can( 'create_users' ) ) {\n\t\t\t\tthrow new UserError( __( 'Sorry, you are not allowed to create a new user.', 'wp-graphql' ) );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Map all of the args from GQL to WP friendly\n\t\t\t */\n\t\t\t$user_args = UserMutation::prepare_user_object( $input, 'createUser' );\n\n\t\t\t/**\n\t\t\t * Create the new user\n\t\t\t */\n\t\t\t$user_id = wp_insert_user( $user_args );\n\n\t\t\t/**\n\t\t\t * Throw an exception if the post failed to create\n\t\t\t */\n\t\t\tif ( is_wp_error( $user_id ) ) {\n\t\t\t\t$error_message = $user_id->get_error_message();\n\t\t\t\tif ( ! empty( $error_message ) ) {\n\t\t\t\t\tthrow new UserError( esc_html( $error_message ) );\n\t\t\t\t} else {\n\t\t\t\t\tthrow new UserError( __( 'The object failed to create but no error was provided', 'wp-graphql' ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * If the $post_id is empty, we should throw an exception\n\t\t\t */\n\t\t\tif ( empty( $user_id ) ) {\n\t\t\t\tthrow new UserError( __( 'The object failed to create', 'wp-graphql' ) );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Update additional user data\n\t\t\t */\n\t\t\tUserMutation::update_additional_user_object_data( $user_id, $input, 'createUser', $context, $info );\n\n\t\t\t/**\n\t\t\t * Return the new user ID\n\t\t\t */\n\t\t\treturn [\n\t\t\t\t'id' => $user_id,\n\t\t\t];\n\t\t};\n\t}", "public function register() {\n \n }", "public function register(): void\n {\n $response = $this->signedPostRequest('acme/new-acct', [\n 'termsOfServiceAgreed' => true,\n ], true);\n $this->kid = $response->getHeader('Location')[0];\n }", "public function register( $offset );", "public function register()\n {\n // ...\n }", "public function register()\n {\n // ...\n }", "public function setInsert($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Spanner\\V1\\Mutation\\Write::class);\n $this->writeOneof(1, $var);\n\n return $this;\n }", "public function create(): void\n {\n $this->register();\n }", "public function register( array $input );", "public function addFalseMutations(\\google\\bigtable\\v1\\Mutation $value){\n return $this->_add(5, $value);\n }", "public function register()\n {\n // maybe something, one day\n }", "function register_graphql_connection(array $config)\n {\n }", "public function register() {\n \n }", "public function register() {\n \n }" ]
[ "0.8146185", "0.8146185", "0.8146185", "0.8146185", "0.8146185", "0.8146185", "0.8146185", "0.8146185", "0.8146185", "0.8146185", "0.8146185", "0.8146185", "0.8146185", "0.8146185", "0.77128154", "0.7654564", "0.7466115", "0.7438965", "0.71764946", "0.64365125", "0.64365125", "0.64365125", "0.5979347", "0.5818066", "0.5786059", "0.5712658", "0.5626411", "0.5626411", "0.5626411", "0.561323", "0.5335631", "0.5335631", "0.5286626", "0.5208875", "0.51895773", "0.5165898", "0.51503843", "0.5101928", "0.5014491", "0.5014491", "0.49855825", "0.4977436", "0.49574235", "0.49574235", "0.49574235", "0.49574235", "0.49574235", "0.49561745", "0.49483934", "0.49479973", "0.49479973", "0.49479973", "0.49479973", "0.49479973", "0.49367553", "0.49265563", "0.49168947", "0.48901418", "0.48839965", "0.4857643", "0.48306346", "0.48038608", "0.47707835", "0.4768451", "0.47117674", "0.4704232", "0.4704232", "0.4704232", "0.46699506", "0.46699506", "0.46699506", "0.46699506", "0.46699506", "0.46699506", "0.46699506", "0.46699506", "0.46503365", "0.4632689", "0.46240246", "0.46011811", "0.45937872", "0.4587555", "0.4580377", "0.45607945", "0.4548405", "0.454407", "0.45435622", "0.45206314", "0.45148683", "0.45124933", "0.45017204", "0.45017204", "0.44800958", "0.44793224", "0.4476167", "0.44686735", "0.44655535", "0.44584906", "0.44557992", "0.44557992" ]
0.67022264
19
Get a mutation by name
public function getMutation($name) { return $this->mutations[$name]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function mutation(string $name, ?string $alias = null): MutationBuilder;", "public function addMutation($mutation, $name)\n {\n $this->mutations[$name] = $mutation;\n }", "public static function mutate_and_get_payload(\\WP_Taxonomy $taxonomy, string $mutation_name)\n {\n }", "public static function mutate_and_get_payload(\\WP_Taxonomy $taxonomy, string $mutation_name)\n {\n }", "public static function mutate_and_get_payload(\\WP_Taxonomy $taxonomy, $mutation_name)\n {\n }", "abstract public function getMutation(array $tokens, $index);", "abstract public function getMutation(array $tokens, $index);", "public function getOperation($name);", "function register_graphql_mutation(string $mutation_name, array $config)\n {\n }", "public function register_mutation($mutation_name, $config)\n {\n }", "public function name(): string\n {\n if (isset($this->name)) {\n return $this->name;\n }\n\n return Str::camel(Str::before(class_basename($this), 'Mutation'));\n }", "public function get(string $name): string;", "public function get($name)\n {\n if (!$this->has($name)) {\n throw new \\InvalidArgumentException(sprintf('The action \"%s\" already exists.', $name));\n }\n\n return $this->actions[$name];\n }", "public function get(string $name);", "public static function mutate_and_get_payload($post_type_object, $mutation_name)\n {\n }", "public static function mutate_and_get_payload($post_type_object, $mutation_name)\n {\n }", "public function getByName(string $name): string;", "public static function mutate_and_get_payload(\\WP_Post_Type $post_type_object, string $mutation_name)\n {\n }", "public function get($name) {}", "public function getAction(string $name): Action;", "abstract public function getCommand(string $name): string;", "public function getFragment($name) {\n if($name instanceof FragmentSpreadNode) {\n $name = $name->name->value;\n }\n return array_get($this->fragments, $name);\n }", "public function getCommand($name)\n {\n $this->ensureCommandExists($name);\n\n return $this->commands[$name];\n }", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get( $name );", "public function get(string $name): Value;", "public function get($name) {\n\t\t$closure = $this->getClosure($name);\n\t\treturn $closure();\n\t}", "function get( $name )\n\t{\n\t foreach( $this->inputs as $input ){\n\t // loop over each and see if match\n\t if( $input['name'] == $name ){\n\t // return a reference\n\t return $input;\n\t }\n\t }\n\t}", "public function get(HookName $name): Hook;", "public function getByName($name)\n\t{\n\t\t# Structure doesn't exists yet, create it.\n\t\tif(!isset($this->_structures[$name]))\n\t\t{\n\t\t\t$this->add(YaPhpDoc_Token_Abstract::getToken($this->_parser,\n\t\t\t\t$this->_type, $this->_parser->getRoot(), $name));\n\t\t}\n\t\t\n\t\treturn $this->_structures[$name];\n\t}", "static public function get($name) {}", "public function getArgument(string $name);", "public function get_by_name($name)\r\n\t{\r\n\t\t$where = array();\r\n\t\t$where['name'] = $name;\r\n\t\t$action = ORM::factory('action')->where($where)->find();\r\n\t\treturn $action->as_array();\r\n\t}", "public function getMutationType() : ?\\GraphQL\\Type\\Definition\\Type\n {\n }", "static function getPermission($name) {\n return static::getPermissions()->get($name);\n }", "public function getColumn($name)\n {\n foreach ($this->getColumns() as $column) {\n if ($column->getName() === $name) {\n return $column;\n }\n }\n\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public static function register_mutation()\n {\n }", "public function get($name)\n {\n if (!isset($this->data[$name])) {\n throw new \\InvalidArgumentException(\"Variable '$name' doesn't exist.\");\n }\n\n return $this->data[$name];\n }", "public function mutationTypeDefinition(): ObjectTypeDefinitionNode\n {\n return $this->objectTypeOrDefault('Mutation');\n }", "public function getByName($name) {\n return $this->getBy($name, \"name\");\n }", "function get($name) \n {\n return $this->instance->get($name);\n }", "protected function _get($name) {}", "function get($name) {\r\n\t\treturn $this->_send(array('cmd'=>'get', 'name'=>$name));\r\n\t}", "public function check($name) {\n $material = Material::where('name', $name)->first();\n return $material;\n }", "public function get($name)\n {\n return $this->suggesters[$name];\n }", "public function get($name)\n {\n if (isset($this->calls[$name])) {\n return $this->calls[$name];\n } else {\n return null;\n };\n }", "public function findByName(string $name)\n {\n return Permission::whereName($name)->first();\n }", "public function get($name) {\n return $this->$name;\n }", "public function get($name)\n\t{\n\t\treturn $this->data[$name];\n\t}", "public function getDirective(string $name) : ?\\GraphQL\\Type\\Definition\\Directive\n {\n }", "public static function Get($name);", "public function getMutationsList(){\n return $this->_get(2);\n }", "public function get($name) {\n\t\treturn $this->$name;\n\t}", "public function get($name = null);", "public function get($name)\n {\n return $this->values[$name];\n }", "public function getNamedExpressionArgument($name);", "public function get($name = NULL);", "public function getClause($name);", "public function getColumn($name)\n {\n return $this->columns[$name];\n }", "public function get(string $name)\n {\n return $this->reader->read($name);\n }", "public function get(string $name)\n {\n $keys = explode(static::DELIMITER, $name);\n $tmp = &$this->values;\n $is_ok = false;\n foreach ($keys as $key) {\n $is_ok = is_array($tmp) && array_key_exists($key, $tmp);\n if (!$is_ok) {\n break;\n }\n $tmp = &$tmp[$key];\n while (is_callable($tmp)) {\n $tmp = $tmp($this);\n }\n }\n\n $result = null;\n if ($is_ok) {\n $result = $this->cache[$name] = &$tmp;\n }\n\n return $result;\n }", "public function getQuery($name)\n {\n return $this->queries[$name];\n }", "public function __get($name)\n {\n return $this -> $name;\n }", "public static function getByName($name)\n {\n return static::where('name', $name)->first();\n }", "public static function getByName($name) {\n\t\treturn self::getByField('name', $name);\n\t}", "public function __get($name)\n {\n $result = $this->get([$name]);\n\n return reset($result);\n }", "public function __get($name) {\n return self::get($name);\n }", "public function getMutationsList(){\n return $this->_get(3);\n }", "protected static function getMethod(string $name): ReflectionMethod\n {\n $class = new \\ReflectionClass(MySqlGrammar::class);\n $method = $class->getMethod($name);\n $method->setAccessible(true);\n\n return $method;\n }", "protected function get($name)\n\t{\n\t\treturn $this->stores[ $name ] ?? $this->resolve($name);\n\t}", "public static function mutate_and_get_payload( WP_Post_Type $post_type_object, string $mutation_name ) {\n\t\treturn function( $input ) use ( $post_type_object ) {\n\n\t\t\t/**\n\t\t\t * Get the ID from the global ID\n\t\t\t */\n\t\t\t$id_parts = Relay::fromGlobalId( $input['id'] );\n\n\t\t\t/**\n\t\t\t * Stop now if a user isn't allowed to delete a post\n\t\t\t */\n\t\t\tif ( ! isset( $post_type_object->cap->delete_post ) || ! current_user_can( $post_type_object->cap->delete_post, absint( $id_parts['id'] ) ) ) {\n\t\t\t\t// translators: the $post_type_object->graphql_plural_name placeholder is the name of the object being mutated\n\t\t\t\tthrow new UserError( sprintf( __( 'Sorry, you are not allowed to delete %1$s', 'wp-graphql' ), $post_type_object->graphql_plural_name ) );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Check if we should force delete or not\n\t\t\t */\n\t\t\t$force_delete = ! empty( $input['forceDelete'] ) && true === $input['forceDelete'];\n\n\t\t\t/**\n\t\t\t * Get the post object before deleting it\n\t\t\t */\n\t\t\t$post_before_delete = get_post( absint( $id_parts['id'] ) );\n\n\t\t\tif ( empty( $post_before_delete ) ) {\n\t\t\t\tthrow new UserError( __( 'The post could not be deleted', 'wp-graphql' ) );\n\t\t\t}\n\n\t\t\t$post_before_delete = new Post( $post_before_delete );\n\n\t\t\t/**\n\t\t\t * If the post is already in the trash, and the forceDelete input was not passed,\n\t\t\t * don't remove from the trash\n\t\t\t */\n\t\t\tif ( 'trash' === $post_before_delete->post_status ) {\n\t\t\t\tif ( true !== $force_delete ) {\n\t\t\t\t\t// Translators: the first placeholder is the post_type of the object being deleted and the second placeholder is the unique ID of that object\n\t\t\t\t\tthrow new UserError( sprintf( __( 'The %1$s with id %2$s is already in the trash. To remove from the trash, use the forceDelete input', 'wp-graphql' ), $post_type_object->graphql_single_name, $input['id'] ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Delete the post\n\t\t\t */\n\t\t\t$deleted = wp_delete_post( $id_parts['id'], $force_delete );\n\n\t\t\t/**\n\t\t\t * If the post was moved to the trash, spoof the object's status before returning it\n\t\t\t */\n\t\t\t$post_before_delete->post_status = ( false !== $deleted && true !== $force_delete ) ? 'trash' : $post_before_delete->post_status;\n\n\t\t\t/**\n\t\t\t * Return the deletedId and the object before it was deleted\n\t\t\t */\n\t\t\treturn [\n\t\t\t\t'postObject' => $post_before_delete,\n\t\t\t];\n\t\t};\n\t}", "public static function remove($name)\n {\n $value = self::fetch($name);\n self::delete($name);\n return $value;\n }", "public function getHint(string $name);", "public function __get(string $name) {\n\n\t\t\treturn $this->get($name);\n\t\t}", "public function get($name) {\n if(!$this->objects->has($name)) {\n $this->objects->set($name, $this->getNew($name));\n }\n\n return $this->objects->get($name);\n }", "public function __get($name)\n {\n return $this->{$name}();\n }" ]
[ "0.6427494", "0.61549467", "0.595812", "0.595812", "0.59507394", "0.5897483", "0.5897483", "0.5669289", "0.55645573", "0.55600256", "0.5527737", "0.54350907", "0.54108566", "0.5356093", "0.5335916", "0.5335916", "0.53229105", "0.5265567", "0.5263839", "0.52100754", "0.519733", "0.5187849", "0.51844996", "0.51551634", "0.51551634", "0.51551634", "0.51551634", "0.51551634", "0.51551634", "0.51551634", "0.51551634", "0.51551634", "0.51551634", "0.51551634", "0.51551634", "0.51426953", "0.5132881", "0.5108564", "0.5068394", "0.50634974", "0.5058435", "0.5054006", "0.4994675", "0.49944475", "0.49935058", "0.49728128", "0.49622282", "0.49580276", "0.49580276", "0.49580276", "0.49580276", "0.49580276", "0.49580276", "0.49580276", "0.49580276", "0.49580276", "0.49580276", "0.49580276", "0.49580276", "0.49580276", "0.49580276", "0.49306893", "0.49276802", "0.49177468", "0.49160522", "0.4892703", "0.48907727", "0.48901913", "0.48888254", "0.48873287", "0.48761234", "0.48714665", "0.48645383", "0.48418266", "0.48247695", "0.48098034", "0.4804549", "0.47971347", "0.47846195", "0.47826812", "0.47779042", "0.47729623", "0.47713646", "0.47585422", "0.47488043", "0.47325054", "0.47322693", "0.4731102", "0.47232044", "0.4718547", "0.47128782", "0.47101328", "0.4699472", "0.46990326", "0.4691883", "0.46759212", "0.46691382", "0.46613926", "0.46577743", "0.46573758" ]
0.85030496
0
Set the Member for the current context
public function setMember(Member $member) { $this->member = $member; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMember(\\Model\\Member $member){\n\t\t$this->member = $member;\n\t}", "public function __set(string $member, $value)\r\n {\r\n $this->$member = $value;\r\n }", "public function setMember($value)\n {\n if ($value !== null) {\n $this->_params['member'] = $value;\n }\n else {\n unset($this->_params['member']);\n }\n }", "private function _setIdentity(){\n $this->_setUserData($this->getClassUser()->getIdentity());\n }", "function setMember(){\n\t\t//to do: do we need static method, use Convert::raw2sql\n\t\tPage::setFriend($_REQUEST['FriendName'], $_REQUEST['SocialID'], $_REQUEST['SocialNetwork']);\n\t\tDirector::redirectBack();\n\t}", "public function __set( $member, $value ){\n\n $this->array_values[ $member ] = $value;\n\n }", "public function __set( $name, $value )\n {\n\t\t\tif( property_exists( \"UserSVC\", $name ) )\n\t\t\t\t$this->$name = $value;\n }", "public function testUpdateMember()\n {\n }", "public function set_custom_field($member, $field, $value)\n {\n $this->connection->query_update('users', array('cms_' . $field => $value), array('uid' => $member), '', null, null, false, true);\n }", "public function setMember($member)\n {\n $this->member = $member;\n\n return $this;\n }", "protected function _setMember(NewsletterMember $member)\n {\n $this->_member = $member;\n\n $this->to($member->email);\n $this->set('member', $member);\n\n if (method_exists($this->_email, 'locale')) {\n //$this->locale($member->locale);\n $this->_email->locale($member->locale);\n }\n\n return $this;\n }", "public function setMember(?MemberRepositoryInterface $member): void;", "function set_property(){\n }", "public function __set($_name,$_value) {\n\t\tif (array_key_exists($_name,$this->fields)) {\n\t\t\t$this->fields[$_name]=is_string($_value)?\n\t\t\t\tF3::resolve($_value):$_value;\n\t\t\tif (!is_null($_value))\n\t\t\t\t// Axon is now hydrated\n\t\t\t\t$this->empty=FALSE;\n\t\t\treturn;\n\t\t}\n\t\tif (array_key_exists($_name,$this->virtual)) {\n\t\t\ttrigger_error(self::TEXT_AxonReadOnly);\n\t\t\treturn;\n\t\t}\n\t\tF3::$global['CONTEXT']=$_name;\n\t\ttrigger_error(self::TEXT_AxonNotMapped);\n\t}", "public function setRoleMemberInfo($val)\n {\n $this->_propDict[\"roleMemberInfo\"] = $val;\n return $this;\n }", "private function newMemberSetUp() {\n\t\t$this->infoAlert(\"Welcome! Looks like you're new here, We'll set you up with a default team. Have fun!\");\n\t\t$this->teams[0] = new TeamManagerTeam();\n\n\t\t$userData = $this->getUserData();\n\t\t$fname = $userData['fname'];\n\t\t$lname = $userData['lname'];\n\t\t$phone = $userData['phone'];\n\t\t$email = $userData['email'];\n\t\t$position = \"Manager\";\n\t\t$manager = new TeamManagerMember($fname, $lname, $phone, $email, $position);\n\n\t\t$manager = $this->teams[0]->addMember($manager);\n\n\t\tadd_user_meta( $this->user_id, $this->user_meta_key, $this->teams[0]->id );\n\t}", "function __set ( $name , $value )\n {\n $this->$name=$value;\n }", "public function setContext(&$context)\n {\n $this->context = $context;\n }", "private function __setAuthUser()\n {\n $authUser = $this->request->session()->read('Auth');\n\n $accountType = 'FREE';\n if (!empty($authUser)) {\n $accountType = $authUser['User']['account_type'];\n }\n\n $this->set(compact('authUser', 'accountType'));\n }", "public function setUser($p_mVal) { $this->m_mUser = $p_mVal; }", "function __set( $name, $value ) {\n\t\t$this->$name = $value;\n\t}", "public function __SET($attr, $value){ //Establece valor y atributo\n\n\t\t\t$this->$attr=$value;\n\t\t}", "function set($setting, $value , $instance_id = null)\r\n\t{\r\n\t\treturn parent::set($setting, $value);\r\n\t}", "public function setContext($context) {\r\n\t\t$this->context= $context;\r\n\t}", "public function pre_dispatch()\n\t{\n\t\t$this->_memID = currentMemberID();\n\t\t$this->_profile = MembersList::get($this->_memID);\n\t}", "public function init()\n {\n parent::init();\n \n if (isset($this->target->type) && $this->target->type == 'VIA' && isset($this->via)) {\n $this->target->id = $this->via->id;\n }\n else {\n $this->target->id = $this->member->profile->id;\n $this->_minPrivilege = null;\n $this->target->acl->owner = true;\n }\n }", "public function setMemberid($memberid)\r\n {\r\n $this->_memberid = $memberid;\r\n }", "function setContext( )\n\t{\n\t\t$args = new safe_args();\n\t\t$args->set('name', \tREQUIRED, 'string');\n\t\t$args->set('value', REQUIRED, 'any');\t\t\n\t\t$args = $args->get(func_get_args());\n\t\t\t\n\t\t$this->context[$args['name']] = $args['value'];\n\t}", "public function __construct(Member $member)\n {\n $this->member = $member;\n }", "public function __construct(Member $member)\n {\n $this->member = $member;\n }", "public function __SET($att, $valor){\r\n $this->$att = $valor;\r\n}", "public function setUser($user) {\r\n $this->user = $user;\r\n $user->setOurTeamMember($this);\r\n }", "private function __set($name, $value)\n {\n// \tprint(\"Property set for [$name]<br/>\");\n if (method_exists($this, ($method = 'set_'.$name)))\n {\n $this->$method($value);\n }\n }", "public function set($token);", "public function __set($key, $value){\n \t$this->$key = $value;\n }", "function setToken($_token) {\n $this->token = $_token;\n return $this;\n }", "abstract public function setContext($context_object);", "abstract public function set();", "public function setAsGlobal()\n {\n static::$instance = $this;\n }", "function __set( $key, $value ) {\n\t\t$this->{$key} = $value;\n\t}", "public function setCurrentUser($user){\n $this->user = $user;\n }", "function __set($name, $value) {\n $this->$name = $value;\n }", "public function set()\n\t{\n\t\t$this->created_at = date(TIMESTAMP_FORMAT);\n $user = new SessionUser();\n\t\t$this->created_by = $user->getID();\t\t\n\t}", "public function __set($name, $value)\n\t{\n\t\t$method = 'set' . $name;\n\t\tif (!method_exists($this, $method)) \n\t{\n\t\tthrow new \\Exception('Class Entity: Ttcidi Invalid specified property: set'.$name);\n\t}\n\t$this->$method($value);\n\t}", "function setUser( $user )\r\n {\r\n if ( is_a( $user, \"eZUser\" ) )\r\n {\r\n $userID = $user->id();\r\n\r\n $this->UserID = $userID;\r\n }\r\n }", "public function __set($name, $value){\n $this->$name=$value;\n }", "public function set() {\n\t\t$this->token = uniqid(rand(), true);\n\n\t\t$this->time = time();\n\n\t\t$this->$referer = $_SERVER['HTTP_REFERER'];\n\n\t\tif ($this->isEnable()) {\n\t\t\t$_SESSION['token'] = $this->token;\n\t\t\t$_SESSION['token_time'] = $this->time;\n\t\t\t$_SESSION['token_referer'] = $this->$referer;\n\t\t}\n\t}", "function SetUser(&$user)\n\t{\n\t\t$this->userId = $user->userId;\n\t}", "public function setContext(string $key, $value);", "protected function setCustomer(MemberInterface $member): void\n {\n if ($member->getCustomer()) {\n $this->persistenceHelper->persistAndRecompute($member, false);\n\n return;\n }\n\n if (!$customer = $this->customerRepository->findOneByEmail($member->getEmail())) {\n return;\n }\n\n $member->setCustomer($customer);\n\n $gateway = $this->gatewayRegistry->get($member->getAudience()->getGateway());\n if ($gateway->supports(GatewayInterface::CREATE_MEMBER)) {\n $gateway->createMember($member);\n }\n\n $this->persistenceHelper->persistAndRecompute($member, false);\n\n if ($member->getStatus() === MemberStatuses::SUBSCRIBED) {\n $event = new ResourceEvent();\n $event->setResource($customer);\n $this->dispatcher->dispatch(CustomerEvents::NEWSLETTER_SUBSCRIBE, $event);\n }\n }", "private function __setUser() {\n // Create the (helper) user object from the authenticated subject if present\n $subject = \\Native5\\Identity\\SecurityUtils::getSubject();\n if ($subject->isAuthenticated()) {\n $this->user = \\Akzo\\User\\Service::getInstance()->getUser(\n $subject->getPrincipal()['username'],\n $subject\n );\n }\n }", "public function setContext($context)\r\n {\r\n $this->context = $context;\r\n }", "public function setContext($context) {\n $this->context = $context;\n }", "public function __set($key, $value){\n\t\t\t\t$this->$key = $value;\n\t\t\t}", "public function __set($key, $value){\n\t\t\t\t$this->$key = $value;\n\t\t\t}", "function __set($attr_name, $value) {\n // in $attr_name, replace _ with \" \"\n $attr_name = str_replace('_', ' ', $attr_name);\n $attr_name = ucwords($attr_name);\n $attr_name = str_replace(' ', '', $attr_name);\n $function = \"set$attr_name\";\n //var_dump($function);\n $this->$function($value);\n }", "function __set($name, $value)\r\n\t{\r\n\t\t$this->{$name} = $value;\r\n\t}", "public function setContext($context);", "public function setContext($context);", "protected function setMemberDefaults(){\n parent::setMemberDefaults();\n if(!$this->id) $this->id = UniqId::get(\"faq-\");\n }", "function set_user($user)\n\t{\n\t\t$this->user=$user;\n\t}", "public function __set($name, $value)\r\n {\r\n if (!strpos($name, ' ') && !isset($this->_viewVariables[$name])) {\r\n $this->_viewVariables[$name] = $value;\r\n } else {\r\n throw new Exception('Setting class members with white spaces is not allowed');\r\n }\r\n }", "public function __set($name, $value){\r\n echo \"You are trying to direct set property \".$name.\" to value \".$value.\" and thats not possible use set\".$name.\"(\\$value) method.\";\r\n echo \"<br/> At line \".__LINE__.\" in file \".__FILE__;\r\n }", "public function setMemberId($memberId)\n {\n $this->memberId = $memberId;\n }", "public function set($id, $instance);", "function setToken($token)\n {\n $this->token = $token;\n }", "function set($attr, $value)\r\n\t{\r\n\t\t$this->$attr = $value;\r\n\t}", "public function setUser($user)\n{\n$this->user = $user;\n\nreturn $this;\n}", "public function __set($name,$value)\r\n {\r\n $this->set($name,$value);\r\n }", "public function setMessageLine($inMessageLine) { //set methods must be public followed by the word \"set\" then the name of the property\n\n $this->messageLine = $inMessageLine; //'$this->' shortcut reference to current class/object\n}", "public function setContext(Context $context)\r\n\t{\r\n\t\t$this->context = $context;\r\n\t}", "public function __set($name, $value){\n $this->$name = $value;\n }", "public function __set($strName, $mixValue)\n {\n switch ($strName) {\n case \"IdUser\":\n return $this->__set('idAuthUser', $mixValue);\n default:\n return parent::__set($strName, $mixValue);\n //throw new Exception(\"Not porperty exists with name '\" . $strName . \"' in class \" . __CLASS__);\n }\n }", "public function __set($name, $value)\n\t{\n\t\t$this->getInstance()->$name = $value;\n\t}", "public function setActive() {}", "public function setMember(\\GoetasWebservices\\Client\\SalesforceEnterprise\\Sobject\\UserType $member)\n {\n $this->member = $member;\n return $this;\n }", "public function __set($name, $value)\n\t{\n\t\t$method = 'set' . $name;\n\t\tif (!method_exists($this, $method)) \n\t{\n\t\tthrow new \\Exception('Class Entity: Trmsus Invalid specified property: set'.$name);\n\t}\n\t$this->$method($value);\n\t}", "public function __set($varible, $value) {\n\t\t$this->$varible = $value;\n\t}", "protected function setTypo3Context() {}", "public function setControllerContext(\\TYPO3\\Flow\\Aop\\JoinPointInterface $joinPoint) {\n\t\t$this->controllerContext = $joinPoint->getMethodArgument('controllerContext');\n\t}", "function __set($name,$value) {\n\t\t$this->object[$name]=$value;\n\t}", "abstract public function set($in): void;", "function setUser($user) {\n $this->userObject = $user;\n }", "public function __set($param, $value);", "public function __set($key, $value)\n {\n \t// prevent overwriting private or protected members\n \tif(substr($key,0,1) === '_'){\n \t\tthrow new Exception('Setting private or protected class members is not allowed');\n \t}\n\n \t$this->$key = $value;\n \treturn;\n }", "public static function setCore($memberID) {\n\t\t\tself::initialize();\n\t\t\tself::$customer['user'] = array();\n\t\t\t$memberID = clean($memberID, 'integer');\n\t\t\tif ($memberID) {\n\t\t\t\t$result = query(\"SELECT * FROM `members` WHERE memberID = '\".$memberID.\"'\");\n\t\t\t\tif ($result->rowCount > 0) {\n\t\t\t\t\t$row = $result->fetchRow();\n\t\t\t\t\tself::$customer['user']['id'] = $row['memberID'];\n\t\t\t\t\tself::$customer['user']['email'] = $row['email'];\n\t\t\t\t\tself::$customer['user']['first'] = $row['first'];\n\t\t\t\t\tself::$customer['user']['last'] = $row['last'];\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function setTeamMemberId(?string $teamMemberId): void\n {\n $this->teamMemberId['value'] = $teamMemberId;\n }", "protected function set_post() {\n $this->post = $this->safe_find_from_id('Post');\n }", "function __set($name, $value){\n //var_dump($value);\n\n $this->_properties[$name] = $value;\n }", "public function set_active_instance($uid) {\n\n\n }", "private function setBotProvider(): void\n {\n $this->providers[Bot::class] = new MessengerProviderDTO(Bot::class);\n }", "function setUID($uid) {\n\t\t$this->_uid = $uid;\n\t}", "function set($name,$value) \n {\n return $this->instance->set($name,$value);\n }", "public function __set($name, $value);", "public function __set($name, $value);", "function setField($field) {\r\r\n\t\t$this->field = $field;\r\r\n\t}", "public function testSet()\n {\n $object = new \\Webaholicson\\Minimvc\\Core\\Object(['test' => true]);\n $this->assertTrue($object->get('test'));\n $this->assertSame($object, $object->set('test', false));\n $this->assertFalse($object->get('test'));\n $object->set(['node' => ['test' => false]]);\n $this->assertContains(false , $object->get('node'));\n }", "public function __set($name, $value)\n { \n //set the attribute with the value\n $this->$name = $value;\n }", "function __set($name, $value)\n {\n $this->set($name, $value);\n }", "public function __set($_name, $_value);" ]
[ "0.67784894", "0.6705615", "0.6678364", "0.6287002", "0.6274125", "0.5923277", "0.58914477", "0.5855744", "0.58114606", "0.5804379", "0.5795023", "0.5783404", "0.57792735", "0.56875557", "0.55810356", "0.5535277", "0.55292153", "0.5523706", "0.5490006", "0.54844946", "0.5470716", "0.5462364", "0.5456781", "0.5449078", "0.54402417", "0.5436368", "0.54245055", "0.54214835", "0.5416164", "0.5416164", "0.5405662", "0.53938985", "0.53902423", "0.5388538", "0.53869843", "0.53836757", "0.53816307", "0.5376219", "0.5375151", "0.53732264", "0.53710926", "0.53540844", "0.5351926", "0.5342107", "0.5339624", "0.53282726", "0.5320849", "0.53205866", "0.53190637", "0.53143543", "0.53116554", "0.5311033", "0.5309677", "0.5290255", "0.5290255", "0.5289244", "0.5285846", "0.5283692", "0.5283692", "0.5281369", "0.52762306", "0.52736694", "0.5256849", "0.5247658", "0.5244049", "0.52431303", "0.52408725", "0.52345806", "0.5231857", "0.5225245", "0.5218529", "0.52184206", "0.5218029", "0.5211177", "0.5203367", "0.52000743", "0.5195065", "0.51917374", "0.5188094", "0.5185336", "0.51774234", "0.5176635", "0.51738405", "0.51724404", "0.5169543", "0.51598483", "0.51536995", "0.5153053", "0.5149502", "0.514371", "0.5142712", "0.5138618", "0.513612", "0.51327133", "0.51327133", "0.51308155", "0.51277053", "0.51254356", "0.5124583", "0.51238596" ]
0.58660775
7
Get the Member for the current context either from a previously set value or the current user
public function getMember() { return $this->member ?: Member::currentUser(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Member() {\n \t\t$member = null;\n\t\tif(is_numeric($this->urlParams['ID'])) {\n\t\t\t$member = DataObject::get_by_id('Member', $this->urlParams['ID']);\n\t\t} else {\n\t\t\t$member = Member::currentUser();\n\t\t}\n\n\t\treturn $member;\n\t}", "public function getMember()\n\t{\n\t\treturn $this->memberID ? Member::getMember($this->memberID) : NULL;\n\t}", "public static function Current()\n\t{\n\t\tif (!isset($_SESSION['userID']))\n\t\t\treturn null;\n\n\t\treturn Member::Load($_SESSION['userID']);\n\t}", "public function getMember()\n {\n return $this->member;\n }", "public function getMember()\n {\n if (array_key_exists('member', $this->_params)) {\n return $this->_params['member'];\n } else {\n return null;\n }\n }", "public function get_member()\n {\n //get cookie information if available\n $cookie_raw_info = (array_key_exists(get_member_cookie(), $_COOKIE)) ? $_COOKIE[get_member_cookie()] : '';\n\n $cookie_info = array();\n $cookie_info = explode('_', $cookie_raw_info);\n $cookie_member = (array_key_exists(0, $cookie_info)) ? $cookie_info[0] : '';\n $cookie_loginkey = (array_key_exists(1, $cookie_info)) ? $cookie_info[1] : '';\n\n if ($cookie_member != '') {\n $row = $this->get_member_row(intval($cookie_member));\n //is the cookie info correct\n if ($cookie_loginkey == $row['loginkey']) {\n //if it is correct then return the cookie member\n return $cookie_member;\n } else {\n //return the default guest ID, because the login key is not correct\n return $this->get_guest_id();\n }\n } else {\n //return the default guest ID, because there is no member cookie information\n return $this->get_guest_id();\n }\n }", "public function getActingMember()\n {\n /** @var Emagedev_Trello_Model_Member $member */\n $member = Mage::getModel('trello/member');\n $member->loadFromTrello($this->getIdMemberCreator());\n\n return $member;\n }", "function getVotingMember() {\n\t\treturn Member::get()->byID($this->MemberID);\n\t}", "public static function getMember() {\n\t\t\tif (self::$customer === false) {\n\t\t\t\tself::initialize();\n\t\t\t}\n\t\t\tif (isset(self::$customer['user']['id'])) {\n\t\t\t\t$member = new member(self::$customer['user']['id']);\n\t\t\t} else {\n\t\t\t\t$member = new member;\n\t\t\t}\n\t\t\treturn $member;\n\t\t}", "public function me() {\n\t\t\tif (!isset($this->oUser)) $this->oUser = user($this->iUser); \n\t\t\treturn $this->oUser; \n\t\t}", "static function getCurrent(){\r\n\t\tif( empty($_SESSION['moduser']['userId']) )\r\n\t\t\treturn null;\r\n\t\treturn self::getInstance($_SESSION['moduser']['userId']);\r\n\t}", "public function getToMember()\n {\n if (!$this->to_member && $this->to) {\n $email = self::get_email_from_rfc_email($this->to);\n $member = Member::get()->filter(array('Email' => $email))->first();\n if ($member) {\n $this->setToMember($member);\n }\n }\n return $this->to_member;\n }", "public static function current()\n {\n if (Yii::app()->user->isGuest)\n return null;\n\n if (!User::$current_user)\n User::$current_user = User::model()->findByPk(Yii::app()->user->getId());\n\n return User::$current_user;\n }", "public function user() {\n\t\tif ( ! is_null($this->user)) return $this->user;\n\t\treturn $this->user = $this->retrieve($this->token);\n\t}", "public static function currentUser() {\n global $user;\n\n return $user;\n }", "protected function _current_user()\n {\n $user_id = $this->session->userdata(\"user_id\");\n \n if($user_id)\n {\n $this->load->model('user_model');\n $this->current_user = $this->user_model->getOne('' , ['user.user_id' => $user_id]);\n }\n \n return $this->current_user;\n }", "public function getUserInstance()\n {\n $entity = null;\n\n if ($this instanceof \\User) {\n $entity = $this;\n } elseif ($this instanceof \\PortalUser) {\n $this->setPortalId();\n $entity = $this->getRelated('User');\n } else {\n $entity = $this->getPortalUser()->getRelated('User');\n }\n\n $this->checkJoin($this, $entity);\n\n return $entity;\n }", "public function findCurrent() {\n\t\t$currentUserUid = (int)$GLOBALS['TSFE']->fe_user->user['uid'];\n\t\treturn $currentUserUid ? $this->findByUid($currentUserUid) : new Tx_MmForum_Domain_Model_User_AnonymousFrontendUser();\n\t}", "final public static function current()\n\t{\n\t\tstatic $_current;\n\n\t\tif ($_current === null) {\n\t\t\t$_current = Auth::instance()->get_user();\n\t\t}\n\t\treturn $_current;\n\t}", "function get_user () {\n\t\treturn $this->user_id;\n\t}", "public function getFromMember()\n {\n if (!$this->from_member && $this->from) {\n $email = self::get_email_from_rfc_email($this->from);\n $member = Member::get()->filter(array('Email' => $email))->first();\n if ($member) {\n $this->setFromMember($member);\n }\n }\n return $this->from_member;\n }", "function getUser()\n\t\t{\n\t\t\tglobal $wpdb;\n\n\t\t\tif(!empty($this->user))\n\t\t\t\treturn $this->user;\n\n\t\t\t$gmt_offset = get_option('gmt_offset');\n\t\t\t$this->user = $wpdb->get_row(\"SELECT *, UNIX_TIMESTAMP(user_registered) + \" . ($gmt_offset * 3600) . \" as user_registered FROM $wpdb->users WHERE ID = '\" . $this->user_id . \"' LIMIT 1\");\n\t\t\treturn $this->user;\n\t\t}", "public function getCurrentUser(){\n $currentUser = $_SESSION['userdata'];\n\n // Sets the user object\n $this->setUser($currentUser->control);\n\n }", "public function get_user() {\r\n\t\treturn ($this->user);\r\n\t}", "public function get_user_specific()\r\n {\r\n return $this->m_user_specific;\r\n }", "public function user()\n {\n if ($this->user !== null) {\n return $this->user;\n }\n\n try{\n if ($token = $this->handle->getToken()) {\n $this->user = $this->provider->retrieveById($token->getId());\n if(get_class($this->user()) !== $token->getClass()){\n $this->user = null;\n }\n }\n }catch (TokenException $exception){\n\n }\n\n\n return $this->user;\n }", "public function getMember()\n {\n return $this->match;\n }", "function get_member( $member )\n {\n // TODO Determine role.is_admin in a better way\n\n $get_member_query = <<<SQL\n select m.first_name,\n m.last_name,\n m.gatech_email_address,\n m.display_email_address,\n to_char( m.paid_dues_date, 'MM/DD/YYYY' ) as paid_dues_date,\n to_char( m.paid_locker_date, 'MM/DD/YYYY' ) as paid_locker_date,\n to_char( m.paid_practice_date, 'MM/DD/YYYY' ) as paid_practice_date,\n to_char(\n m.paid_locker_date + ( m.locker_months * interval '1 month' ),\n 'MM/DD/YYYY'\n ) as locker_end_date,\n m.locker_number,\n m.profile_photo_path,\n m.personal_website,\n m.is_available_for_collaboration,\n m.biography,\n m.first_name || ' ' || m.last_name as name,\n r.is_admin\n from tb_member m\n join tb_member_role mr\n on m.member = mr.member\n join tb_role r\n on mr.role = r.role\n where m.member = ?member?\norder by r.rank\n limit 1\nSQL;\n\n $params = [ 'member' => $member ];\n $result = query_execute( $get_member_query, $params );\n\n return query_success( $result ) ? query_fetch_one( $result ) : false;\n }", "protected static function retrieveCurrentUser()\n {\n global $user;\n\n return $user;\n }", "public function user()\n\t{\n\t\tif (is_null($this->user) and $this->session->has(static::$key))\n\t\t{\n\t\t\t$this->user = call_user_func(Config::get('auth.by_id'), $this->session->get(static::$key));\n\t\t}\n\n\t\treturn $this->user;\n\t}", "public function getMemberInfo() {\n\n $memberModel = $GLOBALS[\"memberModel\"];\n // Get the member by the membership number\n $GLOBALS[\"member\"] = $memberModel->getOneByMemberNumber($_SESSION[\"MembershipNumber\"]);\n }", "private function currentUser() {\n return Auth::guard(session('guard'))->user();\n }", "public function getLoggedInMember()\n {\n return $_SESSION['__COMMENTIA__']['member_username'];\n }", "public function get_current_user()\n\t{\n\t\treturn $this->current_user;\n\t}", "public function getCurrentUser();", "public function user() { return $this->user; }", "private function getUser() {\n\t\t$account = $this->authenticationManager->getSecurityContext()->getAccount();\n\t\t$user = $account->getParty();\n\t\treturn $user;\n\t}", "function getUser() {\n return user_load($this->uid);\n }", "private function currentUser()\n {\n return Auth::guard('web')->user();\n }", "public function getCurrentUser() {\n if (!property_exists($this, 'currentUser')) {\n $this->currentUser = null;\n $uid = isset($_SESSION['uid']) ? $_SESSION['uid'] : false;\n if ($uid) {\n $this->currentUser = User::find($uid);\n }\n }\n return $this->currentUser;\n }", "public function getUser() {\n\n if (isset($this->user)) {\n return $this->user;\n }\n\n return NULL;\n }", "function get_user()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_USER);\r\n }", "function get_user()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_USER);\r\n }", "public function getUser ()\r\n\t{\r\n\t\treturn $this->user;\r\n\t}", "public function get_user() {\n\t\treturn $this->user;\n\t}", "public function getCurrentUser() {\n\t\treturn Zend_Registry::get('currentUser');\n\t}", "public function user()\n {\n if (!$this->user) {\n $identifier = $this->getToken();\n $this->user = $this->provider->retrieveByToken($identifier, '');\n }\n return $this->user;\n }", "protected function getUser()\n {\n return $this->loadUser(array(\n 'user_name' => $this->context['admin'],\n ));\n }", "protected function getUserByContext() {}", "public function getDetails()\n {\n if($user = $this->loadUser())\n \treturn $user;\n }", "function getUser() \n {\n\t\t\treturn $this->user;\n\t\t}", "public function user()\n {\n return $this->context-> getUser();\n }", "function current_user(){\n static $current_user;\n global $db;\n if(!$current_user){\n if(isset($_SESSION['user_id'])):\n $user_id = intval($_SESSION['user_id']);\n $current_user = find_by_id('users',$user_id);\n endif;\n }\n return $current_user;\n }", "public function getCurrentUser(){\n\t\treturn BankAccessor::create()->getCurrentUser();\n\t}", "static function getCurrentUser() {\n $User = Ak::getStaticVar('CurrentUser');\n if (empty($User)) {\n trigger_error($this->t('Current user has not been set yet.'), E_USER_ERROR);\n }\n return $User;\n }", "public function getCurrentUser()\n {\n return $this->remoteUser;\n }", "public function getUser()\n {\n if (!$membership = $this->getMembership()) {\n return false;\n }\n \n return $membership->getUser();\n }", "function current_user(){\n static $current_user;\n global $db;\n if( !$current_user ) {\n if(isset($_SESSION['user_id'])) {\n $user_id = intval($_SESSION['user_id']);\n $current_user = find_by_id('users',$user_id);\n }\n }\n return $current_user;\n}", "public function user() {\n if ($this->User === null)\n $this->User = $this->getEntity(\"User\", $this->get(\"user_id\"));\n return $this->User;\n }", "public function GetUser()\n\t\t{\n\t\t\treturn $this->User;\n\t\t}", "public function getIdentity()\n {\n if ($this->hasLoadedUser) {\n return $this->currentUser;\n }\n $identity = parent::getIdentity();\n\n if ($identity) {\n $authenticationIdentity = $identity->getAuthenticationIdentity();\n if ($authenticationIdentity && isset($authenticationIdentity['user_id'])) {\n $id = $authenticationIdentity['user_id'];\n $this->currentUser = $this->authentication->getIdentity($id);\n }\n }\n\n return $this->currentUser;\n }", "public function getUser()\n {\n if(!$this->user)\n $this->user = User::getActive();\n\n return $this->user;\n }", "static function getCurrentUser()\r\n {\r\n return self::getSingleUser('id', $_SESSION[\"user_id\"]);\r\n }", "function owa_getCurrentWpUser() {\r\n\tglobal $current_user;\r\n get_currentuserinfo();\r\n return $current_user;\r\n\r\n}", "public function getMembership()\n {\n return Member::getByID($this->site_members_id);\n }", "function user()\n {\n return eZUser::fetch( $this->UserID );\n }", "public function getUser(){\n\t\treturn $this->user;\n\t}", "public function GetCurrentUser()\n {\n return $this->userManager->getCurrent();\n }", "public static function user()\n {\n if (!isset(static::$user)) {\n $uid = static::getCurrentUserId();\n if ($uid) static::$user = static::fetchUserById($uid);\n }\n \n return static::$user;\n }", "public static function current(): User\n\t{\n\t\tstatic $current;\n\n\t\tif ($current === null) {\n\t\t\t$user = wp_get_current_user();\n\t\t\t$current = new static($user);\n\t\t}\n\n\t\treturn $current;\n\t}", "static function currentUser() {\n $cookie = new CookieSigner(Config::app()['BASE_KEY']);\n\n if (isset($_SESSION['userId']) && $userId = $_SESSION['userId']) {\n $user = new User();\n return $user->findOne($userId);\n } else if ($userId = $cookie->get('userId')) {\n $user = new User();\n $user->findOne($userId);\n\n if ($user && $user->isAuthenticated('remember', $cookie->get('rememberToken'))) {\n self::logIn($user);\n return $user;\n }\n }\n return null;\n }", "public function member()\n {\n return $this->belongsTo('app\\common\\model\\Member', 'uid');\n }", "public static function user ()\n {\n return self::$user;\n }", "function _wp_get_current_user()\n {\n }", "public function getCurrentUser()\n {\n $userId = Security::getUserId();\n if (!empty($userId)) {\n $this->uid = $userId;\n }\n }", "protected function getUserFromAvailableData()\n {\n $storage = $this->getStorage();\n\n //get saved values\n $user = $storage->get('user', null);\n $persistedAccessToken = $storage->get('access_token');\n\n $accessToken = $this->getAccessToken();\n\n /**\n * This is true if both statements are true:\n * 1: We got an access token\n * 2: The access token has changed or if we don't got a user.\n */\n if ($accessToken && !($user !== null && $persistedAccessToken == $accessToken)) {\n $user = $this->getUserFromAccessToken();\n if ($user !== null) {\n $storage->set('user', $user);\n } else {\n $storage->clearAll();\n }\n }\n\n return $user;\n }", "public function getMemberOf()\n {\n if (array_key_exists(\"memberOf\", $this->_propDict)) {\n return $this->_propDict[\"memberOf\"];\n } else {\n return null;\n }\n }", "public function getLocalUser()\n {\n if (!is_null($this->localUser)) {\n return $this->localUser;\n } elseif ($this->hasAttribute('id')) {\n return $this;\n }\n return null;\n }", "public static function getInfoCurrentUser()\n {\n /**\n * @var \\ZCMS\\Core\\ZSession $session\n */\n $session = Di::getDefault()->get('session');\n $auth = $session->get('auth');\n\n if ($auth) {\n return Users::findFirst($auth['id']);\n }\n return null;\n }", "static public function GetGETUser() {\n if (isset(self::$getUser))\n return self::$getUser;\n else\n return self::UNKNOWN;\n }", "protected function getCurrentUser()\n {\n return User::query()->findOrFail(Auth::user()->id);\n }", "public static function currentUser()\n {\n return wp_get_current_user();\n }", "public function getUserProfileInstance()\n {\n $entity = null;\n\n if ($this instanceof \\UserProfile) {\n $entity = $this;\n } elseif ($this instanceof \\PortalUser) {\n $entity = $this->getRelated('UserProfile');\n } else {\n $portalUser = $this->getPortalUser();\n if ($portalUser == null) {\n return null;\n }\n $entity = $portalUser->getRelated('UserProfile');\n }\n\n $this->checkJoin($this, $entity);\n\n return $entity;\n }", "public function user()\n {\n return $this->user;\n }", "public function user()\n {\n return $this->user;\n }", "public function getCurrentUser()\n {\n if ($this->_currentUser == null) {\n\n if ($this->_oauthToken == null) {\n $this->_setOauthToken();\n }\n $this->_currentUser = json_decode($this->_oauthToken)->user;\n }\n\n return $this->_currentUser;\n }", "public function getAdminMember()\n {\n $bdd = $this->bdd;\n $query = \"SELECT * FROM member WHERE rights =:rights\";\n\n $req = $bdd->prepare($query);\n $req->bindValue('rights', \"1\" , PDO::PARAM_INT);\n $req->execute();\n $row= $req->fetch(PDO::FETCH_ASSOC);\n\n $user = new User();\n $user->setId($row['id']);\n $user->setPseudo($row['pseudo']);\n\n $user->setEmail($row['email']);\n $user->setRight($row['rights']);\n\n return $user;\n }", "public function getCurrent($payload){\n $user = User::getByUsername($payload['username']);\n if(!$thisUser){ \n throw new Error(\"Trouble finding user\");\n }else{\n return $thisUser;\n }\n return $thisUser;\n }", "public function getUser()\n {\n if ($this->user === null) {\n // if we have not already determined this and cached the result.\n $this->user = $this->getUserFromAvailableData();\n }\n\n return $this->user;\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser( ) {\n\t\treturn $this->user;\n\t}", "public function getUser( ) {\n\t\treturn $this->user;\n\t}", "public function getCurrentUser() {\n $uid = $this->currentUser->id();\n $user = User::load($uid);\n $mid = $user->get('field_rusa_member_id')->getValue()[0]['value'];\n\n return new JsonResponse([\n 'data' => ['uid' => $uid, 'mid' => $mid],\n 'method' => 'GET',\n ]);\n\t}", "public static function getCurrentUser() {\n return Users::model()->findByAttributes(array(\n // [NguyenPT]: TODO - Investigate should use 'username' or 'id'\n DomainConst::KEY_USERNAME => Yii::app()->user->id\n ));\n }", "public function getUser() {\n\t\treturn $this->user;\n\t}", "public function getUser() {\n\t\treturn $this->user;\n\t}", "function getUser(){\n\t\tif( $this->isGuest )\n\t\t\treturn;\n\t\tif( $this->_user === null ){\n\t\t\t$this->_user = User::model()->findByPk( $this->id );\n\t\t}\n\t\treturn $this->_user;\n\t}" ]
[ "0.7767322", "0.718603", "0.71327496", "0.6983086", "0.69645214", "0.6849294", "0.6792129", "0.67782265", "0.6776476", "0.6708414", "0.6561445", "0.6460723", "0.6437021", "0.64282566", "0.6358084", "0.6322435", "0.6321555", "0.62902105", "0.62807536", "0.62581736", "0.6253524", "0.6218873", "0.62014264", "0.6195705", "0.6184162", "0.6176743", "0.6176221", "0.6157299", "0.6155638", "0.61471945", "0.60790986", "0.60692865", "0.60466194", "0.60430896", "0.6032366", "0.6032231", "0.60122263", "0.60094494", "0.60056907", "0.5990315", "0.5987246", "0.598563", "0.598563", "0.59813523", "0.5972814", "0.59612167", "0.5958349", "0.59414446", "0.5937784", "0.5933883", "0.59337974", "0.5930936", "0.59265095", "0.5915495", "0.5909256", "0.59052604", "0.5904718", "0.59042346", "0.590343", "0.58951575", "0.58950835", "0.58932924", "0.58902806", "0.58886415", "0.58811784", "0.5877824", "0.5875591", "0.58710766", "0.58641934", "0.5860545", "0.58595616", "0.5850415", "0.5847792", "0.5847443", "0.5842006", "0.58373773", "0.5835772", "0.58341634", "0.583037", "0.5826186", "0.5809476", "0.5806812", "0.57992333", "0.5797761", "0.5797761", "0.57967097", "0.57906866", "0.5790511", "0.57870555", "0.57861507", "0.57861507", "0.57861507", "0.57861507", "0.5784559", "0.5784559", "0.578383", "0.57824224", "0.5781202", "0.5781202", "0.5780844" ]
0.7697486
1
Get global context to pass to $context for all queries
protected function getContext() { return [ 'currentUser' => $this->getMember() ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function context() {\n\t\treturn self::get_context();\n\t}", "public static function context()\n {\n return self::$_context;\n }", "abstract public function get_context();", "protected function getContext() {}", "public function getContext();", "public function getContext();", "public function getContext();", "public function getContext();", "public function getContext();", "public function getContext() : \\WPGraphQL\\AppContext\n {\n }", "public function getContext()\n {\n return self::$context;\n }", "public function getcontext()\n {\n return $this->context;\n }", "public function getContext(): mixed;", "public function context()\n {\n return $this->context;\n }", "public function context()\n {\n return $this->context;\n }", "protected function getContext() {\n\t\treturn $this->context;\n\t}", "protected function getContext()\n {\n return $this->_context;\n }", "protected function getContext()\n {\n return $this->_context;\n }", "protected function getContext()\n\t{\n\t\treturn $this->context;\n\t}", "public function getContext() {\n\t\treturn $this->getPrivateSetting('context');\n\t}", "public function getContext() {\n return $this->context;\n }", "public function getContext() {\n return $this->context;\n }", "public function getContext()\r\n {\r\n return $this->context;\r\n }", "public function getContexts();", "public function getContext ()\n {\n return $this->context;\n }", "public function getContext() {\r\n\t\treturn $this->context;\r\n\t}", "public function getContext() {\n\t\treturn $this->context;\n\t}", "function &getContext() {\n\t\treturn $this->_context;\n\t}", "function getCurrentContext();", "protected function context() {\n return ArrayHelper::filter($GLOBALS, $this->logVars);\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext() {\n return $this->context;\n }", "public function getContext()\r\n\t{\r\n\t\treturn $this->context;\r\n\t}", "public function getContext()\n\t{\n\t\treturn $this->context;\n\t}", "public final function getContext ()\n {\n return $this->context;\n }", "public final function getContext ()\n {\n return $this->context;\n }", "protected function getContextQuery()\n {\n return $this->contextQuery;\n }", "public function getContext(): QueryInterface\n\t{\n\t\treturn $this->context ?? $this;\n\t}", "public function getContext(): ContextInterface;", "public static function get_app_context()\n {\n }", "public function get_ctx() \n {\n return $this->ctx;\n }", "public function contextStrategy();", "public final function getContext ()\n {\n\n return $this->context;\n\n }", "public function getContext()\n\t\t{\n\t\t\treturn $this->context;\n\t\t}", "public static function getContext()\n {\n if (isset(self::$context) == false) {\n self::$context = new Context();\n }\n\n return self::$context;\n }", "public function getContext() : Context {\n return $this->context;\n }", "public function getContext(): Context\n {\n return $this->context;\n }", "protected function _get_page_context() {\n $context = $this->get_context();\n return (!empty($context)) ? $context : context_system::instance();\n }", "public static function getContext(){\n if(!isset(self::$instance)){\n self::$instance = new JeproshopContext();\n }\n return self::$instance;\n }", "public function getContext(): Context\n\t{\n\t\treturn $this->context;\n\t}", "public function getInitialContext()\n {\n return $this->getApplication()->getInitialContext();\n }", "private function get_context() {\n return context_course::instance($this->course->id);\n }", "public static function getDefaultContext() {\n if (!self::$context)\n return self::getEmptyObject();\n else\n return self::$context;\n }", "private function getContext()\n {\n if ($this->context === null) {\n $this->context = $this->container->get('security.context');\n }\n return $this->context;\n }", "function frmget_context() {\n\tglobal $CFG, $DB;\n //include this file for content /libdir/filelib.php\n return $systemcontext = context_system::instance();\t\n}", "private function getContext()\n {\n $context = $this->request->getData('context');\n\n return Context::isValidOrFail($context) ? $context : null;\n }", "public function getContext(): array;", "public function context()\n {\n $context['environment'] = $this->environment;\n\n // if there is no method, then it is not an http call\n $context['http'] = [\n 'method' => $this->method ? strtolower($this->method) : null,\n 'url' => $this->method ? $this->url : null,\n ];\n\n // nicked from laravel's Application@runningInConsole method\n $context['is-cli'] = php_sapi_name() == 'cli';\n\n return $context;\n }", "protected function get_context() {\n $contextclass = '\\local_elisprogram\\context\\\\'.$this->contextlevel;\n if ($this->contextlevel !== 'system' && class_exists($contextclass)) {\n $id = $this->required_param('id', PARAM_INT);\n return $contextclass::instance($id);\n } else {\n return context_system::instance();\n }\n }", "public function getContext() : array;", "public function getDefaultContext()\n {\n return $this->defaultContext;\n }", "public function initialContext() {\n return $this->ff->createBasicContext();\n }", "function readContext() {return $this->_context;}", "public function getInitialContext()\n {\n return $this->initialContext;\n }", "protected function initContextAware()\n {\n return;\n }", "public function getBoundContext(): IoContextInterface;", "public function getCurrentContext() {\n if ($this->contextOverride) {\n return $this->contextOverride;\n }\n foreach ($this->contextResolvers as $resolver) {\n if ($context = $resolver->getCurrentContext()) {\n return $context;\n }\n }\n return NULL;\n }", "public function getCurrentContext()\n\t{\n\t\treturn $this->context_name;\n\t}", "public function getContext(): ContextInterface\n {\n return $this;\n }", "public function getContexts() {\n return $this->contexts;\n }", "public function createContext(): IContext;", "function getContextOptions();", "public function getContext(): array\n\t{\n\t\treturn $this->context;\n\t}", "public function getContext(): array\n\t{\n\t\treturn $this->context;\n\t}", "public function getContext() : Model\n\t{\n\t\treturn $this->context;\n\t}", "public function getBasePublicQuery($context = null);", "public function getContexts()\n {\n return $this->contexts;\n }", "public function getContexts()\n {\n return $this->contexts;\n }", "function kilman_get_context($cmid) {\n static $context;\n\n if (isset($context)) {\n return $context;\n }\n\n if (!$context = context_module::instance($cmid)) {\n print_error('badcontext');\n }\n return $context;\n}", "public function getContextInfo() {}", "function getContextId() {\n\t\treturn $this->_contextId;\n\t}", "protected function getUserByContext() {}", "function init(&$context){}", "protected function getApplicationContext() {}", "function add_global_context(array $data)\n {\n foil('context')->add(new GlobalContext($data));\n }", "public static function getCurrent()\n\t{\n\t\tif (Application::hasInstance())\n\t\t{\n\t\t\t$application = Application::getInstance();\n\t\t\treturn $application->getContext();\n\t\t}\n\n\t\treturn null;\n\t}", "protected function load($context) {\n\t\treturn $context;\n\t}", "public function getApplicationContext() {}", "public function getBoundContext(): IoContextInterface\n {\n return $this->boundContext;\n }", "public function getSourceContext()\n {\n return $this->source_context;\n }" ]
[ "0.7781127", "0.75301325", "0.7477324", "0.7348858", "0.73389554", "0.73389554", "0.73389554", "0.73389554", "0.73389554", "0.7264762", "0.7202083", "0.71788776", "0.7145581", "0.7095237", "0.7095237", "0.7063228", "0.70045495", "0.70045495", "0.69891596", "0.6915063", "0.69055563", "0.69055563", "0.6887517", "0.6876281", "0.68668085", "0.68544436", "0.68544054", "0.68511486", "0.6849769", "0.6827842", "0.6824864", "0.6824864", "0.6824864", "0.6824864", "0.6824864", "0.6824864", "0.6824864", "0.6824864", "0.6824864", "0.6824864", "0.6824864", "0.6800304", "0.67907053", "0.67800665", "0.67738444", "0.67738444", "0.67724043", "0.67556226", "0.675038", "0.67282164", "0.6715493", "0.67052794", "0.66905993", "0.6679194", "0.6647505", "0.657561", "0.6478992", "0.6461135", "0.6457147", "0.6407933", "0.63924086", "0.639055", "0.6336224", "0.6306765", "0.62996674", "0.6277121", "0.6236004", "0.62252355", "0.62074304", "0.620527", "0.6177316", "0.61644065", "0.6156702", "0.6151439", "0.6138846", "0.61193913", "0.6116867", "0.60841656", "0.60599923", "0.60466486", "0.60174453", "0.6010892", "0.59936476", "0.59936476", "0.5991051", "0.59723854", "0.59661776", "0.59661776", "0.595749", "0.59410226", "0.59045565", "0.58989185", "0.5885034", "0.5873891", "0.58672035", "0.58657444", "0.58522063", "0.58502674", "0.58118194", "0.5765719" ]
0.62533474
66
Run the database seeds.
public function run() { DB::table('open_hours')->truncate(); DB::table('open_hours')->insert( [ [ 'hour' => '8:00', 'title' => '8:00 AM' ], [ 'hour' => '8:30', 'title' => '8:30 AM' ], [ 'hour' => '9:00', 'title' => '9:00 AM' ], [ 'hour' => '9:30', 'title' => '9:30 AM' ], [ 'hour' => '10:00', 'title' => '10:00 AM' ], [ 'hour' => '10:30', 'title' => '10:30 AM' ], [ 'hour' => '11:00', 'title' => '11:00 AM' ], [ 'hour' => '11:30', 'title' => '11:30 AM' ], [ 'hour' => '12:00', 'title' => '12:00 AM' ], [ 'hour' => '12:30', 'title' => '12:30 AM' ], [ 'hour' => '13:00', 'title' => '1:00 PM' ], [ 'hour' => '13:30', 'title' => '1:30 PM' ], [ 'hour' => '14:00', 'title' => '2:00 PM' ], [ 'hour' => '14:30', 'title' => '2:30 PM' ], [ 'hour' => '15:00', 'title' => '3:00 PM' ], [ 'hour' => '15:30', 'title' => '3:30 PM' ], [ 'hour' => '16:00', 'title' => '4:00 PM' ], [ 'hour' => '16:30', 'title' => '4:30 PM' ], [ 'hour' => '17:00', 'title' => '5:00 PM' ], ] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::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 < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::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 < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::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\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::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 Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::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 News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\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 Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
calculating actual date by removing holidays
function SubmitLeave(Request $request) { $no_of_days=$request->get('total_days'); #Number of days entered by user $total_days=$request->get('no_of_days'); $faculty_id=\Session::get('faculty_id'); $department=\Session::get('department'); $dates=array(); $leavetype=array(); $allocated_faculty=array(); $allocated_class=array(); $todays_dt=Carbon::now('Asia/Kolkata'); $submitted_date=$todays_dt->format('Y-m-d'); $submited_time=$todays_dt->toTimeString(); $type_of_leave=$request->get('type_of_leave'); $f_sn=\Session::get('f_sn'); $random = str_shuffle('0123456789'); $leave_id=$f_sn.$todays_dt->format('md').substr($random, 0, 2); for($i=1;$i<=$total_days;$i++) { if($request->get('date'.$i)) { $dates[$i]=$request->get('date'.$i); } if($request->get('date'.$i)){ $leavetype[$i]=$request->get('leavetype'.$i); } for($j=1;$j<=6;$j++) { if($request->get('lec_'.$i."_".$j)) { $allocated_faculty[$i][$j]=$request->get('lec_'.$i."_".$j); $allocated_class[$i][$j]=$request->get('class_'.$i."_".$j); } } } if($total_days<7) { $reason=$request->get('reason'); foreach ($allocated_faculty as $key1 => $value1) { $lec_id=$f_sn.substr(str_shuffle($random), 0, 7); #data for leave applications table $faculty_applications=array(); $faculty_applications['faculty_id']=$faculty_id; $faculty_applications['leave_id']=$leave_id; $faculty_applications['lec_id']=$lec_id; $faculty_applications['type_of_leave']=$leavetype[$key1]; $faculty_applications['leave_date']=$dates[$key1]; $faculty_applications['submitted_date']=$submitted_date; $faculty_applications['submitted_time']=$submited_time; $faculty_applications['hod_status']="pending"; $faculty_applications['director_status']="pending"; $faculty_applications['department']=$department; #Making changes in Leave count table if($leavetype[$key1]=="CL"){ $cl=DB::table('leave_used')->select('cl')->where('faculty_id',$faculty_id)->get(); $cl_count=$cl[0]->cl+1; DB::table('leave_used')->where('faculty_id',$faculty_id)->update(['cl'=>$cl_count]); $total_cl_avaliable=DB::table('leave_avaliable')->select('total_cl_avaliable')->where('faculty_id',$faculty_id)->get(); DB::table('leave_avaliable')->where('faculty_id',$faculty_id)->update(['cl'=>0,'total_cl_avaliable'=>$total_cl_avaliable[0]->total_cl_avaliable-1,'last_cl_used'=>$submitted_date]); } else if($leavetype[$key1]=="RH"){ $rh=DB::table('leave_used')->select('rh')->where('faculty_id',$faculty_id)->get(); $rh_count=$rh[0]->rh+1; DB::table('leave_used')->where('faculty_id',$faculty_id)->update(['rh'=>$rh_count]); $total_rh=DB::table('leave_avaliable')->select('rh')->where('faculty_id',$faculty_id)->get(); DB::table('leave_avaliable')->where('faculty_id',$faculty_id)->update(['rh'=>$total_rh[0]->rh-1]); } else if($leavetype[$key1]=="LWP"){ $lwp=DB::table('leave_used')->select('lwp')->where('faculty_id',$faculty_id)->get(); $lwp_count=$lwp[0]->lwp+1; DB::table('leave_used')->where('faculty_id',$faculty_id)->update(['lwp'=>$lwp_count]); } //-------------_________________ DB::table('faculty_applications')->insert($faculty_applications); $lecture_arrangement=array(); $lecture_arrangement['lec_id']=$lec_id; foreach ($value1 as $key2 => $value2) { $lecture_arrangement['lecture'.$key2]=$value2; $lecture_arrangement['status'.$key2]="pending"; $lecture_arrangement['class'.$key2]=$allocated_class[$key1][$key2]; } DB::table('lecture_arrangement')->insert($lecture_arrangement); } } #for Marriage Leave________________________________________ //dd($request); if($type_of_leave=="ML") { DB::table('leave_avaliable')->where('faculty_id',$faculty_id)->update(['ml'=>0]); DB::table('leave_used')->where('faculty_id',$faculty_id)->update(['ml'=>$no_of_days]); foreach ($allocated_faculty as $key1 => $value1) { $lec_id=$f_sn.substr(str_shuffle($random), 0, 7); $file = file_get_contents($_FILES["proof"]["tmp_name"]); $lec_id=$f_sn.substr(str_shuffle($random), 0, 7); #data for leave applications table $faculty_applications=array(); $faculty_applications['faculty_id']=$faculty_id; $faculty_applications['leave_id']=$leave_id; $faculty_applications['lec_id']=$lec_id; $faculty_applications['type_of_leave']=$leavetype[$key1]; $faculty_applications['leave_date']=$dates[$key1]; $faculty_applications['submitted_date']=$submitted_date; $faculty_applications['submitted_time']=$submited_time; $faculty_applications['hod_status']="pending"; $faculty_applications['director_status']="pending"; $faculty_applications['proof']=$file; DB::table('faculty_applications')->insert($faculty_applications); $lecture_arrangement=array(); $lecture_arrangement['lec_id']=$lec_id; foreach ($value1 as $key2 => $value2) { $lecture_arrangement['lecture'.$key2]=$value2; $lecture_arrangement['status'.$key2]="pending"; $lecture_arrangement['class'.$key2]=$allocated_class[$key1][$key2]; } DB::table('lecture_arrangement')->insert($lecture_arrangement); } } return redirect('leave')->with('success',"Leave application submitted successfully"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function holidays () {\n\t$year = date(\"Y\");\n\t$p = date(\"N\", strtotime(\"February 1, $year\")) == 1 ? 'second' : 'third';\n\t$easter = date(\"Y-m-d\", easter_date($year));\n\n\t$holday_descriptions = array(\n\t\t\"January 1, $year\",\n\t\t\"January $year third Monday\",\n\t\t\"February $year $p Monday\",\n\t\t\"$easter - 2 days\",\n\t\t\"last Monday of May $year\",\n\t\t\"July 4, $year\",\n\t\t\"september $year first monday\",\n\t\t\"fourth Thursday of November $year\",\n\t\t\"December 25, $year\"\n\t);\n\n\t$holday_dates = array();\n\n\tforeach ($holday_descriptions as $d) {\n\t\t$holday_dates[] = date(\"Y-m-d\", strtotime($d));\n\t}\n\n\treturn $holday_dates;\n}", "function getWorkingDays($startDate,$endDate,$holidays){\n //We add one to inlude both dates in the interval.\n if($startDate!=NULL && $endDate!=NULL){\n $days = ($endDate->getTimestamp() - $startDate->getTimestamp()) / 86400 + 1;\n $no_full_weeks = floor($days / 7);\n $no_remaining_days = fmod($days, 7);\n //It will return 1 if it's Monday,.. ,7 for Sunday\n $the_first_day_of_week = date(\"N\",$startDate->getTimestamp());\n $the_last_day_of_week = date(\"N\",$endDate->getTimestamp());\n\n // echo $the_last_day_of_week;\n\n //---->The two can be equal in leap years when february has 29 days, the equal sign is added here\n\n //In the first case the whole interval is within a week, in the second case the interval falls in two weeks.\n\n if ($the_first_day_of_week <= $the_last_day_of_week){\n\n if ($the_first_day_of_week <= 6 && 6 <= $the_last_day_of_week) $no_remaining_days--;\n\n if ($the_first_day_of_week <= 7 && 7 <= $the_last_day_of_week) $no_remaining_days--;\n\n }\n else{\n\n if ($the_first_day_of_week <= 6) {\n\n //In the case when the interval falls in two weeks, there will be a Sunday for sure\n\n $no_remaining_days--;\n\n }\n\n }\n //The no. of business days is: (number of weeks between the two dates) * (5 working days) + the remainder\n\n//---->february in none leap years gave a remainder of 0 but still calculated weekends between first and last day, this is one way to fix it\n\n $workingDays = $no_full_weeks * 5;\n\n if ($no_remaining_days > 0 )\n\n {\n\n $workingDays += $no_remaining_days;\n\n }\n //We subtract the holidays\n\n/* foreach($holidays as $holiday){\n\n $time_stamp=strtotime($holiday);\n\n //If the holiday doesn't fall in weeken\n\n if (strtotime($startDate) <= $time_stamp && $time_stamp <= strtotime($endDate) && date(\"N\",$time_stamp) != 6 && date(\"N\",$time_stamp) != 7)\n\n $workingDays--;\n\n }*/\n return round ($workingDays-1);\n }\nreturn NULL;\n}", "function add_business_days($start_date, $business_days, $holidays, $date_format) {\r\n $first_end_date = add_business_days_no_holidays($start_date, $business_days, $date_format);\r\n\r\n // Now, what about holidays?\r\n $add_more_days = 0;\r\n foreach ($holidays as $holiday) {\r\n if (( strtotime($start_date) <= strtotime($holiday) ) && ( strtotime($first_end_date) >= strtotime($holiday) )) {\r\n $add_more_days++;\r\n }\r\n }\r\n\r\n $end_date = $first_end_date;\r\n if ($add_more_days != 0) {\r\n $end_date = add_business_days_no_holidays($first_end_date, $add_more_days, $date_format);\r\n }\r\n\r\n return $end_date;\r\n}", "function add_business_days_no_holidays($start_date, $business_days, $date_format) {\r\n $ts_start_date = strtotime($start_date);\r\n\r\n $weeks = floor($business_days / 5);\r\n $days1 = $business_days % 5;\r\n\r\n // Now, the end day is at a weekend?\r\n $init_day = date('N', $ts_start_date);\r\n $last_day = $init_day + $days1;\r\n $days2 = 0;\r\n if ($last_day > 5) {\r\n// $days2 = 8 - $last_day;\r\n $days2 = 2; //add two days for going over weekend??\r\n \r\n }\r\n\r\n $total_days = ( $weeks * 7 ) + ( $days1 + $days2 );\r\n\r\n return date('Y-m-d', strtotime('+' . $total_days . ' days', $ts_start_date));\r\n}", "function Date_Holidays_Driver_Jewish()\n {\n }", "private function calculateNewYearHolidays(): void\n {\n $newYearsDay = new DateTime(\"$this->year-01-01\", DateTimeZoneFactory::getDateTimeZone($this->timezone));\n $dayAfterNewYearsDay = new DateTime(\"$this->year-01-02\", DateTimeZoneFactory::getDateTimeZone($this->timezone));\n\n switch ($newYearsDay->format('w')) {\n case 0:\n $newYearsDay->add(new DateInterval('P1D'));\n $dayAfterNewYearsDay->add(new DateInterval('P1D'));\n break;\n case 5:\n $dayAfterNewYearsDay->add(new DateInterval('P2D'));\n break;\n case 6:\n $newYearsDay->add(new DateInterval('P2D'));\n $dayAfterNewYearsDay->add(new DateInterval('P2D'));\n break;\n }\n\n $this->addHoliday(new Holiday('newYearsDay', [], $newYearsDay, $this->locale));\n $this->addHoliday(new Holiday('dayAfterNewYearsDay', [], $dayAfterNewYearsDay, $this->locale));\n }", "function get_holidays($inc_year){\n\t//$year = date(\"Y\");\n\t$year = $inc_year;\n\n\t// $holidays[] = new Holiday(\"New Year's Day\", get_timestamp(\"$year-1-1\"));\n\t$holidays[] = new Holiday(\"Republic Day\", get_timestamp(\"$year-1-26\"));\n\t// $holidays[] = new Holiday(\"Labour Day\", ordinal_day(1, 'Mon', 3, $year));\n\t// $holidays[] = new Holiday(\"Anzac Day\", get_timestamp(\"$year-4-25\"));\n\t//$holidays[] = new Holiday(\"St. Patrick's Day\", get_timestamp(\"$year-3-17\"));\n\t// TODO: $holidays[] = new Holiday(\"Good Friday\", easter_date($year));\n\t// $holidays[] = new Holiday(\"Easter\", easter_date($year));\n\t// TODO: $holidays[] = new Holiday(\"Easter Monday\", easter_date($year));\n\t// $holidays[] = new Holiday(\"Foundation Day\", ordinal_day(1, 'Mon', 6, $year));\n\t// $holidays[] = new Holiday(\"Queen's Birthday\", ordinal_day(1, 'Mon', 10, $year));\n\t//$holidays[] = new Holiday(\"Memorial Day\", memorial_day($year));\n\t//$holidays[] = new Holiday(\"Mother's Day\", ordinal_day(2, 'Sun', 5, $year));\n\t//$holidays[] = new Holiday(\"Father's Day\", ordinal_day(3, 'Sun', 6, $year));\n\t//$holidays[] = new Holiday(\"Independence Day\", get_timestamp(\"$year-7-4\"));\n\t//$holidays[] = new Holiday(\"Labor Day\", ordinal_day(1, 'Mon', 9, $year));\n\t$holidays[] = new Holiday(\"Christmas\", get_timestamp(\"$year-12-25\"));\n\t$holidays[] = new Holiday(\"Dussera\", get_timestamp(\"2010-10-15\"));\n\t$holidays[] = new Holiday(\"Ugadi\", get_timestamp(\"2010-3-16\"));\n\t$holidays[] = new Holiday(\"kanada Rajyotshava\", get_timestamp(\"$year-11-1\"));\n\t$holidays[] = new Holiday(\"Christmas\", get_timestamp(\"2010-3-16\"));\n\t$holidays[] = new Holiday(\"Diwali\", get_timestamp(\"2010-11-04\"));\n\t$holidays[] = new Holiday(\"Diwali\", get_timestamp(\"2010-11-05\"));\n\t// $holidays[] = new Holiday(\"Boxing Day\", get_timestamp(\"$year-12-26\"));\n\n\t$numHolidays = count($holidays) - 1;\n\t$out_array = array();\n\n\tfor ($i = 0; $i < $numHolidays; $i++){\n\t\t$out_array[] = $holidays[$i]->date;\n\t}\n\tunset($holidays);\n\treturn $out_array;\n}", "private function calculateLiberationDay(): void\n {\n if ($this->year >= 1949) {\n $this->addHoliday(new Holiday(\n 'liberationDay',\n ['it' => 'Festa della Liberazione'],\n new DateTime(\"$this->year-4-25\", DateTimeZoneFactory::getDateTimeZone($this->timezone)),\n $this->locale\n ));\n }\n }", "function date_difference($start_date, $end_date, $workdays_only = false, $skip_holidays = false){\n\t$start_date = strtotime($start_date);\n\t$end_date = strtotime($end_date);\n\t$seconds_in_a_day = 86400;\n\t$sunday_val = \"0\";\n\t$saturday_val = \"6\";\n\t$workday_counter = 0;\n\t$holiday_array = array();\n\n\t$ptr_year = intval(date(\"Y\", $start_date));\n\t$holiday_array[$ptr_year] = get_holidays(date(\"Y\", $start_date));\n\n\tfor($day_val = $start_date; $day_val <= $end_date; $day_val+=$seconds_in_a_day){\n\t\t$pointer_day = date(\"w\", $day_val);\n\t\tif($workdays_only == true){\n\t\t\tif(($pointer_day != $sunday_val) AND ($pointer_day != $saturday_val)){\n\t\t\t\tif($skip_holidays == true){\n\t\t\t\t\tif(intval(date(\"Y\", $day_val))!=$ptr_year){\n\t\t\t\t\t\t$ptr_year = intval(date(\"Y\", $day_val));\n\t\t\t\t\t\t$holiday_array[$ptr_year] = get_holidays(date(\"Y\", $day_val));\n\t\t\t\t\t}\n\t\t\t\t\tif(!in_array($day_val, $holiday_array[date(\"Y\", $day_val)])){\n\t\t\t\t\t\t$workday_counter++;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$workday_counter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\tif($skip_holidays == true){\n\t\t\t\tif(intval(date(\"Y\", $day_val))!=$ptr_year){\n\t\t\t\t\t$ptr_year = intval(date(\"Y\", $day_val));\n\t\t\t\t\t$holiday_array[$ptr_year] = get_holidays(date(\"Y\", $day_val));\n\t\t\t\t}\n\t\t\t\tif(!in_array($day_val, $holiday_array[date(\"Y\", $day_val)])){\n\t\t\t\t\t$workday_counter++;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$workday_counter++;\n\t\t\t}\n\t\t}\n\t}\n\treturn $workday_counter;\n}", "function dateDiffInDays($startDate,$endDate,$holidays = array(\"2019-01-26\",\"2019-08-15\",\"2019-10-02\")){\r\n $endDate = strtotime($endDate);\r\n $startDate = strtotime($startDate);\r\n //The total number of days between the two dates. We compute the no. of seconds and divide it to 60*60*24\r\n //We add one to inlude both dates in the interval.\r\n $days = ($endDate - $startDate) / 86400 + 1;\r\n $no_full_weeks = floor($days / 7);\r\n $no_remaining_days = fmod($days, 7);\r\n //It will return 1 if it's Monday,.. ,7 for Sunday\r\n $the_first_day_of_week = date(\"N\", $startDate);\r\n $the_last_day_of_week = date(\"N\", $endDate);\r\n //---->The two can be equal in leap years when february has 29 days, the equal sign is added here\r\n //In the first case the whole interval is within a week, in the second case the interval falls in two weeks.\r\n if ($the_first_day_of_week <= $the_last_day_of_week) {\r\n if ($the_first_day_of_week <= 6 && 6 <= $the_last_day_of_week) $no_remaining_days--;\r\n if ($the_first_day_of_week <= 7 && 7 <= $the_last_day_of_week) $no_remaining_days--;\r\n }\r\n else {\r\n // (edit by Tokes to fix an edge case where the start day was a Sunday\r\n // and the end day was NOT a Saturday)\r\n // the day of the week for start is later than the day of the week for end\r\n if ($the_first_day_of_week == 7) {\r\n // if the start date is a Sunday, then we definitely subtract 1 day\r\n $no_remaining_days--;\r\n if ($the_last_day_of_week == 6) {\r\n // if the end date is a Saturday, then we subtract another day\r\n $no_remaining_days--;\r\n }\r\n }\r\n else {\r\n // the start date was a Saturday (or earlier), and the end date was (Mon..Fri)\r\n // so we skip an entire weekend and subtract 2 days\r\n $no_remaining_days -= 2;\r\n }\r\n }\r\n //The no. of business days is: (number of weeks between the two dates) * (5 working days) + the remainder\r\n//---->february in none leap years gave a remainder of 0 but still calculated weekends between first and last day, this is one way to fix it\r\n $workingDays = $no_full_weeks * 5;\r\n if ($no_remaining_days > 0 )\r\n {\r\n $workingDays += $no_remaining_days;\r\n }\r\n //We subtract the holidays\r\n foreach($holidays as $holiday){\r\n $time_stamp=strtotime($holiday);\r\n //If the holiday doesn't fall in weekend\r\n if ($startDate <= $time_stamp && $time_stamp <= $endDate && date(\"N\",$time_stamp) != 6 && date(\"N\",$time_stamp) != 7)\r\n $workingDays--;\r\n }\r\n return $workingDays;\r\n}", "private function calculateWaitangiDay(): void\n {\n if ($this->year < 1974) {\n return;\n }\n\n $date = new DateTime(\"$this->year-02-6\", DateTimeZoneFactory::getDateTimeZone($this->timezone));\n\n if ($this->year >= 2015 && !$this->isWorkingDay($date)) {\n $date->modify('next monday');\n }\n\n $this->addHoliday(new Holiday('waitangiDay', [], $date, $this->locale));\n }", "private function calculateNationalDay(): void\n {\n if ($this->year < 1916) {\n return;\n }\n\n $holidayName = 'Svenska flaggans dag';\n\n // Since 1983 this day was named 'Sveriges nationaldag'\n if ($this->year >= 1983) {\n $holidayName = 'Sveriges nationaldag';\n }\n\n $this->addHoliday(new Holiday(\n 'nationalDay',\n ['sv' => $holidayName],\n new DateTime(\"$this->year-6-6\", DateTimeZoneFactory::getDateTimeZone($this->timezone)),\n $this->locale\n ));\n }", "public function calculateHoliday($checkDate){\n\t\n\t\t$jaar = date('Y');\n\t\t$feestdag = array();\n\t\t$a = $jaar % 19;\n\t\t$b = intval($jaar/100);\n\t\t$c = $jaar % 100;\n\t\t$d = intval($b/4);\n\t\t$e = $b % 4;\n\t\t$g = intval((8 * $b + 13) / 25);\n\t\t$theta = intval((11 * ($b - $d - $g) - 4) / 30);\n\t\t$phi = intval((7 * $a + $theta + 6) / 11);\n\t\t$psi = (19 * $a + ($b - $d - $g) + 15 -$phi) % 29;\n\t\t$i = intval($c / 4);\n\t\t$k = $c % 4;\n\t\t$lamda = ((32 + 2 * $e) + 2 * $i - $k - $psi) % 7;\n\t\t$maand = intval((90 + ($psi + $lamda)) / 25);\n\t\t$dag = (19 + ($psi + $lamda) + $maand) % 32;\n\n\t\t$feestdag[] = date('Y-m-d', mktime (1,1,1,1,1,$jaar)); // Nieuwjaarsdag\n\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,$maand,$dag-2,$jaar)); // Goede Vrijdag\n\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,$maand,$dag,$jaar)); // 1e Paasdag\n\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,$maand,$dag+1,$jaar)); // 2e Paasdag\n\n\t\tif ($jaar < '2014'){\n\t\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,4,30,$jaar)); // Koninginnedag\n\t\t}\n\t\telse {\n\t\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,4,26,$jaar)); // Koningsdag\n\t\t}\n\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,5,5,$jaar)); // Bevrijdingsdag\n\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,$maand,$dag+39,$jaar)); // Hemelvaart\n\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,$maand,$dag+49,$jaar)); // 1e Pinksterdag\n\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,$maand,$dag+50,$jaar)); // 2e Pinksterdag\n\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,12,25,$jaar)); // 1e Kerstdag\n\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,12,26,$jaar)); // 2e Kerstdag\n\n/*\n\t\tfile_put_contents('/tmp/filename.txt', print_r($feestdag, true));\n\t\tfile_put_contents('/tmp/filename2.txt', $checkDate);\n*/\n\n\t\treturn in_array($checkDate, $feestdag) ? true : false;\n\t}", "function getWorkingDays($startDate, $endDate, $holidays) {\r\n\r\n // do strtotime calculations just once\r\n $endDate = strtotime($endDate);\r\n $startDate = strtotime($startDate);\r\n\r\n\r\n //The total number of days between the two dates. We compute the no. of seconds and divide it to 60*60*24\r\n //We add one to inlude both dates in the interval.\r\n $days = ($endDate - $startDate) / 86400;\r\n\r\n $no_full_weeks = floor($days / 7);\r\n $no_remaining_days = fmod($days, 7);\r\n\r\n //It will return 1 if it's Monday,.. ,7 for Sunday\r\n $the_first_day_of_week = date(\"N\", $startDate);\r\n $the_last_day_of_week = date(\"N\", $endDate);\r\n\r\n //---->The two can be equal in leap years when february has 29 days, the equal sign is added here\r\n //In the first case the whole interval is within a week, in the second case the interval falls in two weeks.\r\n if ($the_first_day_of_week <= $the_last_day_of_week) {\r\n if ($the_first_day_of_week <= 6 && 6 <= $the_last_day_of_week)\r\n $no_remaining_days--;\r\n if ($the_first_day_of_week <= 7 && 7 <= $the_last_day_of_week)\r\n $no_remaining_days--;\r\n }\r\n else {\r\n // (edit by Tokes to fix an edge case where the start day was a Sunday\r\n // and the end day was NOT a Saturday)\r\n // the day of the week for start is later than the day of the week for end\r\n if ($the_first_day_of_week == 7) {\r\n // if the start date is a Sunday, then we definitely subtract 1 day\r\n $no_remaining_days--;\r\n\r\n if ($the_last_day_of_week == 6) {\r\n // if the end date is a Saturday, then we subtract another day\r\n $no_remaining_days--;\r\n }\r\n } else {\r\n // the start date was a Saturday (or earlier), and the end date was (Mon..Fri)\r\n // so we skip an entire weekend and subtract 2 days\r\n $no_remaining_days -= 2;\r\n }\r\n }\r\n\r\n //The no. of business days is: (number of weeks between the two dates) * (5 working days) + the remainder\r\n//---->february in none leap years gave a remainder of 0 but still calculated weekends between first and last day, this is one way to fix it\r\n $workingDays = $no_full_weeks * 5;\r\n if ($no_remaining_days > 0) {\r\n $workingDays += $no_remaining_days;\r\n }\r\n\r\n //We subtract the holidays\r\n foreach ($holidays as $holiday) {\r\n $time_stamp = strtotime($holiday);\r\n //If the holiday doesn't fall in weekend\r\n if ($startDate <= $time_stamp && $time_stamp <= $endDate && date(\"N\", $time_stamp) != 6 && date(\"N\", $time_stamp) != 7)\r\n $workingDays--;\r\n }\r\n\r\n if ($workingDays < 0) {\r\n $workingDays = .01;\r\n }\r\n return $workingDays;\r\n\r\n\r\n ////Example:\r\n//\r\n//$holidays=array(\"2008-12-25\",\"2008-12-26\",\"2009-01-01\");\r\n//\r\n//echo getWorkingDays(\"2008-12-22\",\"2009-01-02\",$holidays)\r\n//// => will return 7\r\n//\r\n}", "private function calculateLabourDay(): void\n {\n if ($this->year < 1900) {\n return;\n }\n\n $date = new DateTime(\n ($this->year < 1910 ? 'second wednesday of october' : 'fourth monday of october') . \" $this->year\",\n DateTimeZoneFactory::getDateTimeZone($this->timezone)\n );\n\n $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale));\n }", "private function calculateRepublicDay(): void\n {\n if ($this->year >= 1946) {\n $this->addHoliday(new Holiday(\n 'republicDay',\n ['it' => 'Festa della Repubblica'],\n new DateTime(\"$this->year-6-2\", DateTimeZoneFactory::getDateTimeZone($this->timezone)),\n $this->locale\n ));\n }\n }", "function getUpcomingHolidays($date=NULL) {\n\t\tif (!$date) $date = time();\n\t\t$year = date('Y');\n\t\t$rs = aql::select(\"ct_holiday { slug, date where date is not null order by date_order asc }\");\n\t\tforeach ($rs as $r) {\n\t\t\tif (strtotime($r['date'].'/'.$year) > $date ) $this_years_holidays[$r['slug']] = strtotime($r['date'].'/'.$year);\n\t\t\telse $next_years_holidays[$r['slug']] = strtotime($r['date'].'/'.($year+1));\n\t\t}\n\t\treturn(array_merge($this_years_holidays,$next_years_holidays));\n}", "private function calculateSlovakNationalUprisingDay(): void\n {\n $this->addHoliday(new Holiday(\n 'slovakNationalUprisingDay',\n [\n 'sk' => 'Výročie Slovenského národného povstania',\n 'en' => 'Slovak National Uprising Day',\n ],\n new DateTime($this->year . '-08-29', DateTimeZoneFactory::getDateTimeZone($this->timezone)),\n $this->locale,\n Holiday::TYPE_OFFICIAL\n ));\n }", "function testSubstituteHolidaysInMay2008()\n {\n $obj = Date_Holidays::factory('Japan', 2008);\n if (Date_Holidays::isError($obj)) {\n $this->fail('Factory was unable to produce driver-object');\n }\n // calculate substitute holiday for Children's Day (1st time)\n $this->assertTrue($obj->isHoliday(new Date('2008-05-06')), '1st time');\n\n // calculate substitute holiday for Children's Day (2nd time)\n // because re-calculated holidays internaly\n $this->assertTrue($obj->isHoliday(new Date('2008-05-06')), '2nd time');\n\n // in 2007, this day is not substitute holiday\n $this->assertFalse($obj->isHoliday(new Date('2007-05-07')), 'in 2007');\n }", "public function initialize(): void\n {\n $this->timezone = 'Europe/Stockholm';\n\n // Add common holidays\n $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale));\n\n // Add common Christian holidays (common in Sweden)\n $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale));\n $this->calculateEpiphanyEve();\n $this->calculateWalpurgisEve();\n $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->easter($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->ascensionDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->pentecost($this->year, $this->timezone, $this->locale));\n $this->calculateStJohnsHolidays(); // aka Midsummer\n $this->calculateAllSaintsHolidays();\n $this->addHoliday($this->christmasEve($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale));\n\n $this->addHoliday($this->newYearsEve($this->year, $this->timezone, $this->locale, Holiday::TYPE_OBSERVANCE));\n\n // Calculate other holidays\n $this->calculateNationalDay();\n }", "public function getHolidays()\n {\n\t\t$db = $this->getDbo();\n\t\t$rHolidays = array();\n\t\t\n\t\t$query = $db->getQuery(true)\n\t\t\t->select('a.*')\n\t\t\t->from('#__cooltouraman_holiday AS a')\n\t\t\t->where('1');\n\t\t\t\n\t\t$db->setQuery($query);\n\t\t\n\t\t$holidays = $db->loadObjectlist();\n\t\t\n\t\tforeach($holidays as $holiday)\n\t\t{ \n\t\t\t$thisYear = new DateTime();\n\t\t\t$nextYear = new DateTime();\n\t\t\t$nextYear->modify('+ 1 year');\n\t\t\t\n\t\t\tif ($holiday->year === '*')\n\t\t\t\t\t$holiday->year = $thisYear->format(\"Y\");\n\t\t\t\n\t\t\tif ($holiday->year === $thisYear->format(\"Y\") || $holiday->year === $nextYear->format(\"Y\"))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$holidayDate = new DateTime($holiday->year.'-'.$holiday->month.'-'.$holiday->day);\n\t\t\t\t$monthName = strtoupper($holidayDate->format(\"F\"));\n\n\t\t\t\tif(!isset($rHolidays[$monthName]))\n\t\t\t\t\t$rHolidays[$monthName] = array();\n\t\t\t\t\n\t\t\t\t$rHolidays[$monthName][$holidayDate->format(\"d-m-Y\")]['day'] = $holidayDate->format(\"d\");\n\t\t\t\t$rHolidays[$monthName][$holidayDate->format(\"d-m-Y\")]['title'] = $holiday->title;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $rHolidays;\n }", "function holiday ($yr=0)\n\t{\n\t\tif ($yr==0) $yr = (int)date(\"Y\");\n\t\t$this->bjd = gregorian_to_jd(1,1,$yr);\n\t\t$this->ejd = gregorian_to_jd(12,31,$yr);\n\n\t\t//add holidays easily define in the gregorian calendar\n\t\t$this->holidays = Array(\n\t\t\t\"newyearseve\" => gregorian_to_jd(12,31,$yr),\n\t\t\t\"valentinesday\"=> gregorian_to_jd(2,14,$yr),\n\t\t\t\"presidentsday\" => nth_weekday_jd(3,dMONDAY,2,$yr),\n\t\t\t\"stpatricksday\" => gregorian_to_jd(3,17,$yr),\n\t\t\t\"aprilfoolsday\" => gregorian_to_jd(4,1,$yr),\n\t\t\t\"cincodemayo\" => gregorian_to_jd(5,5,$yr),\n\t\t\t\"mothersday\" => nth_weekday_jd(2,dSUNDAY,5,$yr),\n\t\t\t\"memorialday\" => $this->memorialDay($yr),\n\t\t\t\"fathersday\" => nth_weekday_jd(3,dSUNDAY,6,$yr),\n\t\t\t\"fourthofjuly\" => gregorian_to_jd(7,4,$yr),\n\t\t\t\"laborday\" => nth_weekday_jd(1,dMONDAY,9,$yr),\n\t\t\t\"columbusday\" => nth_weekday_jd(2,dMONDAY,10,$yr),\n\t\t\t\"halloween\" => gregorian_to_jd(10,31,$yr), \n\t\t\t\"thanksgiving\" => nth_weekday_jd(4, dTHURSDAY, 11,$yr),\n\t\t\t\"christmas\" => gregorian_to_jd(12,24,$yr),\n\t\t\t\"christmasday\" => gregorian_to_jd(12,25,$yr),\n\t\t\t\"mardigras\" => easter_jd($yr,-47),\n\t\t\t\"easter\" =>\teaster_jd($yr)\n\t\t);\n\t\t\t\n\t\tasort($this->holidays);\n\t}", "function getDate($s)\n\t{\n\t\tif (array_key_exists($s, $this->holidays)) return (strtotime(jdtogregorian(intval($this->holidays[$s],10)+1)));\n\n\n\t\t//the key doesn't exist, return 0\n\t\treturn (0);\n\t}", "function getLeaveHoliday($db, $strStartDate, $strFinishDate)\n{\n $intResult = 0;\n if ($strStartDate == \"\" || $strFinishDate == \"\") {\n return 0;\n }\n $strSQL = \"SELECT count(id) AS total FROM hrd_calendar WHERE status='t' AND leave='t' \";\n $strSQL .= \"AND holiday BETWEEN '$strStartDate' AND '$strFinishDate' \";\n $resTmp = $db->execute($strSQL);\n if ($rowTmp = $db->fetchrow($resTmp)) {\n if ($rowTmp['total'] != \"\") {\n $intResult = $rowTmp['total'];\n }\n }\n return $intResult;\n}", "private function calculateAnzacDay(): void\n {\n if ($this->year < 1921) {\n return;\n }\n\n $date = new DateTime(\"$this->year-04-25\", DateTimeZoneFactory::getDateTimeZone($this->timezone));\n\n if ($this->year >= 2015 && !$this->isWorkingDay($date)) {\n $date->modify('next monday');\n }\n\n $this->addHoliday(new Holiday('anzacDay', [], $date, $this->locale));\n }", "function get_holidays() {\n $arr_holidays = array(\n 0 => array(\n 'day' => 1,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 1 => array(\n 'day' => 2,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 2 => array(\n 'day' => 3,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 3 => array(\n 'day' => 4,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 4 => array(\n 'day' => 5,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 5 => array(\n 'day' => 6,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 6 => array(\n 'day' => 7,\n 'month' => 1,\n 'holiday_name' => 'Рождество Христово',\n ),\n 7 => array(\n 'day' => 8,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 8 => array(\n 'day' => 23,\n 'month' => 2,\n 'holiday_name' => 'День защитника отечества',\n ),\n 9 => array(\n 'day' => 8,\n 'month' => 3,\n 'holiday_name' => 'Международный женский день',\n ),\n );\n\n return $arr_holidays;\n}", "private function calculateStJohnsHolidays(): void\n {\n $date = new DateTime(\"$this->year-6-20 this saturday\", DateTimeZoneFactory::getDateTimeZone($this->timezone));\n $this->addHoliday(new Holiday(\n 'stJohnsDay',\n [],\n $date,\n $this->locale\n ));\n\n $date->sub(new DateInterval('P1D'));\n $this->addHoliday(new Holiday(\n 'stJohnsEve',\n [],\n $date,\n $this->locale,\n Holiday::TYPE_OBSERVANCE\n ));\n }", "public static function businessDates($startDate, $endDate, $nonWork = 6) {\n $begin = new \\DateTime($startDate);\n $end = new \\DateTime($endDate);\n $holiday = array();\n $interval = new \\DateInterval('P1D');\n $dateRange = new \\DatePeriod($begin, $interval, $end);\n foreach ($dateRange as $date) {\n if ($date->format(\"N\") < $nonWork and ! in_array($date->format(\"Y-m-d\"), $holiday)) {\n $dates[] = $date->format(\"Y-m-d\");\n }\n }\n return $dates;\n }", "function getHolidays($holiday_sheet){\n\t$file = fopen($holiday_sheet,\"r\");\n\t$header = fgetcsv($file);\n\n\t$holidays = array();\n\twhile(! feof($file)){\n\t\t$row = fgetcsv($file);\n\t\tif($row[1]!=\"\"){\n\t\t\t$date_split = explode(\"-\", $row[1]);\n\t\t\t$date = $date_split[2].\"-\".$date_split[1].\"-\".$date_split[0];\n\t\t\t// $mk_date = strtotime($raw_date);\n \t\t\t// print $raw_date.\", \".$mk_date.\"<br>\";\n \t\t\tarray_push($holidays,[$date,$row[2]]);\n \t\t\t// print_r([$date,$row[2]]);\n \t\t\t// echo \"<br>\";\n \t\t}\n \t}\n\tfclose($file);\n\treturn $holidays;\n}", "public function calculateBusinessDays()\n {\n return $this->calculateDays(request('start_date'), request('end_date'));\n }", "function testHolidaysFrom1970to2050()\n {\n for ($year = 1970; $year < 2051; $year++) {\n $obj =& Date_Holidays::factory('Japan', $year);\n if (Date_Holidays::isError($obj)) {\n $this->fail('Factory was unable to produce driver-object');\n }\n\n $invalid_holidays = array();\n foreach ($obj->getHolidayDates() as $holiday) {\n $dt = substr($holiday->getDate(), 0, 10);\n if (array_key_exists($dt, $this->_holidays)) {\n unset($this->_holidays[$dt]);\n } else {\n $invalid_holidays[] = $holiday->getDate();\n }\n }\n }\n // if all holidays was calculated or not\n $this->assertEquals(0, count($this->_holidays));\n\n // if no invalid holidays was calculated or not\n $this->assertEquals(0, count($invalid_holidays));\n }", "public function getWithAppliedHolidays($holidays) {\n\n $payrollDates = $this->generatedPayrollDates;\n\n foreach ($holidays AS $holiday) {\n /* @var $holiday Holiday */\n for ($i = 0; $i < count($payrollDates); $i ++) {\n /* @var $this->generatedPayrollDates[$i] PayrollDate */\n if ($payrollDates[$i]->date->format(\"Y-m-d\") == $holiday->date) {\n $payrollDates[$i]->holidayType = $holiday->holiday_type_code;\n }\n }\n }\n\n return $payrollDates;\n }", "private function calculateAllSaintsHolidays(): void\n {\n $date = new DateTime(\"$this->year-10-31 this saturday\", DateTimeZoneFactory::getDateTimeZone($this->timezone));\n $this->addHoliday(new Holiday(\n 'allSaintsDay',\n [],\n $date,\n $this->locale\n ));\n\n $date->sub(new DateInterval('P1D'));\n $this->addHoliday(new Holiday(\n 'allSaintsEve',\n [],\n $date,\n $this->locale,\n Holiday::TYPE_OBSERVANCE\n ));\n }", "public function isHoliday($date);", "public function getHolidays()\n {\n return $this->holidays;\n }", "function getHolidays()\n {\n $holidaysQuery = DB::table('dbo.LEAVE_PUBLIC_HOLIDAYS')->lists('holiday_date');\n $holidays = [];\n foreach ($holidaysQuery as $holiday) {\n array_push($holidays, $holiday);\n }\n\n return $holidays;\n }", "public function initialize(): void\n {\n $this->timezone = 'Europe/Bratislava';\n\n // 1.1.\n $this->calculateSlovakIndependenceDay();\n // 6.1.\n $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK));\n // 1.5.\n $this->addHoliday($this->internationalWorkersDay(\n $this->year,\n $this->timezone,\n $this->locale,\n Holiday::TYPE_BANK\n ));\n // 8.5.\n $this->addHoliday($this->victoryInEuropeDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK));\n // 5.7.\n $this->calculateSaintsCyrilAndMethodiusDay();\n // 29.8.\n $this->calculateSlovakNationalUprisingDay();\n // 1.9.\n $this->calculateSlovakConstitutionDay();\n // 15.9.\n $this->calculateOurLadyOfSorrowsDay();\n // 1.11.\n $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK));\n // 17.11.\n $this->calculateStruggleForFreedomAndDemocracyDay();\n // 24.12.\n $this->addHoliday($this->christmasEve($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK));\n // 25.12.\n $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK));\n // 26.12.\n $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK));\n\n // variable holidays - easter\n $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK));\n $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK));\n }", "public function initialize(): void\n {\n $this->timezone = 'Europe/Oslo';\n\n // Add common holidays\n $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale));\n\n // Add common Christian holidays (common in Norway)\n $this->addHoliday($this->maundyThursday($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->easter($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->ascensionDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->pentecost($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->pentecostMonday($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale));\n\n // Calculate other holidays\n $this->calculateConstitutionDay();\n }", "function testGreeneyDay()\n {\n // with ja_JP.xml\n $obj = Date_Holidays::factory('Japan', 1986);\n if (Date_Holidays::isError($obj)) {\n $this->fail('Factory was unable to produce driver-object');\n }\n $obj->addTranslationFile(LANG_FILE . '/Japan/ja_JP.xml', 'ja_JP');\n if (Date_Holidays::isError($obj)) {\n $this->fail('fail to add translation file');\n }\n\n // the day of week on 1986-05-04 is 0 (sunday)\n $this->assertNull($obj->getHolidayForDate('1986-05-04'));\n\n $obj->setYear(1987);\n $this->assertEquals('国民の休日', $obj->getHolidayForDate('1987-05-04', 'ja_JP')->getTitle(), 'showa day in 1987');\n\n $obj->setYear(2007);\n $this->assertEquals('みどりの日', $obj->getHolidayForDate('2007-05-04', 'ja_JP')->getTitle(), 'showa day in 2007');\n }", "function danish_holidays($year = null)\n {\n if (is_null($year)) {\n $year = (int) date('Y');\n }\n $dayLength = 24 * 60 * 60; // seconds\n $easter = mktime(0, 0, 0, 3, (21 + (easter_days($year))), $year);\n $holidays = [];\n $holidays['Nytårsdag'] = date('Y-m-d', mktime(0, 0, 0, 1, 1, $year));\n $holidays['Palmesøndag'] = date('Y-m-d', $easter - (6.5 * $dayLength));\n $holidays['Skærtorsdag'] = date('Y-m-d', $easter - (3 * $dayLength));\n $holidays['Langfredag'] = date('Y-m-d', $easter - (2 * $dayLength));\n $holidays['Påskedag'] = date('Y-m-d', $easter);\n $holidays['2. påskedag'] = date('Y-m-d', $easter + (1 * $dayLength));\n $holidays['Store bededag'] = date('Y-m-d', $easter + (26 * $dayLength));\n $holidays['Kristi himmelfart'] = date('Y-m-d', $easter + (39 * $dayLength));\n $holidays['Pinsedag'] = date('Y-m-d', $easter + (49 * $dayLength));\n $holidays['2. pinsedag'] = date('Y-m-d', $easter + (50 * $dayLength));\n//\t\t$holidays['Grundlovsdag'] = date('Y-m-d', mktime(0, 0, 0, 6, 5, $year));\n $holidays['Juleaften'] = date('Y-m-d', mktime(0, 0, 0, 12, 24, $year));\n $holidays['Juledag'] = date('Y-m-d', mktime(0, 0, 0, 12, 25, $year));\n $holidays['2. juledag'] = date('Y-m-d', mktime(0, 0, 0, 12, 26, $year));\n $holidays['Nytårsaften'] = date('Y-m-d', mktime(0, 0, 0, 12, 31, $year));\n return $holidays;\n }", "public function initialize(): void\n {\n $this->timezone = 'Europe/Kiev';\n\n // Add common holidays\n // New Years Day will not be substituted to an monday if it's on a weekend!\n $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale), false);\n $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->internationalWomensDay($this->year, $this->timezone, $this->locale));\n\n // Add Christian holidays\n $this->addHoliday($this->easter($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->pentecost($this->year, $this->timezone, $this->locale));\n\n // Add other holidays\n $this->calculateChristmasDay();\n $this->calculateSecondInternationalWorkersDay();\n $this->calculateVictoryDay();\n $this->calculateConstitutionDay();\n $this->calculateIndependenceDay();\n $this->calculateDefenderOfUkraineDay();\n $this->calculateCatholicChristmasDay();\n }", "function _clearHolidays()\n {\n $this->_holidays = array();\n $this->_internalNames = array();\n $this->_dates = array();\n $this->_titles = array();\n }", "private function calculateStruggleForFreedomAndDemocracyDay(): void\n {\n $this->addHoliday(new Holiday(\n 'struggleForFreedomAndDemocracyDay',\n [\n 'sk' => 'Deň boja za slobodu a demokraciu',\n 'cs' => 'Den boje za svobodu a demokracii',\n 'en' => 'Struggle for Freedom and Democracy Day',\n ],\n new DateTime($this->year . '-11-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)),\n $this->locale,\n Holiday::TYPE_OFFICIAL\n ));\n }", "function holiday($name, $date){\n\t\t$this->name = $name; // Official name of holiday\n\t\t$this->date = $date; // UNIX timestamp of date\n\t}", "public function calculateEpiphanyEve(): void\n {\n $this->addHoliday(new Holiday(\n 'epiphanyEve',\n [],\n new DateTime(\"$this->year-1-5\", DateTimeZoneFactory::getDateTimeZone($this->timezone)),\n $this->locale,\n Holiday::TYPE_OBSERVANCE\n ));\n }", "private function calculateChristmasHolidays(): void\n {\n $christmasDay = new DateTime(\"$this->year-12-25\", DateTimeZoneFactory::getDateTimeZone($this->timezone));\n $boxingDay = new DateTime(\"$this->year-12-26\", DateTimeZoneFactory::getDateTimeZone($this->timezone));\n\n switch ($christmasDay->format('w')) {\n case 0:\n $christmasDay->add(new DateInterval('P2D'));\n break;\n case 5:\n $boxingDay->add(new DateInterval('P2D'));\n break;\n case 6:\n $christmasDay->add(new DateInterval('P2D'));\n $boxingDay->add(new DateInterval('P2D'));\n break;\n }\n\n $this->addHoliday(new Holiday('christmasDay', [], $christmasDay, $this->locale));\n $this->addHoliday(new Holiday('secondChristmasDay', [], $boxingDay, $this->locale));\n }", "public function getCalendarHolidayName ()\n {\n return $this->calendar_holiday_name;\n }", "public function calculateBonusDay()\n {\n /**\n * If we would assume that bonus day will always be on the 15th,\n * we could simply check if the first day of the month is a week day, \n * since the 1st and the 15th are always on the same weekday. However,\n * the bonus day might change in the future.\n * (usualBonusDay + indexOfFirstDay + 6) mod 7 \n * gives you the numeric representation of the 15th day of the month \n */\n $bonusDay = ($this->_bonusDay + $this->_startsOn + 6) % 7;\n if ($bonusDay == 0) {\n return $this->_bonusDay + $this->_altBonusDay;\n } else if ($bonusDay == 6) {\n return $this->_bonusDay + $this->_altBonusDay + 1;\n } else {\n return $this->_bonusDay;\n }\n }", "public function testCanadaDayOnAfter1983(): void\n {\n $year = 2019; // July 1 is not Sunday\n $this->assertHoliday(\n self::REGION,\n self::HOLIDAY,\n $year,\n new \\DateTime(\"{$year}-07-01\", new \\DateTimeZone(self::TIMEZONE))\n );\n $year = 2018; // July 1 is Sunday\n $this->assertHoliday(\n self::REGION,\n self::HOLIDAY,\n $year,\n new \\DateTime(\"{$year}-07-02\", new \\DateTimeZone(self::TIMEZONE))\n );\n }", "public function initialize(): void\n {\n $this->timezone = 'Europe/Rome';\n\n // Add common holidays\n $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale));\n\n // Add Christian holidays\n $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->easter($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->assumptionOfMary($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->immaculateConception($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->stStephensDay($this->year, $this->timezone, $this->locale));\n\n // Calculate other holidays\n $this->calculateLiberationDay();\n $this->calculateRepublicDay();\n }", "public function deselectHolidays()\n {\n $current_year = date('Y-m-d',strtotime(date('Y-01-01')));\n $next_year = date('Y-m-d', strtotime('last day of december next year'));\n $dates = [];\n\n $available_days = AvailableDays::where('available_date', '>=', $current_year)\n ->where('available_date', '<=', $next_year)\n ->get();\n $available_adhocs = AvailableAdhocs::where('date', '>=', $current_year)\n ->where('date', '<=', $next_year)\n ->get();\n $unavailable_days = UnavailableDays::where('date', '>=', $current_year)\n ->where('date', '<=', $next_year)\n ->get();\n $unavailable_adhocs = UnavailableAdhocs::where('date', '>=', $current_year)\n ->where('date', '<=', $next_year)\n ->get();\n $holidays = $this->getTwoYearDates();\n foreach ($holidays as $key => $holiday) {\n $dates[] = date('Y-m-d', strtotime($holiday->date));\n }\n\n foreach ($available_days as $key => $available_day) {\n if(in_array($available_day->available_date, $dates) ) {\n $available_day->delete();\n }\n }\n\n foreach ($available_adhocs as $key => $available_adhoc) {\n if(in_array($available_adhoc->date, $dates) ) {\n $available_adhoc->delete();\n }\n }\n\n foreach ($unavailable_days as $key => $unavailable_day) {\n if(in_array($unavailable_day->date, $dates) ) {\n $unavailable_day->delete();\n }\n }\n\n foreach ($unavailable_adhocs as $key => $unavailable_adhoc) {\n if(in_array($unavailable_adhoc->date, $dates) ) {\n $unavailable_adhoc->delete();\n }\n }\n }", "function testHolidaysFrom1970to2050WithSetYear()\n {\n $obj =& Date_Holidays::factory('Japan');\n if (Date_Holidays::isError($obj)) {\n $this->fail('Factory was unable to produce driver-object');\n }\n for ($year = 1970; $year < 2051; $year++) {\n $obj->setYear($year);\n $invalid_holidays = array();\n foreach ($obj->getHolidayDates() as $holiday) {\n $dt = substr($holiday->getDate(), 0, 10);\n if (array_key_exists($dt, $this->_holidays)) {\n unset($this->_holidays[$dt]);\n } else {\n $invalid_holidays[] = $holiday->getDate();\n }\n }\n }\n // if all holidays was calculated or not\n $this->assertEquals(0, count($this->_holidays));\n\n // if no invalid holidays was calculated or not\n $this->assertEquals(0, count($invalid_holidays));\n }", "protected function dates_filter(){\n \t//+Constraint Isgi: only one year data\n \t$temporal = $this->get_temporal();\n \tif( strtolower($temporal->end) == \"now\"){\n \t\t$now = new \\DateTime();\n \t\t$temporal->end = $now->format(\"Y-m-d\");\n \t}\n \t\n \t\n \t//change start and end\n \tif( $this->start < $temporal->start){\n \t\t$this->start = $temporal->start;\n \t}\n \tif( $this->end > $temporal->end){\n \t\t$this->end = $temporal->end;\n \t}\n \t$update = $this->get_update();\n \tif( !empty( $update) && $update < $this->end){\n \t\t$this->end = $update;\n \t}\n \t// diff between start and end\n \t$start = new \\DateTime( $this->start);\n \t$end = new \\DateTime( $this->end);\n \t$interval = $start->diff( $end);\n \tif( $interval->invert){\n \t\t//end < start\n \t\t$this->error = \"NO_DATA\";\n \t}else{\n\t \tif( $interval->days > 365){\n\t \t\t$start = clone $end;\n\t \t\t$start->sub( new \\DateInterval(\"P364D\"));\n\t \t\t$this->start = $start->format(\"Y-m-d\");\n\t \t}\n \t}\n }", "function testShowaDay()\n {\n // with ja_JP.xml\n $obj = Date_Holidays::factory('Japan', 1949);\n if (Date_Holidays::isError($obj)) {\n $this->fail('Factory was unable to produce driver-object');\n }\n $obj->addTranslationFile(LANG_FILE . '/Japan/ja_JP.xml', 'ja_JP');\n if (Date_Holidays::isError($obj)) {\n $this->fail('fail to add translation file');\n }\n\n $this->assertEquals('天皇誕生日', $obj->getHolidayForDate('1949-04-29', 'ja_JP')->getTitle(), 'showa day in 1949');\n\n $obj->setYear(1989);\n $this->assertEquals('みどりの日', $obj->getHolidayForDate('1989-04-29', 'ja_JP')->getTitle(), 'showa day in 1989');\n\n $obj->setYear(2007);\n $this->assertEquals('昭和の日', $obj->getHolidayForDate('2007-04-29', 'ja_JP')->getTitle(), 'showa day in 2007');\n }", "function _buildIndependence()\n {\n $this->_addHoliday(\n 'Independence',\n $this->_year . '-01-04',\n 'Independence\\'s Day'\n );\n }", "function getHolidays($jd)\n\t{\n\t\t$s=\"\";\n\t\treset($this->holidays);\n\n\t\t//test each holiday for matching given date\n\t\tforeach($this->holidays as $k => $d)\n\t\t{\n\t\t\tif ($jd==$d) $s.=$k.\"<br/>\\n\\r\\n\";\n\t\t}\n\n\t\t//return string listing any holidays for given date\n\t\treturn ($s);\n\t}", "public function run()\n {\n $holidays = [\n ['name' => 'Новогодние каникулы', 'date' => '01-01'],\n ['name' => 'Новогодние каникулы', 'date' => '01-02'],\n ['name' => 'Новогодние каникулы', 'date' => '01-03'],\n ['name' => 'Новогодние каникулы', 'date' => '01-04'],\n ['name' => 'Новогодние каникулы', 'date' => '01-05'],\n ['name' => 'Новогодние каникулы', 'date' => '01-06'],\n ['name' => 'Рождество Христово', 'date' => '01-07'],\n ['name' => 'Новогодние каникулы', 'date' => '01-08'],\n ['name' => 'День защитника Отечества', 'date' => '02-23'],\n ['name' => 'Международный женский день', 'date' => '03-08'],\n ['name' => 'Выходной', 'date' => '03-09'],\n ['name' => 'Короткий день', 'date' => '04-30'],\n ['name' => 'Праздник Весны и Труда', 'date' => '05-01'],\n ['name' => 'День Победы', 'date' => '05-09'],\n ['name' => 'Короткий день', 'date' => '05-08'],\n ['name' => 'Выходной', 'date' => '05-11'],\n ['name' => 'День России', 'date' => '06-12'],\n ['name' => 'Короткий день', 'date' => '06-11'],\n ['name' => 'День народного единства', 'date' => '11-04'],\n ['name' => 'Короткий день', 'date' => '11-03'],\n ['name' => 'Короткий день', 'date' => '12-31'],\n ['name' => 'Выходной', 'date' => '02-24'],\n ['name' => 'Выходной', 'date' => '05-04'],\n ['name' => 'Выходной', 'date' => '05-05'],\n ];\n\n Holiday::insert($holidays);\n }", "function culturefeed_search_ui_default_holidays_options() {\n\n return array(\n array(\n 'exposed' => TRUE,\n 'holiday' => 'Krokusvakantie 2016',\n 'query-string' => 'krokusvakantie',\n 'start-date' => array(\n 'year' => '2016',\n 'month' => '2',\n 'day' => '6'\n ),\n 'end-date' => array(\n 'year' => '2016',\n 'month' => '2',\n 'day' => '14'\n ),\n 'api-filter-query' => 'startdate:[2016-02-06T00:00:00Z TO 2016-02-14T23:59:59Z]'\n ),\n array(\n 'exposed' => TRUE,\n 'holiday' => 'Paasvakantie 2016',\n 'query-string' => 'paasvakantie',\n 'start-date' => array(\n 'year' => '2016',\n 'month' => '3',\n 'day' => '26'\n ),\n 'end-date' => array(\n 'year' => '2016',\n 'month' => '4',\n 'day' => '10'\n ),\n 'api-filter-query' => 'startdate:[2016-03-26T00:00:00Z TO 2016-04-10T23:59:59Z]'\n ),\n array(\n 'exposed' => TRUE,\n 'holiday' => 'Zomervakantie 2016',\n 'query-string' => 'zomervakantie',\n 'start-date' => array(\n 'year' => '2016',\n 'month' => '7',\n 'day' => '1'\n ),\n 'end-date' => array(\n 'year' => '2016',\n 'month' => '8',\n 'day' => '31'\n ),\n 'api-filter-query' => 'startdate:[2016-07-01T00:00:00Z TO 2016-08-31T23:59:59Z]'\n ),\n array(\n 'exposed' => TRUE,\n 'holiday' => 'Herfstvakantie 2016',\n 'query-string' => 'herfstvakantie',\n 'start-date' => array(\n 'year' => '2016',\n 'month' => '10',\n 'day' => '29'\n ),\n 'end-date' => array(\n 'year' => '2016',\n 'month' => '11',\n 'day' => '6'\n ),\n 'api-filter-query' => 'startdate:[2016-10-29T00:00:00Z TO 2016-11-06T23:59:59Z]'\n ),\n array(\n 'exposed' => TRUE,\n 'holiday' => 'Kerstvakantie 2016',\n 'query-string' => 'kerstvakantie',\n 'start-date' => array(\n 'year' => '2016',\n 'month' => '12',\n 'day' => '24'\n ),\n 'end-date' => array(\n 'year' => '2017',\n 'month' => '1',\n 'day' => '8'\n ),\n 'api-filter-query' => 'startdate:[2016-12-24T00:00:00Z TO 2017-01-08T23:59:59Z]'\n ),\n );\n}", "function testHolidays2009()\n {\n $drv = Date_Holidays::factory('Spain', 2009, 'en_EN');\n if (Date_Holidays::isError($drv)) {\n $this->fail(helper_get_error_message($drv));\n }\n\n foreach ($this->testDates2009 as $name => $dateInfo) {\n $day = $drv->getHoliday($name);\n if (Date_Holidays::isError($day)) {\n $this->fail(helper_get_error_message($day));\n }\n $this->assertEquals($name, $day->getInternalName());\n $date = $day->getDate();\n $this->assertEquals($dateInfo['day'], $date->format('d'), $name);\n $this->assertEquals($dateInfo['month'], $date->format('m'), $name);\n $this->assertEquals($dateInfo['year'], $date->format('Y'), $name);\n }\n }", "public function get_office_working_days($inputMonth) {\n\t\t$month = date('m', strtotime($inputMonth));\n\t\t$year = date('Y', strtotime($inputMonth));\n\t\t$yymm = $year . '-' . $month;\n\n\t\t$totalDays = cal_days_in_month(CAL_GREGORIAN, $month, $year);\n\t\t$weekly_off[] = null;\n\t\t$query = $this->db->get_where('working_day', array('flag' => '0'));\n\t\tif($query != null) {\n\t\t\tforeach ($query->result() as $row) {\n\t\t\t\t$weekly_off[] = $row->position;\n\t\t\t}\n\t\t}\n\t\t$countDays = $this->countDays($month, $year, $weekly_off);\n\t\t$publicHolidays = $this->_publicHolidays($yymm);\n\n\t\t$data['totalDays'] = cal_days_in_month(CAL_GREGORIAN, $month, $year);\n\t\t$data['workingDays'] = $countDays - $publicHolidays;\n\t\t$data['weeklyOff'] = $totalDays - $countDays;\n\t\t$data['holidays'] = $publicHolidays;\n\t\treturn $data;\n\t}", "private function baseCalendarArray($date, $fday, $lday, $monthHolidays){\n $calendar = array();\n for($day = $fday; $day < $lday+1; $day++)\n {\n\n $calendar = $this->setDay($calendar, $day);\n $calendar = $this->setDayName($calendar, $day, $this->date, \"D\");\n\n if(!empty($event[$day]))\n $calendar = $this->setDayEvent($calendar, $day, $event[$day]);\n \n\n if($date->isWeekend())\n {\n $calendar = $this->setDayWeekend($calendar, $day, \"Weekend\");\n $calendar = $this->setDayColor($calendar, $day, 'purple');\n }\n else \n {\n $calendar = $this->setDayColor($calendar, $day, 'white');\n }\n\n if(!empty($monthHolidays[$day]))\n {\n $calendar = $this->setDayEvent($calendar, $day, $monthHolidays[$day]['event']);\n $calendar = $this->setDayColor($calendar, $day, 'pink');\n }\n \n $date->addDay();\n }\n\n return $calendar;\n }", "public function testCanadaDayBefore1879(): void\n {\n $this->assertNotHoliday(\n self::REGION,\n self::HOLIDAY,\n $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1)\n );\n }", "public function calculate_business_days_between_dates($start_date, $end_date)\r {\r if (!$start_date)\r {\r return 0;\r }\r \r // Create date objects\r $datetime1 = new DateTime($start_date);\r $datetime2 = new DateTime($end_date);\r \r // Get the week number for each date\r $week1 = $datetime1->format('W');\r $week2 = $datetime2->format('W');\r \r // Calculate the total days different between the first and last date\r $interval = $datetime1->diff($datetime2);\r $days_between = $interval->format('%a');\r \r // Subtract weekends from the total days\r $business_days = $days_between - (2*($week2-$week1));\r \r return $business_days;\r }", "public function holiday() {\n\t\t// Disable cron\n\t\t$output = shell_exec('crontab -l');\n\t\t$lines = explode(\"\\n\", trim($output));\n\t\tif (count($lines) > 3) {\n\t\t\t$x='';\n\t\t\twhile ($lines[0] != \"#BEGIN\") {\n\t\t\t\t$x .=$lines[0].PHP_EOL; //copy first header lines of cron file\n\t\t\t\tarray_shift($lines);\n\t\t\t}\n\t\t\t$x .=$lines[0].PHP_EOL; //copy first header lines of cron file\n\t\t\tarray_shift($lines);\n\t\t\tforeach ($lines as $line) {\n\t\t\t\tif (substr($line,0,1) != '#') $x .= '#'.$line.PHP_EOL; //comment cron line\n\t\t\t\telse $x .= $line.PHP_EOL;\n\t\t\t}\n\t\t\tfile_put_contents(Flight::get(\"pathCron\"), $x);\n\t\t\texec(\"cat \".Flight::get(\"pathCron\").\" | crontab -\");\n\t\t\t$ret = array('Status' => 'OK');\n\n\t\t}\n\t\telse { $ret = array('Status' => 'KO','Cron' => 'Not Found'); }\n\t\t// del all \"At\"\n\t\t$x = shell_exec('atq');\n\t\tif (count($x) >= 1) {\n\t\t\t$x = explode(\"\\n\",trim($x));\n\t\t\tforeach ($x as $at) {\n\t\t\t\t$at = explode(\"\\t\", $at);\n\t\t\t\tpassthru('atrm '.$at[0],$x1);\n\t\t\t}\n\t\t}\n\t\tFlight::json($ret);\n\t}", "function holidays() {\nglobal $template;\n\n\n// Конфигурация\n$klvmsg=\"7\"; // Сколько выводить дат?\n$klvdays=\"30\"; // Максимальное удалённое событие, дней\n$datafile=root.\"plugins/holidays/dat_holidays/holidays.dat\"; // Имя файла базы данных\n$months = array(\"\", \"января\", \"февраля\", \"марта\", \"апреля\", \"мая\", \"июня\", \"июля\", \"августа\", \"сентября\", \"октября\", \"ноября\", \"декабря\");\n$date=date(\"d \".$months[date('n')].\" Y\"); // число.месяц.год\n$time=date(\"H:i:s\"); // часы:минуты:секунды\n\n$holidays .= \"\";\n$day=$date=date(\"d\"); // день\n$month=$date=date(\"n\"); // месяц\n$year=$date=date(\"Y\"); // год\nif ($month==12) {$year++;} // Чтобы верно считал январские праздники\n$vchera=$day-1;\n$klvchasov=$klvdays*30;\n$lines=file($datafile);\n$itogo=count($lines); $i=0;\n\ndo {$dt=explode(\"|\",$lines[$i]);\n\n$todaydate=date(\"d \".$months[date('n')].\" Y\");\n$tekdt=mktime();\n\n$newdate=mktime(0,0,0,$dt[1],$dy[0],$year);\n$dayx=date(\"d \".$months[date('n')].\" Y\",$newdate); // конверируем дни до праздника в человеческий формат\n$hdate=ceil(($newdate-$tekdt)/3600); // через сколько ЧАСОВ наступит событие\n$ddate=ceil($hdate/24); // считаем сколько дней до события\n\n// приводим слово ДЕНЬ/ДНЯ/ДНЕЙ к нужному типу\n$dney=\"дней\"; if ($ddate==\"1\") {$dney=\"день\";} if ($ddate==\"2\" or $ddate==\"3\" or $ddate==\"4\") {$dney=\"дня\";}\n\nif (($dt[0]==$vchera) and ($dt[1]==$month)) {$holidays .= \"<IMG src='/engine/plugins/holidays/images/happy2.gif'> Вчера был праздник:<IMG src='/engine/plugins/holidays/images/down.gif'> <strong>$dt[2]</strong>\";}\nif (($dt[0]==$day) and ($dt[1]==$month)) {$holidays .= \"<IMG src='/engine/plugins/holidays/images/happy.gif'> Сегодня праздник:<IMG src='/engine/plugins/holidays/images/down.gif'> <strong>$dt[2]</strong><br>\";}\nif ($klvmsg>1) {\n\nif (($hdate>1) and ($hdate<$klvchasov)) {\nif (!isset($m1)) {$holidays .= \"<IMG src='/engine/plugins/holidays/images/info.gif'> В ближайщее время ожидаются праздники:<DIV style='BORDER-BOTTOM: #515151 1px dashed'></DIV>\"; $m1=1;}\n$klvmsg--; $holidays .=\"<IMG src='/engine/plugins/holidays/images/data.gif'> <font color='#cc0017'><B>$dayx</B></font> <small>через <B>$ddate</B> $dney</small><br><IMG src='/engine/plugins/holidays/images/down.gif'> $dt[2]<DIV style='BORDER-BOTTOM: #515151 1px dashed'></DIV>\";} }\n\n$i++;\n} while($i<$itogo);\n\n$holidays .= \"\";\n\n\n$output = $holidays;\n\n$template['vars']['plugin_holidays'] = $output;\n}", "function listHolidays($y=0)\n\t{\n\t\tglobal $GREGORIAN_MONTH, $GREGORIAN_DAY;\n\t\t//call with year $y for other than current year\n\t\tif ($y!=0) $this->holiday($y);\n\t\t//reset($this->holidays);\n\n\t\t//print (\"<pre>\");\n\t\t//print_r ($this->holidays);\n\t\t//print (\"</pre>\");\n\t\t//return;\n\n\t\tforeach($this->holidays as $k => $f)\n\t\t{\n\t\t\tjd_to_gregorian($f, $m, $d, $y);\n\t\t\t$d = \": \" . $GREGORIAN_DAY[jd_to_weekday($f)] . \", \" .\n\t\t\t\t$GREGORIAN_MONTH[$m] . \" $d, $y\";\n\n\t\t\t//print(\"<pre>\" . $f . \"--\" . $k . $d . \"</pre>\");\n\t\t\tprint($k . $d . \"<br />\");\n\n\t\t}\n\t}", "public static function getHolidays( $date ) {\n\t\t$log = vglobal('log');\n\t\t$log->debug(\"Entering Settings_PublicHoliday_Module_Model::getHolidays(\".print_r($date,true).\") method ...\");\n\n\t\t$db = PearDatabase::getInstance();\n\t\t$sql = 'SELECT `publicholidayid`, `holidaydate`, `holidayname`, `holidaytype` FROM `vtiger_publicholiday`'; \n\t\t$params = array();\n\n\t\tif ( is_array($date) ) {\n\t\t\t$sql .= ' WHERE holidaydate BETWEEN ? AND ?';\n\t\t\t$params[] = $date[0];\n\t\t\t$params[] = $date[1];\n\t\t}\n\t\t$sql .= ' ORDER BY `holidaydate` ASC;';\n\n\t\t$result = $db->pquery( $sql, $params );\n\t\t$num = $db->num_rows( $result );\n\t\t\n\t\t$holidays = array();\n\t\tif ( $num > 0 ) {\n\t\t\tfor( $i=0; $i<$num; $i++ ) {\n\t\t\t\t$id = $db->query_result( $result, $i, 'publicholidayid' );\n\t\t\t\t$date = $db->query_result( $result, $i, 'holidaydate' );\n\t\t\t\t$name = $db->query_result( $result, $i, 'holidayname' );\n\t\t\t\t$type = $db->query_result( $result, $i, 'holidaytype' );\n\t\t\t\t$holidays[$id]['id'] = $id; \n\t\t\t\t$holidays[$id]['date'] = $date; \n\t\t\t\t$holidays[$id]['name'] = $name; \n\t\t\t\t$holidays[$id]['type'] = $type; \n\t\t\t\t$holidays[$id]['day'] = vtranslate(date('l', strtotime($date)), 'PublicHoliday');\n\t\t\t}\n\t\t}\n\t\t\n\t\t$log->debug(\"Exiting Settings_PublicHoliday_Module_Model::getHolidays() method ...\");\n\t\treturn $holidays;\n\t}", "function easterSunday( $nYEAR ) \r\n{\r\n // but mktime() starts at 1970-01-01! \r\n if ( $nYEAR < 1970 ) \r\n { \r\n $dtEasterSunday = mktime( 1,1,1,1,1,1970 ); \r\n } \r\n else \r\n { \r\n $nGZ = ( $nYEAR % 19 ) + 1; \r\n $nJHD = div( $nYEAR, 100 ) + 1; \r\n $nKSJ = div( 3 * $nJHD, 4 ) - 12; \r\n $nKORR = div( 8 * $nJHD + 5, 25 ) - 5; \r\n $nSO = div( 5 * $nYEAR, 4 ) - $nKSJ - 10; \r\n $nEPAKTE = (( 11 * $nGZ + 20 + $nKORR - $nKSJ ) % 30 ); \r\n \r\n if (( $nEPAKTE == 25 OR $nGZ == 11 ) AND $nEPAKTE == 24 ) \r\n { \r\n $nEPAKTE = $nEPAKTE + 1; \r\n }\r\n \r\n $nN = 44 - $nEPAKTE; \r\n if( $nN < 21 ) \r\n { \r\n $nN = $nN + 30; \r\n } \r\n $nN = $nN + 7 - (( $nSO + $nN ) % 7 ); \r\n $nN = $nN + isLeapYear( $nYEAR ); \r\n $nN = $nN + 59; \r\n \r\n $nA = isLeapYear( $nYEAR ); \r\n // Month \r\n $nNM = $nN; \r\n if ( $nNM > ( 59 + $nA )) \r\n { \r\n $nNM = $nNM + 2 - $nA; \r\n } \r\n $nNM = $nNM + 91; \r\n $nMONTH = div( 20 * $nNM, 611 ) - 2; \r\n \r\n // Day \r\n $nNT = $nN; \r\n $nNT = $nN; \r\n if ( $nNT > ( 59 + $nA )) \r\n { \r\n $nNT = $nNT + 2 - $nA; \r\n } \r\n $nNT = $nNT + 91; \r\n $nM = div( 20 * $nNT, 611 ); \r\n $nDAY = $nNT - div( 611 * $nM, 20 ); \r\n \r\n $dtEasterSunday = mktime( 0,0,0,$nMONTH,$nDAY,$nYEAR ); \r\n } \r\n return $dtEasterSunday; \r\n}", "public function testRemembranceDayAfter2006(): void\n {\n $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR);\n $this->assertHoliday(\n self::REGION,\n self::HOLIDAY,\n $year,\n new \\DateTime(\"{$year}-03-24\", new \\DateTimeZone(self::TIMEZONE))\n );\n }", "private function calculateSaintsCyrilAndMethodiusDay(): void\n {\n $this->addHoliday(new Holiday(\n 'saintsCyrilAndMethodiusDay',\n [\n 'sk' => 'Sviatok svätého Cyrila a Metoda',\n 'cs' => 'Den slovanských věrozvěstů Cyrila a Metoděje',\n 'en' => 'Saints Cyril and Methodius Day',\n ],\n new DateTime($this->year . '-07-05', DateTimeZoneFactory::getDateTimeZone($this->timezone)),\n $this->locale,\n Holiday::TYPE_OFFICIAL\n ));\n }", "public function get_holidays() {\r\n $this->db->select('*');\r\n $this->db->from('tbl_holidays');\r\n $query = $this->db->get();\r\n return $query->result();\r\n }", "private function calculateSlovakConstitutionDay(): void\n {\n $this->addHoliday(new Holiday(\n 'slovakConstitutionDay',\n [\n 'sk' => 'Deň Ústavy Slovenskej republiky',\n 'en' => 'Day of the Constitution of the Slovak Republic',\n ],\n new DateTime($this->year . '-09-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)),\n $this->locale,\n Holiday::TYPE_OFFICIAL\n ));\n }", "function carbonDiffWithoutWeekends($startdate,$enddate){\n\n $dt = $startdate;\n $dt2 = $enddate;\n $daysForExtraCoding = $dt->diffInDaysFiltered(function(Carbon $date) { return\n !$date->isWeekend();\n }, $dt2);\n\n return $daysForExtraCoding;\n\n }", "public function calculateDay()\r\n {\r\n return date('N', strtotime($this->getDate())) - 1;\r\n }", "function getDiasHabiles2($fechainicio,$fechafin, $diasferiados = array(), $saturday = false, $sunday = true) {\n// $fechafin = $year . \"-\" . $month . \"-\" . date(\"d\", (mktime(0, 0, 0, $month + 1, 1, $year) - 1));\n\n // Convirtiendo en timestamp las fechas\n $fechainicio = strtotime($fechainicio);\n $fechafin = strtotime($fechafin);\n\n // Incremento en 1 dia\n $diainc = 24 * 60 * 60;\n\n // Arreglo de dias habiles, inicianlizacion\n $business_days = array();\n\n $arrayDay = array();\n if ($saturday) {\n $arrayDay[] = 6;\n }\n\n if ($sunday) {\n $arrayDay[] = 7;\n }\n\n // Se recorre desde la fecha de inicio a la fecha fin, incrementando en 1 dia\n for ($midia = $fechainicio; $midia <= $fechafin; $midia += $diainc) {\n // Si el dia indicado, no es sabado o domingo es habil\n if (!in_array(date('N', $midia), $arrayDay)) { // DOC: http://www.php.net/manual/es/function.date.php\n // Si no es un dia feriado entonces es habil\n if (!in_array(date('Y-m-d', $midia), $diasferiados)) {\n array_push($business_days, date('Y-m-d', $midia));\n }\n }\n }\n\n// return array(\"days\" => $business_days, \"count\" => count($business_days), \"date-end\" => $fechafin);\n return $business_days;\n }", "private function calculateCatholicChristmasDay(): void\n {\n if ($this->year < 2017) {\n return;\n }\n\n $this->addHoliday(\n new Holiday(\n 'catholicChristmasDay',\n [\n 'uk' => 'Католицький день Різдва',\n 'ru' => 'Католическое рождество',\n ],\n new \\DateTime(\"$this->year-12-25\", new \\DateTimeZone($this->timezone)),\n $this->locale\n ),\n false // Catholic Christmas Day will not be substituted to an monday if it's on a weekend!\n );\n }", "function getNextHolidayHeading()\n{\n\t$nextHolidayHeading = \"\";\n\t$holidayNames = array(\"New Year\", \"Valentine's Day\", \"Saint Patrick's Day\", \"Easter\", \"Oktoberfest\", \"Thanksgiving\", \"Halloween\", \"Thanksgiving\", \"Christmas\");\n\t$currentDate = date(\"m/d\");\n\t$holidayDateBounds = array(\"01/04\", \"02/17\", \"03/20\", \"04/30\", \"09/19\", \"10/14\", \"11/02\", \"11/26\", \"12/27\"); /* upper bound for corresponding holiday dates */\n\t$numHolidays = 9;\n\t\n\t$currentMonth = substr($currentDate, 0, 2);\n\t\n\tif ((strcmp($currentMonth, \"04\") > 0) && (strcmp($currentMonth, \"09\") < 0))\n\t{\n\t\t$nextHolidayHeading = \"None\"; \n\t}\n\t\n\telse \n\t{\n\t\tfor ($i = 0; $i < $numHolidays; $i++)\n\t\t{\n\t\t\tif ($currentDate <= $holidayDateBounds[$i])\n\t\t\t{\n\t\t\t\t$nextHolidayHeading = $holidayNames[$i];\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($i >= 9)\n\t\t{\n\t\t\t$nextHolidayHeading = $holidayNames[0];\n\t\t}\n\t}\n\t\n\treturn $nextHolidayHeading;\n}", "private function setHoliday(Request $request , Holiday $holiday){\n $holiday->year = $request->input('year');\n $holiday->hol_name = $request->input('hol_name');\n $holiday->day_off = $request->input('day_off');\n //Format Date then insert it to the database\n $holiday->date_from = date('Y-m-d', strtotime(str_replace('-', '/', $request->input('date_from'))));\n $holiday->date_to = date('Y-m-d', strtotime(str_replace('-', '/', $request->input('date_to'))));\n\n $holiday->save();\n }", "public function get_employee_working_days($id, $inputMonth) {\n\t\t$month = date('m', strtotime($inputMonth));\n\t\t$year = date('Y', strtotime($inputMonth));\n\t\t$yymm = $year . '-' . $month;\n\n\t\t$weekly_off[] = NULL;\n\t\t$query = $this->db->select('emp_working_days')->get_where('employees', array('emp_p_id' => $id))->row();\n\t\t$emp_working_days = json_decode($query->emp_working_days);\n\t\tif($emp_working_days != null) {\n\t\t\tforeach ($emp_working_days as $row) {\n\t\t\t\tif($row->flag == 0) {\n\t\t\t\t\t$weekly_off[] = $row->position;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$totalDays = cal_days_in_month(CAL_GREGORIAN, $month, $year);\n\t\t$countDays = $this->_countDays($month, $year, $weekly_off);\n\t\t$publicHolidays = $this->_publicHolidays($yymm);\n\n\t\t$data['totalDays'] = $totalDays;\n\t\t$data['weeklyOff'] = $totalDays - $countDays;\n\t\t$data['holidays'] = $publicHolidays;\n\n\t\t$data['presentDays'] = $this->db->select('count(`attendance_p_id`) AS present_days')->from('attendance')->where(array('emp_ID' => $id, 'attendance_status' => 'P'))->like('attendance_date', $yymm)->get()->row();\n\t\t$data['absentDays'] = $this->db->select('count(`attendance_p_id`) AS absent_days')->from('attendance')->where(array('emp_ID' => $id, 'attendance_status' => 'L'))->like('attendance_date', $yymm)->get()->row();\n\t\t$data['unpaidLeave'] = $this->db->select('count(`attendance_p_id`) AS unpaid_leave')->from('attendance')->join('leave_type', 'attendance.leave_type_id = leave_type.leave_p_id', 'inner')->where(array('emp_ID' => $id, 'attendance.attendance_status' => 'L', 'leave_type.salary_deduct' => '1'))->like('attendance_date', $yymm)->get()->row();\n\t\t$data['deductionValue'] = $this->db->select('sum(`deduction_value`) AS deduction_value')->from('attendance')->join('leave_type', 'attendance.leave_type_id = leave_type.leave_p_id', 'inner')->where(array('emp_ID' => $id, 'attendance.attendance_status' => 'L', 'leave_type.salary_deduct' => '1'))->like('attendance_date', $yymm)->get()->row();\n\t\treturn $data;\n\t}", "private function getCalculatedDate(){\n date_default_timezone_set('GMT+1');//@todo get the information from system\n\n $oneDay = 86400;//seconds\n $numDays = 7; //default are 7 days\n $today = strtotime('now');\n\n if(!empty($this->settings['flexform']['countDays'])){\n $numDays = $this->settings['flexform']['countDays'];\n }\n\n //calcaulate date\n $date = date(\"d.m.Y\",$today-($numDays * $oneDay));\n\n return $date;\n }", "function _buildMahaThingyan1()\n {\n $this->_addHoliday(\n 'MahaThingyan1',\n $this->_year . '-04-11',\n 'MahaThingyan Day'\n );\n }", "function getWorkingDays($startDate,$wDays) {\n $new_date = date('Y-m-d', strtotime(\"{$startDate} +{$wDays} weekdays\"));\n \n foreach($this->holidayOfYears as $holiday):\n $holiday_ts = strtotime($holiday);\n \n // if holiday falls between start date and new date, then account for it\n if ($holiday_ts >= strtotime($startDate) && $holiday_ts <= strtotime($new_date)) {\n \n // check if the holiday falls on a working day\n $h = date('w', $holiday_ts);\n if ($h != 0 && $h != 6 ) {\n $this->holiday_Count ++; \n // holiday falls on a working day, add an extra working day\n $new_date = date('Y-m-d', strtotime(\"{$new_date} + 1 weekdays\"));\n }\n }\n endforeach;\n \n return $new_date;\n }", "public function daterange_getholidays($start = false, $end = false, $limit = null)\n {\n $return = array();\n $mode = 0;\n if (!$start && !$end) {\n $query = 'SELECT `hid`, `hname`,`hdate` FROM '.$this->Tbl['cal_holiday'].' WHERE `uid` IN (0,'.$this->uid.') ORDER BY `hdate`ASC';\n if (is_array($limit)) {\n $query .= ' LIMIT '.doubleval($limit[0]).','.doubleval($limit[1]);\n } elseif (!is_null($limit) && 0 < $limit) {\n $query .= ' LIMIT '.doubleval($limit);\n }\n $mode = 1;\n } elseif (!$end) {\n $query = 'SELECT `hname`, `hdate` FROM '.$this->Tbl['cal_holiday'].' WHERE `uid` IN (0,'.$this->uid.') AND `hdate`=\"'.$this->esc($start).'\"';\n } else {\n $query = 'SELECT `hname`, `hdate` FROM '.$this->Tbl['cal_holiday']\n .' WHERE `uid` IN (0,'.$this->uid.') AND `hdate`>=\"'.$this->esc($start).'\" AND `hdate`<=\"'.$this->esc($end).'\"';\n }\n $res = $this->query($query);\n while ($line = $this->assoc($res)) {\n if (1 == $mode) {\n $return[$line['hid']] = array($line['hdate'], $line['hname']);\n } else {\n $return[$line['hdate']] = $line['hname'];\n }\n }\n return $return;\n }", "function get_holiday()\n\t {\n\t\t$holiday_list \t= $this ->ObjM->holiday_list();\n\t\t//var_dump($holiday_list); exit;\n\t\t\n\t\tif(count($holiday_list)<1){\n\t\t\t$json_arr[]=array('validation'=>'false');\t\n\t\t\techo json_encode($json_arr);\n\t\t\texit;\t \n\t\t}\n\t\t\n\t\tfor($i=0;$i<count($holiday_list);$i++){\n\t\t\tif($holiday_list[$i]['type'] == 'multi')\n\t\t\t{\n\t\t\t $holiday_date = date('d-m-Y',$holiday_list[$i]['start_date']).' To '.date('d-m-Y',$holiday_list[$i]['end_date']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$holiday_date = date('d-m-Y',$holiday_list[$i]['start_date']);\t\n\t\t\t}\n\t\t\t$day = date(\"D\", $holiday_list[$i]['start_date']);\n\t\t\t\n\t\t\t$json_arr[]=array(\n\t\t\t\t\t'title'\t\t\t\t=>\t$holiday_list[$i]['title'],\n\t\t\t\t\t'holiday_date'\t\t=>\t$holiday_date,\n\t\t\t\t\t'holiday_day'\t\t=>\t$day,\n\t\t\t\t\t'description'\t\t=>\t$holiday_list[$i]['description'],\n\t\t\t\t\t'validation'\t \t=>\t'true' );\n\t\t }\n\t\t echo json_encode($json_arr);\n\t\t\texit;\n\t }", "public function getTwoYearDates()\n {\n $current_year = date('Y-m-d',strtotime(date('Y-01-01')));\n $next_year = date('Y-m-d', strtotime('last day of december next year'));\n\n return Holiday::where('date', '>=', $current_year)\n ->where('date', '<=', $next_year)\n ->orderBy('date', 'asc')\n ->paginate(25);\n }", "function erp_financial_end_date() {\n $financial_year_dates = erp_get_financial_year_dates();\n\n return $financial_year_dates['end'];\n}", "public function testWorkingDayComputationForMonthlyRegular() {\n// Artisan::call('db:seed', [\"--class\" => \"TestWorkingDayComputation_HolidaySeeder\"]);\n\n $payroll = Payroll::firstOrNew([\"pay_period\" => \"2017-02-15\"]);\n $payroll->cutoff_start = DateTime::createFromFormat('Y-m-d', \"2017-01-26\");\n $payroll->cutoff_end = DateTime::createFromFormat('Y-m-d', \"2017-02-10\");\n $payroll->next_pay_period = DateTime::createFromFormat('Y-m-d', \"2017-03-01\");\n\n $payroll->include_monthly_processable = true;\n\n $payroll->save();\n\n// $employee = Employee::find(\"20170120001\");\n $employee = Employee::find(\"20170120003\");\n\n // test one regular holiday, ranged\n $holiday = new Holiday();\n $holiday->code = \"01_30_Test01\";\n $holiday->description = \"test regular holiday\";\n $holiday->holiday_type_code = \"REG\";\n $holiday->date_start = DateTime::createFromFormat('Y-m-d', \"2017-01-30\");\n $holiday->date_end = DateTime::createFromFormat('Y-m-d', \"2017-01-31\");\n\n $holiday->save();\n\n // test one special holiday\n $holiday2 = new Holiday();\n $holiday2->code = \"02_01_Test02\";\n $holiday2->description = \"test special holiday\";\n $holiday2->holiday_type_code = \"SNW\";\n $holiday2->date_start = DateTime::createFromFormat('Y-m-d', \"2017-02-01\");\n $holiday2->date_end = DateTime::createFromFormat('Y-m-d', \"2017-02-01\");\n\n $holiday2->save();\n\n $workingDayComputationService = new WorkingDayComputationService();\n\n $workingDays = $workingDayComputationService->getWorkingDays($payroll, $employee);\n\n echo json_encode($workingDays);\n\n $this->assertTrue(true);\n }", "function getDeliveryDate($DiasEntrega, $PeriodoEntrega){\n\t$PeriodoEntrega = strtolower($PeriodoEntrega);\n\tif(!in_array($PeriodoEntrega, array('lun-dom', 'lun-sab', 'lun-vie'))) {\n\t\tlogAddNotice('El rango enviado ('.$PeriodoEntrega.') no es permitido');\n\t\treturn false;\n\t}\n\t\n\t$result = $GLOBALS['ISC_CLASS_DB']->Query('SELECT Fecha FROM [|PREFIX|]intelisis_festivedays WHERE EsLaborable = \"0\"');\n\t$diasfestivos = array();\n\twhile($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)){\n\t\t$diasfestivos[] = $row['Fecha'];\n\t}\n\t\n\t$i = 0;\n\t$manana=time();\n\t$dia=date('D', $manana);\n\twhile($i < $DiasEntrega){\n\t\t$manana = $manana + 86400;\n\t\t$mananaDia = date('D', $manana);\n\t\t$mananaFecha = date('Y-m-d 00:00:00', $manana);\n\n\t\tif(in_array($mananaFecha, $diasfestivos)) continue;\n\t\t\n\t\tif($PeriodoEntrega == 'lun-vie'){\n\t\t\tif($mananaDia != 'Sat' && $mananaDia != 'Sun'){\n\t\t\t\t$i++;\n\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t}\n\t\tif($PeriodoEntrega == 'lun-sab'){\n\t\t\tif($mananaDia != 'Sun'){\n\t\t\t\t$i++;\n\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t}\n\t\tif($PeriodoEntrega == 'lun-dom'){\n\t\t\t//if($mananaDia != 'Sun'){\n\t\t\t\t$i++;\n\t\t\t\tcontinue;\n\t\t\t//\t}\n\t\t}\n\t}\n\treturn $manana;\n}", "public function getDateFin();", "function CalcFine($rowCopy, $rowLoan, $rowMember){\n\t// $FINE_PER_DAY = 9;\n\t// $FINE_PER_HOUR = 1;\n\n\t// $FINE_START_TIME = 9; // 10AM\n\n\n\n\n\t $sql1 = \"SELECT * FROM config1 WHERE id =1\";\n $recordset = executeSqlQuery($sql1);\n $rowcount = mysqli_num_rows($recordset);\n $row = mysqli_fetch_assoc($recordset);\n\n // $sql1 = \"SELECT value2 FROM config1 WHERE id =1\";\n // $recordset1 = executeSqlQuery($sql1);\n // $rowcount1 = mysqli_num_rows($recordset1);\n // $row1 = mysqli_fetch_assoc($recordset1);\n\n // $sql2 = \"SELECT value3 FROM config1 WHERE id =1\";\n // $recordset2 = executeSqlQuery($sql2);\n // $rowcount2 = mysqli_num_rows($recordset2);\n // $row2 = mysqli_fetch_assoc($recordset2);\n\n // $sql3 = \"SELECT value4 FROM config1 WHERE id =1\";\n // $recordset3= executeSqlQuery($sql3);\n // $rowcount3 = mysqli_num_rows($recordset3);\n // $row3 = mysqli_fetch_assoc($recordset3);\n\n\n $FINE_FOR_FIRST_DAY= $row['value'];\n $FINE_PER_DAY = $row['value2'];\n $FINE_PER_HOUR = $row['value3'];\n $FINE_START_TIME =$row['value4'];\n\n \n \n\n\n\t\n\t$dateDue = $rowLoan['date_due'];\n\t$dateDueTS = strtotime($dateDue);\t\n\t$dateReturned = $rowLoan['date_returned'];\n\t$dateReturnedTS = strtotime($dateReturned);\n\t\n\t\n\t//Holiday subtracting \n\t$duedateHol = new DateTime($rowLoan['date_due']);\n\t$retdateHol = new DateTime($rowLoan['date_returned']);\n\t\n\t//$interval = $retdateHol->diff($duedateHol);\n\t\n\t// create an iterateable period of date (P1D equates to 1 day)\n\t$period = new DatePeriod($duedateHol, new DateInterval('P1D'), $retdateHol);\n\t\n\t//holiday array\n\t\t$sql = \"SELECT * FROM holidays\";\n\t\t$rs = executeSqlQuery($sql);\n\n\t\t$holidays = array();\n\t\t\n\t\t$holidaysCount =0;\n\t\t\n\t\t$rows = mysqli_num_rows($rs);\n if ($rows != 0) {\n\t\t\twhile($holidaysData = mysqli_fetch_array($rs)){\n\t\t\t\t\n\t\t\t\t$holidays[] =$holidaysData['date'];\n\t\t\t\t\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t//Reducinng days count\n\t\t\n\t\tforeach($period as $dt) {\n\t\t\t$curr = $dt->format('D');\n\n\t\t\t// substract if Saturday or Sunday\n\t\t\tif ($curr == 'Sat' || $curr == 'Sun') {\n\t\t\t\t$holidaysCount++;\n\t\t\t}\n\n\t\t\t// (optional) for the updated question\n\t\t\telseif (in_array($dt->format('Y-m-d'), $holidays)) {\n\t\t\t\t$holidaysCount++;\n\t\t\t}\n\t\t}\n\n\n\tif($dateDueTS >= $dateReturnedTS){ // The book is not overdue\n\t\treturn array(0,'Not Overdue');\n\t}\n\t\n\t// Get the finable time difference in days and hours\n\t$difference = $dateReturnedTS - $dateDueTS;\n\t$days = floor( ($difference) / (60*60*24) ); //days\n\t\n\t// Subtract the number of holidays\n\t$days = $days - $holidaysCount;\n\t\n\t$hours = floor( ( $difference % (60*60*24) ) / (60*60) ) - $FINE_START_TIME; \n\tif($hours<0) $hours=0; \n\n\tif($days > 1){\n\t\t$fine = ($FINE_FOR_FIRST_DAY + ($days-1)*$FINE_PER_DAY) + ($hours * $FINE_PER_HOUR);\n\t} elseif($days == 1) {\n\t\t$fine = $FINE_FOR_FIRST_DAY + ($hours * $FINE_PER_HOUR);\n\t} \n\n\t$msg = $days . 'd ' . $hours . 'h';\t\n\treturn array($fine,$msg);\n}", "public function testRecurSetCalcLeafOutPersistentExceptionDates()\n {\n // month \n $from = new Tinebase_DateTime('2010-06-01 00:00:00');\n $until = new Tinebase_DateTime('2010-06-31 23:59:59');\n \n $event = $this->_getRecurEvent();\n $event->rrule = \"FREQ=MONTHLY;INTERVAL=1;BYDAY=3TH\";\n $event->attendee = new Tinebase_Record_RecordSet('Calendar_Model_Attender', array(\n array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['sclever']->getId()),\n array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['pwulf']->getId())\n ));\n \n $persistentRecurEvent = $this->_controller->create($event);\n \n // get first recurrance\n $eventSet = new Tinebase_Record_RecordSet('Calendar_Model_Event', array($persistentRecurEvent));\n Calendar_Model_Rrule::mergeRecuranceSet($eventSet, \n new Tinebase_DateTime('2010-06-01 00:00:00'),\n new Tinebase_DateTime('2010-06-31 23:59:59')\n );\n $firstRecurrance = $eventSet[1];\n \n // create exception of this first occurance: 17.6. -> 24.06.\n $firstRecurrance->dtstart->add(1, Tinebase_DateTime::MODIFIER_WEEK);\n $firstRecurrance->dtend->add(1, Tinebase_DateTime::MODIFIER_WEEK);\n $this->_controller->createRecurException($firstRecurrance);\n \n // fetch weekview 14.06 - 20.06.\n $from = new Tinebase_DateTime('2010-06-14 00:00:00');\n $until = new Tinebase_DateTime('2010-06-20 23:59:59');\n $weekviewEvents = $this->_controller->search(new Calendar_Model_EventFilter(array(\n array('field' => 'uid', 'operator' => 'equals', 'value' => $persistentRecurEvent->uid),\n array('field' => 'period', 'operator' => 'within', 'value' => array('from' => $from, 'until' => $until),\n ))));\n Calendar_Model_Rrule::mergeRecuranceSet($weekviewEvents, $from, $until);\n \n // make shure the 17.6. is not in the set\n $this->assertEquals(1, count($weekviewEvents), '17.6. is an exception date and must not be part of this weekview');\n }", "public function setCalendarHolidayEnd ($v)\n {\n if ( $v !== null && !is_int ($v) )\n {\n $ts = strtotime ($v);\n //Date/time accepts null values\n if ( $v == '' )\n {\n $ts = null;\n }\n if ( $ts === -1 || $ts === false )\n {\n throw new PropelException (\"Unable to parse date/time value for [calendar_holiday_end] from input: \" .\n var_export ($v, true));\n }\n }\n else\n {\n $ts = $v;\n }\n if ( $this->calendar_holiday_end !== $ts )\n {\n $this->calendar_holiday_end = date (\"Y-m-d\", $ts);\n }\n }", "public function get_holidays( $p_interval = \"1 week\" )\n\t{\n\t\t$return = array();\n\t\t$t_now = new DateTime();\n\t\t$this->db->select( 'holidays.holiday_id, staff.name, holidays.start, holidays.end, holidays.confirmed, holidays.approved' );\n\t\t$this->db->join( 'staff', 'holidays.staff_id=staff.staff_id');\n\t\t$this->db->where( '`start` BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL ' . $p_interval . ')' );\n\t\t$this->db->or_where( '`end` BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL ' . $p_interval . ')' );\n\t\t$this->db->or_where( 'NOW() BETWEEN `start` AND `end`' );\n\t\t$this->db->order_by( 'holidays.start');\n\t\t$query = $this->db->get( 'holidays' );\n\t\tif( $query->num_rows() > 0 ) {\n\t\t\tforeach( $query->result_array() as $row ) {\n\t\t\t\t$t_class = 'success';\n\t\t\t\tif( $row[ 'confirmed' ] == 0 ) {\n\t\t\t\t\t$t_class = 'danger';\n\t\t\t\t} elseif( $row[ 'approved' ] == 0 ) {\n\t\t\t\t\t$t_class = 'warning';\n\t\t\t\t}\n\t\t\t\t$t_start = new DateTime( $row[ 'start' ]);\n\t\t\t\t$t_end = new DateTime( $row[ 'end' ]);\n\t\t\t\tif( $t_now->getTimestamp() > $t_start->getTimestamp() &&\n\t\t\t\t\t$t_now->getTimestamp() < $t_end->getTimestamp() &&\n\t\t\t\t\t$t_class == 'success' ) {\n\t\t\t\t\t$t_name = '<strong>' . $row[ 'name' ] . '</strong>';\n\t\t\t\t\t$t_dates = '<strong>' . $row[ 'start' ] . \" to \" . $row[ 'end' ] . '</strong>';\n\t\t\t\t} else {\n\t\t\t\t\t$t_name = $row[ 'name' ];\n\t\t\t\t\t$t_dates = $row[ 'start' ] . \" to \" . $row[ 'end' ];\n\t\t\t\t}\n\t\t\t\t$return[] = array(\n\t\t\t\t\t'class' => $t_class,\n\t\t\t\t\t'id' => $row[ 'holiday_id' ],\n\t\t\t\t\t'name' => $t_name,\n\t\t\t\t\t'dates' => $t_dates,\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\treturn $return;\n\t}", "public function getDueDates(){\n\t\t$startDate = new DateTime($this->Params['start_date']);\n\t\t$monthDay = $startDate->format('d');\n\t\t$periodDueDate = new DateTime($this->Params['due_date']);\n\t\tswitch($this->Params['payment_mode']){\n\t\t\tcase 1: // DAILY\n\t\t\t\tif($this->Params['num'] > 1){\n\t\t\t\t\tif($this->Params['amortization_type'] == 2){ // STRAIGHT-LINE\n\t\t\t\t\t\t$periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\t\t$datePeriodTimeStamp = strtotime($datePeriod);\n\t\t\t\t\t\t$getPeriodDay = date('D', $datePeriodTimeStamp);\n\t\t\t\t\t\tif($getPeriodDay === \"Sun\") $periodDueDate->modify('+1 day');\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 2: // WEEKLY\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 3: // SEMI-MONTHLY\n\t\t\t\tswitch($this->Params['dd_type']){\n\t\t\t\t\tcase 3: // 15th and End of the Month\n\t\t\t\t\t\tif($monthDay <= 15){\n\t\t\t\t\t\t\t$dueDateDay = [1 => 15, 2 => 'last_day_month'];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dueDateDay = [1 => 'last_day_month', 2 => 15];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dueDatePeriod = $dueDateDay[$this->Params['count_reset']];\n\t\t\t\t\t\tif(is_int($dueDatePeriod)){\n\t\t\t\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$monthName = $periodDueDate->format('F');\n\t\t\t\t\t\t\t$periodDueDate->modify('last day of '.$monthName);\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5: // 5th and 20th of the Month\n\t\t\t\t\t\tif($monthDay <= 5){\n\t\t\t\t\t\t\t$dueDateDay = [1 => '05', 2 => 20];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dueDateDay = [1 => 20, 2 => '05'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dueDatePeriod = $dueDateDay[$this->Params['count_reset']];\n\t\t\t\t\t\tif($dueDatePeriod == '05' && $this->Params['num'] > 1) $periodDueDate->modify('+1 month');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6: // 10th and 25th of the Month\n\t\t\t\t\t\tif($monthDay <= 10){\n\t\t\t\t\t\t\t$dueDateDay = [1 => 10, 2 => 25];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dueDateDay = [1 => 25, 2 => 10];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dueDatePeriod = $dueDateDay[$this->Params['count_reset']];\n\t\t\t\t\t\tif($dueDatePeriod == 10 && $this->Params['num'] > 1) $periodDueDate->modify('+1 month');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 7: // 15th and 30th of the Month\n\t\t\t\t\t\tif($monthDay <= 15){\n\t\t\t\t\t\t\t$dueDateDay = [1 => 15, 2 => 30];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dueDateDay = [1 => 30, 2 => 15];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dueDatePeriod = $dueDateDay[$this->Params['count_reset']];\n\t\t\t\t\t\tif($dueDatePeriod == 15 && $this->Params['num'] > 1) $periodDueDate->modify('+28 days');\n\t\t\t\t\t\t\n\t\t\t\t\t\t$monthName = $periodDueDate->format('F');\n\t\t\t\t\t\tif($monthName == \"February\"){\n\t\t\t\t\t\t\tif($dueDatePeriod == 15){\n\t\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$periodDueDate->modify('last day of '.$monthName);\n\t\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 4: // MONTHLY\n\t\t\t\tswitch($this->Params['dd_type']){\n\t\t\t\t\tcase 2: // END OF THE MONTH\n\t\t\t\t\t\tif($this->Params['num'] > 1){\n\t\t\t\t\t\t\t$periodDueDate->modify('+28 days');\n\t\t\t\t\t\t\t$periodDueDate->modify('last day of this month');\n\t\t\t\t\t\t}else{ // ALLOWANCE OF 15 DAYS\n\t\t\t\t\t\t\t$periodDueDate->modify('-1 month');\n\t\t\t\t\t\t\t$periodDueDate->modify('+15 days');\n\t\t\t\t\t\t\t$periodDueDate->modify('last day of this month');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4: // SAME DAY OF EACH MONTH\n\t\t\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('next month');\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(isset($this->Params['isFebruary']) && $this->Params['isFebruary']){\n\t\t\t\t\t\t\t$startDate = new DateTime($this->Params['due_date']);\n\t\t\t\t\t\t\t$periodDueDate->modify('-1 month');\n\t\t\t\t\t\t\t$periodDueDate->modify('last day of this month');\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\t\t\tunset($this->Params['isFebruary']);\n\t\t\t\t\t\t\t$this->Params['isFebruary'] = false;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$startDate = new DateTime($this->Params['start_date']);\n\t\t\t\t\t\t\t$monthDay = $startDate->format('d');\n\t\t\t\t\t\t\t$periodDueDate->format($monthDay);\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$monthDay);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$monthName = $periodDueDate->format('F');\n\t\t\t\t\t\t$isLeapYear = $periodDueDate->format('L'); // CHECK IF LEAPYEAR\n\t\t\t\t\t\t$leapDays = ($isLeapYear > 0) ? 29 : 28;\n\t\t\t\t\t\tif($monthName == \"January\" && $monthDay > $leapDays){ // TO SET ON FEBRUARY\n\t\t\t\t\t\t\t$this->Params['isFebruary'] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase 5: // QUARTERLY\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['monthly_terms'].' month');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 6: // SEMESTRAL\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['monthly_terms'].' month');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 7: // YEARLY\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+1 year');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 9: // LUMPSUM\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('next month');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $datePeriod;\n\t}", "public function restored(Holiday $holiday)\n {\n //\n }", "public function run()\n {\n DB::table('holidays')->delete();\n\n $holidays = array(\n'2019-01-01' => '元日',\n'2019-01-14' => '成人の日',\n'2019-02-11' => '建国記念の日',\n'2019-03-21' => '春分の日',\n'2019-04-29' => '昭和の日',\n'2019-05-03' => '憲法記念日',\n'2019-05-04' => 'みどりの日',\n'2019-05-05' => 'こどもの日',\n'2019-05-06' => 'こどもの日 振替休日',\n'2019-07-15' => '海の日',\n'2019-08-11' => '山の日',\n'2019-08-12' => '山の日 振替休日',\n'2019-09-16' => '敬老の日',\n'2019-09-23' => '秋分の日',\n'2019-10-14' => '体育の日',\n'2019-11-03' => '文化の日',\n'2019-11-04' => '文化の日 振替休日',\n'2019-11-23' => '勤労感謝の日',\n'2020-01-01' => '元日',\n'2020-01-13' => '成人の日',\n'2020-02-11' => '建国記念の日',\n'2020-02-23' => '天皇誕生日',\n'2020-02-24' => '天皇誕生日 振替休日',\n'2020-03-20' => '春分の日',\n'2020-04-29' => '昭和の日',\n'2020-05-03' => '憲法記念日',\n'2020-05-04' => '憲法記念日 振替休日',\n'2020-05-04' => 'みどりの日',\n'2020-05-05' => 'こどもの日',\n'2020-07-20' => '海の日',\n'2020-08-11' => '山の日',\n'2020-09-21' => '敬老の日',\n'2020-09-22' => '秋分の日',\n'2020-10-12' => '体育の日',\n'2020-11-03' => '文化の日',\n'2020-11-23' => '勤労感謝の日'\n);\n foreach ($holidays as $key => $value) {\n DB::table('holidays')->insert([\n 'date' => $key,\n 'title' => $value,\n ]);\n }\n }", "public function testRemembranceDayBefore2006(): void\n {\n $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1);\n $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year);\n }", "private function calculateSecondInternationalWorkersDay(): void\n {\n if ($this->year >= 2018) {\n return;\n }\n\n $this->addHoliday(new Holiday('secondInternationalWorkersDay', [\n 'uk' => 'День міжнародної солідарності трудящих',\n 'ru' => 'День международной солидарности трудящихся',\n ], new \\DateTime(\"$this->year-05-02\", new \\DateTimeZone($this->timezone)), $this->locale));\n }", "public static function diffDate($from,$to,$removeSunday = false)\n {\n $from = date(\"Y-m-d H:i:s\", strtotime($from));\n $to = date(\"Y-m-d H:i:s\", strtotime($to)); \n $datetime1 = new \\DateTime($from);\n $datetime2 = new \\DateTime($to);\n $interval = $datetime1->diff($datetime2);\n $day = $interval->format('%a')+1;\n $days = $datetime1->diff($datetime2, true)->days;\n\n if($removeSunday == true)\n {\n $sundays = intval($days / 7) + ($datetime1->format('N') + $days % 7 >= 7);\n $available_days = $day - $sundays;\n return $available_days;\n }\n else\n {\n return $days;\n }\n }", "function the_weekday_date($before = '', $after = '')\n {\n }", "public function getDateDiff($until, $from = null)\n {\n\n // convert parameters to DateTime if necessary\n /** @var \\DateTime $until */\n if (is_string($until)) {\n $until = new \\DateTime($until);\n }\n /** @var \\DateTime $from */\n if (! $from) {\n $from = new \\DateTime();\n } elseif (is_string($from)) {\n $from = new \\DateTime($from);\n }\n\n // if $until precedes $from...\n if ($from > $until) {\n $tmp = $from;\n $from = $until;\n $until = $tmp;\n $invert = 1;\n } else {\n $invert = 0;\n }\n // if the start date/time is a weekend or holiday, push the date forward\n // until it isn't and set the time to midnight. unusual, but people might\n // work on a weekend\n $day_of_week = $from->format('w'); // 0 = sunday, 6 = saturday\n // $this->debug(sprintf(\"parameters are from %s and until %s\",\n // $from->format('r'), $until->format('r')));\n if ($day_of_week == 0) {\n $from->add(new \\DateInterval(\"P1D\"))->setTime(0, 0);\n } elseif ($day_of_week == 6) {\n $from->add(new \\DateInterval(\"P2D\"))->setTime(0, 0);\n }\n $from_ymd = $from->format('Y-m-d');\n\n // if $from is a holiday (also unusual), likewise advance $from until it isn't\n\n /** @todo consider fetching ALL closings, ad hoc non-holiday included.\n * if we are closed ~today~ for any reason, then today is not a business day */\n $holidays = $this->getHolidaysForPeriod($until->format('Y-m-d'), $from_ymd);\n $holidays_to_deduct = count($holidays);\n $this->debug(sprintf(\"%d holidays between submitted dates\", count($holidays)));\n while (in_array($from_ymd, $holidays)) {\n $from->add(new \\DateInterval(\"P1D\"));\n $from_ymd = $from->format('Y-m-d');\n $holidays_to_deduct--; // already accounted for\n }\n\n // figure out how many weekend days to deduct\n $diff = $from->diff($until);\n $weeks = floor($diff->days / 7);\n // $this->debug(\"# of weeks is $weeks\");\n\n $days_to_deduct = 2 * $weeks;\n $until_day_of_week = $until->format('w');\n if ($until_day_of_week < $day_of_week) {\n $days_to_deduct += 2;\n } elseif ($until_day_of_week == $day_of_week) {\n // then it depends on the time of day\n $t1 = $from->format('H:i');\n $t2 = $until->format('H:i');\n if ($t1 >= $t2) {\n $days_to_deduct += 2;\n $this->debug('incrementing $days_to_deduct += 2 ...');\n }\n }\n $days_to_deduct += $holidays_to_deduct;\n // $this->debug(\"days to deduct is now: $days_to_deduct at \" . __LINE__);\n // figure out how many holidays to deduct\n if ($days_to_deduct) {\n $from->add(new \\DateInterval(\"P{$days_to_deduct}D\"));\n }\n\n $diff = $from->diff($until);\n $diff->invert = $invert;\n\n return $diff;\n }" ]
[ "0.69038564", "0.6723537", "0.6722597", "0.6717855", "0.6562868", "0.6496241", "0.6483442", "0.646535", "0.63959813", "0.63933265", "0.63862646", "0.6375235", "0.63364094", "0.6311497", "0.6310511", "0.62968916", "0.62843674", "0.6200843", "0.61858416", "0.6166769", "0.61436486", "0.61153847", "0.6092589", "0.6092089", "0.6072591", "0.6057336", "0.6052333", "0.60440373", "0.603961", "0.60282266", "0.60261995", "0.60207605", "0.600233", "0.59843194", "0.59573", "0.594993", "0.5876467", "0.58342046", "0.57801974", "0.5747528", "0.57369894", "0.5734639", "0.57243156", "0.57122076", "0.5704741", "0.5703324", "0.5702074", "0.56899744", "0.5688575", "0.567352", "0.5672685", "0.5655159", "0.5650769", "0.56389165", "0.56246835", "0.56076825", "0.5602029", "0.5578829", "0.55711675", "0.5553524", "0.55474055", "0.553506", "0.55198336", "0.55084574", "0.55059266", "0.5486799", "0.5479902", "0.5461693", "0.5419935", "0.5403975", "0.53651166", "0.5363909", "0.53575176", "0.5337532", "0.533371", "0.53258103", "0.531211", "0.5294164", "0.52897036", "0.52875715", "0.52789545", "0.5270579", "0.52631557", "0.52626127", "0.52421135", "0.52414095", "0.52398986", "0.5225266", "0.52218205", "0.5219271", "0.5206923", "0.5205645", "0.52038175", "0.51839906", "0.51786506", "0.5176156", "0.51627135", "0.515854", "0.5157715", "0.5151525", "0.5150922" ]
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\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\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "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 }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "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}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "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 }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "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 }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "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 }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "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}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "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 }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "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 }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "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 }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "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 }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "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 }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "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 }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "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}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(StoreTvListRequest $request) { $validatedData = auth()->user()->tvlists()->create($request->validated()); return response()->json($validatedData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show(TvList $tvList) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "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\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\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::error('event.view.not_allowed');\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}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Se obtiene el registro de la serie agregada por el User
public function checkUser($serie) { $tvCheck = TvList::where([['api_id', $serie],['user_id', Auth::id()]])->first(); return response()->json($tvCheck); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function agregarUsuario(){\n \n }", "public function registro() {\n \n if(Auth::is_valid()){\n return Router::redirect('/');\n }\n \n $this->title = 'Formulario de registro';\n\n if (Input::hasPost('usuario')) {\n $obj = Load::model('usuario'); \n if ($obj->save(Input::post('usuario'))) {\n Flash::success('En un momento recibira un correo de confirmación para activar su cuenta.');\n return Router::redirect(\"usuario/ver/$obj->nick/\");\n }else{\n Flash::error('Falló operación'); \n $this->usuario = $obj;\n $this->usuario->clave = '';\n return false;\n }\n } \n }", "public function buscaCvePas(){\n /* Consulta usando ELOQUENT -> Trae al usuario si lo encuentra en la tabla usuarios */\n $usuario = Usuario::where([\n ['cuentaUsuario', $this->cuentaUsuario],\n ['contrasenia', $this->contrasenia]\n ])->first();\n return $usuario;\n }", "public static function buscarRegistro( UserUser $userUser, $tipoLista ){\n\t\t$strEmail = $userUser->email;\n\n\t\t$conexion = new Conexion();\n\n\t\t$consulta = $conexion->prepare(\"SELECT A.id, A.email, A.confirmed, A.blacklisted, A.optedin, A.bouncecount, A.entered, A.modified, A.uniqid, A.uuid, A.htmlemail, A.subscribepage, A.disabled FROM phplist_user_user AS A INNER JOIN phplist_user_user_attribute AS B ON A.id = B.userid AND B.attributeid = 1 WHERE A.email = :email\");\n\n\t\t$consulta->bindParam( ':email', $strEmail, PDO::PARAM_STR );\n\n\t\t$consulta->execute();\n\n\t\t$registro = $consulta->fetch();\n\n\t\tif($registro){\n\t\t\t$userUser->id = $registro['id'];\n\t\t\t$userUser->email = $registro['email'];\n\t\t\t$userUser->confirmed = $registro['confirmed'];\n\t\t\t$userUser->blacklisted = $registro['blacklisted'];\n\t\t\t$userUser->optedin = $registro['optedin'];\n\t\t\t$userUser->bouncecount = $registro['bouncecount'];\n\t\t\t$userUser->entered = $registro['entered'];\n\t\t\t$userUser->modified = $registro['modified'];\n\t\t\t$userUser->uniqid = $registro['uniqid'];\n\t\t\t$userUser->uuid = $registro['uuid'];\n\t\t\t$userUser->htmlemail = $registro['htmlemail'];\n\t\t\t$userUser->subscribepage = $registro['subscribepage'];\n\t\t\t$userUser->disabled = $registro['disabled'];\n\n\t\t}else{\n\t\t\t$userUser->uuid = null;\n\t\t}\n\t\treturn $userUser;\n\t}", "public function saveUserContratante()\n {\n\n $data_insert = [\n 'id_user' => $this->_id_user,\n 'id_contratante' => $this->_id_contratante,\n ];\n return parent::save($data_insert);\n }", "public function data_user(){\n\t\treturn $this->db->get('registrasi');\n\t}", "public function user()\n {\n return $this->belongsTo(User::class);//relacionamento da ordem 1\n }", "protected function objectUserEnCours(){\n $fbUid = $this->getRequest()->getSession()->get('_fos_facebook_fb_482361481839052_user_id');\n $user = $this->getDoctrine()->getManager()->getRepository('MetinetFacebookBundle:User')->findOneByfbUid($fbUid);\n return $user ;\n }", "public function registrar_registro()\n \n {\n /** \n * @brief : Metodos para ingresar registro en la base de datos.\n * @return :Vista donde nos mostrara todos lo registro.\n */\n \n $data =Request()->all();\n registro::create($data);\n\n }", "function registro($_usuario, $_pass, $_nombre, $_apellidos, $_email) {\n\t\t$sql = \"SELECT * from usuario where usuario='\".$_usuario.\"'\";\n\n\t\t$usuario_result = $this->db->query($sql)->result();\n\n\t\tif (count($usuario_result)!='0') {\n\n\t\t\t// SI EXISTE DEVOLVEMOS \"FALSE\"\n\t\t\techo \"false\";\n\t\t} else {\n\n\t\t\t// SI NO EXISTE HACEMOS LA INSERCION Y LO GUARDAMOS EN LA VARIABLE SESSION\n\t\t\t$insert = \"INSERT INTO usuario value (NULL, '\".$_nombre.\"', '\".$_apellidos.\"', '\".$_usuario.\"', md5('\".$_pass.\"'), '\".$_email.\"', 'usuario');\";\n\n\t\t\t$this->db->query($insert);\n\n\t\t\t$sql = \"SELECT * from usuario where usuario='\".$_usuario.\"'\";\n\n\t\t\t$usuario_result = $this->db->query($sql)->result();\n\n\t\t\tforeach ($usuario_result[0] as $key => $value) {\n\t\t\t\t$usuario[0][$key] = $value;\n\t\t\t}\n\t\t\tif (count($usuario_result)=='1') {\n\t\t\t\t$this->session->id_usuario = $usuario[0]['id'];\n\t\t\t\t$this->session->nombre = $usuario[0]['usuario'];\n\t\t\t\t$this->session->email = $usuario[0]['email'];\n\t\t\t\t$this->session->privilegio = $usuario[0]['privilegio'];\n\t\t\t\t$this->session->sesion = TRUE;\n\t\t\t}\n\n\t\t\techo \"true\";\n\t\t}\n\n\t}", "public function guardar(){\r\n $clave_activacion = Upload::generar_nombre(32);\r\n\t\t\t\r\n\t\t\t$user_table = Config::get()->db_user_table;\r\n\t\t\t$consulta = \"INSERT INTO $user_table(dni, password, admin, email, imagen, activo, clave_activacion, timestamp)\r\n\t\t\tVALUES ('$this->dni','$this->password',0,'$this->email', '$this->imagen', 0, '$clave_activacion', default);\";\r\n\t\t\treturn Database::get()->query($consulta);\r\n\r\n\t\t}", "public function user()\n {\n return $this->belongsTo(User::class, 'criador_id', 'id');\n }", "public function createUsuario()\n {\n $hash = password_hash($this->contra, PASSWORD_DEFAULT);\n $sql = 'INSERT INTO administradores(nombre, apellido, correo, usuario, contra)\n VALUES(?, ?, ?, ?, ?)';\n $params = array($this->nombre, $this->apellido, $this->correo, $this->usuario, $hash);\n return Database::executeRow($sql, $params);\n }", "public function store(EmpresaFormRequest $request)\n {\n $user = new User;\n $user->email = $request->input('mail');\n $user->password = bcrypt( $request->input('password') );\n $user->rol = \"coordinador\";\n $user->save();\n $user = User::where('email', $request->input('mail'))->first();\n\n $empresa=new Empresa;\n //'nombre' es obj creado del request\n $empresa->Nombre=$request->get('Nombre');\n $empresa->Giro=$request->get('Giro');\n $empresa->Direccion=$request->get('Direccion');\n $empresa->Telefono=$request->get('Telefono');\n $empresa->condicion='1';\n $empresa->users_id = $user->id;\n $empresa->save();\n //Después de guardar nos redireccionamos a la carpeta coordinador\n return Redirect::to('revolution/empresa'); \n }", "public function getOneByUser(){\n //hacemos la consulta y lo guardamos en una variable\n $sql=\"SELECT id,coste FROM pedidos\"\n .\" where usuario_id={$this->getUsuario_id()} order by id desc limit 1\";\n $pedido=$this->db->query($sql);\n //devolvemos un valor en especifico y lo comvertimos a un objeto completamente usable.\n return $pedido->fetch_object();\n }", "public function guardar(){\r\n\t\t\t$user_table = Config::get()->db_user_table;\r\n\t\t\t$consulta = \"INSERT INTO $user_table(dni, nom, cognom1, cognom2, data_naixement, estudis,\r\n\t\t\t\t\t\tsituacio_laboral, prestacio, telefon_mobil, telefon_fix, email, admin, imatge)\r\n\t\t\tVALUES ('$this->dni','$this->nom','$this->cognom1','$this->cognom2','$this->data_naixement','\r\n\t\t\t\t\t$this->estudis','$this->situacio_laboral','$this->prestacio','$this->telefon_mobil', '\r\n\t\t\t\t\t$this->telefon_fix','$this->email','$this->admin','$this->imatge');\";\r\n\t\t\t\t\t\t\t\r\n\t\t\treturn Database::get()->query($consulta);\r\n\t\t}", "public function buscarUsuarioReg($usuario) {\n $user=Usuario::where('usuario', $usuario)->get();\n return Response::json($user, 200);\n }", "public function saveUsuario(){\n\t\t$conexion = new Database();\n if ($this->codigo){\n $query = sprintf('UPDATE agenda_usuario SET usuario = \"%s\" password = \"%s\" WHERE usuario_id = %d',\n $this->usuario,\n $this->password,\n $this->codigo);\n $rows = $conexion->exec( $query );\n }\n else{\n $query = sprintf('INSERT INTO agenda_usuario ( usuario, password) VALUES (\"%s\", \"%s\")',\n $this->usuario,\n $this->password );\n\t\t\t$rows = $conexion->exec( $query );\n $this->codigo = $conexion->lastInsertId();\n }\n }", "public function store()\n\t{\n\t\t//return Input::all();\n\t\t// Creamos un nuevo objeto para nuestro nuevo usuario\n $userespecialidad = new Userespecialidads;\n // Obtenemos la data enviada por el usuario\n //$data = Input::all();\n \n \n //$userespecialidad->fill($data);\n // Guardamos el usuario\n $userespecialidad->User=Input::get('User');;\n $userespecialidad->Especialidad=Input::get('Especialidad');;\n $userespecialidad->save();\n // Y Devolvemos una redirección a la acción show para mostrar el usuario\n return Redirect::route('admin.userespecialidads.create');\n\t}", "public function activarUsuario() {\n\t\t$this->id_status = self::STATUS_ACTIVED;\n\t\treturn $this->save () ? $this : null;\n\t}", "public function getUsuario()\n {\n return $this->hasOne(User::className(), ['id' => 'createdBy'])->inverseOf('comentarios');\n }", "function getById(){\n //query to read single user\n $query = \"SELECT u.id, u.username, u.password, u.estado, (CASE u.estado WHEN '1' THEN 'ACTIVO' WHEN '0' THEN 'INACTIVO' END)\n AS valor_estado, u.fecha_creacion, p.id AS id_perfil, p.nombre AS nombre_perfil FROM \". $this->table_name .\" u\n INNER JOIN perfil p ON u.id_perfil = p.id AND u.id=? LIMIT 0,1\";\n\n //prepare query statement\n $stmt = $this->conn->prepare($query);\n\n //bind id of user to be updated\n $stmt->bindParam(1, $this->id);\n\n //execute query\n $stmt->execute();\n\n //get retrieved row\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //set values to object properties\n $this->username = $row['username'];\n $this->password = $row['password'];\n $this->estado = $row['estado'];\n $this->valor_estado = $row['valor_estado'];\n $this->fecha_creacion = $row['fecha_creacion'];\n $this->id_perfil = $row['id_perfil'];\n $this->nombre_perfil = $row['nombre_perfil'];\n }", "public function getIdUsuario(){\n return $this->idUsuario;\n }", "function recuperarUsuario()\n {\n $_codigo=$this->codigo ; \n $this->dataBaseAccess(); \n $mySelect = 'select Codigo_empresa,Nome,Senha where Codigo = ' . $this->Codigo ;\n $ret = mysqli_query($this->myCon , $mySelect) ;\n $numRows= mysqli_num_rows($ret); \n if($numRows>0)\n {\n $reg = mysqli_fetch_array($ret) ;\n $this->Codigo_empresa=$reg['Codigo_empresa'] ;\n $this->Nome=$reg['Nome'] ;\n $this->Senha=$reg['Senha'] ;\n mysqli_close( $this->myCon );\n $this->records_found=$numRows ;\n return true ; // ja cadastrado \n }else{\n mysqli_close( $this->myCon );\n return false ; \n }\n }", "public function ingresoUsuarioModel($user, $password){\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM usuarios WHERE codigo = :user and password = :password\"); //se prepara la conexion\n\t\t//definicion de parametros\n\t\t$stmt->bindParam(\":user\", $user);\n\t\t$stmt->bindParam(\":password\",$password);\n\t\t$stmt->execute(); //ejecucion mediante pdo\n\t\treturn $stmt->fetch(); //se retorna lo asociado a la consulta\n\t\t$stmt->close();\n\t}", "public function getUsuario() {\n }", "public function autenticar(Autenticar $autenticar){\n\n $sql = \"select * from tbl_funcionario where matricula = '\".$autenticar->getLogin().\"' and senha = '\".$autenticar->getSenha().\"'\";\n\n echo $sql;\n \n $pdoConn = $this->conn->startConnection();\n\n $select = $pdoConn->query($sql);\n\n if($rsContatos=$select->fetch(PDO::FETCH_ASSOC)){\n // echo \"AQQUI\";\n // var_dump($rsContatos);\n \n // require_once('model/usuarioCmsClass.php');\n $user = new UsuarioCms();\n\n $user->setId($rsContatos['id']);\n $user->setNome($rsContatos['nome']);\n $user->setLogin($rsContatos['matricula']);\n $user->setSenha($rsContatos['senha']);\n $user->setIdPermissao($rsContatos['id_permissao']);\n\n return $user;\n }else{\n return \"FALHA\";\n }\n\n $this->conn->closeConnection();\n\n }", "public function userDestinatario()\n {\n return $this->belongsTo(User::class, 'user_id_transaction');//relacionamento da ordem 1\n }", "public function dados()\n {\n\n return $this->belongsTo('App\\User','user_id');\n \n }", "public function registro(Request $request){\n $id = auth()->user()->id;\n $id_information = DB::table('users_information')->where('user_id',$id)->get();\n // dd($id_information);\n if($id_information->isEmpty()){\n $this->store($id);\n return view(\"inteligencias\");\n }\n return view(\"inteligencias\");\n }", "public function getRUser($post)\n\t{\n\t\ttry {\n\t\t\t$condicion = '';\n\t\t\t$aux_ids = array();\n\t\t\t#Si existe el id del personal, buscar los bienes de la persona\n\t\t\tif ( isset($post['servidor_id']) && !empty($post['servidor_id']) ) \n\t\t\t{\n\t\t\t\t$servidor = $post['servidor_id']; \n\n\t\t\t\t$this->sql = \" SELECT bien_id FROM asignacion WHERE personal_id = ? \";\n\t\t\t\t$this->stmt = $this->pdo->prepare( $this->sql );\n\t\t\t\t$this->stmt->bindParam( 1,$servidor );\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$bienes_ids = $this->stmt->fetchAll( PDO::FETCH_OBJ );\n\t\t\t\tforeach ($bienes_ids as $key => $id) {\n\t\t\t\t\tarray_push($aux_ids,$id->bien_id);\n\t\t\t\t}\n\t\t\t\t/*Conversion a string*/\n\t\t\t\t$aux_ids = implode(',',$aux_ids);\n\t\t\t\t\n\t\t\t\t/*Buscar en la tabla de bienes , las asignaciones registradas*/\n\t\t\t\t$this->sql = \" SELECT \n\t\t\t\t\tb.id,\n\t\t\t\t\tb.descripcion,\n\t\t\t\t\tb.serie,\n\t\t\t\t\tb.status,\n\t\t\t\t\tb.inventario,\n\t\t\t\t\tb.desc_ub,\n\t\t\t\t\tm.nombre AS marca,\n\t\t\t\t\tg.nombre AS grupo,\n\t\t\t\t\tt.nombre AS tipo,\n\t\t\t\t\tmo.nombre AS modelo,\n\t\t\t\t\tb.fecha_reg AS registro,\n\t\t\t\t\tb.fecha_adq AS adquisicion,\n\t\t\t\t\tUPPER(c.nombre) AS color,\n\t\t\t\t\tma.nombre AS material,\n\t\t\t\t\tp.nombre AS proveedor,\n\t\t\t\t\tCONCAT(\n\t\t\t\t\t pe.nombre,\n\t\t\t\t\t ' ',\n\t\t\t\t\t pe.ap_pat,\n\t\t\t\t\t ' ',\n\t\t\t\t\t pe.ap_mat\n\t\t\t\t\t) AS asignadoa\n\t\t\t\t FROM bienes AS b\n\t\t\t\t INNER JOIN marcas AS m\n\t\t\t\t ON\n\t\t\t\t m.id = b.marca_id\n\t\t\t\t INNER JOIN grupos AS g\n\t\t\t\t ON\n\t\t\t\t g.id = b.grupo_id\n\t\t\t\t INNER JOIN t_bienes AS t\n\t\t\t\t ON\n\t\t\t\t t.id = b.tipo_id\n\t\t\t\t INNER JOIN modelos AS mo\n\t\t\t\t ON\n\t\t\t\t mo.id = b.modelo_id\n\t\t\t\t INNER JOIN color AS c\n\t\t\t\t ON\n\t\t\t\t c.id = b.color_id\n\t\t\t\t INNER JOIN materiales AS ma\n\t\t\t\t ON\n\t\t\t\t ma.id = b.material_id\n\t\t\t\t INNER JOIN proveedores AS p\n\t\t\t\t ON\n\t\t\t\t p.id = b.pro_id\n\t\t\t\t INNER JOIN asignacion AS a\n\t\t\t\t ON\n\t\t\t\t a.bien_id = b.id\n\t\t\t\t INNER JOIN personal AS pe\n\t\t\t\t ON\n\t\t\t\t pe.id = a.personal_id WHERE b.id IN ($aux_ids) \";\n\t\t\t\t$this->stmt = $this->pdo->prepare( $this->sql );\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$bienes = $this->stmt->fetchAll( PDO::FETCH_OBJ );\n\t\t\t\t\n\t\t\t\treturn json_encode($bienes) ;\n\t\t\t} \n\t\t\telseif( isset($post['area']) && !empty($post['area']) )\n\t\t\t{\n\t\t\t\t$area = $post['area'];\n\t\t\t\t#Buscar a los usuarios pertenecientes al area\n\t\t\t\t$this->sql = \"SELECT id FROM personal WHERE area_id = ?\";\n\t\t\t\t$this->stmt = $this->pdo->prepare( $this->sql );\n\t\t\t\t$this->stmt->bindParam(1,$area);\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$personas = $this->stmt->fetchAll( PDO::FETCH_OBJ );\n\t\t\t\tforeach ($personas as $key => $id) {\n\t\t\t\t\tarray_push($aux_ids,$id->id);\n\t\t\t\t}\n\t\t\t\t$aux_ids = implode(',',$aux_ids);\n\t\t\t\t#ubicar los bienes con las personas (En asignaciones)\n\t\t\t\t$this->sql = \"SELECT bien_id FROM asignacion WHERE personal_id IN (?)\";\n\t\t\t\t$this->stmt = $this->pdo->prepare( $this->sql );\n\t\t\t\t$this->stmt->bindParam(1,$aux_ids);\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$asignaciones = $this->stmt->fetchAll( PDO::FETCH_OBJ );\n\t\t\t\t#Limpiar arreglo auxiliar\n\t\t\t\tunset($aux_ids);\n\t\t\t\t$aux_ids = array();\n\t\t\t\tforeach ($asignaciones as $key => $id) {\n\t\t\t\t\tarray_push($aux_ids,$id->bien_id);\n\t\t\t\t}\n\t\t\t\t$aux_ids = implode(',',$aux_ids);\n\t\t\t\t#Buscar los bienes (Bienes)\n\t\t\t\t$this->sql = \"SELECT \n\t\t\t\t\tb.id,\n\t\t\t\t\tb.descripcion,\n\t\t\t\t\tb.serie,\n\t\t\t\t\tb.status,\n\t\t\t\t\tb.inventario,\n\t\t\t\t\tb.desc_ub,\n\t\t\t\t\tm.nombre AS marca,\n\t\t\t\t\tg.nombre AS grupo,\n\t\t\t\t\tt.nombre AS tipo,\n\t\t\t\t\tmo.nombre AS modelo,\n\t\t\t\t\tb.fecha_reg AS registro,\n\t\t\t\t\tb.fecha_adq AS adquisicion,\n\t\t\t\t\tUPPER(c.nombre) AS color,\n\t\t\t\t\tma.nombre AS material,\n\t\t\t\t\tp.nombre AS proveedor,\n\t\t\t\t\tCONCAT(\n\t\t\t\t\t pe.nombre,\n\t\t\t\t\t ' ',\n\t\t\t\t\t pe.ap_pat,\n\t\t\t\t\t ' ',\n\t\t\t\t\t pe.ap_mat\n\t\t\t\t\t) AS asignadoa\n\t\t\t\t FROM bienes AS b\n\t\t\t\t INNER JOIN marcas AS m\n\t\t\t\t ON\n\t\t\t\t m.id = b.marca_id\n\t\t\t\t INNER JOIN grupos AS g\n\t\t\t\t ON\n\t\t\t\t g.id = b.grupo_id\n\t\t\t\t INNER JOIN t_bienes AS t\n\t\t\t\t ON\n\t\t\t\t t.id = b.tipo_id\n\t\t\t\t INNER JOIN modelos AS mo\n\t\t\t\t ON\n\t\t\t\t mo.id = b.modelo_id\n\t\t\t\t INNER JOIN color AS c\n\t\t\t\t ON\n\t\t\t\t c.id = b.color_id\n\t\t\t\t INNER JOIN materiales AS ma\n\t\t\t\t ON\n\t\t\t\t ma.id = b.material_id\n\t\t\t\t INNER JOIN proveedores AS p\n\t\t\t\t ON\n\t\t\t\t p.id = b.pro_id\n\t\t\t\t INNER JOIN asignacion AS a\n\t\t\t\t ON\n\t\t\t\t a.bien_id = b.id\n\t\t\t\t INNER JOIN personal AS pe\n\t\t\t\t ON\n\t\t\t\t pe.id = a.personal_id\n\t\t\t\t WHERE b.id IN ($aux_ids)\";\n\t\t\t\t$this->stmt = $this->pdo->prepare( $this->sql );\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$bienes = $this->stmt->fetchAll( PDO::FETCH_OBJ );\n\t\t\t\treturn json_encode($bienes);\n\t\t\t}else{\n\t\t\t\treturn json_encode( array('message'=>'No selecciono ningún criterio') );\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t$this->result = array('error' => $e->getMessage() );\n\t\t}\t\n\t}", "public function action_recebeUsuario(){\n\t\t\n\t\tif(isset($_POST) && count($_POST) > 0){\n\t\t\t$usuario = Model_Usuario::forge();\n $usuario->idUsuario = $_POST['idUsuario'];\n\t\t\t$usuario->login = $_POST['login'];\n\t\t\t$usuario->senha = $_POST['senha'];\n\t\t\t$usuario->nome = $_POST['nome'];\n\t\t\t$usuario->email = $_POST['email'];\n\t\t\t\n\t\t\t$app_db = Model_Usuario::find('all');\n\t\t\t\n \n\t}\n }", "function agregar($nombre_usuario, $nick_usuario, $clave, $apellido_usuario, $direccion_usuario, $telefono_usuario, $email_usuario, $genero_usuario, $id_rol){\n\t\tinclude 'data_bd.inc';\n\t\tinclude 'databaseClass.php';\n\t\t//creo mi cadena de conexion\n\t\t$conexion = new DB($host, $user, $pass, $bd);\n\t\t//Creo mi conexión\n\t\t$status = $conexion->conectar();\n\t\t//En caso de que devuelva una falla\n\t\tif($status === FALSE){\n\t\t\tdie('No se pudo conectar');\n\t\t}\n\t\t//Creo mi query\n\t\t$consulta = \"INSERT INTO\n\t\t\t\t\t\t\t\tusuario(nombre_usuario, nick_usuario, clave, apellido_usuario, direccion_usuario, telefono_usuario, email_usuario, genero_usuario, id_rol)\n\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t'$nombre_usuario',\n\t\t\t\t\t\t\t\t'$nick_usuario',\n\t\t\t\t\t\t\t\t'$clave',\n\t\t\t\t\t\t\t\t'$apellido_usuario',\n\t\t\t\t\t\t\t\t'$direccion_usuario',\n\t\t\t\t\t\t\t\t'$telefono_usuario',\n\t\t\t\t\t\t\t\t'$email_usuario',\n\t\t\t\t\t\t\t\t'$genero_usuario',\n\t\t\t\t\t\t\t\t$id_rol\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\";\n\t\t//Ejecuto la consulta\n\t\t$resultado = $conexion -> ejecutarConsulta($consulta);\n\t\t//Si fue una falla\n\t\tif($conexion === FALSE){\n\t\t\t$conexion -> cerrar();\t\n\t\t\treturn FALSE;\n\t\t}\n\t\t//Cierro la conexion\n\t\t$id = $resultado;\n\t\t$conexion -> cerrar();\n\t\trequire('usuarioClass.php');\n\t\t$usuario = new Usuario($id, $nombre_usuario, $nick_usuario, $clave, $apellido_usuario, $direccion_usuario, $telefono_usuario, $email_usuario, $genero_usuario, $id_rol);\n\t\t//Regreso los productos\n\t\treturn $usuario;\n\t}", "public function SaveAsUser()\r\n\t\t{\r\n\t\t\t$db = new Db();\r\n\t\t\t$id = $_SESSION['a_restaurant_id'];\r\n\t\t\t$sql = \"INSERT INTO tbl_reservaties (klantnaam, aantalpersonen, datum, uur, tafel_id)\r\n\t\t\tVALUES ('\".$db->conn->real_escape_string($this->m_sName).\"',\r\n\t\t\t\t\t'\".$db->conn->real_escape_string($this->m_iPersonen).\"',\r\n\t\t\t\t\tSTR_TO_DATE('\".$db->conn->real_escape_string($this->m_dDate).\"', '%e-%m-%Y'),\r\n\t\t\t\t\t'\".$db->conn->real_escape_string($this->m_iUur).\"',\r\n\t\t\t\t\t(SELECT tafel_id FROM tbl_tafels WHERE tafelnr = \".$db->conn->real_escape_string($this->m_iTable).\" AND restaurant_id = $id\r\n\t\t\t))\";\r\n\t\t\t$db->conn->query($sql);\r\n\t\t\t\r\n\t\t}", "public function createUser($correo)\n {\n $query = $this->connect()->prepare('SELECT * FROM users WHERE Correo = :correo');\n $query->execute(['correo' => $correo]);\n //Guardo el obj PDO en cadenaValida\n $this->cadenaValida = $query->fetch();\n\n //si el resultado retorna true no inserta, de lo contrario inserta\n if ($this->cadenaValida) {\n //El usuario ya existe, hay que retornar mensaje de lo que paso\n\n return $resultado = true;\n }else\n {\n //El correo buscado no existe, hay que insertar en tabla users\n //Obtenemos el ultimo valor de ID de usuario para agregar al nuevo\n $idTemp = $this->connect()->query('SELECT MAX(IDUsuario) FROM users');\n \n $a = $idTemp->fetch(PDO::FETCH_BOTH);\n\n $this->idu = $a[0];\n\n $this->idu = (int) $this->idu + 1;\n $this->nombre = $_POST['name'];\n $this->apellidoP = $_POST['ap'];\n $this->apellidoM = $_POST['am'];\n $this->correo = $_POST['correo'];\n $this->pass = md5($_POST['pass']);\n $this->rol = 1;\n\n $query = $this->connect()->prepare(\n 'INSERT INTO users VALUES(\n :idTemp,\n :nombre,\n :apellidoP,\n :apellidoM,\n :correo,\n :pass,\n :rol)'\n );\n\n $query->execute([\n 'idTemp' => $this->idu,\n 'nombre' => $this->nombre,\n 'apellidoP' => $this->apellidoP,\n 'apellidoM' => $this->apellidoM,\n 'correo' => $this->correo,\n 'pass' => $this->pass,\n 'rol' => $this->rol]);\n\n return $resultado = false;\n }\n }", "public function empleado()\n {\n return \\App\\Models\\Empleado::where('user_id', $this->user_id)->first();\n }", "function idperfil($nombre){\n //busca en la tabla usuarios los campos donde el alias sea igual a lo que recibe del controlaor si no encuentra nada devuelve null\n $usuario = R::findOne('usuarios', 'alias=?', [\n $nombre\n ]);\n //guardo en una sesion la variable usuario y se retorna esa variable al controlador Usuarios.php linea 169 dentro de la carpeta usuario\n $_SESSION['idusuario']=$usuario->id;\n return $usuario;\n }", "public function store(Request $request){\n\n try{\n // Inicia transação com banco de dados\n \\DB::beginTransaction();\n\n //dados do usuário motorista\n $user = new User();\n $user->name = $request->nome;\n $user->email = $request->email;\n $user->password = bcrypt($request->password);\n $user->roles = \"MOTORISTA\";\n\n ///dados específicos do motorista\n $motorista = new Motorista();\n $motorista->cnh = $request->cnh;\n $motorista->tipo_cnh = $request->tipo_cnh;\n $motorista->obs = $request->obs;\n $motorista->administrador_id = auth()->user()->id;\n\n print_r($motorista->cnh);\n\n\n //se deu certo a gravação dos dados no BD\n //método save() é herdado da model User\n if($user->save()){\n $motorista->user_id = $user->id;\n if($motorista->save()){\n // Efetiva todas as operações\n \\DB::commit();\n //retorna para o index de resources/views/usuario/index.blade.php\n return redirect('motorista')->with('success', \"Motorista cadastrado com sucesso!\");\n }\n }\n else{\n return redirect ('login');\n }\n\n }catch(exception $e) {\n // Cancela todas as operações em caso de erro\n \\DB::rollback();\n return redirect('motorista')->with('error', \"Não cadastrou motorista!\");\n }\n\n }", "public function insertUsuario(){\n $query = \"INSERT INTO usuario (nombre, apellido, sexo, fecha_nac, correo, contrasenia) VALUES ('\".parent::string($this->getNombre()).\"', '\".parent::string($this->getApellido()).\"', '\".parent::string($this->getSexo()).\"', '\".parent::string($this->getFecha_Nac()).\"', '\".parent::string($this->getCorreo()).\"', '\".md5(md5(\"PAO%%%%0001TPIPSADSADasdsad\").parent::string($this->getContrasenia())).\"');\";\n $result = mysqli_query(parent::conexion(), $query);\n if($result){\n $fila = mysqli_fetch_array($result);\n parent::desconectar();\n return $fila;\n } else{\n echo parent::conexion()->error;\n parent::desconectar();\n return false;\n }\n }", "public function getUsuarioInsercion()\n {\n return $this->usuarioInsercion;\n }", "public function traer_registro($id)\n {\n $this->db->where('id_usuario', $id)->from('usuarios'); \n\n $query = $this->db->get(); \n\n $usuario = $query->result(); \n\n if ($usuario){\n return $usuario[0];\n }\n else {\n return null;\n }\n }", "private function consultar_usuario_por_id() {\n\n if (is_numeric($this->referencia_a_buscar)) {\n $id_a_buscar = intval($this->referencia_a_buscar);\n $sentencia = \"select id,nombrecompleto ,correo,token from usuario u where u.id= {$id_a_buscar};\";\n $this->respuesta = $this->obj_master_select->consultar_base($sentencia);\n } else {\n $this->respuesta = null;\n }\n }", "public function getUsuario()\n {\n return $this->hasOne(Usuarios::className(), ['id' => 'usuario_id'])->inverseOf('deseados');\n }", "private function ifoCadUser()\n {\n $infoCadUser = new AdmsRead();\n $infoCadUser->fullRead(\"SELECT env_email_conf, adms_niveis_acesso_id, adms_sits_usuario_id FROM adms_cads_usuarios WHERE id =:id LIMIT :limit\", \"id=1&limit=1\");\n $this->IfoCadUser = $infoCadUser->getResultado();\n\n }", "function retourneUtilisateur($idUtilisateur){\n\tglobal $connexion; // on définie la variables globale de connection dans la fonction\n\t\n\t$requete = $connexion->query(\"SELECT * FROM utilisateur where idUtilisateur=\".$idUtilisateur.\"\");\n\t$requete->setFetchMode(PDO::FETCH_OBJ);\n\t$enregistrement = $requete->fetch();\n\t\n\n\treturn $enregistrement; // on renvoie un objet utilisateur\n}", "public function guardarUsuario()\r\n {\r\n $user = new \\App\\Models\\User;\r\n \r\n $user->Seq_Usuario = $_REQUEST['Seq_Usuario'];\r\n $user->Usuario = $_REQUEST['username'];\r\n $user->Password = $_REQUEST['password'];\r\n $user->sys_rol_id = $_REQUEST['rolID'];\r\n\r\n\r\n $userController = new App\\Controllers\\UserController;\r\n\r\n if($user->Seq_Usuario > 0) {\r\n $result = $userController->updateUser($user);\r\n } else {\r\n $result = $userController->createUser($user);\r\n }\r\n \r\n /**\r\n * Variable de sesión usada para mostrar la notificación del\r\n * resultado de la solicitud.\r\n */\r\n $_SESSION['result'] = $result;\r\n \r\n header('Location: ?c=Registro&a=usuarios');\r\n }", "public function findUserById()\n {\n $this->db->query('SELECT * FROM user WHERE id = :id');\n $this->db->bind(':id', $_SESSION['id']);\n \n $row = $this->db->single();\n \n return $row; \n }", "public function getUsuario()\n {\n return $this->hasOne(Usuarios::className(), ['id' => 'usuario_id'])->inverseOf('ignorados');\n }", "public static function registro($usuario_obj){\n\n\t\t// var_dump($usuario);\n\t\t$query = \"INSERT INTO usuarios(nombre,usuario,email,password,privilegio) VALUES (:nombre,:usuario,:email,:password,:privilegio)\";\n\n\n\t\t/**\n\t\t * Call getConexion()\n\t\t */\n\t\tself::getConexion();\n\n\t\t$resultado = self::$cn->prepare($query);\n\n\t\t$resultado->bindValue(\":nombre\", $usuario_obj->getNombre());\n\t\t$resultado->bindValue(\":usuario\", $usuario_obj->getUsuario());\n\t\t$resultado->bindValue(\":email\", $usuario_obj->getEmail());\n\t\t$resultado->bindValue(\":password\", $usuario_obj->getPassword());\n\t\t$resultado->bindValue(\":privilegio\",$usuario_obj->getPrivilegio());\n\n\t\tif ($resultado->execute()) {\n\t\t\t#echo \"<br>TRUE<br>\";\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\necho \"false\";\n\t}", "public function findOrRegister($user)\n {\n if ($userExist = User::where($user['email'])->first()) {\n return $userExist; \n }\n $newUser = User::create($user);\n return $newUser;\n }", "public function AgregarUsuario(Usuario $usu){\n $conn = new conexion();\n $user = -1;\n try {\n if($conn->conectar()){\n $str_sql = \"Insert into usuarios(nom_usu,usuario,cedula,telefono,email,pass,foto,estado,\"\n . \"id_tp_usu,tipo,idcliente) values(\"\n .\"'\".$usu->getNom_usu().\"',\"\n .\"'\".$usu->getUsuario().\"',\"\n .\"'\".$usu->getCedula().\"',\"\n .\"'\".$usu->getTelefono().\"',\"\n .\"'\".$usu->getEmail().\"',\"\n .\"'\".$usu->getPass().\"',\"\n .\"'\".$usu->getFoto().\"',\"\n .\"'\".$usu->getEstado().\"',\"\n .\"\".$usu->getId_tp_usu().\",\"\n .\"'\".$usu->getTipo().\"',\"\n .\"\".$usu->getIdcliente().\");\";\n $sql = $conn->getConn()->prepare($str_sql);\n $user = $sql->execute();\n \n }\n } catch (Exception $exc) {\n echo $exc->getMessage();\n }\n $conn->desconectar();\n return $user;\n }", "public function registroUsuarioModel($data){\n\t\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO usuarios(codigo,nombre,apellidos, email, password, tipo) VALUES(:codigo, :nombre, :apellidos, :email, :password, :tipo)\");\n\t\t//preparacion de parametros\n\t\t$stmt->bindParam(\":codigo\", $data['codigo']);\n\t\t$stmt->bindParam(\":nombre\", $data['nombre']);\n\t\t$stmt->bindParam(\":apellidos\", $data['apellidos']);\n\t\t$stmt->bindParam(\":email\", $data['email']);\n\t\t$stmt->bindParam(\":password\", $data['password']);\n\t\t$stmt->bindParam(\":tipo\", $data['tipo']);\n\t\tif($stmt->execute()) //ejecucion\n\t\t\treturn \"success\"; //respuesta\n\t\telse\n\t\t\treturn \"error\";\n\t\t$stmt->close();\n\t}", "public function user() {\n // sukuria sasaja su user modeliu\n return $this->hasOne('App\\User', 'id', 'user_id');\n }", "function obtenerUsuario_Especialista(){\n\t\t\n\t\t$user = 'user';\n\t\t\n\t\t$query = $this->db->from('usuario')->where('perfil',$user)->get();\n\t if($query-> num_rows() > 0) return $query->result_array();\n\t else return false ;\n\t\t\n\t}", "public function getUser(){\n //Query untuk mengambil data semua user dengan level 'User'\n $this->db->where('level', 'User');\n return $this->db->get('user');\n }", "public function getSalarieByUser() {\n $user = $this->container->get('security.context')->getToken()->getUser();\n if (!$user) {\n return $this->redirect($this->generateUrl('fos_user_security_login'));\n }\n $em = $this->getDoctrine()->getManager();\n\n $salarie = $em->getRepository('KbhGestionCongesBundle:Salarie')->findOneByUser($user);\n\n if (!$salarie) {\n return $this->redirect($this->generateUrl('fos_user_security_login'));\n }\n return $salarie;\n }", "public function Agregar(): bool\n {\n $retorno = false;\n $objetoAccesoDato = AccesoDatos::RetornarObjetoAcceso();\n\n $consulta = $objetoAccesoDato->RetornarConsulta(\"INSERT INTO usuarios (correo,clave,nombre,id_perfil)\"\n . \" VALUES(:correo, :clave, :nombre, :id_perfil)\");\n\n //bindValue asocia un valor con la clave del insert.\n // $consulta->bindValue(':id', $this->id, PDO::PARAM_INT);\n $consulta->bindValue(':correo', $this->correo, PDO::PARAM_STR);\n $consulta->bindValue(':clave', $this->clave, PDO::PARAM_STR);\n $consulta->bindValue(':nombre', $this->nombre, PDO::PARAM_STR);\n $consulta->bindValue(':id_perfil', $this->id_perfil, PDO::PARAM_INT);\n\n $retorno = $consulta->execute();\n\n return $retorno;\n }", "function add(Usuario $objeto) {\n $campos = self::_getCampos($objeto);\n unset($campos['id']);\n return $this->db->insertParameters(self::TABLA, $campos, false);\n }", "function createUser()\n{\n $userCheck = UsersQuery::create()->findOneByUsername($_POST['username']);\n if ($userCheck == \"\") {\n // next add user to db\n $user = new Users();\n $user->setUsername($_POST['username']);\n $user->setPassword($_POST['password']);\n $user->setName($_POST['name']);\n $user->setEmail($_POST['email']);\n $user->setStatus(\"active\");\n $user->setPicture(\"none\");\n $user->setCreated(time());\n $user->setModified(time());\n\n $user->save();\n\n if ($user != null) {\n echo \"user added successfully\";\n }\n } else {\n echo \"user already registered\";\n }\n}", "public function asignar(Request $request){\n if(!$request->ajax() || Auth::user()->rol_id == 11)return redirect('/');\n $rol = $request->rol_id;\n $user = new User();\n $user->id = $request->id_persona;\n $user->usuario = $request->usuario;\n $user->password = bcrypt( $request->password);\n $user->condicion = '1';\n $user->rol_id = $request->rol_id;\n\n if($user->rol_id == 2){\n $vendedor = new Vendedor();\n $vendedor->id = $request->id_persona;\n $vendedor->save();\n }\n\n switch($rol){// se le abilitan los modulos deacuerdo a su tipo de rol\n case 1: // Administrador\n {\n $user->administracion=1;\n $user->desarrollo=1;\n $user->precios=1;\n $user->obra=1;\n $user->ventas=1;\n $user->acceso=1;\n $user->reportes=1;\n //Administracion\n $user->departamentos=1;\n $user->personas=1;\n $user->empresas=1;\n $user->medios_public=1;\n $user->lugares_contacto=1;\n $user->servicios=1;\n $user->inst_financiamiento=1;\n $user->tipos_credito=1;\n $user->asig_servicios=1;\n $user->mis_asesores=0;\n //Desarrollo\n $user->fraccionamiento=1;\n $user->etapas=1;\n $user->modelos=1;\n $user->lotes=1;\n $user->asign_modelos=1;\n $user->licencias=1;\n $user->acta_terminacion=1;\n $user->p_etapa=0;\n\n //Precios\n $user->agregar_sobreprecios=1;\n $user->precios_etapas=1;\n $user->sobreprecios=1;\n $user->paquetes=1;\n $user->promociones=1;\n //Obra\n $user->contratistas=1;\n $user->ini_obra=1;\n $user->aviso_obra=1;\n $user->partidas=1;\n $user->avance=1;\n //Ventas\n $user->lotes_disp=1;\n $user->mis_prospectos=0;\n $user->simulacion_credito=1;\n $user->hist_simulaciones=1;\n $user->hist_creditos=1;\n $user->contratos=1;\n $user->docs=1;\n //Acceso\n $user->usuarios=1;\n $user->roles=1;\n //Reportes\n $user->mejora=1;\n break;\n }\n case 2: //Asesor de ventas\n {\n $user->administracion=1;\n $user->ventas=1;\n //Administracion\n $user->empresas=1;\n //Ventas\n $user->lotes_disp=1;\n $user->mis_prospectos=0;\n $user->simulacion_credito=1;\n break;\n }\n case 3: //Gerente de proyectos\n {\n $user->desarrollo=1;\n //Desarrollo\n $user->fraccionamiento=1;\n $user->modelos=1;\n $user->lotes=1;\n $user->licencias=1;\n $user->acta_terminacion=1;\n break;\n }\n case 4: //Gerente de ventas\n {\n $user->administracion=1;\n $user->ventas=1;\n $user->reportes=1;\n //Administracion\n $user->empresas=1;\n $user->inst_financiamiento=1;\n $user->tipos_credito=1;\n $user->mis_asesores=0;\n //Ventas\n $user->lotes_disp=1;\n $user->simulacion_credito=1;\n $user->hist_simulaciones=1;\n $user->contratos=1;\n $user->docs=1;\n //Reportes\n $user->mejora=1;\n break;\n }\n case 5: // Gerente de obra\n {\n $user->obra=1;\n\n //Obra\n $user->contratistas=1;\n $user->aviso_obra=1;\n $user->partidas=1;\n $user->avance=1;\n break;\n }\n case 6: // Admin ventas\n {\n $user->administracion=1;\n $user->desarrollo=1;\n $user->precios=1;\n $user->obra=1;\n $user->ventas=1;\n $user->acceso=1;\n $user->reportes=1;\n //Administracion\n $user->empresas=1;\n $user->personas=1;\n $user->inst_financiamiento=1;\n $user->tipos_credito=1;\n //Desarrollo\n $user->fraccionamiento=1;\n $user->etapas=1;\n $user->modelos=1;\n $user->asign_modelos=1;\n //Precios\n $user->agregar_sobreprecios=1;\n $user->precios_etapas=1;\n $user->sobreprecios=1;\n $user->paquetes=1;\n $user->promociones=1;\n //Obra\n $user->ini_obra=1;\n //Ventas\n $user->lotes_disp=1;\n $user->simulacion_credito=1;\n $user->hist_simulaciones=1;\n $user->hist_creditos=1;\n $user->contratos=1;\n $user->docs=1;\n //Acceso\n $user->usuarios=1;\n $user->roles=1;\n //Reportes\n $user->mejora=1;\n break;\n }\n case 7: // Publicidad\n {\n $user->administracion=1;\n $user->desarrollo=1;\n $user->reportes=1;\n //Administracion\n $user->medios_public=1;\n $user->lugares_contacto=1;\n $user->servicios=1;\n $user->asig_servicios=1;\n //Desarrollo\n $user->modelos=1;\n $user->p_etapa=0;\n\n //Reportes\n $user->mejora=1;\n break;\n }\n case 8: // Gestor ventas\n {\n $user->administracion=1;\n $user->ventas=1;\n //Administracion\n $user->empresas=1;\n $user->inst_financiamiento=1;\n $user->tipos_credito=1;\n //Ventas\n $user->lotes_disp=1;\n $user->simulacion_credito=1;\n $user->hist_simulaciones=1;\n $user->hist_creditos=1;\n $user->contratos=1;\n $user->docs=1;\n break;\n }\n case 9: // Contabilidad\n {\n $user->administracion=1;\n $user->saldo=1;\n //Administracion\n $user->cuenta=1;\n //Saldos\n $user->edo_cuenta=1;\n $user->depositos=1;\n $user->gastos_admn=1;\n break;\n }\n\n }\n\n $user->save();\n }", "public function getSeguidoresUser()\n {\n return $this->hasMany(User::className(), ['id' => 'user_id'])->via('seguidores');\n }", "function consultarUserEmpleado(){\n\t\t\n\t\t$usu=$this->objEmpleado->getUsuario();\n\t\t//SELECT ESTADO FROM `cliente` WHERE `usuario`=\"lili\"\n\t\t$objConexion = new ControlConexion();\n\t\t$objConexion->abrirBd($GLOBALS['serv'],$GLOBALS['usua'],$GLOBALS['pass'],$GLOBALS['bdat']);\n\t\t//$comandoSql=\"SELECT cedula, nombre_tmp, tipoCliente, fechaRegistro, imagen_tmp, email_tmp, telefono_tmp, cupoCredito, contrasena FROM CLIENTE WHERE USUARIO='\".$usu.\"' \";\n\t\t$comandoSql=\"SELECT * FROM EMPLEADO WHERE USUARIO='\".$usu.\"' \";\n\t\t\n\t\t$recordSet=$objConexion->ejecutarSelect($comandoSql);\n\n\t\t \n\t\t\n\t\twhile($registro = $recordSet->fetch_array(MYSQLI_ASSOC)){\n\t\t\n\t\t\t$this->objEmpleado->setNombre($registro[\"nombre\"]);\n\t\t\t$this->objEmpleado->setCedula($registro[\"cedula\"]);\n\t\t\t$this->objEmpleado->setFechaIngreso($registro[\"fechaIngreso\"]);\n\t\t\t$this->objEmpleado->setFechaRetiro($registro[\"fechaRetiro\"]);\n\t\t\t$this->objEmpleado->setSalarioBasico($registro[\"salarioBasico\"]);\n\t\t\t$this->objEmpleado->setDeducciones($registro[\"deducciones\"]);\n\t\t\t$this->objEmpleado->setFoto($registro[\"foto\"]);\n\t\t\t$this->objEmpleado->setHojaVida($registro[\"hojaVida\"]);\n\t\t\t$this->objEmpleado->setEmail($registro[\"email\"]);\n\t\t\t$this->objEmpleado->setTelefono($registro[\"telefono\"]);\n\t\t\t$this->objEmpleado->setCelular($registro[\"celular\"]);\n\t\t\t$this->objEmpleado->setEstado($registro[\"estado\"]);\n\t\t\t$this->objEmpleado->setContrasena($registro[\"contrasena\"]);\n\t\t\t$this->objEmpleado->setNombreTmp($registro[\"nombre_tmp\"]);\n\t\t\t$this->objEmpleado->setFotoTmp($registro[\"foto_tmp\"]);\n\t\t\t$this->objEmpleado->setHojaVidaTmp($registro[\"hojaVida_tmp\"]);\n\t\t\t$this->objEmpleado->setEmailTmp($registro[\"email_tmp\"]);\n\t\t\t$this->objEmpleado->setTelefonoTmp($registro[\"telefono_tmp\"]);\n\t\t\t$this->objEmpleado->setCelularTmp($registro[\"celular_tmp\"]);\n\n\t\t\t\n\t\t\t}\t\n\t\t\t\n\t\t\t$objConexion->cerrarBd(); \n\t\t\treturn $this->objEmpleado; \t\t\n\t}", "public function getUsuario(){\n return $this->usuario;\n }", "public function obtener($antigua,$nueva){\n \n \n session_start();\n //busca en la tabla usuarios los campos donde el nombre sea igual a admin si no encuentra nada devuelve null\n \n $usuario = R::findOne('usuarios', 'alias=?', [\n $_SESSION['nombre']\n ]);\n \n \n //comprueba si la variable password es distinta al campo contraseña almacenado en la base de datos si es asi b octiene el valor=\"no\"\n if ( password_verify($antigua, $usuario->contrasena)) {\n \n \n $actualizar=R::load('usuarios',$usuario->id);\n $actualizar->contrasena = password_hash($nueva, PASSWORD_DEFAULT);\n $actualizar->confirmar_contrasena=password_hash($nueva, PASSWORD_DEFAULT);\n \n \n R::store($actualizar);\n redirect(base_url().\"usuario/Usuarios/accesoget\");\n \n }\n }", "public function user(){\n return $this->belongsTo(User::class, 'id_aplicacion_usuario');\n }", "public function crearusuarios($nombre,$primer_apellido,$segundo_apellido,$fechanacimento,$email,$telefono,$password,$comprobacion,$alias,$foto)\n { //busca en la tabla usuarios los campos donde el alias sea igual a admin si no encuentra nada devuelve null\n $usuarios = R::findOne('usuarios', 'alias=?', [\n $alias\n ]);\n \n \n // ok es igual a true siempre y cuando usuarios sea distinto de null\n $ok = ($usuarios == null );\n if ($ok) {\n // crea la tabla usuarios\n $usuarios = R::dispense('usuarios');\n //crea los campos de la tabla usuarios\n $usuarios->nombre=$nombre;\n $usuarios->primer_apellido=$primer_apellido;\n $usuarios->segundo_apellido=$segundo_apellido;\n $usuarios->fecha_nacimiento=$fechanacimento;\n $usuarios->fecha_de_registro=date('Y-m-d');\n $usuarios->email=$email;\n $usuarios->telefono=$telefono;\n $usuarios->contrasena=password_hash($password, PASSWORD_DEFAULT);\n $usuarios->confirmar_contrasena=password_hash($comprobacion, PASSWORD_DEFAULT);\n $usuarios->alias=$alias;\n //verifico si las fotos exiten en el directorio assets/fotosperfil\n $sustitutuirespaciosblancos = str_replace(\" \",\"_\",$alias);\n $directorio = \"assets/fotosperfil/usuario-\".$sustitutuirespaciosblancos.\".png\";\n \n $existefichero = is_file( $directorio );\n //si la foto exite se guarda en la base de datos se guarda el campo extension como png si la foto no exite se guarda como null\n if($foto!=null){\n \n if ( $existefichero==true ){\n $extension=\"png\";\n }else{\n \n \n \n \n \n \n \n }}\n $usuarios->foto = $extension;\n //almacena los datos en la tabla usuarios\n R::store($usuarios);\n \n \n //rdirege al controlador principal\n redirect(base_url());\n \n \n }\n \n }", "public function traerEmail($email){\n $query = $this->conex->prepare('SELECT * FROM usuarios WHERE email_usuario = :email');\n $query->bindValue(':email' , $email);\n $query->execute();\n $usuario = $query->fetch(PDO::FETCH_OBJ);\n // si NO lo encuentra me devuelve false, si lo encuentra me trae datos\n\n return $usuario;\n //me devuelve un objeto $usuario de clase standar.\n //ojo! este objeto es otra clase y no conoce los metodos de la clase User.php\n }", "public function register(Request $request)\n {\n\n\n\n $this->validator($request->all())->validate();\n\n event(new Registered($user = $this->create($request->all())));\n\n\n /*pegar email */\n\n $getID = DB::table('login')\n ->where('email', '=', $request->email)\n ->where('cpf', '=', $request->cpf)\n// ->orderBy('quantity', 'asc')\n ->first();\n\n\n// return $getID->id;\n\n// return $request->simulacao_id\n//\n//porrag;\n\n\n try{\n //Find the user object from model if it exists\n $simulacao= Simulacao::findOrFail($request->simulacao_id);\n\n //$request contain your post data sent from your edit from\n //$user is an object which contains the column names of your table\n\n //Set user object attributes\n $simulacao->user_id = $getID->id;\n\n\n // Save/update user.\n // This will will update your the row in ur db.\n $simulacao->save();\n\n return view('api.ativacao', ['name' => $request->email, 'params' => $request->all()]);\n }\n catch(ModelNotFoundException $err){\n //Show error page\n }\n\n\n\n\n return redirect()->intended('index');\n// return redirect()->back()->withInput();\n // pegar o id do usuario e inserir na table simulacao_id\n\n /**///simulacao_id e editar\n\n\n }", "public static function save(User $user)// statiska funkcija, lai nevajadzetu taisit klases objektu\n {\n }", "public function usuario(){\n\n return $this->hasOne('App\\Models\\Usuario', 'id_usuario', 'id_usuario');\n }", "public function getUserExiste(){\n return $this->userExist;\n }", "public function guardar_usuario(UsuarioRequest $request)\n {\n //una vez ingresado la nueva persona, ya se tiene acceso a todos sus datos.\n $persona = new Persona();\n $persona->primer_nombre = $request->get(\"primer_nombre\");\n $persona->segundo_nombre = $request->get(\"segundo_nombre\");\n $persona->primer_apellido = $request->get(\"primer_apellido\");\n $persona->segundo_apellido = $request->get(\"segundo_apellido\");\n $persona->dui = $request->get(\"dui\");\n $persona->nit = $request->get(\"nit\");\n\n //sentencia para agregar la foto\n //$persona->foto = $request->get(\"foto\");\n\n $persona->afp = $request->get(\"afp\");\n $persona->cuenta = $request->get(\"cuenta\");\n $persona->save();\n\n $usuario = new User();\n $usuario->rol_id = $request->get(\"tipo_usuario\");\n $usuario->persona_id = $persona->id;\n $usuario->name = $persona->primer_nombre . \".\" . $persona->primer_apellido;\n $usuario->password = bcrypt(\"ATB\");\n $usuario->email = $request->get(\"correo\");\n $usuario->activo = 1;\n $usuario->save();\n\n $periodo_activo = Periodo::where(\"activo\", \"=\", 1)->first();\n //dd($periodo_activo);\n $asambleista = new Asambleista();\n $asambleista->user_id = $usuario->id;\n $asambleista->periodo_id = $periodo_activo->id;\n $asambleista->facultad_id = $request->get(\"facultad\");\n $asambleista->sector_id = $request->get(\"sector\");\n $asambleista->propietario = $request->get(\"propietario\");\n //setea al user como un asambleista activo\n $asambleista->activo = 1;\n\n $hoy = Carbon::now();\n $inicio_periodo = Carbon::createFromFormat(\"Y-m-d\", $periodo_activo->inicio);\n\n if ($hoy > $inicio_periodo) {\n $asambleista->inicio = $hoy;\n } else {\n $asambleista->inicio = $inicio_periodo;\n }\n $asambleista->save();\n\n $request->session()->flash(\"success\", \"Usuario agregado con exito\");\n return redirect()->route(\"mostrar_formulario_registrar_usuario\");\n }", "public function getID()\n {\n return $this->idUsuario;\n }", "public function insertarUsuario(){\r\n $sql = \"INSERT INTO usuarios(Usuario, Clave, NombreCompleto, Correo, IdRol, Estado)\r\n VALUES('{$this->usuario}','{$this->clave}','{$this->nombreCompleto}',\r\n '{$this->correo}','{$this->idRol}', '{$this->estado}');\";\r\n $res = $this->conexion->setQuery($sql);\r\n return $res;\r\n}", "public function guardar()\n\t{\n\t\t// Crear una instancia de la conexion\n\t\t$conexion = new Conexion;\n\n\t\t// Comprobar si es un registro nuevo o uno ya existente\n\t\tif ($this->update) {\n\n\t\t\t// Preparar la sentencia para actualizar el tipo de rol en la bd\n\t\t\t$sentencia = $conexion->conn->prepare(\"UPDATE \". static::$tablaConsulta . \" SET medio= ? WHERE id= ?\");\n\n\t\t\t// Pasar los campos del objecto a la sentencia\n\t\t\t$sentencia->bind_param(\n\t\t\t\t\t'si',\n\t\t\t\t\t$this->medio,\n\t\t\t\t\t$this->id\n\t\t\t);\n\n\t\t} else {\n\n\t\t\t// Preparar la sentencia para isertar el tipo de rol en la bd\n\t\t\t$sentencia = $conexion->conn->prepare(\"INSERT INTO \". static::$tablaConsulta . \" VALUES (null, ?)\");\n\n\t\t\t// Pasar los campos del objecto a la sentencia\n\t\t\t$sentencia->bind_param(\n\t\t\t\t\t's',\n\t\t\t\t\t$this->medio\n\t\t\t);\n\t\t}\n\n\n // Ejecutar la sentencia\n\t\tif ( $sentencia->execute() ) {\n\n\t\t\t// Devolver un uno si fue un exito\n\t\t\treturn 1;\n\t\t} else {\n\n\t\t\t// Devolver un 0 si ocurrio un error\n\t\t\treturn 0;\n\t\t}\n\t}", "public function getCreatedUser()\n {\n return $this->hasOne(ScrtUser::className(), ['user_id' => 'created_user_id']);\n }", "public function getCreatedUser()\n {\n return $this->hasOne(ScrtUser::className(), ['user_id' => 'created_user_id']);\n }", "public function getCreatedUser()\n {\n return $this->hasOne(ScrtUser::className(), ['user_id' => 'created_user_id']);\n }", "public function getCreatedUser()\n {\n return $this->hasOne(ScrtUser::className(), ['user_id' => 'created_user_id']);\n }", "public function getCreatedUser()\n {\n return $this->hasOne(ScrtUser::className(), ['user_id' => 'created_user_id']);\n }", "public function getCreatedUser()\n {\n return $this->hasOne(ScrtUser::className(), ['user_id' => 'created_user_id']);\n }", "public function usuario() {\n return $this->belongsTo(User::class, 'user_id');\n }", "public function selectUserById($id){\r\n //2 prepare la requete\r\n $stmt=$connexion->prepare(\r\n \"SELECT *\r\n FROM User\r\n WHERE id=:id\"\r\n );\r\n //3 execute la requete\r\n $stmt->execute(\r\n array('id'=>$id)\r\n );\r\n // 4 Recuperation resultat et stockage ds variable\r\n $user=$stmt->fetchObject('User');\r\n // 5 retourne la variable (reslutat)\r\n return $user;\r\n }", "public function getOneByUser(){\n $sql = \"SELECT p.id, p.coste FROM pedidos p \"\n //. \"INNER JOIN lineas_pedidos lp ON p.id = lp.pedido_id \"\n . \"WHERE p.usuario_id = {$this->getUsuario_id()} ORDER BY id DESC LIMIT 1\";\n\n $pedido = $this->db->query($sql);\n\n \n //echo $this->db->error;\n \n return $pedido->fetch_object();\n \n }", "public function ultimoUsuario() {\n $ultimo = new SqlQuery(); //instancio objeto la case en cuestion\n (string) $tabla = get_class($this); //obtengo el nombre de la clase para realizar la consulta en la BD\n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction();\n $usuarioConsulta = $this->refControladorPersistencia->ejecutarSentencia($ultimo->buscarUltimo($tabla)); //en esta consulta busco cual es el ultimo usuario \n $arrayUsuario = $usuarioConsulta->fetchAll(PDO::FETCH_ASSOC); //utilizo el FETCH_ASSOC para que no repita los campos\n $this->refControladorPersistencia->get_conexion()->commit(); //realizo el commit de los datos a la base de datos\n $idUsuario = \"\"; //creo una variable para poder enviar los datos al metodo correpondiente\n foreach ($arrayUsuario as $id) {//recorro el array que contiene los datos que necesito para buscarl el ultimo usuario\n foreach ($id as $clave => $value) {//recorro los datos dentro del array y obtengo el valor que necesito\n $idUsuario = $value; //asigno el valor correspondiente a la variable creada anteriormente para tal caso\n }\n }\n //envio los datos al metodo que se va a encargar de ralizar la consulta a la base de \n //datos para obtener el último usiario registrado y devolver los datos para mostrarlos por pantalla\n $usuarioId = $this->buscarUsuarioXId($idUsuario); //lamo al metodo para obtener todos los datos del usuario que \n //estoy buscando en este caso el último que se creo\n return $usuarioId; //regreso los datos de ese usuario a la llamada para enviarlos desde el ruteador a la vista\n } catch (PDOException $excepcionPDO) { //atrapo la excepcion por si algo salio mal que se realice el rollback \n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si hay algún error hace rollback\n }\n }", "public function getUsuario($id,$cedula){\r\n\t$pdo = Database::connect();\r\n//Utilizamos parametros para la consulta:\r\n\t$sql = \"select * from cat_usuarios where ID_US=?\";\r\n\t$consulta = $pdo->prepare($sql);\r\n//Ejecutamos y pasamos los parametros para la consulta:\r\n\t$consulta->execute(array($id));\r\n//Extraemos el registro especifico:\r\n\t$dato = $consulta->fetch(PDO::FETCH_ASSOC);\r\n//Transformamos el registro obtenido a objeto:\r\n\t$usuario=new Usuarios();\r\n\t$usuario->setID_US($dato['ID_US']);\r\n\t$usuario->setCEDULA_US($dato['CEDULA_US']);\r\n\t$usuario->setNOMBRE_US($dato['NOMBRE_US']);\r\n\t$usuario->setAPELLIDO_US($dato['APELLIDO_US']);\r\n\t$usuario->setFECHANAC_US($dato['FECHANAC_US']);\r\n\t$usuario->setCIUDAD_US($dato['CIUDAD_US']);\r\n\t$usuario->setTELEFONO_US($dato['TELEFONO_US']);\r\n\t$usuario->setGENERO_US($dato['GENERO_US']);\r\n\t$usuario->setAPELLIDO_US($dato['APELLIDO_US']);\r\n\t$usuario->setDIRECCION_US($dato['DIRECCION_US']);\r\n\t$usuario->setFECHAREGISTRO_US($dato['FECHAREGISTRO_US']);\r\n\t$usuario->setEMAIL_US($dato['EMAIL_US']);\r\n\r\n\tDatabase::disconnect();\r\n\treturn $usuario;\r\n}", "public function solicitaUsuario()\n {\n // Lo emitimos por evento\n $this->emit('cambioUsuario', $this->usuario);\n }", "public function existe_usuario($user){ \n \n $query = \"SELECT email, password, idneo4j FROM usuario WHERE email = '\".$user.\"';\";\n $mysql = new Conexion();\n $resultado = $mysql->get_resultados_query($query);\n \n //print_r($resultado);\n \n if(!empty($resultado))\n return $resultado;\n \n return false;\n \n }", "public function registrar_usuario($nombre,$apellido,$genero,$fecha_nacimiento,$correo,$imagen,$contraseña, $type){\n \n \n $nodo_usuario = new Usuario();\n $mysql = new Conexion();\n\n $nodo_usuario->nombre = $nombre;\n $nodo_usuario->apellido = $apellido; \n $nodo_usuario->genero = $genero;\n $nodo_usuario->fecha_nacimiento = $fecha_nacimiento;\n $nodo_usuario->correo = $correo; \n $nodo_usuario->imagen = $imagen; \n $nodo_usuario->contraseña = $contraseña;\n $nodo_usuario->type = $type;\n \n /* aun no esta funcionando esto\n\t $nodo_usuario->nick = $nik;\n\t $nodo_usuario->ciudad_origen = $orig;\n\t $nodo_usuario->lugar_recidencia = $reci; \n\t $nodo_usuario->sitio_web = $web; \n\t $nodo_usuario->facebook = $face;\n\t $nodo_usuario->twitter = $twit;\n\t $nodo_usuario->youtube = $you;\n */ \n \n ModelUsuarios::crearNodoUsuario($nodo_usuario); //crea el nodo del Usuario \n\n $idneo4j = $nodo_usuario->id; //obtengo el id del nodo creado\n \n\n /*\n * Registro de usuario en Mysql\n * \"la url de facebook es importante y no se esta capturando\"\n */\n \n $sql = \"INSERT INTO usuario (\n email,\n idfacebook,\n idneo4j,\n password\n )VALUES(\n '\".$correo.\"',\n '12345678',\n '\".$idneo4j.\"',\n '\".$contraseña.\"'\n );\";\n \n return $mysql->ejecutar_query($sql); \n \n \n \n \n }", "public function detailsuser() \n { \n $user = Auth::user();\n $email = $user[\"email\"];\n $info = Usuario::with('rol', 'tipo_identificacion')->find($email);\n return response()->json(['success' => $info], $this->successStatus); \n }", "public function obtenerSaldo();", "public function getUsuario($id) {\n $getUsuario = new SqlQuery(); //instancion objeto de la clase para realizar consulta\n (string) $tabla = get_class($this); //obtengo el nombre de la clase para hacer la consulta\n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza la transacción\n $usuario = $getUsuario->buscarId($id, $tabla);\n $statement = $this->refControladorPersistencia->ejecutarSentencia($usuario); //llamo a la funcion\n $user = $statement->fetchAll(PDO::FETCH_ASSOC);\n $this->refControladorPersistencia->get_conexion()->commit(); //si todo salió bien hace el commit \n } catch (PDOException $excepcionPDO) {\n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si hay algún error hace rollback\n }\n return $user;\n }", "public function getUserData(Request $request){\n $usuario =DB::table('eventos')\n ->join('users', 'eventos.id_creador', '=', 'users.id')\n ->select('users.*')\n ->where('eventos.id', $request->input('nombre_evento'))\n ->first();\n return response()->json(['usuario' =>$usuario]);\n }", "public function getAction(){\n \t$user=Doctrine_Query::create()\n\t\t ->select(\"u.ID, u.nome,u.cognome,u.user,u.active,u.data_iscrizione,u.ID_role\")\n\t\t ->from(\"Users u\")\n\t\t ->addWhere(\"u.ID=?\",$this->getRequest()->getParam('id'))\n\t\t ->fetchOne(null,Doctrine::HYDRATE_ARRAY);\n $this->emitLoadData($user);\n }", "public function usuario()\n {\n return $this->hasOne('App\\Users', 'id', 'idUsuario');\n }", "public function save()\n\t\t{\n\t\treturn isset($this->userguid) ? $this->update() : $this->create();\n\t\t}", "public function usuario_entar($email_usuario, $senha_usuario){\n try{\n $this->load->model('usuario');\n\n $obj_usuario = new Usuario();\n\n $query = $this->db->select('*')->from('usuario')->where('senha_usuario', $senha_usuario)->where('email_usuario', $email_usuario)->get();\n $row = $query->row(); \n\n if (isset($row))\n {\n $obj_usuario -> set_id($row-> id_usuario);\n $obj_usuario -> set_nome($row-> nome_usuario);\n $obj_usuario -> set_sobrenome($row-> sobrenome_usuario);\n $obj_usuario -> set_email($row-> email_usuario);\n $obj_usuario -> set_senha($row-> senha_usuario); \n $obj_usuario -> set_admin($row-> admin_usuario);\n \n return $obj_usuario;\n } else{\n return false;\n }\n }catch(Exception $e){\n return false;\n }\n \n }", "public static function modeloUserGet ($userid){\n $datosuser=[];\n $stmt=self::$db->prepare(self::$consulta_user);\n $stmt->bindValue(1,$userid);\n $stmt->execute();\n if ($stmt->rowCount()>0) {\n $stmt->setFetchMode(PDO::FETCH_CLASS,\"Usuario\");\n $cod=$stmt->fetch();\n $datosuser=[\n $cod->clave,\n $cod->nombre,\n $cod->email,\n $cod->plan,\n $cod->estado\n ];\n return $datosuser;\n }\n return null;\n}", "function recupereUser(PDO $bdd, $id)\r\n{\r\n $query = $bdd->prepare('SELECT * FROM utilisateur WHERE id = :id ');\r\n $query->bindValue(':id', $id);\r\n $query->execute();\r\n return $query->fetch();\r\n}", "public function guardar($datosCampos) {\n $guardar = new SqlQuery(); //instancio objeto de la clase sqlQuery\n (string) $tabla = get_class($this); //obtengo el nombre de la clase para poder realizar la consulta\n switch ($datosCampos[\"acceso\"]) {\n case \"total\":\n $datosCampos[\"acceso\"] = 1;\n break;\n case \"restringido\":\n $datosCampos[\"acceso\"] = 2;\n break;\n default:\n $datosCampos[\"acceso\"] = 0;\n break;\n }\n $datosCampos[\"pass\"] = sha1(\"123\"); //agrego la contraseña en sha1 para que solicite el cambio cada vez que se cree un usuario\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza transaccion\n $rtaVerifUser = $this->refControladorPersistencia->ejecutarSentencia(\n $guardar->verificarExistenciaUsuario($tabla, $datosCampos[\"usuario\"])); //verifico si ya hay un usuario con ese nombre \n $existeUser = $rtaVerifUser->fetch(); //paso a un array\n $this->refControladorPersistencia->get_conexion()->commit(); //cierro\n if ($existeUser[0] == '0') {//solamente si el usuario no existe se comienza con la carga a la BD\n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza la transacción\n $arrayCabecera = $guardar->meta($tabla); //armo la cabecera del array con los datos de la tabla de BD\n $sentencia = $guardar->armarSentencia($arrayCabecera, $tabla); //armo la sentencia\n $array = $guardar->armarArray($arrayCabecera, $datosCampos); //armo el array con los datos de la vista y los datos que obtuve de la BD \n array_shift($array); //remuevo el primer elemento id si es nuevo se genera automaticamente en la BD\n $this->refControladorPersistencia->ejecutarSentencia($sentencia, $array); //genero la consulta\n $this->refControladorPersistencia->get_conexion()->commit();\n $this->refControladorPersistencia->get_conexion()->beginTransaction();\n $ultimo = $guardar->buscarUltimo($tabla);\n $idUser = $this->refControladorPersistencia->ejecutarSentencia($ultimo); //busco el ultimo usuario para mostrarlo en la vista \n $id = $idUser->fetchColumn(); //array \n $this->refControladorPersistencia->get_conexion()->commit(); //si todo salió bien hace el commit\n } catch (PDOException $excepcionPDO) {\n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si hay algún error hace rollback\n }\n $respuesta = $this->getUsuario($id); //busco el usuario\n return $respuesta; //regreso\n } else {\n return $id = [\"incorrecto\" => \"incorrecto\"]; //si hubo un error volvemos a vista y corregimos\n }\n }", "public function getDatosUsuario(){\r\n $sql = \"SELECT *\r\n FROM usuarios WHERE Usuario = '{$this->usuario}' AND Clave='{$this->clave}';\";\r\n $data = $this->conexion->getTable($sql);\r\n $row = mysqli_fetch_assoc($data);\r\n return $row;\r\n}" ]
[ "0.67239857", "0.65089524", "0.6493922", "0.64640033", "0.64367193", "0.6300026", "0.62690634", "0.62621146", "0.6221923", "0.61986685", "0.61951184", "0.6157196", "0.61403817", "0.61393726", "0.61263955", "0.6117269", "0.6115113", "0.6114532", "0.6114256", "0.6113549", "0.6104218", "0.61008614", "0.6091158", "0.60811436", "0.6069266", "0.60536253", "0.60531974", "0.6050193", "0.60500544", "0.60331047", "0.6026586", "0.6012542", "0.6009672", "0.59996116", "0.59828377", "0.59738946", "0.5969949", "0.5966223", "0.59559834", "0.59527415", "0.59411657", "0.5937947", "0.59183204", "0.5913636", "0.5911365", "0.5910249", "0.59060115", "0.58925575", "0.5889069", "0.5887789", "0.58851844", "0.58847505", "0.58806247", "0.58786905", "0.5871997", "0.5867754", "0.5867269", "0.5863346", "0.58541447", "0.58460844", "0.58435464", "0.5837715", "0.5837089", "0.5820809", "0.5820123", "0.5819", "0.58153516", "0.5813307", "0.581196", "0.5810866", "0.58093655", "0.58090335", "0.58075726", "0.5806474", "0.5803828", "0.5803655", "0.5803655", "0.5803655", "0.5803655", "0.5803655", "0.5803655", "0.5802871", "0.58019", "0.58015555", "0.57947344", "0.57837796", "0.5778874", "0.5777933", "0.5776108", "0.577528", "0.5768889", "0.57679373", "0.57621974", "0.5760066", "0.5752988", "0.57486534", "0.5748153", "0.57460105", "0.5745972", "0.5745791", "0.5744649" ]
0.0
-1
Show the form for editing the specified resource.
public function edit(TvList $tvList) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\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('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(StoreTvListRequest $request, TvList $tvlist) { // $tvlist->update($request->all()); return response()->json($tvlist); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(TvList $tvList) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Handle AdcreativesApi adcreativesAdd function
public function add(array $params = []) { return $this->handleMiddleware('add', $params, function(MiddlewareRequest $request) { $params = $request->getApiMethodArguments(); $data = $params; $response = $this->apiInstance->adcreativesAdd($data); return $this->handleResponse($response); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addads() \n\t{\n\t\t$view = $this->getView('ads');\n\t\t// Get/Create the model\n\t\tif ($model = $this->getModel('addads'))\n\t\t{\n\t\t\t//Push the model into the view (as default)\n\t\t\t//Second parameter indicates that it is the default model for the view\n\t\t\t$view->setModel($model, true);\n\t\t}\n\t\t$view->setLayout('adslayout');\n\t\t$view->ads();\n\t}", "public function addCampaignBanners() {\n\n $data = $_POST;\n\n\n if (!isset($data)) {\n\n throw new RestException(HttpStatusCodes::BAD_REQUEST, \"Missing required params\");\n }\n try {\n\n $bannerDara = json_decode($data, true);\n $id = Campaign::addNewCampaign(array('name' => $bannerDara['name']));\n foreach ($bannerDara['banners'] as $key => $values) {\n\n $bannerDara['banners'][$key]['campaign_id'] = $id;\n }\n Banner::addMultipleBanner($bannerDara['banners']);\n\n return array(\"success\" => \"Campaign Banner, Updated \" . $id);\n\n http_response_code(HttpStatusCodes::CREATED);\n } catch (Exception $e) {\n throw new RestException($e->getCode(), $e->getMessage());\n }\n }", "public function addAsync(array $params = [])\n {\n return $this->handleMiddleware('add', $params, function(MiddlewareRequest $request) {\n $params = $request->getApiMethodArguments();\n $data = $params;\n $response = $this->apiInstance->adcreativesAddAsync($data);\n return $response;\n });\n }", "function add() {\n Ad::addAd($_POST['title'], $_POST['url'], $_POST['description']);\n unset($_POST['title']);\n unset($_POST['url']);\n unset($_POST['description']);\n }", "public function add_postAction() {\n $info = $this->getPost(array('title', 'ad_ptype', 'img_day', 'img_night', 'start_time', 'end_time', 'status'));\n $info['ad_type'] = self::AD_TYPE;\n $this->cookData($info);\n $this->mergeImgParam($info);\n $result = Client_Service_Ad::addAd($info);\n if (! $result) $this->output(- 1, '操作失败');\n $this->output(0, '操作成功');\n }", "public function add_postAction() {\r\n\t\t$info = $this->getPost(array('sort', 'title', 'ad_type', 'ad_ptype', \r\n\t\t\t\t'link', 'activity', 'clientver', 'img', 'start_time', 'end_time', 'status', 'hits',\r\n\t\t\t\t'channel_id', 'module_id', 'cid', 'channel_code', 'ptype_id', 'is_recommend', 'action'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$result = Gou_Service_Ad::addAd($info);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "function AddAdGroups($proxy, $campaignId, $adGroups)\n{\n $request = new AddAdGroupsRequest();\n $request->CampaignId = $campaignId;\n $request->AdGroups = $adGroups;\n \n return $proxy->GetService()->AddAdGroups($request);\n}", "public function addAction() {\n $this->assign('ad_ptypes', $this->ad_ptypes);\n }", "function smash_wp_footer_add_ads() {\n\n\t?>\n\n\t<?php /* appending the JS-File to the document */ ?>\n\t<script>try {\n\t\t\tSmashingAds.loadAds();\n\t\t} catch ( e ) {\n\t\t}</script>\n\n\t<?php /* rendering the ads after JS-File is added */ ?>\n\t<script>try {\n\t\t\tSmashingAds.render( OA_output );\n\t\t} catch ( e ) {\n\t\t}</script>\n\n\t<?php\n}", "public function process()\n\t{\t\n\t\t$this->template()\n ->setBreadCrumb(Phpfox::getPhrase('adsonfeed.add_new_ads'))\n ->setHeader(array(\n 'ad.js' => 'module_adsonfeed'\n ))\n ;\n $bIsEdit = false;\n if (($iId = $this->request()->getInt('id')) && ($aAds = phpfox::getService('adsonfeed')->getForEdit($iId)))\n {\n $bIsEdit = true; \n $this->template()->assign(array(\n 'aForms' => $aAds\n ));\n }\n $aVals = $this->request()->getArray('val');\n $aValidation = array(\n\t\t\t'name' => Phpfox::getPhrase('adsonfeed.provide_a_name_for_this_campaign')\n\t\t);\n if (is_array($aVals) && count($aVals) > 0)\n\t\t{\n\t\t\tif (isset($aVals['type_id']))\n\t\t\t{\n\t\t\t\tif ($aVals['type_id'] == 2)\n\t\t\t\t{\n\t\t\t\t\t$aValidation['url_link'] = Phpfox::getPhrase('adsonfeed.provide_a_link_for_your_banner');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n $oValidator = Phpfox::getLib('validator')->set(array('sFormName' => 'js_form', 'aParams' => $aValidation));\n if (is_array($aVals) && count($aVals) > 0)\n\t\t{\n\t\t\tif ($aVals['type_id'] == 1 && empty($aVals['html_code']))\n\t\t\t{\n\t\t\t\tPhpfox_Error::set(Phpfox::getPhrase('adsonfeed.provide_html_for_your_banner'));\t\n\t\t\t}\n\n\t\t\tif ($oValidator->isValid($aVals))\n\t\t\t{\n\t\t\t\tif ($bIsEdit)\n\t\t\t\t{\n\t\t\t\t\tif (Phpfox::getService('adsonfeed.process')->update($aVals['id'], $aVals))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->url()->send('admincp.adsonfeed.add', array('id' => $aVals['id']), Phpfox::getPhrase('adsonfeed.ad_successfully_updated'));\n\t\t\t\t\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\tif (Phpfox::getService('adsonfeed.process')->add($aVals))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->url()->send('admincp.adsonfeed.add', null, Phpfox::getPhrase('adsonfeed.ad_successfully_added'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n $this->template()->assign(array(\n 'bIsEdit' => $bIsEdit\n ));\n\t}", "function apsa_ajax_add_element() {\n if (!current_user_can('manage_options')) {\n die();\n }\n\n $success = 1;\n\n $campaign_id = $_POST['campaign_id'];\n $type = $_POST['type'];\n\n $new_element = apsa_insert_element($campaign_id, '', $type);\n\n if ($new_element['element_id'] === FALSE) {\n $success = 0;\n }\n\n $response = array('success' => $success, 'element_id' => $new_element['element_id'], 'creation_date' => $new_element['creation_date']);\n echo json_encode($response);\n\n wp_die();\n}", "public function add_postAction() {\n\t\t$info = $this->getPost(array('sort', 'title', 'ad_type', 'ad_ptype', 'link', 'img', 'icon', 'start_time', 'end_time', 'status'));\n\t\t$info['ad_type'] = $this->ad_type;\n\t\t$info = $this->_cookData($info);\n\t\t\n\t\tif($info['ad_ptype'] == 1){\n\t\t\t$adInfo = Resource_Service_Games::getResourceGames($info['link']);\n\t\t\t$tip = \"内容\";\n\t\t} else if($info['ad_ptype'] == 2){\n\t\t\t$adInfo = Resource_Service_Attribute::getResourceAttributeByTypeId($info['link'],1);\n\t\t\t$tip = \"分类\";\n\t\t} else if($info['ad_ptype'] == 3){\n\t\t\t$adInfo = Client_Service_Subject::getSubject($info['link']);\n\t\t\t$tip = \"专题\";\n\t\t}\n\t\t$msg = $this->_getMsg($adInfo, $tip,$info['ad_ptype'],$info['link']);\n\t\t$result = Client_Service_Ad::addAd($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function add() {\n\n if ($this -> input -> server('REQUEST_METHOD') == 'POST') {\n \n //Add Advertisement \n if(!$this -> input -> post('home_page'))\n {\n $this -> form_validation -> set_rules('MainCategoryId', 'Category', 'trim|required|xss_clean');\n } \n $this -> form_validation -> set_rules('AdvertisementTitle', 'Advertisement Title', 'trim|required|xss_clean'); \n $this -> form_validation -> set_rules('AdvertisementDescription', 'Description', 'trim|required|xss_clean'); \n $this -> form_validation -> set_rules('AdvertisementUrl', 'Advertisement Url', 'trim|required|xss_clean'); \n $this -> form_validation -> set_rules('StartDate', 'Start date', 'trim|required|xss_clean');\n $this -> form_validation -> set_rules('EndDate', 'End Date', 'trim|required|xss_clean');\n \n $client_type = $this -> input -> post('client_type');\n \n if($client_type == 'new' )\n {\n $this -> form_validation -> set_rules('CompanyName', 'Company Name', 'trim|required|xss_clean');\n $this -> form_validation -> set_rules('ClientEmail', 'Client Email', 'trim|required|xss_clean');\n $this -> form_validation -> set_rules('ContactNumber', 'Contact Number', 'trim|required|xss_clean');\n $this -> form_validation -> set_rules('ContactPerson', 'Contact Person', 'trim|required|xss_clean');\n }else if($client_type == 'existing' ){ \n $this -> form_validation -> set_rules('RetailerId', 'Retailer', 'trim|required|xss_clean');\n $this -> form_validation -> set_rules('StoreTypeId', 'Store Format', 'trim|required|xss_clean');\n $this -> form_validation -> set_rules('StoreId', 'Store', 'trim|required|xss_clean'); \n }\n\n if (!$this -> form_validation -> run() == FALSE) {\n\n $result = array();\n $image_path = \"\";\n\n //If image uploaded\n if (!empty($_FILES['AdvertisementImage']['name'])) {\n $result = $this -> do_upload('AdvertisementImage', 'advertisements', $this -> input -> post('image-x'), $this -> input -> post('image-y'), $this -> input -> post('image-width'), $this -> input -> post('image-height'));\n $image_path = $result['upload_data']['file_name'];\n }\n if (!isset($result['error'])) {\n $data = array(\n 'MainCategoryId' => $this -> input -> post('MainCategoryId'),\n 'AdvertisementTitle' => $this -> input -> post('AdvertisementTitle'),\n 'AdvertisementDescription' => $this -> input -> post('AdvertisementDescription'), \n 'AdvertisementUrl' => $this -> input -> post('AdvertisementUrl'), \n 'StartDate' => $this -> input -> post('StartDate'),\n 'EndDate' => $this -> input -> post('EndDate'), \n 'AdvertisementImage' => $image_path,\n 'home_page' => $this -> input -> post('home_page'),\n 'ClientType' => $this -> input -> post('client_type'),\n 'CompanyName' => $this -> input -> post('CompanyName'),\n 'ClientEmail' => $this -> input -> post('ClientEmail'),\n 'ContactNumber' => $this -> input -> post('ContactNumber'),\n 'ContactPerson' => $this -> input -> post('ContactPerson'),\n 'RetailerId' => $this -> input -> post('RetailerId'),\n 'StoreTypeId' => $this -> input -> post('StoreTypeId'),\n 'StoreId' => $this -> input -> post('StoreId'),\n 'CreatedBy' => $this -> session -> userdata('user_id'),\n 'CreatedOn' => date('Y-m-d H:i:s'),\n 'IsActive' => 1\n );\n $result = $this -> advertisementsmodel -> add_advertisement($data);\n if ($result) {\n $this -> session -> set_userdata('success_message', \"Advertisement added successfully\");\n $this -> result = 1;\n $this -> message = 'Advertisement added successfully';\n }else {\n $this -> session -> set_userdata('error_message', \"Failed to add advertisement\");\n $this -> result = 0;\n $this -> message = 'Failed to add advertisement';\n }\n redirect('/advertisements', 'refresh');\n exit(0);\n }\n else { \n // code to display error while image upload\n $this -> session -> set_userdata('error_message', $result['error']);\n $this -> result = 0;\n $this -> message = $result['error'];\n }\n }else{\n //echo validation_errors();\n }\n }\n\n $this -> breadcrumbs[0] = array('label' => 'Ads Management', 'url' => '');\n $this -> breadcrumbs[1] = array('label' => 'Advertisements', 'url' => '/advertisements');\n $this -> breadcrumbs[2] = array('label' => 'Add Advertisement', 'url' => 'advertisements/add');\n\n $data['title'] = $this -> page_title;\n $data['breadcrumbs'] = $this -> breadcrumbs;\n \n $data['main_categories'] = $data['parent_category'] = $data['sub_category'] = array();\n $data['main_categories'] = $this -> categorymodel -> get_main_categories();\n $data['retailers'] = $this -> retailermodel -> get_retailers();\n \n $this -> template -> view('admin/advertisements/add', $data);\n }", "public function addAction(Request $request)\n {\n $em = $this->getDoctrine()->getManager();\n\n $advert = new Advert();\n\n $advert->setTitle('Recherching');\n $advert->setAuthor('Alexander');\n $advert->setContent('blablabla');\n\n\n $image = new Image();\n\n $image->setUrl('http://sdz-upload.s3.amazonaws.com/prod/upload/job-de-reve.jpg');\n $image->setAlt('Job de rêve');\n\n $advert->setImage($image);\n\n $listSkills = $em->getRepository(\"OCPlatformBundle:Skill\")->findAll();\n\n foreach ($listSkills as $skill) {\n $advertSkill = new AdvertSkill();\n\n $advertSkill->setAdvert($advert);\n $advertSkill->setSkill($skill);\n $advertSkill->setLevel(\"Medium\");\n\n $em->persist($advertSkill);\n }\n\n\n for ($i = 0; $i < 5; $i++) {\n $app = new Application();\n $app->setAuthor(\"Author N°\".$i);\n $app->setContent(\"Content N°\".$i);\n $app->setAdvert($advert);\n $em->persist($app);\n }\n\n\n $em->persist($advert);\n $em->flush();\n\n\n if ($request->isMethod('POST')) {\n $request->getSession()->getFlashBag()->add('notice', 'Annonce bien enregistré');\n\n return $this->redirectToRoute('oc_platform_view', array('id' => 5));\n }\n\n return $this->render('OCPlatformBundle:Advert:add.html.twig');\n }", "public function add_banner($campid=0,$adv=0)\n\t{\n\t\t/*-------------------------------------------------------------\n\t\tBreadcrumb Setup Start\n\t\t-------------------------------------------------------------*/\n\t\t$link = breadcrumb();\n\t\t$data['breadcrumb'] = $link;\n\t\t $data['sel_camp'] = $campid;\n\t\t $data['sel_adv'] = $adv;\n\t\t \n\t\t $data['sel_camp_type'] = $this->input->post('sel_camp_type');\n\t\t \n\t\t/*-------------------------------------------------------------\n\t\tGet Advertiser List\n\t\t-------------------------------------------------------------*/\n\t\t$adv_list = $this->mod_campaign->get_advertiser_list();\n\t\t$data['advertiser'] = $adv_list;\n\t\t$data['mob_screens']\t= $this->mod_banner->banner_screen();\n\t\t/*-------------------------------------------------------------*/\n\t\t\n\t\tif($adv!=0)\n\t\t{\n\t\t\t$where_adv = array('clientid'=>$adv);\n\t\t\t$camp_list = $this->mod_banner->filter_campaigns($where_adv);\n\t\t\t$data['campaigns'] = $camp_list;\n\t\n\t\t}\n\t\t\n\n\t/*-------------------------------------------------------------\n\t\t\t\tEmbed current page content into template layout\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_content'] = $this->load->view(\"admin/banners/add\",$data,true);\n\t\t\n\t\techo $this->load->view('page_layout',$data,true);\n\t\t\n\t\texit;\n\t}", "public function addAction()\n {\n $ad = new ad();\n \n $form = $this->createForm(new AdType, $ad);\n \n $request = $this->get('request');\n \n if($request->getMethod() == 'POST')\n {\n $form->bind($request);\n \n if($form->isValid())\n {\n \n $em = $this->getDoctrine()->getManager();\n \n $em->persist($ad);\n $em->flush();\n \n $this->get('session')->getFlashBag()->add('info', 'The ad has been added.');\n \n return $this->redirect( $this->generateUrl('comem_newsroom_directory'));\n }\n }\n \n return $this->render('comemNewsroomBundle:Admin:add.html.twig', array(\n 'form' => $form->createView(),\n 'page' => 'annuaire'\n ));\n }", "protected function add() {\n\t}", "function AddCampaigns($proxy, $accountId, $campaigns)\n{\n $request = new AddCampaignsRequest();\n $request->AccountId = $accountId;\n $request->Campaigns = $campaigns;\n \n return $proxy->GetService()->AddCampaigns($request);\n}", "public function addAdvertiesment()\r\n {\r\n fn_is_logged_in();\r\n\r\n $user_id = $this->session->userdata('logged_in_user_id');\r\n $advertiesment_details_id = $this->input->post('advertiesment_details_id');\r\n $newspaper_id = $this->input->post('newspaper_id');\r\n\r\n $booking_date = Date(DATETIME_FORMAT_1);\r\n $booking_number = fn_unique_code(3,2);\r\n\r\n $advertiesment_name = $this->input->post('advertiesment_name');\r\n //$advertiesment_height = $this->input->post('advertiesment_height');\r\n //$advertiesment_width = $this->input->post('advertiesment_width');\r\n $advertiesment_amount = $this->input->post('advertiesment_amount');\r\n //$category_type = $this->input->post('category_type');\r\n $description = $this->input->post('description');\r\n\r\n if ( (isset($user_id) && ($user_id != \"\"))\r\n && (isset($advertiesment_details_id) && ($advertiesment_details_id != \"\"))\r\n && (isset($newspaper_id) && ($newspaper_id != \"\"))\r\n && (isset($advertiesment_name) && ($advertiesment_name != \"\"))\r\n && (isset($advertiesment_amount) && ($advertiesment_amount != \"\"))\r\n && (isset($description) && ($description != \"\")) \r\n && (isset($booking_date) && ($booking_date != \"\"))\r\n && (isset($booking_number) && ($booking_number != \"\"))\r\n )\r\n {\r\n $data = Array(\r\n 'users_id' => $user_id, \r\n 'advertiesment_details_id' => $advertiesment_details_id,\r\n 'newspaper_id' => $newspaper_id,\r\n 'advertiesment_name' => $advertiesment_name,\r\n 'advertiesment_amount' => $advertiesment_amount,\r\n 'description' => $description,\r\n 'booking_date' => $booking_date,\r\n 'booking_number' => $booking_number,\r\n );\r\n $new_advertiesment_id = $this->Advertiesment_model->addAdvertiesment($data);\r\n\r\n if (isset($new_advertiesment_id))\r\n { \r\n $sess_data = array(\r\n 'success' => true,\r\n 'message' => 'Booking Done Successfully',\r\n );\r\n $this->session->set_flashdata($sess_data);\r\n\r\n redirect(base_url().\"advertiesment/advertiesment_details/advertiesment_details_id/\".$advertiesment_details_id);\r\n // $result = 'Advertiesment added Successfully';\r\n // echo $result; \r\n }\r\n else\r\n { \r\n $sess_data = array(\r\n 'success' => false,\r\n 'message' => 'No Booking Done',\r\n );\r\n $this->session->set_flashdata($sess_data);\r\n\r\n redirect(base_url().\"advertiesment/advertiesment_details/advertiesment_details_id/\".$advertiesment_details_id);\r\n \r\n /*$result = 'No Advertiesment added';\r\n echo $result;*/ \r\n } \r\n }\r\n else\r\n {\r\n $sess_data = array(\r\n 'success' => false,\r\n 'message' => 'All fields are required',\r\n );\r\n $this->session->set_flashdata($sess_data);\r\n\r\n redirect(base_url().\"advertiesment/advertiesment_details/advertiesment_details_id/\".$advertiesment_details_id);\r\n\r\n // $result = 'All fields are required';\r\n // echo $result; \r\n }\r\n \r\n }", "public function addAction() {\r\n\t\t$channel_id = intval($this->getInput('channel_id'));\r\n\t\t$this->assign('ad_types', $this->ad_types[$channel_id]);\r\n\t\t$this->assign('channel_id', $channel_id);\r\n\t\t$ad_type = $this->getInput('ad_type');\r\n\t\t$this->assign('ad_type', $ad_type);\r\n\t\t\r\n\t\tif($channel_id == 2 || $channel_id == 6) {\r\n\t\t list(, $ptypes) = Type_Service_Ptype::getsBy(array('status'=>1,'pid'=>0), array('sort'=>'DESC', 'id'=>'DESC'));\r\n\t\t $this->assign('ptype', $ptypes);\r\n\t\t}\r\n\t\t\r\n\t\tif($channel_id == 2) {\r\n\t\t $this->assign('actions', $this->client_actions);\r\n\t\t}\r\n\t\t\r\n\t\t//module channel\r\n\t\tlist($modules, $channel_names) = Gou_Service_ChannelModule::getsModuleChannel();\r\n\t\t$this->assign('modules', $modules);\r\n\t\t$this->assign('channel_names', $channel_names);\r\n\t}", "public function addAssets() {}", "public function addAssets() {}", "function ad_insert_post_ads( $content ) {\n\t\n\t//adding check for one off articles *for now\n\t$id = get_the_ID();\n\t\n\tif ($id == 201246) {\n\t//do nothing for a special reason\n\t}else{\n\t \n \t$ad_code = '<div style=\"text-align:center;\"><div id=\"div-gpt-ad-Cube_Article\" class=\"dfp-ad dfp-Cube_Article\" data-ad-unit=\"Cube_Article\">';\n\n\t$ad_code .= '<script type=\"text/javascript\">';\n\t$ad_code .= 'if ( \"undefined\" !== typeof googletag ) {\n\t\t\tgoogletag.cmd.push( function() { googletag.display(\"div-gpt-ad-Cube_Article\"); } );\n\t\t}';\n\t$ad_code .= '</script>';\n\t$ad_code .= '</div></div>';\n\t$ad_code .= \"<div></div>\";\n \n if ( is_single() && ! is_admin() ) {\n return ad_insert_after_paragraph( $ad_code, 2, $content );\n }\n\n\t}\n \n return $content;\n}", "public function adCreativereport()\n\t{\n\n\n\n\t\t$query=\"https://graph.facebook.com/v3.2/\".$this->ad_acc_id.\"/campaigns?fields=ads{adcreatives{id,name,thumbnail_url},insights.level(ad).metrics(ctr){cost_per_unique_click,spend,impressions,frequency,reach,unique_clicks,clicks,ctr,ad_name,adset_name,cpc,cpm,cpp,campaign_name,ad_id,adset_id,account_id,account_name}}&access_token=\".$this->user_access_token.\"\";\n\n\n\t\t\t// Call to Graph api here\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch,CURLOPT_URL,$query);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_POST, 0);\n\n\n\t\t$resp = curl_exec($ch);\n\t\t$resp = json_decode($resp);\n\t\tcurl_close($ch);\n\t\tif(isset($resp->error->error_user_msg))\n\t\t\tSession::flash('message',$resp->error->error_user_msg);\n\t\telseif(isset($resp->error->message))\n\t\t\tSession::flash('message',$resp->error->message);\n\n\n\t\treturn view('social.adcreative-reports',['resp'=>$resp]);\n\t}", "public function addAction() {\n $configid = $this->getInput('id');\n $customAnimationEffect = Common::getConfig('deliveryConfig','customAnimationEffect');\n if($configid){\n \t$configInfo = Advertiser_Service_AdAppkeyConfigModel::getConfig($configid);\n \t$this->assign('config', $configInfo);\n }\n \t$this->assign('customAnimationEffect', $customAnimationEffect);\n }", "function CustomAdd(&$values, &$keys, &$error, $inline, &$pageObject)\n{\n\n\t\tcalendar_AddRecord($values);\n\nreturn false;\n;\t\t\n}", "function add_car($car_data, $location)\n{\n $url = set_url('advert');\n $token = $_SESSION['token'];\n $params = array();\n $temp_array = array();\n $post_array = array();\n foreach ($car_data as $item) {\n $temp_array[$item->meta_key] = $item->meta_val;\n }\n $params['vin'] = $temp_array['vin'];\n $params['year'] = $temp_array['year'];\n $params['make'] = $temp_array['make'];\n $params['model'] = $temp_array['model'];\n $params['fuel_type'] = $temp_array['fuel_type'];\n $params['engine_power'] = $temp_array['engine_power'];\n $params['engine_capacity'] = $temp_array['engine_capacity'];\n $params['door_count'] = $temp_array['door_count'];\n $params['gearbox'] = $temp_array['gearbox'];\n $params['mileage'] = $temp_array['mileage'];\n $params['body_type'] = $temp_array['body_type'];\n $params['color'] = $temp_array['color'];\n $params['colour_type'] = $temp_array['colour_type'];\n $params['rhd'] = $temp_array['rhd'];\n $params['country_origin'] = $temp_array['country_origin'];\n $params['date_registration'] = $temp_array['date_registration'];\n $params['registered'] = $temp_array['registered'];\n $params['nr_seats'] = $temp_array['nr_seats'];\n $params['no_accident'] = $temp_array['no_accident'];\n $params['service_record'] = $temp_array['service_record'];\n $params['transmission'] = $temp_array['transmission'];\n $params['price'] = $temp_array['price'];\n //$params['video'] = $temp_array['video'];\n $params['features'] = $temp_array['features'];\n $post_array['title'] = $temp_array['title'];\n $temp_array['description'] = json_encode($temp_array['description']);\n $post_array['description'] = substr($temp_array['description'], 1, -1);\n $post_array['category_id'] = $temp_array['category_id'];\n $post_array['region_id'] = 1;\n $post_array['coordinates'] = '{\"latitude\": ' . $location['latitude'] . ',\"longitude\": ' . $location['longitude'] . '}';\n $post_array['contact'] = $temp_array['contact'];\n $post_array['new_used'] = $temp_array['new_used'];\n $post_array['params'] = otomoto_encode($params);\n $post_array['image_collection_id'] = $temp_array['image_collection_id'];\n $post_string = otomoto_encode($post_array);\n //print_r($post_string);\n //exit;\n $cURLConnection = curl_init($url);\n curl_setopt($cURLConnection, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Authorization: Bearer ' . $token,]);\n curl_setopt($cURLConnection, CURLOPT_POSTFIELDS, $post_string);\n curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);\n $apiResponse = json_decode(curl_exec($cURLConnection));\n curl_close($cURLConnection);\n return $apiResponse;\n}", "public function AddArc(){\r\n $this->arc();\r\n $this->titlePost();\r\n $this->contentPost();\r\n $this->_arcsManager->addArc($this->_titlePostSecure,$this->_contentPostSecure);\r\n \r\n header('location: GestionArcEpisode'); \r\n }", "public function create($data){\n\t\tif(empty($data['adgroup_id'])){\n\t\t\tthrow new \\Exception('adgroup id is required.');\n\t\t}\n\t\tif(empty($data['ad_headline']) || empty($data['ad_description1'])\n\t\t|| empty($data['ad_description2']) || empty($data['ad_displayurl'])){\n\t\t\tthrow new \\Exception('Incompleted ad data.');\n\t\t}\n\t\t$operations = array();\n\t\t// Create text ad.\n\t\t$textAd = new \\TextAd();\n\t\t$textAd->headline = $data['ad_headline'];\n\t\t$textAd->description1 = $data['ad_description1'];\n\t\t$textAd->description2 = $data['ad_description2'];\n\t\t$textAd->displayUrl = $data['ad_displayurl'];\n\t\t$textAd->url = $data['ad_url'];\n\n\t\t// Create ad group ad.\n\t\t$adGroupAd = new \\AdGroupAd();\n\t\t$adGroupAd->adGroupId = $data['adgroup_id'];\n\t\t$adGroupAd->ad = $textAd;\n\n\t\t// Set additional settings (optional).\n\t\t$adGroupAd->status = $this->mappingStatus($data['ad_status']);\n\n\t\t// Create operation.\n\t\t$operation = new \\AdGroupAdOperation();\n\t\t$operation->operand = $adGroupAd;\n\t\t$operation->operator = 'ADD';\n\t\t$operations[] = $operation;\n\n\t\t// Make the mutate request.\n\t\t$result = $this->adGroupAdService->mutate($operations);\n\t\t$adGroupAd = $result->value[0];\n\t\treturn $adGroupAd->ad->id;\n\t}", "public function add_advert($data) {\n return $this->db->autoExecute($this->ecs->table(\"advert\"), $data, 'INSERT'); \n }", "function AddAdGroupRemarketingListAssociations($proxy, $adGroupRemarketingListAssociations)\n{\n $request = new AddAdGroupRemarketingListAssociationsRequest();\n $request->AdGroupRemarketingListAssociations = $adGroupRemarketingListAssociations;\n \n return $proxy->GetService()->AddAdGroupRemarketingListAssociations($request);\n}", "public function add_banner_process($campid=0,$adv=0)\n\t{\t\n\t\t\n\t\t\n\t\t$banner_type = $this->input->post('banner_type');\n\t\t\n\t\tswitch($banner_type)\n\t\t{\n\t\t\tcase 0:\n\t\t\t{\n\t\t\t\t$this->form_validation->set_rules('advertiser', 'Advertiser', 'required');\n\t\t\t\t$this->form_validation->set_rules('campaign_type', 'Campaign', 'required');\n\t\t\t\t$this->form_validation->set_rules('img_banner_name', 'Banner Name', 'required');\n\t\t\t\t$this->form_validation->set_rules('img_banner_url', 'Banner URL', 'required');\n\t\t\t\t$this->form_validation->set_rules('banner_type', 'Banner Type', 'required');\n\t\t\t\tif ($this->form_validation->run() == FALSE)\n\t\t\t\t{\n\t\t\t\t /* Form Validation is failed. Redirect to Add Banner Form */\n\t\t\t\t $this->session->set_userdata('banner_error', $this->lang->line('label_error_missing'));\n\t\t\t\t $this->add_banner($campid,$adv);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$advertiser \t= $this->input->post('advertiser');\n\t\t\t\t\t$campaign\t\t= $this->input->post('campaign_type');\n\t\t\t\t\t$banner_name \t= $this->input->post('img_banner_name');\n\t\t\t\t\t$banner_url \t= $this->input->post('img_banner_url');\n\t\t\t\t\t$banner_content = $this->input->post('img_banner_txt');\n\t\t\t\t\t\n\t\t\t\t\t/* Hard Coded Values */\n\t\t\t\t\t$storage_type\t= \"web\";\n\t\t\t\t\t$master_banner\t= -2;\n\t\t\t\t\t$admin_status\t= 0;\n\n\t\t\t\t\t$where_camp\t= array('campaignid'=>$campaign);\n\t\t\t\t\t$camp_status\t= $this->mod_banner->camp_status($where_camp);\n\t\t\t\t\tif($camp_status==0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$banstatus\t=\t0;\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$banstatus\t=\t1;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Get Image Banner Sizes*/\n\t\t\t\t\t$img_banner_sizes\t= $this->mod_banner->getBannerSizes();\n\t\t\t\t \tforeach($img_banner_sizes as $bs) \n\t\t\t\t \t{\n \t\t\t\t\t\t$size[$bs->screen]['width'] \t= $bs->width;\n\t\t\t\t\t\t$size[$bs->screen]['height']\t= $bs->height;\n \t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/* Check Duplication for Banner Name based on Campaign ID */\n\t\t\t\t\t $where_banner\t= array('description'=>$banner_name,'campaignid'=>$campaign);\n\t\t\t\t\t $where_not_in\t= 0;\n\t\t\t\t\t $banner_check \t= $this->mod_banner->check_banner_duplication($where_banner,$where_not_in);\n\t\t\t\t\t if($banner_check==FALSE)\n\t\t\t\t\t {\n\t\t\t\t \t\t\t/* Master/Child 0(Large) Image Upload */\n\t\t\t\t\t\t\t$banner_image = rand(999, 9999).\"-\".$_FILES['large_banner']['name'];\n\t\t\t\t\t\t\t$config['image_library'] \t= 'gd2';\n\t\t\t\t\t\t\t$config['allowed_types'] \t= 'gif|jpg|png|jpeg';\n\t\t\t\t\t\t\t$config['max_size']\t \t= '2000';\n\t\t\t\t\t\t\t$config['source_image']\t\t= $_FILES['large_banner']['tmp_name'];\n\t\t\t\t\t\t\t$config['new_image'] \t= $this->config->item('ads_url').$banner_image;\n\t\t\t\t\t\t\t$config['maintain_ratio'] \t= FALSE;\n\t\t\t\t\t\t\t$config['width'] \t\t = $size['master']['width'];\n\t\t\t\t\t\t\t$config['height'] \t\t = $size['master']['height'];\n\t\t\t\n\t\t\t\t\t\t\t$this->image_lib->initialize($config);\n\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tif(!$this->image_lib->resize())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* Banner Deleted Failed. Redirect to Banner List */\n\t\t\t\t\t\t\t\t//$this->image_lib->display_errors()\n\t\t\t\t\t\t\t\t$this->session->set_userdata('banner_error', lang('label_image_display_errors'));\n\t\t\t\t\t\t\t\tif($campid == '0' || $campid == '')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->add_banner();\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{\n\t\t\t\t\t\t\t\t\tif($adv == '0' || $adv == '')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$this->add_banner();\n\t\t\t\t\t\t\t\t\t\t//redirect('admin/inventory_banners');\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t$this->add_banner($campid,$adv);\n\t\t\t\t\t\t\t\t\t\t//redirect('admin/inventory_banners/listing_camp/all/'.$campid.\"/\".$adv);\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\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->image_lib->clear();\t\n\t\t\t\t\t\t\t\t$large_img_type\t\t= $this->mod_banner->staticGetContentTypeByExtension($banner_image, $alt=false);\n\t\t\t\t\t\t\t\t$large_img_name \t= $banner_image;\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/* Child 1(Medium) Image Upload */\n\t\t\t\t\t\t\t$banner_image = rand(999, 9999).\"-\".$_FILES['medium_banner']['name'];\n\t\t\t\t\t\t\t$config['image_library'] \t= 'gd2';\n\t\t\t\t\t\t\t$config['allowed_types'] \t= 'gif|jpg|png|jpeg';\n\t\t\t\t\t\t\t$config['max_size']\t \t= '2000';\n\t\t\t\t\t\t\t$config['source_image']\t\t= $_FILES['medium_banner']['tmp_name'];\n\t\t\t\t\t\t\t$config['new_image'] \t= $this->config->item('ads_url').$banner_image;\n\t\t\t\t\t\t\t$config['maintain_ratio'] \t= FALSE;\n\t\t\t\t\t\t\t$config['width'] \t\t = $size['child1']['width'];\n\t\t\t\t\t\t\t$config['height'] \t\t = $size['child1']['height'];\n\t\t\t\n\t\t\t\t\t\t\t$this->image_lib->initialize($config);\n\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tif(!$this->image_lib->resize())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* Banner Deleted Failed. Redirect to Banner List */\n\t\t\t\t\t\t\t\t$this->session->set_userdata('banner_error', lang('label_image_display_errors'));\n\t\t\t\t\t\t\t\tif($campid == '0' || $campid == '')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->add_banner();\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{\n\t\t\t\t\t\t\t\t\tif($adv == '0' || $adv == '')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$this->add_banner();\n\t\t\t\t\t\t\t\t\t\t//redirect('admin/inventory_banners');\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t$this->add_banner($campid,$adv);\n\t\t\t\t\t\t\t\t\t\t//redirect('admin/inventory_banners/listing_camp/all/'.$campid.\"/\".$adv);\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\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->image_lib->clear();\n\t\t\t\t\t\t\t\t$medium_img_type\t= $this->mod_banner->staticGetContentTypeByExtension($banner_image, $alt=false);\n\t\t\t\t\t\t\t\t$medium_img_name \t= $banner_image;\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\t/* Child 2(Small) Image Upload */\n\t\t\t\t\t\t\t$banner_image = rand(999, 9999).\"-\".$_FILES['small_banner']['name'];\n\t\t\t\t\t\t\t$config['image_library'] \t= 'gd2';\n\t\t\t\t\t\t\t$config['allowed_types'] \t= 'gif|jpg|png|jpeg';\n\t\t\t\t\t\t\t$config['max_size']\t \t= '2000';\n\t\t\t\t\t\t\t$config['source_image']\t\t= $_FILES['small_banner']['tmp_name'];\n\t\t\t\t\t\t\t$config['new_image'] \t= $this->config->item('ads_url').$banner_image;\n\t\t\t\t\t\t\t$config['maintain_ratio'] \t= FALSE;\n\t\t\t\t\t\t\t$config['width'] \t\t = $size['child2']['width'];\n\t\t\t\t\t\t\t$config['height'] \t\t = $size['child2']['height'];\n\t\t\t\n\t\t\t\t\t\t\t$this->image_lib->initialize($config);\n\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tif(!$this->image_lib->resize())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* Banner Deleted Failed. Redirect to Banner List */\n\t\t\t\t\t\t\t\t$this->session->set_userdata('banner_error', lang('label_image_display_errors'));\n\t\t\t\t\t\t\t\tif($campid == '0' || $campid == '')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->add_banner();\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{\n\t\t\t\t\t\t\t\t\tif($adv == '0' || $adv == '')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$this->add_banner();\n\t\t\t\t\t\t\t\t\t\t//redirect('admin/inventory_banners');\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t$this->add_banner($campid,$adv);\n\t\t\t\t\t\t\t\t\t\t//redirect('admin/inventory_banners/listing_camp/all/'.$campid.\"/\".$adv);\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\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->image_lib->clear();\n\t\t\t\t\t\t\t\t$small_img_type\t\t= $this->mod_banner->staticGetContentTypeByExtension($banner_image, $alt=false);\n\t\t\t\t\t\t\t\t$small_img_name \t= $banner_image;\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\t/* Child 3(XSmall) Image Upload */\n\t\t\t\t\t\t\t$banner_image = rand(999, 9999).\"-\".$_FILES['x_small_banner']['name'];\n\t\t\t\t\t\t\t$config['image_library'] \t= 'gd2';\n\t\t\t\t\t\t\t$config['allowed_types'] \t= 'gif|jpg|png|jpeg';\n\t\t\t\t\t\t\t$config['max_size']\t \t= '2000';\n\t\t\t\t\t\t\t$config['source_image']\t\t= $_FILES['x_small_banner']['tmp_name'];\n\t\t\t\t\t\t\t$config['new_image'] \t= $this->config->item('ads_url').$banner_image;\n\t\t\t\t\t\t\t$config['maintain_ratio'] \t= FALSE;\n\t\t\t\t\t\t\t$config['width'] \t\t = $size['child3']['width'];\n\t\t\t\t\t\t\t$config['height'] \t\t = $size['child3']['height'];\n\t\t\t\n\t\t\t\t\t\t\t$this->image_lib->initialize($config);\n\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tif(!$this->image_lib->resize())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* Banner Deleted Failed. Redirect to Banner List */\n\t\t\t\t\t\t\t\t$this->session->set_userdata('banner_error', lang('label_image_display_errors'));\n\t\t\t\t\t\t\t\tif($campid == '0' || $campid == '')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->add_banner();\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{\n\t\t\t\t\t\t\t\t\tif($adv == '0' || $adv == '')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$this->add_banner();\n\t\t\t\t\t\t\t\t\t\t//redirect('admin/inventory_banners');\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t$this->add_banner($campid,$adv);\n\t\t\t\t\t\t\t\t\t\t//redirect('admin/inventory_banners/listing_camp/all/'.$campid.\"/\".$adv);\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\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->image_lib->clear();\n\t\t\t\t\t\t\t\t$xsmall_img_type\t= $this->mod_banner->staticGetContentTypeByExtension($banner_image, $alt=false);\n\t\t\t\t\t\t\t\t$xsmall_img_name \t= $banner_image;\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\t/* Add Master Iamge Banner - Start */\n\t\t\t\t\t\t\t$add_master_banner = array(\n\t\t\t\t\t\t\t\t'campaignid'\t=>mysql_real_escape_string($campaign),\n\t\t\t\t\t\t\t\t'description'\t=>mysql_real_escape_string($banner_name),\n\t\t\t\t\t\t\t\t'url'\t\t\t=>mysql_real_escape_string($banner_url),\n\t\t\t\t\t\t\t\t'filename' \t=>mysql_real_escape_string($large_img_name),\n\t\t\t\t\t\t\t\t'bannertext'\t=>mysql_real_escape_string($banner_content),\n\t\t\t\t\t\t\t\t'contenttype' \t=>mysql_real_escape_string($large_img_type),\n\t\t\t\t\t\t\t\t'storagetype'\t=>mysql_real_escape_string($storage_type),\n\t\t\t\t\t\t\t\t'width'\t\t \t=>mysql_real_escape_string($size['master']['width']),\n\t\t\t\t\t\t\t\t'height'\t \t=>mysql_real_escape_string($size['master']['height']),\n\t\t\t\t\t\t\t\t'master_banner'\t=>mysql_real_escape_string($master_banner),\n\t\t\t\t\t\t\t\t'adminstatus'\t=>mysql_real_escape_string($admin_status),\n\t\t\t\t\t\t\t\t'status'\t\t=>mysql_real_escape_string($banstatus),\n\t\t\t\t\t\t\t\t'updated'\t=>date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t/* Banner Insert Method and Get Last Insert ID */\n\t\t\t\t\t\t\t$parent_id = $this->mod_banner->add_banner($add_master_banner);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$where_place = array(\"placement_id\"=>$campaign);\n\t\t\t\t\t\t\t$query = $this->db->get_where('ox_placement_zone_assoc',$where_place);\n\t\t\t\t\t\t\tif($query->num_rows()>0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach($query->result() as $row)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$zoneid = $row->zone_id;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$ins_ad_zone = array(\"zone_id\"=>$zoneid,\"ad_id\"=>$parent_id,\"link_type\"=>\"1\");\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->db->insert('ox_ad_zone_assoc',$ins_ad_zone);\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Add Master Iamge Banner - End */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Add Large Iamge Banner - Start */\n\t\t\t\t\t\t\t$add_large_banner = array(\n\t\t\t\t\t\t\t\t'campaignid'\t=>mysql_real_escape_string($campaign),\n\t\t\t\t\t\t\t\t'description'\t=>mysql_real_escape_string($banner_name),\n\t\t\t\t\t\t\t\t'url'\t\t\t=>mysql_real_escape_string($banner_url),\n\t\t\t\t\t\t\t\t'filename' \t=>mysql_real_escape_string($large_img_name),\n\t\t\t\t\t\t\t\t'bannertext'\t=>mysql_real_escape_string($banner_content),\n\t\t\t\t\t\t\t\t'contenttype' \t=>mysql_real_escape_string($large_img_type),\n\t\t\t\t\t\t\t\t'storagetype'\t=>mysql_real_escape_string($storage_type),\n\t\t\t\t\t\t\t\t'width'\t\t \t=>mysql_real_escape_string($size['master']['width']),\n\t\t\t\t\t\t\t\t'height'\t \t=>mysql_real_escape_string($size['master']['height']),\n\t\t\t\t\t\t\t\t'master_banner'\t=>mysql_real_escape_string($parent_id),\n\t\t\t\t\t\t\t\t'adminstatus'\t=>mysql_real_escape_string($admin_status),\n\t\t\t\t\t\t\t\t'status'\t\t=>mysql_real_escape_string($banstatus),\n\t\t\t\t\t\t\t\t'updated'\t=>date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t/* Banner Insert Method and Get Last Insert ID */\n\t\t\t\t\t\t\t$large_img_id = $this->mod_banner->add_banner($add_large_banner);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$where_place = array(\"placement_id\"=>$campaign);\n\t\t\t\t\t\t\t$query = $this->db->get_where('ox_placement_zone_assoc',$where_place);\n\t\t\t\t\t\t\tif($query->num_rows()>0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach($query->result() as $row)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$zoneid = $row->zone_id;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$ins_ad_zone = array(\"zone_id\"=>$zoneid,\"ad_id\"=>$large_img_id,\"link_type\"=>\"1\");\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->db->insert('ox_ad_zone_assoc',$ins_ad_zone);\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Add Large Iamge Banner - End */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Add Medium Iamge Banner - Start */\n\t\t\t\t\t\t\t$add_medium_banner = array(\n\t\t\t\t\t\t\t\t'campaignid'\t=>mysql_real_escape_string($campaign),\n\t\t\t\t\t\t\t\t'description'\t=>mysql_real_escape_string($banner_name),\n\t\t\t\t\t\t\t\t'url'\t\t\t=>mysql_real_escape_string($banner_url),\n\t\t\t\t\t\t\t\t'filename' \t=>mysql_real_escape_string($medium_img_name),\n\t\t\t\t\t\t\t\t'bannertext'\t=>mysql_real_escape_string($banner_content),\n\t\t\t\t\t\t\t\t'contenttype' \t=>mysql_real_escape_string($medium_img_type),\n\t\t\t\t\t\t\t\t'storagetype'\t=>mysql_real_escape_string($storage_type),\n\t\t\t\t\t\t\t\t'width'\t\t \t=>mysql_real_escape_string($size['child1']['width']),\n\t\t\t\t\t\t\t\t'height'\t \t=>mysql_real_escape_string($size['child1']['height']),\n\t\t\t\t\t\t\t\t'master_banner'\t=>mysql_real_escape_string($parent_id),\n\t\t\t\t\t\t\t\t'adminstatus'\t=>mysql_real_escape_string($admin_status),\n\t\t\t\t\t\t\t\t'status'\t\t=>mysql_real_escape_string($banstatus),\n\t\t\t\t\t\t\t\t'updated'\t=>date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t/* Banner Insert Method and Get Last Insert ID */\n\t\t\t\t\t\t\t$medium_img_id = $this->mod_banner->add_banner($add_medium_banner);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$where_place = array(\"placement_id\"=>$campaign);\n\t\t\t\t\t\t\t$query = $this->db->get_where('ox_placement_zone_assoc',$where_place);\n\t\t\t\t\t\t\tif($query->num_rows()>0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach($query->result() as $row)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$zoneid = $row->zone_id;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$ins_ad_zone = array(\"zone_id\"=>$zoneid,\"ad_id\"=>$medium_img_id,\"link_type\"=>\"1\");\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->db->insert('ox_ad_zone_assoc',$ins_ad_zone);\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Add Medium Iamge Banner - End */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Add Small Iamge Banner - Start */\n\t\t\t\t\t\t\t$add_small_banner = array(\n\t\t\t\t\t\t\t\t'campaignid'\t=>mysql_real_escape_string($campaign),\n\t\t\t\t\t\t\t\t'description'\t=>mysql_real_escape_string($banner_name),\n\t\t\t\t\t\t\t\t'url'\t\t\t=>mysql_real_escape_string($banner_url),\n\t\t\t\t\t\t\t\t'filename' \t=>mysql_real_escape_string($small_img_name),\n\t\t\t\t\t\t\t\t'bannertext'\t=>mysql_real_escape_string($banner_content),\n\t\t\t\t\t\t\t\t'contenttype' \t=>mysql_real_escape_string($small_img_type),\n\t\t\t\t\t\t\t\t'storagetype'\t=>mysql_real_escape_string($storage_type),\n\t\t\t\t\t\t\t\t'width'\t\t \t=>mysql_real_escape_string($size['child2']['width']),\n\t\t\t\t\t\t\t\t'height'\t \t=>mysql_real_escape_string($size['child2']['height']),\n\t\t\t\t\t\t\t\t'master_banner'\t=>mysql_real_escape_string($parent_id),\n\t\t\t\t\t\t\t\t'adminstatus'\t=>mysql_real_escape_string($admin_status),\n\t\t\t\t\t\t\t\t'status'\t\t=>mysql_real_escape_string($banstatus),\n\t\t\t\t\t\t\t\t'updated'\t=>date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t/* Banner Insert Method and Get Last Insert ID */\n\t\t\t\t\t\t\t$small_img_id = $this->mod_banner->add_banner($add_small_banner);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$where_place = array(\"placement_id\"=>$campaign);\n\t\t\t\t\t\t\t$query = $this->db->get_where('ox_placement_zone_assoc',$where_place);\n\t\t\t\t\t\t\tif($query->num_rows()>0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach($query->result() as $row)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$zoneid = $row->zone_id;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$ins_ad_zone = array(\"zone_id\"=>$zoneid,\"ad_id\"=>$small_img_id,\"link_type\"=>\"1\");\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->db->insert('ox_ad_zone_assoc',$ins_ad_zone);\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Add Small Iamge Banner - End */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Add XSmall Iamge Banner - Start */\n\t\t\t\t\t\t\t$add_xsmall_banner = array(\n\t\t\t\t\t\t\t\t'campaignid'\t=>mysql_real_escape_string($campaign),\n\t\t\t\t\t\t\t\t'description'\t=>mysql_real_escape_string($banner_name),\n\t\t\t\t\t\t\t\t'url'\t\t\t=>mysql_real_escape_string($banner_url),\n\t\t\t\t\t\t\t\t'filename' \t=>mysql_real_escape_string($xsmall_img_name),\n\t\t\t\t\t\t\t\t'bannertext'\t=>mysql_real_escape_string($banner_content),\n\t\t\t\t\t\t\t\t'contenttype' \t=>mysql_real_escape_string($xsmall_img_type),\n\t\t\t\t\t\t\t\t'storagetype'\t=>mysql_real_escape_string($storage_type),\n\t\t\t\t\t\t\t\t'width'\t\t \t=>mysql_real_escape_string($size['child3']['width']),\n\t\t\t\t\t\t\t\t'height'\t \t=>mysql_real_escape_string($size['child3']['height']),\n\t\t\t\t\t\t\t\t'master_banner'\t=>mysql_real_escape_string($parent_id),\n\t\t\t\t\t\t\t\t'adminstatus'\t=>mysql_real_escape_string($admin_status),\n\t\t\t\t\t\t\t\t'status'\t\t=>mysql_real_escape_string($banstatus),\n\t\t\t\t\t\t\t\t'updated'\t=>date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t/* Banner Insert Method and Get Last Insert ID */\n\t\t\t\t\t\t\t$xsmall_img_id = $this->mod_banner->add_banner($add_xsmall_banner);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$where_place = array(\"placement_id\"=>$campaign);\n\t\t\t\t\t\t\t$query = $this->db->get_where('ox_placement_zone_assoc',$where_place);\n\t\t\t\t\t\t\tif($query->num_rows()>0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach($query->result() as $row)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$zoneid = $row->zone_id;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$ins_ad_zone = array(\"zone_id\"=>$zoneid,\"ad_id\"=>$xsmall_img_id,\"link_type\"=>\"1\");\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->db->insert('ox_ad_zone_assoc',$ins_ad_zone);\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Add XSmall Iamge Banner - End */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Tablet Banner added Successfully. Redirect to Banner List */\n\t\t\t\t\t\t\t$this->session->set_flashdata('banner_add_success', $this->lang->line('label_banner_add_success'));\n\t\t\t\t\t\t\tif($campid == '0' || $campid == '')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif($adv == '0' || $adv == '')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tredirect('admin/inventory_banners');\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{\n\t\t\t\t\t\t\t\t\t\tredirect('admin/inventory_banners');\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{\n\t\t\t\t\t\t\t\t\tredirect('admin/inventory_banners/listing_camp/all/'.$campid.\"/\".$adv);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\t /* Banner Duplication Error */\n\t\t\t\t\t $this->session->set_userdata('banner_duplicate', $this->lang->line('label_banner_duplicate_error'));\n\t\t\t\t\t $this->add_banner($campid,$adv);\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 1:\n\t\t\t{\n\t\t\t\t$this->form_validation->set_rules('advertiser', 'Advertiser', 'required');\n\t\t\t\t$this->form_validation->set_rules('campaign_type', 'Campaign', 'required');\n\t\t\t\t$this->form_validation->set_rules('txt_banner_name', 'Banner Name', 'required');\n\t\t\t\t$this->form_validation->set_rules('txt_banner_url', 'Banner URL', 'required');\n\t\t\t\t$this->form_validation->set_rules('txt_banner_content', 'Banner Content', 'required');\n\t\t\t\t$this->form_validation->set_rules('banner_type', 'Banner Type', 'required');\n\t\t\t\t if ($this->form_validation->run() == FALSE)\n\t\t\t\t{\n\t\t\t\t /* Form Validation is failed. Redirect to Add Banner Form */\n\t\t\t\t $this->session->set_userdata('banner_error', $this->lang->line('label_error_missing'));\n\t\t\t\t $this->add_banner($campid,$adv);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$advertiser \t= $this->input->post('advertiser');\n\t\t\t\t\t$campaign\t\t= $this->input->post('campaign_type');\n\t\t\t\t\t$banner_name \t= $this->input->post('txt_banner_name');\n\t\t\t\t\t$banner_url \t= $this->input->post('txt_banner_url');\n\t\t\t\t\t$banner_content = $this->input->post('txt_banner_content');\n\t\t\t\t\t\n\t\t\t\t\t/* Hard Coded Values */\n\t\t\t\t\t$storage_type\t= \"txt\";\n\t\t\t\t\t$master_banner\t= -1;\n\t\t\t\t\t$admin_status\t= 0;\n\n\t\t\t\t\t$where_camp\t= array('campaignid'=>$campaign);\n\t\t\t\t\t$camp_status\t= $this->mod_banner->camp_status($where_camp);\n\t\t\t\t\tif($camp_status==0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$banstatus\t=\t0;\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$banstatus\t=\t1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/* Check Duplication for Banner Name based on Campaign ID */\n\t\t\t\t\t $where_banner\t= array('description'=>$banner_name,'campaignid'=>$campaign);\n\t\t\t\t\t $where_not_in\t= 0;\n\t\t\t\t\t $banner_check \t= $this->mod_banner->check_banner_duplication($where_banner,$where_not_in);\n\t\t\t\t\t if($banner_check==FALSE)\n\t\t\t\t\t {\n\t\t\t\t\t\t/* Add Banner Parameters */\n\t\t\t\t\t\t$add_banner = array(\n\t\t\t\t\t\t\t'campaignid'=>mysql_real_escape_string($campaign),\n\t\t\t\t\t\t\t'description'=>mysql_real_escape_string($banner_name),\n\t\t\t\t\t\t\t'url'=>mysql_real_escape_string($banner_url),\n\t\t\t\t\t\t\t'bannertext'=>mysql_real_escape_string($banner_content),\n\t\t\t\t\t\t\t'contenttype' =>mysql_real_escape_string($storage_type),\n\t\t\t\t\t\t\t'storagetype'=>mysql_real_escape_string($storage_type),\n\t\t\t\t\t\t\t'master_banner'=>mysql_real_escape_string($master_banner),\n\t\t\t\t\t\t\t'adminstatus'=>mysql_real_escape_string($admin_status),\n\t\t\t\t\t\t\t'status'\t\t=>mysql_real_escape_string($banstatus),\n\t\t\t\t\t\t\t'updated'\t=>date('Y-m-d H:i:s')\n\t\t\t\t\t\t);\n\t\t\t\t\t\t/* Banner Insert Method and Get Last Insert ID */\n $parent_id = $this->mod_banner->add_banner($add_banner);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$where_place = array(\"placement_id\"=>$campaign);\n\t\t\t\t\t\t$query = $this->db->get_where('ox_placement_zone_assoc',$where_place);\n\t\t\t\t\t\tif($query->num_rows()>0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach($query->result() as $row)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$zoneid = $row->zone_id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$ins_ad_zone = array(\"zone_id\"=>$zoneid,\"ad_id\"=>$parent_id,\"link_type\"=>\"1\");\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->db->insert('ox_ad_zone_assoc',$ins_ad_zone);\n\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/* Banner added Successfully. Redirect to Banner List */\n\t\t\t\t\t\t$this->session->set_flashdata('banner_add_success', $this->lang->line('label_banner_add_success'));\n\t\t\t\t\t\tif($campid == '0' || $campid == '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($adv == '0' || $adv == '')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tredirect('admin/inventory_banners');\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\tredirect('admin/inventory_banners');\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\tredirect('admin/inventory_banners/listing_camp/all/'.$campid.\"/\".$adv);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\t /* Text Banner Duplication Error */\n\t\t\t\t\t $this->session->set_userdata('banner_duplicate', $this->lang->line('label_banner_duplicate_error'));\n\t\t\t\t\t $this->add_banner($campid,$adv);\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 2:\n\t\t\t{\n\t\t\t\t$this->form_validation->set_rules('advertiser', 'Advertiser', 'required');\n\t\t\t\t$this->form_validation->set_rules('campaign_type', 'Campaign', 'required');\n\t\t\t\t$this->form_validation->set_rules('tablet_banner_name', 'Banner Name', 'required');\n\t\t\t\t$this->form_validation->set_rules('tab_banner_url', 'Banner URL', 'required');\n\t\t\t\t$this->form_validation->set_rules('banner_type', 'Banner Type', 'required');\n\t\t\t\tif ($this->form_validation->run() == FALSE)\n\t\t\t\t{\n\t\t\t\t /* Form Validation is failed. Redirect to Add Banner Form */\n\t\t\t\t $this->session->set_userdata('banner_error', $this->lang->line('label_error_missing'));\n\t\t\t\t $this->add_banner($campid,$adv);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t/* Check File Permisson of Uploading Directory */\n\t\t\t\t\t\n\t\t\t\t\t\t$advertiser \t= $this->input->post('advertiser');\n\t\t\t\t\t\t$campaign\t\t= $this->input->post('campaign_type');\n\t\t\t\t\t\t$banner_name \t= $this->input->post('tablet_banner_name');\n\t\t\t\t\t\t$banner_url \t= $this->input->post('tab_banner_url');\n\t\t\t\t\t\t$banner_size\t= $this->input->post('banner_size');\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* Split Banner Width and Height */\n\t\t\t\t\t\tlist($width, $height) =explode(\" X \", $this->input->post('banner_size'));\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* Hard Coded Values */\n\t\t\t\t\t\t$storage_type\t= \"web\";\n\t\t\t\t\t\t$master_banner\t= -3;\n\t\t\t\t\t\t$admin_status\t= 0;\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t$where_camp\t= array('campaignid'=>$campaign);\n\t\t\t\t\t\t$camp_status\t= $this->mod_banner->camp_status($where_camp);\n\t\t\t\t\t\tif($camp_status==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$banstatus\t=\t0;\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$banstatus\t=\t1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* Check Duplication for Banner Name based on Campaign ID */\n\t\t\t\t\t\t$where_banner\t= array('description'=>$banner_name,'campaignid'=>$campaign);\n\t\t\t\t\t\t$where_not_in\t= 0;\n\t\t\t\t\t\t$banner_check \t= $this->mod_banner->check_banner_duplication($where_banner,$where_not_in);\n\t\t\t\t\t\tif($banner_check==FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$banner_image = rand(999, 9999).\"-\".$_FILES['tab_banner_image']['name'];\n\t\t\t\t\t\t\t$config['image_library'] \t= 'gd2';\n\t\t\t\t\t\t\t$config['allowed_types'] \t= 'gif|jpg|png|jpeg';\n\t\t\t\t\t\t\t$config['max_size']\t \t= '2000';\n\t\t\t\t\t\t\t$config['source_image']\t\t= $_FILES['tab_banner_image']['tmp_name'];\n\t\t\t\t\t\t\t$config['new_image'] \t= $this->config->item('ads_url').$banner_image;\n\t\t\t\t\t\t\t$config['maintain_ratio'] \t= FALSE;\n\t\t\t\t\t\t\t$config['width'] \t\t = $width;\n\t\t\t\t\t\t\t$config['height'] \t\t = $height;\n\t\t\t\n\t\t\t\t\t\t\t$this->image_lib->initialize($config);\n\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tif(!$this->image_lib->resize())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* Banner Deleted Failed. Redirect to Banner List */\n\t\t\t\t\t\t\t\t$this->session->set_userdata('banner_error', lang('label_image_display_errors'));\n\t\t\t\t\t\t\t\tif($campid == '0' || $campid == '')\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$this->add_banner();\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\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif($adv == '0' || $adv == '')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$this->add_banner($campid);\n\t\t\t\t\t\t\t\t\t\t//redirect('admin/inventory_banners/add_banner'.$campid);\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t$this->add_banner($campid,$adv);\n\t\t\t\t\t\t\t\t\t\t//redirect('admin/inventory_banners/add_banner/'.$campid.\"/\".$adv);\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\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->image_lib->clear();\n\t\t\t\t\t\t\t\t$img_type\t\t= $this->mod_banner->staticGetContentTypeByExtension($banner_image, $alt=false);\n\t\t\t\t\t\t\t\t$tab_img_name \t= $banner_image;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Add Banner Parameters */\n\t\t\t\t\t\t\t$add_banner = array(\n\t\t\t\t\t\t\t\t'campaignid'\t=>mysql_real_escape_string($campaign),\n\t\t\t\t\t\t\t\t'description'\t=>mysql_real_escape_string($banner_name),\n\t\t\t\t\t\t\t\t'url'\t\t\t=>mysql_real_escape_string($banner_url),\n\t\t\t\t\t\t\t\t'filename' \t=>mysql_real_escape_string($tab_img_name),\n\t\t\t\t\t\t\t\t'contenttype' \t=>mysql_real_escape_string($img_type),\n\t\t\t\t\t\t\t\t'storagetype'\t=>mysql_real_escape_string($storage_type),\n\t\t\t\t\t\t\t\t'width'\t\t \t=>mysql_real_escape_string($width),\n\t\t\t\t\t\t\t\t'height'\t \t=>mysql_real_escape_string($height),\n\t\t\t\t\t\t\t\t'master_banner'\t=>mysql_real_escape_string($master_banner),\n\t\t\t\t\t\t\t\t'adminstatus'\t=>mysql_real_escape_string($admin_status),\n\t\t\t\t\t\t\t\t'status'\t\t=>mysql_real_escape_string($banstatus),\n\t\t\t\t\t\t\t\t'updated'\t=>date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t/* Banner Insert Method and Get Last Insert ID */\n\t\t\t\t\t\t\t$parent_id = $this->mod_banner->add_banner($add_banner);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$where_place = array(\"placement_id\"=>$campaign);\n\t\t\t\t\t\t\t$query = $this->db->get_where('ox_placement_zone_assoc',$where_place);\n\t\t\t\t\t\t\tif($query->num_rows()>0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach($query->result() as $row)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$zoneid = $row->zone_id;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$qry = mysql_query (\"select b.width,b.height,c.revenue_type,z.height,z.zoneid,z.width,z.revenue_type from ox_campaigns c join ox_banners b join ox_zones z on z.width=b.width and z.height=b.height and c.revenue_type=z.revenue_type where z.zoneid='\".$zoneid.\"' and b.bannerid='\".$parent_id.\"'\");\n\n\t\t\t\t\t\t\t\tif(mysql_num_rows($qry)>0)\n\t\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t\t$ins_ad_zone = array(\"zone_id\"=>$zoneid,\"ad_id\"=>$parent_id,\"link_type\"=>\"1\");\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$this->db->insert('ox_ad_zone_assoc',$ins_ad_zone);\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\t\t\t\t\t\n\t\t\t\t\t\t\t/* Tablet Banner added Successfully. Redirect to Banner List */\n\t\t\t\t\t\t\t$this->session->set_flashdata('banner_add_success', $this->lang->line('label_banner_add_success'));\n\t\t\t\t\t\t\tif($campid == '0' || $campid == '')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($adv == '0' || $adv == '')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tredirect('admin/inventory_banners');\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\tredirect('admin/inventory_banners');\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\tredirect('admin/inventory_banners/listing_camp/all/'.$campid.\"/\".$adv);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t }\n\t\t\t\t\t else\n\t\t\t\t\t {\n\t\t\t\t\t\t /* Banner Duplication Error */\n\t\t\t\t\t\t $this->session->set_userdata('banner_duplicate', $this->lang->line('label_banner_duplicate_error'));\n\t\t\t\t\t\t $this->add_banner($campid,$adv);\n\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t}", "function template_preprocess_multibanner_add_list(&$variables) {\n $variables['bundles'] = [];\n if (!empty($variables['content'])) {\n foreach ($variables['content'] as $bundle) {\n /** @var \\Drupal\\multibanner\\MultibannerBundleInterface $bundle */\n $variables['bundles'][$bundle->id()] = [\n 'type' => $bundle->id(),\n 'add_link' => Link::createFromRoute($bundle->label(), 'multibanner.add', ['multibanner_bundle' => $bundle->id()]),\n 'description' => [\n '#markup' => $bundle->getDescription(),\n ],\n ];\n }\n }\n}", "public function add()\n\t{\n\n\t}", "public function add()\n\t{\n\n\t}", "public function add_resources()\n\t{\n\t\t\n\t}", "public function add_data($add_data,$category_data,$contact_data) {\n\n\t\t$city_id=$add_data['city_id'];\n\t\t$area_id=$add_data['area_id'];\n $category_data_new=explode(',',$category_data);\t\n\t\t$category_data_id=array();\n\t\tforeach($category_data_new as $key=>$name)\n\t\t{\n\t\t\t$name=str_replace('&', 'And', $name);\n\t\t\t$name=str_replace('\"', '', $name);\n\t\t\t$name=str_replace(\"'\", '', $name);\n\t\t\t$category_data_id[]=$this->categoryFindOrSave($name);\n\t\t}\n\t\t$category_data_ids['category_id']=implode(',',$category_data_id);\n\t\t$add_data=array_merge($add_data,$category_data_ids);\n\t\t$this->db->insert('advertisements', $add_data);\n\t\t$last_insert_id = $this->db->insert_id();\n\t\tforeach($category_data_id as $key=>$value)\n\t\t{\n\t\t\t$cat_data=array(\n\t\t\t'created_at'=> date('Y-m-d h:i:s'),\n\t\t\t'listing_id'=>$last_insert_id,\n\t\t\t'city_id'=>$city_id,\n\t\t\t'area_id'=>$area_id,\n\t\t\t'category_id'=>$value,\n\t\t\t);\n\t\t $this->db->insert('category_listing', $cat_data);\n\t }\n\t\t\n\t\t $contact_numbers=explode(',',$contact_data);\n\t\t foreach($contact_numbers as $key=>$number)\n\t\t { \n\t\t\t if($key==0){$type='1';}else{$type='2';}\n\t\t\t $advertisment_phones_data=array(\n\t\t\t\t'created'=> date('Y-m-d h:i:s'),\n\t\t\t\t'advertisment_id'=>$last_insert_id,\n\t\t\t\t'number'=>$number,\n\t\t\t\t'type'=>$type,\n\t\t\t\t);\n\t\t\t $this->db->insert('advertisment_phones', $advertisment_phones_data);\n\t\t }\t\t\n\t}", "public function add()\n {\n }", "public function add()\n {\n }", "public function add()\n {\n }", "function caos_google_ads()\n{\n $adsId = 'YOUR-ADS-ID';\n\n if (CAOS_OPT_REMOTE_JS_FILE == 'gtag.js') {\n add_filter(\n 'caos_gtag_additional_config',\n function() use ($adsId) {\n return \"gtag('config', '$adsId');\";\n }\n );\n }\n}", "public function add_client(array $data);", "function apsa_ajax_new_campaign() {\n if (!current_user_can('manage_options')) {\n die();\n }\n\n $success = 1;\n\n $type = $_POST['type'];\n\n $defaults = array();\n if ($type == 'popup' || $type == 'background') {\n $apsa_camps = apsa_get_campaigns('all', $type);\n if (!empty($apsa_camps)) {\n $success = 0;\n $response = array('success' => $success);\n echo json_encode($response);\n wp_die();\n }\n }\n $new_campaign = apsa_add_campaign($type, \"\", \"suspended\", $defaults);\n\n if (empty($new_campaign['campaign_id'])) {\n $success = 0;\n }\n\n $response = array('success' => $success, 'campaign_id' => $new_campaign['campaign_id'], 'creation_date' => $new_campaign['creation_date']);\n echo json_encode($response);\n\n wp_die();\n}", "function add($meta = array(), $post_id = 0, $is_main = \\false)\n {\n }", "public function addAction()\n {\n\n // check if data sent\n if ($data = $this->getRequest()->getPost()) {\n\n // filter input data\n $data = $this->_filterPostData($data);\n\n // init model and set data\n /* @var $model Ab_Adverboard_Model_Adverboard */\n $model = Mage::getModel('ab_adverboard/adverboard');\n\n //remove image from data array\n if (isset($data['image'])) {\n unset($data['image']);\n }\n\n // validate input data\n $model->validate();\n\n // add data to model object\n $model->addData($data);\n\n // get core session object\n $session = Mage::getSingleton('core/session');\n\n try {\n /* @var $imageHelper Ab_Adverboard_Helper_Image */\n $imageHelper = Mage::helper('ab_adverboard/image');\n\n //upload new image\n $imageFile = $imageHelper->uploadImage('image');\n if ($imageFile) {\n if ($model->getImage()) {\n $imageHelper->removeImage($model->getImage());\n }\n $model->setImage($imageFile);\n }\n\n // add data to model object from $_SERVER variable\n $model->setAuthor_ip($_SERVER['REMOTE_ADDR']);\n $model->setAuthor_browser($_SERVER['HTTP_USER_AGENT']);\n $model->setAuthor_country($_SERVER['GEOIP_COUNTRY_CODE'] ? $_SERVER['GEOIP_COUNTRY_CODE'] : null);\n\n // save the data\n $model->save();\n\n //display success message\n $session->addSuccess(\n Mage::helper('ab_adverboard')->__('The advert item has been saved.')\n );\n\n } catch (Mage_Core_Exception $e) {\n // catch exception and add error to session\n $session->addError($e->getMessage());\n } catch (Exception $e) {\n // catch exception and add exception to session\n $session->addException($e,\n Mage::helper('ab_adverboard')->__('An error occurred while saving the advert item.')\n );\n }\n\n // redirect to list page\n $this->_redirectReferer();\n }\n\n }", "public function addAC($data){\n $advisory = new Advisory_Council;\n $advisory->fname = $data['fname'];\n\t \t$advisory->lname = $data['lname'];\n\t \t$advisory->mname = $data['mname'];\n\t \t$advisory->qualifier = $data['qname'];\n\t \t$advisory->gender = $data['gender'];\n\t \t$advisory->contactno = $data['mobile'];\n\t \t$advisory->landline = $data['landline'];\n\t \t$advisory->officename = $data['officename'];\n $advisory->officeaddress = $data['officeadd'];\n\t \t$advisory->email = $data['email'];\n\n\t \tif($data['durstart'] != \"\") {\n\t \t\t$advisory->startdate = $data['durstart'];\n\n\t \t}//if\n\t\tif($data['bdate'] != \"\") {\n\t \t\t$advisory->birthdate = $data['bdate'];\n\n\t \t}//if\n\n\t \t$advisory->fbuser = $data['facebook'];\n\t \t$advisory->twitteruser = $data['twitter'];\n\t \t$advisory->iguser = $data['instagram'];\n\n\t \t\n\n\t \t$advisory->street = $data['street'];\n\t \t$advisory->city = $data['city'];\n\t \t$advisory->province = $data['province'];\n\t \t$advisory->barangay = $data['barangay'];\n\n\n\t \tif($data['upphoto'] != \"\") {\n\t \t\t$advisory->imagepath = $this->loadphoto($data['upphoto']);\n\n\t \t}//if\n\n $advisory->advisory_position_id = $data['acposition'];\n $advisory->ac_sector_id = $data['acsector'];\n\n \t$advisory->second_id = $data['secondary'];\n\n\t if($data['tertiary'] != 'disitem') {\n\t \t$advisory->tertiary_id = $data['tertiary'];\n\t }//if\n\n\t if($data['quaternary'] != 'disitem') {\n\t \t$advisory->quaternary_id = $data['quaternary'];\n\t }//if\n\n $advisory->save();\n }", "function add() {\n }", "public function add();", "public function add();", "public function addAdminAssets() {}", "public function mass_add()\n {\n }", "function on_add_extra()\r\n\t{\r\n\t}", "function jr_ads_add_pages() {\r\n add_options_page('JR Ads', 'JR Ads', 'administrator', 'jr_ads', 'jr_ads_options_page');\r\n}", "function advertising()\n\t{\n\t\t$this->viewdata[\"function_title\"] = __(\"Advertising\");\n\n\t\t$form = array();\n\n\t\t$form['open'] = array(\n\t\t\t'type' => 'open'\n\t\t);\n\n\t\t$form['fs_ads_top_banner'] = array(\n\t\t\t'type' => 'textarea',\n\t\t\t'label' => __('Top banner'),\n\t\t\t'help' => __('Insert the HTML code provided by your advertiser.'),\n\t\t\t'preferences' => TRUE,\n\t\t\t'validation' => 'trim',\n\t\t\t'class' => 'span5'\n\t\t);\n\n\t\t$form['fs_ads_top_banner_active'] = array(\n\t\t\t'type' => 'checkbox',\n\t\t\t'preferences' => TRUE,\n\t\t\t'help' => __('Enable top banner')\n\t\t);\n\n\t\t$form['fs_ads_bottom_banner'] = array(\n\t\t\t'type' => 'textarea',\n\t\t\t'label' => __('Bottom banner'),\n\t\t\t'help' => __('Insert the HTML code provided by your advertiser.'),\n\t\t\t'preferences' => TRUE,\n\t\t\t'validation' => 'trim',\n\t\t\t'class' => 'span5'\n\t\t);\n\n\t\t$form['fs_ads_bottom_banner_active'] = array(\n\t\t\t'type' => 'checkbox',\n\t\t\t'preferences' => TRUE,\n\t\t\t'help' => __('Enable bottom banner')\n\t\t);\n\n\t\t$form['separator'] = array(\n\t\t\t'type' => 'separator'\n\t\t);\n\n\t\t$form['submit'] = array(\n\t\t\t'type' => 'submit',\n\t\t\t'value' => __('Submit'),\n\t\t\t'class' => 'btn btn-primary'\n\t\t);\n\n\t\t$form['close'] = array(\n\t\t\t'type' => 'close'\n\t\t);\n\n\t\t$this->preferences->submit_auto($form);\n\n\t\t$data['form'] = $form;\n\n\t\t// create a form\n\t\t$this->viewdata[\"main_content_view\"] = $this->load->view(\"admin/form_creator\",\n\t\t\t$data, TRUE);\n\t\t$this->load->view(\"admin/default\", $this->viewdata);\n\t}", "function addRelation($request) {\n\t\t$sourceModule = $request->getModule();\n\t\t$sourceRecordId = $request->get('src_record');\n\n\t\t$relatedModule = $request->get('related_module');\n\t\tif(is_numeric($relatedModule)){\n\t\t\t$relatedModule = Vtiger_Functions::getModuleName($relatedModule);\n\t\t}\n\t\t$relatedRecordIdList = $request->get('related_record_list');\n\t\t$sourceModuleModel = Vtiger_Module_Model::getInstance($sourceModule);\n\t\t$relatedModuleModel = Vtiger_Module_Model::getInstance($relatedModule);\n\t\t$relationModel = Vtiger_Relation_Model::getInstance($sourceModuleModel, $relatedModuleModel);\n\t\tforeach($relatedRecordIdList as $relatedRecordId) {\n\t\t\t$relationModel->addRelation($sourceRecordId,$relatedRecordId,$listPrice);\n\t\t\tif($relatedModule == 'PriceBooks'){\n\t\t\t\t$recordModel = Vtiger_Record_Model::getInstanceById($relatedRecordId);\n\t\t\t\tif ($sourceRecordId && ($sourceModule === 'Products' || $sourceModule === 'Services')) {\n\t\t\t\t\t$parentRecordModel = Vtiger_Record_Model::getInstanceById($sourceRecordId, $sourceModule);\n\t\t\t\t\t$recordModel->updateListPrice($sourceRecordId, $parentRecordModel->get('unit_price'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$response = new Vtiger_Response();\n\t\t$response->setResult(true);\n\t\t$response->emit();\n\t}", "public function add($request){\n\n }", "function add()\n { \n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n\t\t\t\t'IDIMAGE' => $this->input->post('IDIMAGE'),\n\t\t\t\t'DESCRIPTION' => $this->input->post('DESCRIPTION'),\n );\n \n $gallery_id = $this->Gallery_model->add_gallery($params);\n redirect('gallery/index');\n }\n else\n { \n $data['_view'] = 'gallery/add';\n $this->load->view('layouts/main',$data);\n }\n }", "public function createAdset()\n\t{\n\n\t\t$query=\"https://graph.facebook.com/v3.2/\".$this->ad_acc_id.\"/campaigns?fields=name,id&limit=100&access_token=\".$this->user_access_token.\"\";\n\n\n\n\t\t\t// Call to Graph api here\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch,CURLOPT_URL,$query);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_POST, 0);\n\n\n\t\t$resp = curl_exec($ch);\n\t\t$resp = json_decode($resp);\n\n\t\tcurl_close($ch);\n\t\tif(isset($resp->error->error_user_msg))\n\t\t\tSession::flash('message',$resp->error->error_user_msg);\n\t\telseif(isset($resp->error->message))\n\t\t\tSession::flash('message',$resp->error->message);\n\n\t\treturn view('social.adset',['campaigns'=>$resp->data]);\n\t}", "public function create()\n {\n $user_id = Auth::user()->id;\n $title = trans('app.post_an_ad');\n $categories = Category::where('category_id', 0)->get();\n $countries = Country::all();\n $ads_images = Media::whereUserId($user_id)->whereAdId(0)->whereRef('ad')->get();\n \n $previous_brands = Brand::where('category_id', old('category'))->get();\n $previous_states = State::where('country_id', old('country'))->get();\n $previous_cities = City::where('state_id', old('state'))->get();\n\n return view('admin.create_ad', compact('title', 'categories', 'countries', 'ads_images', 'previous_brands', 'previous_states', 'previous_cities'));\n }", "public function hook_after_add($id) { \n\t //Your code here\n\n\t }", "public function hook_after_add($id) { \n\t //Your code here\n\n\t }", "public function add()\n {\n for ($i = 0 ; $i < func_num_args(); $i++) {\n $this->addSingle(func_get_arg($i));\n }\n }", "public function storeAd(Request $request)\n\t{\n\n\t\t$request->validate([\n\t\t\t'name' => 'required',\n\t\t\t'adset_id' => 'required',\n\t\t\t'adcreative_id'=>'required',\n\t\t\t'status' =>'required',\n\t\t]);\n\n\t\t$data['name']=$request->input('name');\n\t\t$data['adset_id']=$request->input('adset_id');\n\t\t$data['creative']=json_encode(['creative_id'=>$request->input('adcreative_id')]);\n\n\t\t$data['status']=$request->input('status');\n\n\t\t// Storing to fb via curl\n\n\t\ttry{\n\t\t\t$data['access_token']=$this->user_access_token;\n\n\n\n\t\t\t$url=\"https://graph.facebook.com/v3.2/\".$this->ad_acc_id.'/ads';\n\n\n\t\t\t// Call to Graph api here\n\t\t\t$curl = curl_init();\n\t\t\tcurl_setopt($curl, CURLOPT_URL, $url);\n\t\t\tcurl_setopt($curl, CURLOPT_POST, true);\n\t\t\tcurl_setopt($curl, CURLOPT_AUTOREFERER, true);\n\t\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\t\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n\n\n\t\t\t$resp = curl_exec($curl);\n\t\t\t$resp = json_decode($resp);\n\n\n\t\t\tcurl_close($curl);\n\n\t\t\tif(isset($resp->error->error_user_msg))\n\t\t\t\tSession::flash('message',$resp->error->error_user_msg);\n\t\t\telseif(isset($resp->error->message))\n\t\t\t\tSession::flash('message',$resp->error->error_user_msg);\n\t\t\telse\n\t\t\t\tSession::flash('message',\"Adset created successfully\");\n\n\n\t\t\treturn redirect()->route('social.ad.create');\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tSession::flash('message',$e);\n\t\t\treturn redirect()->route('social.ad.create');\n\t\t}\n\n\t}", "public function addAction(){\n $parameters = array(\n 'token' =>'a959a5e68551f6f5d0b8c4bcdd17c0e4',\n 'name'=>'推广数据4',\n 'intro'=>'额定功耗计算都是的撒哥冬瓜撒蛋糕萨哈帝国和价格的撒14762596987033.jpg娇国际大厦定时机的撒哥环境额定功耗计算都是的撒哥冬瓜撒蛋糕萨哈帝国和价格的撒娇国际大厦定时关机的撒哥环境额定功耗计算都是的撒哥冬瓜撒蛋糕萨哈帝国和价格的撒娇国际大厦定时关机的撒哥环境额定功耗计算都是的撒哥冬瓜撒蛋糕萨哈帝国和价格的撒娇国际大厦定时关机的撒哥环境额定功耗计算都是的撒哥冬瓜撒蛋糕萨哈帝国和价格的撒娇国际大厦定时关机的撒哥环境额定功耗计算都是的撒哥冬瓜撒蛋糕萨哈帝国和价格的撒娇国际大厦定时关机的撒哥环境额定功耗计算都是的撒哥冬瓜撒蛋糕萨哈帝国和价格的撒娇国际大厦定时关机的撒哥环境额定功耗计算都是的撒哥冬瓜撒蛋糕萨哈帝国和价格的撒娇国际大厦定时关机的撒哥环境',\n 'cover'=>'14697788503687.jpg',\n 'type'=>1,\n 'num'=>20,\n 'origin'=>4,\n //'version'=>'3.5',\n 'start_time'=>'2017-04-13 00:00:00',\n 'end_time'=>'2017-09-13 00:00:00',\n 'price'=>'110',\n //'score'=>'50',\n 'sid'=>204,\n 'cate_id'=>'10',\n 'city_id'=>820488,\n 'intro_img'=>'14762596987033.jpg'\n\n );\n Common::verify($parameters, '/stagegoods/add');\n }", "public function create()\n {\n if (Auth::guest()) {\n return redirect()->route('login');\n }\n\n $region = DB::table('region')->get();\n $parent_cat = Category::select('name','slug','icon', 'image')->where('status', 1)->where('parent_id',0)->get();\n\n $featured = FeaturedAds::first();\n\n $ads_type = Ads::$TYPE;\n \n return view('ads.create', compact('region', 'parent_cat', 'featured', 'ads_type'));\n }", "function adleex_resource_add_boxes() {\n\n //add supported meta_box\n\n\n}", "function add() {\n if(!$this->request->is('restful')) {\n // We can't just saveAll because Cake will create rows in the database for all\n // non-member non-owners, which is silly. Create a version without those\n // entries (and properly structured).\n \n // Set page title\n $this->set('title_for_layout', _txt('op.add-a', array(_txt('ct.co_group_members.1'))));\n\n // We may get here via co_groups, in which case co_group_id is static, or\n // via co_people, in which case co_person_id is static\n \n $a = array('CoGroupMember' => array());\n\n foreach($this->request->data['CoGroupMember'] as $g)\n {\n // Must be a member or an owner to get a row created\n \n if(is_array($g)\n && ((isset($g['member']) && $g['member'])\n || (isset($g['owner']) && $g['owner'])))\n {\n $a['CoGroupMember'][] = array(\n 'co_group_id' => (!empty($g['co_group_id'])\n ? $g['co_group_id']\n : $this->request->data['CoGroupMember']['co_group_id']),\n 'co_person_id' => (!empty($g['co_person_id'])\n ? $g['co_person_id']\n : $this->request->data['CoGroupMember']['co_person_id']),\n 'member' => $g['member'],\n 'owner' => $g['owner']\n );\n }\n }\n \n if(count($a['CoGroupMember']) > 0) {\n if($this->CoGroupMember->saveAll($a['CoGroupMember']))\n $this->Flash->set(_txt('rs.added'), array('key' => 'success'));\n else\n $this->Flash->set($this->fieldsErrorToString($this->CoGroupMember->invalidFields()), array('key' => 'error'));\n } else {\n $this->Flash->set(_txt('er.grm.none'), array('key' => 'information'));\n }\n \n $this->performRedirect();\n }\n else\n parent::add();\n }", "public function hook_after_add($id) {\n\n }", "public function addCard()\n {\n }", "function ajaxAdsReview()\n{\n header('Content-type: application/json');\n\n $retour = new \\stdClass();\n $retour->error = false;\n $retour->message = 'ok';\n\n $fields = $_POST['fields'];\n $fields = json_decode(stripslashes($fields));\n\n $refClient = $fields->choisir_client_leboncoin; // vaut false si prospect ou nouveau ou ref_eleve (si !prospect )\n\n $phone = $fields->phone;\n\n if (! $phone) {\n $phone = 'pas-de-num';\n }\n\n $lbcProcessMg = new \\spamtonprof\\stp_api\\LbcProcessManager();\n $lbcAcctMg = new \\spamtonprof\\stp_api\\LbcAccountManager();\n\n $ads = $lbcProcessMg->generateAds($refClient, 50, $phone);\n $lbcAccts = $lbcAcctMg->getAll(array(\n 'ref_client' => $refClient\n ));\n\n $emails = [];\n foreach ($lbcAccts as $lbcAcct) {\n $emails[] = $lbcAcct->getMail();\n }\n\n // récupération des prénoms du client\n \n $clientMg = new \\spamtonprof\\stp_api\\LbcClientManager();\n $client = $clientMg->get(array('ref_client' => $refClient));\n \n $prenomMg = new \\spamtonprof\\stp_api\\PrenomLbcManager();\n $prenoms = $prenomMg -> getAll(array('ref_cat_prenom' => $client->getRef_cat_prenom()));\n \n \n \n // récupération des réponses du client\n $texteMg = new \\spamtonprof\\stp_api\\LbcTexteManager();\n $reponses = $texteMg -> getAll(array(\"ref_type_texte\" => $client->getRef_reponse_lbc()));\n \n \n $retour->phone = $phone;\n $retour->refClient = $refClient;\n $retour->ads = $ads;\n $retour->emails = $emails;\n $retour->prenoms = $prenoms;\n $retour->reponses = $reponses;\n \n \n \n echo (json_encode($retour));\n\n die();\n}", "public function annimalAddAction()\n {\n }", "function addOffer(){\n\t\t$data['title'] = $_POST['offer_title'];\n\t\t$data['description'] = $_POST['description'];\n\t\t$data['trial'] = $_POST['trial'];\n\t\t$data['offer_title'] = $_POST['offer_title'];\n\t\t$data['offer_description'] = $_POST['offer_description'];\n\t\t$data['large_offer_text'] = $_POST['large_offer_text'];\n\t\t$data['additional_text_1'] = isset($_POST['additional_text_1']) ? $_POST['additional_text_1'] : '';\n\t\t$data['additional_text_2'] = isset($_POST['additional_text_2']) ? $_POST['additional_text_2'] : '';\n\t\t$data['additional_text_3'] = isset($_POST['additional_text_3']) ? $_POST['additional_text_3'] : '';\n\t\t$data['amount'] = isset($_POST['amount']) ? number_format($_POST['amount'], 2, '.', '') : '';\n\t\t$data['features'] = serialize($_POST['features']);\n\t\t$data['override_logo'] = $_POST['override_logo'];\n\t\t$data['cat_id'] = isset($_POST['cat_id'])? $_POST['cat_id'] : 0;\n\t\t$data['pos'] = isset($_POST['pos'])? $_POST['pos'] : 0;\n\t\t$data['is_child_name'] = (isset($_POST['is_child_name']) && !empty($_POST['is_child_name']))? $_POST['is_child_name'] : 0;\n\t\t\n\t\t$data['third_party_tiral_url_type'] = isset($_POST['third_party_tiral_url_type']) ? $_POST['third_party_tiral_url_type'] : 0;\n\t\t$data['third_party_trial_url'] = $_POST['third_party_trial_url'];\n\t\t\n\t\t$data['upsale'] = isset($_POST['upsale']) ? $_POST['upsale'] : 0;\n\t\t$data['show_term_condition'] = isset($_POST['show_term_condition']) ? $_POST['show_term_condition'] : 0;\n\t\t$data['term_condition'] = isset($_POST['term_condition']) ? $_POST['term_condition'] : '';\n\t\t\n\t\t\n\t\tif($this->query_model->insertData($this->table,$data)):\n\t\t\n\t\t\t$insert_id = $this->db->insert_id();\n\t\t\tif($data['upsale'] == 1){\n\t\t\t\t\tforeach($_POST['data'] as $upsalePage){\n\t\t\t\t\t\t$updata['up_title'] = $upsalePage['up_title'];\n\t\t\t\t\t\t$updata['up_price'] = $upsalePage['up_price'];\n\t\t\t\t\t\t$updata['yes'] = $upsalePage['yes'];\n\t\t\t\t\t\t$updata['no'] = !empty($upsalePage['no']) ? $upsalePage['no'] : \"No Thank You. I'll Pay Full Price Another Time.\";\n\t\t\t\t\t\t$updata['description'] = $upsalePage['description'];\n\t\t\t\t\t\t$updata['text_1'] = $upsalePage['text_1'];\n\t\t\t\t\t\t$updata['trial_offer_id'] = $insert_id;\n\t\t\t\t\t\t$updata['upsell_top_text'] = $upsalePage['upsell_top_text'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$updata['video_type'] = !empty($upsalePage['video_type']) ? $upsalePage['video_type'] : 'youtube_video';\n\t\t\t\t\t\t$updata['youtube_video'] = !empty($upsalePage['youtube_video']) ? $upsalePage['youtube_video'] : '';\n\t\t\t\t\t\t$updata['vimeo_video'] = !empty($upsalePage['vimeo_video']) ? $upsalePage['vimeo_video'] : '';\n\t\t\t\t\t$this->query_model->insertData('tbl_onlinespecial_upsales',$updata);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tredirect(\"admin/onlinespecial/view/\".$data['cat_id']);\n\t\tendif;\n\t}", "public function createAdFromTag() {\n\n\t\ttry {\n\n\t\t\t$tagId = Request::input('tag_id');\n\n\t\t\t$tagObject = Tag::findOrFail($tagId);\n\n\t\t\t$connectContent = $tagObject->createAdContentForTag(\\Auth::User()->id);\n\t\t\t\n\t\t\tif (!$connectContent) {\n\t\t\t\tthrow new \\Exception(\"Unable to create new ad from tag.\");\n\t\t\t}\n\t\t\t\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('contentID' => $connectContent->id)));\n\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\n\t}", "public function addNewBanner() {\n $_PUT = $this->getPutData();\n $data = isset($_PUT) ? $_PUT : $_POST;\n\n\n if (!isset($data)) {\n\n throw new RestException(HttpStatusCodes::BAD_REQUEST, \"Missing required params\");\n }\n try {\n if (isset($_POST) && isset($data['width']) && filter_var($data['width'], FILTER_VALIDATE_INT) && filter_var($data['height'], FILTER_VALIDATE_INT) && isset($data['height']) && isset($data['name']) && isset($data['content'])) {\n return Banner::addNewBanner($data);\n } else if (isset($_PUT) && filter_var($data['id'], FILTER_VALIDATE_INT)) {\n return Banner::updateBanner($data);\n } else {\n throw new RestException(HttpStatusCodes::BAD_REQUEST, \"Not valid data.\");\n }\n\n http_response_code(HttpStatusCodes::CREATED);\n } catch (Exception $e) {\n throw new RestException($e->getCode(), $e->getMessage());\n }\n }", "public static function bkap_create_resource( $add_resource_name ) {\n\n\t\t$id = wp_insert_post( array(\n\t\t\t'post_title' => $add_resource_name,\n\t\t\t'menu_order' => 0,\n\t\t\t'post_content' => '',\n\t\t\t'post_status' => 'publish',\n\t\t\t'post_author' => get_current_user_id(),\n\t\t\t'post_type' => 'bkap_resource',\n\t\t), true );\n\n\t\tif ( $id && ! is_wp_error( $id ) ) {\n\t\t\t\n\t\t\tupdate_post_meta( $id, '_bkap_resource_qty', 1 );\n\t\t\tupdate_post_meta( $id, '_bkap_resource_availability', array() );\n\n\t\t\treturn $id;\n\t\t}\n\t}", "public function add_postAction() {\n\t\t$info = $this->getPost(array('name', 'link', 'img', 'sort', 'status', 'model_id','type_id'));\n\t\t$info = $this->_cookData($info);\n\t\t$result = Browser_Service_Recsite::addRecsite($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function add() {\n $insertData = $this->data;\n $keepNullFields = [\n 'estimator_id', 'date_requested', 'date_service', 'class_id',\n 'date_service', 'lat', 'lng'\n ];\n foreach ($keepNullFields as $field) {\n if (!$insertData[$field]) {\n $insertData[$field] = null;\n }\n }\n $model = new ReferralModel;\n $ref = $model->create();\n $ref->set($insertData);\n $ref->save();\n $this->renderJson([\n 'success' => true,\n 'message' => 'Job request created successfully',\n 'data' => $ref->asArray()\n ]);\n }", "function add()\n\t{\n\t\t$CFG = $this->config->item('image_configure');\n\t\t$data[\"title\"] = _e(\"Image\");\n\t\t## for check admin or not ##\n\t\t$data[\"response\"] = addPermissionMsg( $CFG[\"sector\"][\"add\"] );\t\t\t\n\t\t## Other auxilary variable ##\n\t\t$data['var'] = array();\t\t\n\t\t$this->load->module('context/context_admin');\n\t\t$user_context = $this->context_admin->getContext();\n\t\t$data['var']['context_dd'] = ( array('' => _e('Choose Context') ) + $user_context );\n\t\t$data['var']['relation_dd'] = ( array('' => _e('Choose Relation') ) );\n\t\t$data[\"top\"] = $this->template->admin_view(\"top\", $data, true, \"image\");\t\n\t\t$data[\"content\"] = $this->template->admin_view(\"image_add\", $data, true, \"image\");\n\t\t$this->template->build_admin_output($data);\n\t}", "public function add() {\n if ($this->request->is('post')) {\n \n $this->Atelier->create();\n if ($this->Atelier->save($this->request->data)) {\n //$this->Session->setFlash(\"Cet Atelier a été créé\", \"success\");\n $this->Session->setFlash(\"Cet Atelier a été créé\");\n //return $this->redirect(array('action' => 'index'));\n } else {\n //$this->Session->setFlash(\"ERREUR : L'atelier n'a pas été sauvegardé\", \"error\");\n $this->Session->setFlash(\"ERREUR : L'atelier n'a pas été sauvegardé\");\n }\n }\n }", "function add()\r\n\t{\r\n\t\t$data['main_content'] = 'policy_add';\r\n\t\t$opt_load = array(\r\n\t\t\t'<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.datalabsecurity.com/webscan/resources/css/dashboardui.css\" />',\r\n\t\t\t'<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.datalabsecurity.com/webscan/resources/css/css3-buttons.css\" />',\r\n\t\t\t'<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.datalabsecurity.com/webscan/resources/css/progress.css\" />',\r\n\t\t\t'<script type=\"text/javascript\" src=\"http://www.datalabsecurity.com/webscan/resources/js/jquery-1.6.4.min.js\"></script>',\r\n\t\t\t'<script src=\"http://www.datalabsecurity.com/webscan/resources/js/jquery.easytabs.min.js\" type=\"text/javascript\"></script>',\r\n\t\t\t'<script type=\"text/javascript\" src=\"http://www.datalabsecurity.com/webscan/resources/js/progress.js\"></script>',\r\n\t\t\t);\r\n\t\t$opt_head = array(\r\n\t\t\t\"title\" => \"Policies\",\r\n\t\t\t\"opt_load\" => $opt_load,\r\n\t\t\t);\r\n\t\t$data['opt_head'] = $opt_head;\r\n\t\t$this->load->view('includes/template-beta', $data);\t\r\n\t}", "public function addAction(Request $request)\n {\n $banner = new Banner();\n\n $form = $this->createForm(new BannerType(), $banner);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n\n $banner->setUser($this->getUser());\n\n $em->persist($banner);\n $em->flush();\n\n $this->flash('flash_success', 'bannerAdded');\n\n return $this->redirectToRoute('bannerIndex');\n }\n\n return $this->renderEditForm($form);\n }", "public function add($fields = array(), $params = array())\n {\n $fullResult = $this->client->call(\n 'crm.dealcategory.add',\n array(\n 'fields' => $fields,\n 'params' => $params\n )\n );\n return $fullResult;\n }", "public function createAdFromPreviewTag() {\n\n\t\ttry {\n\n\t\t\t$previewTagId = Request::input('tag_id');\n\n\t\t\t$previewTagObject = PreviewTag::findOrFail($previewTagId);\n\n\t\t\t$connectContent = $previewTagObject->createAdContentForTag(\\Auth::User()->id);\n\n\t\t\tif (!$connectContent) {\n\t\t\t\tthrow new \\Exception(\"Unable to create new ad from preview tag.\");\t\n\t\t\t}\n\t\t\t\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('contentID' => $connectContent->id)));\n\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\n\t}", "public function add_deal($data_arr,&$validation_passed,&$new_transaction_id,&$err_arr){\n\t\tdie(\"NO LONGER USED\");\n \n }", "function addRelation($request) {\r\n\t\t$sourceModule = $request->getModule();\r\n\t\t$sourceRecordId = $request->get('src_record');\r\n\r\n\t\t$relatedModule = $request->get('related_module');\r\n\t\t$relatedRecordIdList = $request->get('related_record_list');\r\n\r\n\t\t$sourceModuleModel = Vtiger_Module_Model::getInstance($sourceModule);\r\n\t\t$relatedModuleModel = Vtiger_Module_Model::getInstance($relatedModule);\r\n\t\t$relationModel = Vtiger_Relation_Model::getInstance($sourceModuleModel, $relatedModuleModel);\r\n\t\tforeach($relatedRecordIdList as $relatedRecordId) {\r\n\t\t\t$relationModel->addRelation($sourceRecordId,$relatedRecordId,$listPrice);\r\n\t\t\tif($relatedModule == 'PriceBooks'){\r\n\t\t\t\t$recordModel = Vtiger_Record_Model::getInstanceById($relatedRecordId);\r\n\t\t\t\tif ($sourceRecordId && ($sourceModule === 'Products' || $sourceModule === 'Services')) {\r\n\t\t\t\t\t$parentRecordModel = Vtiger_Record_Model::getInstanceById($sourceRecordId, $sourceModule);\r\n\t\t\t\t\t$recordModel->updateListPrice($sourceRecordId, $parentRecordModel->get('unit_price'));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "function addPostponedclients(Request $request, $id){\n ClientPayments::Create($id,ClientPayments::PaymentValue($id,$request->postponed_value,'دفعات'));\n return back()->with(['success'=>'تم تسديد دفعة بنجاح']);\n }", "public function add_new_resource() {\n // @codingStandardsIgnoreLine\n $add_resource_name = wc_clean( $_POST['add_resource_name'] );\n\n if ( empty( $add_resource_name ) ) {\n wp_send_json_error();\n }\n\n $resource = array(\n 'post_title' => $add_resource_name,\n 'post_content' => '',\n 'post_status' => 'publish',\n 'post_author' => dokan_get_current_user_id(),\n 'post_type' => 'bookable_resource',\n );\n $resource_id = wp_insert_post( $resource );\n $edit_url = dokan_get_navigation_url( 'booking' ) . 'resources/edit/?id=' . $resource_id;\n ob_start();\n ?>\n <tr>\n <td><a href=\"<?php echo $edit_url; ?>\"><?php echo $add_resource_name; ?></a></td>\n <td><?php esc_attr_e( 'N/A', 'dokan' ); ?></td>\n <td>\n <a class=\"dokan-btn dokan-btn-sm dokan-btn-theme\" href =\"<?php echo $edit_url; ?>\"><?php esc_attr_e( 'Edit', 'dokan' ); ?></a>\n <button class=\"dokan-btn dokan-btn-theme dokan-btn-sm btn-remove\" data-id=\"<?php echo $resource_id; ?>\"><?php esc_attr_e( 'Remove', 'dokan' ); ?></button>\n </td>\n </tr>\n\n <?php\n $output = ob_get_clean();\n wp_send_json_success( $output );\n }", "function addUserRecognizedActivity(){\n\n\t\tglobal $dclserver;\n\t\t$url=\"$dclserver/MMDataCurationRestfulService/webresources/InformationCuration/AddUserRecognizedActivity\";\n\t\t\n\t\t$data = array(\"userRecognizedActivityId\"=>NULL,\n\t\t\"userId\"=>39,\n\t\t\"activityId\"=>2,\n\t\t\"startTime\"=>\"2015 05 05 16:58:56\",\n\t\t\"endTime\"=>\"2015 05 05 16:58:59\",\n\t\t\"duration\"=>3\n\t\t\n\t\t);\n\t\t\n\t\n\t$json = json_encode($data,true);\n\t\n\t$result =postJsonRest($url,$json);\n\t\n\treturn $result;\n\n\t\t\n}", "function add_new_car(){\n }", "public function invokeAdvertisements()\r\n {\r\n if (!isset($_GET['adverisements'])) {\r\n\r\n $advertisements = $this->model->getAdvertisements();\r\n include 'view/advertisements.php';\r\n }\r\n }", "public function createAd(Request $request, EntityManagerInterface $manager) : Response\n {\n $ad = new Ad();\n $form = $this->createForm(AdType::class, $ad);\n $form->handleRequest($request);\n if($form->isSubmitted() && $form->isValid()){\n\n\n// $ad->initSlug();\n foreach($ad->getImages() as $image) {\n $image->setAd($ad);\n $manager->persist($image);\n }\n\n $ad->setAuthor($this->getUser());\n\n\n\n $manager->persist($ad);\n $manager->flush();\n// dump($ad);\n\n $this->addFlash(\n 'success',\"L'annonce: {$ad->getTitle()} est bien créée\"\n );\n return $this->redirectToRoute('show_ad',['slug' =>$ad->getSlug()]);\n\n\n }\n\n\n\n return $this->render('ad/new.html.twig', [\n 'form' => $form->createView()\n ]);\n }", "public function actionAdd()\n\t{\n\t\t$tag = array(\n\t\t\t'tag_id' => 0\n\t\t);\n\n\t\treturn $this->_getTagAddEditResponse($tag);\n\t}", "public function postAddResource()\n {\n\n $errors = validateAddResources();\n\n if(!($errors === true)) {\n\n $this->_f3->set('errors', $errors);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n } else {\n $this->_f3->reroute('/Admin');\n }\n\n }", "public function create_ad(Request $request)\n { \n \n $ad = new Ad;\n \n \n\n $ad->user_id = $request['user_id'];\n $ad->title = $request['title'];\n $ad->description = $request['description'];\n $ad->quantity = $request['quantity'];\n $ad->state_id = $request['state_id'];\n $ad->city_id = $request['city_id'];\n $ad->address = $request['address'];\n $ad->payment_term = $request['payment_term'];\n $ad->shipment_term = $request['shipment_term'];\n if($request->hasFile('image'))\n {\n $name=time().'-a'.$request->image->getClientOriginalName();\n $request->image->move(public_path().'/ad/', $name); \n }\n $ad->image =$name;\n \n $ad->save();\n \n return back()->with('success','Ad submit successfully');\n }", "function add_resource($resource, $id) {\n\t//Create the HTML content for the resource page\n\t$content = '';\n\tif (isset($resource['description']))\n\t\t$content .= '<p>' . esc_attr($resource['description']) . '</p>';\n\t\n\t$content .= '<p><b>URL:</b> <a href=\"' . $resource['url'] . '\" target=\"_blank\">' . $resource['url'] . '</a><br/>';\n\tif (isset($resource['about'])) \n\t\t$content .= '<b>Keywords:</b> ' . join(\", \", $resource['about']) . '<br/>';\n\tif (isset($resource['author'])) \n\t\t$content .= '<b>Author:</b> ' . $resource['author'] . '<br/>';\n\tif (isset($resource['publisher'])) \n\t\t$content .= '<b>Publisher:</b> ' . $resource['publisher'] . '<br/>';\n\tif (isset($resource['dateCreated'])) \n\t\t$content .= '<b>Date created:</b> ' . $resource['dateCreated'] . '<br/>';\n\tif (isset($resource['language'])) \n\t\t$content .= '<b>Language:</b> ' . $resource['language'] . '<br/>';\n\tif (isset($resource['timeRequired'])) \n\t\t$content .= '<b>Time required:</b> ' . $resource['timeRequired'] . '<br/>';\n\tif (isset($resource['educationalUse'])) {\n\t\tcheck_term($resource['educationalUse'], \"asn_educational_use\");\n\t\t$content .= '<b>Educational use: </b><a href=\"'. get_term_link($resource['educationalUse'], \"asn_educational_use\") . '\">' . $resource['educationalUse'] . '</a><br/>';\n\t}\n\tif (isset($resource['educationalAudience'])) {\n\t\tcheck_term($resource['educationalAudience'], \"asn_educational_audience\");\n\t\t$content .= '<b>Educational audience: </b><a href=\"'. get_term_link($resource['educationalAudience'], \"asn_educational_audience\") . '\">' . $resource['educationalAudience'] . '</a><br/>';\n\t}\n\tif (isset($resource['interactivityType'])) {\n\t\tcheck_term($resource['interactivityType'], \"asn_interactivity_type\");\n\t\t$content .= '<b>Interactivity type: </b><a href=\"'. get_term_link($resource['interactivityType'], \"asn_interactivity_type\") . '\">' . $resource['interactivityType'] . '</a><br/>';\n\t}\n\tif (isset($resource['proficiencyLevel'])) {\n\t\tcheck_term($resource['proficiencyLevel'], \"asn_proficiency_level\");\n\t\t$content .= '<b>Proficiency level: </b><a href=\"'. get_term_link($resource['proficiencyLevel'], \"asn_proficiency_level\") . '\">' . $resource['proficiencyLevel'] . '</a><br/>';\n\t}\n\t\n\t$content .= '</p>';\n\t//Prepare the post attributes\t\n\t$post = array(\n\t 'post_content' => $content,\n\t 'post_name' => sanitize_title(str_replace('-', ' ',$resource['title'])),\n\t 'post_title' => esc_attr($resource['title']),\n\t 'post_status' => 'publish',\n\t 'post_type' => 'learning_resource'\n\t);\n\t\n\n\t//Update existing post if appropriate\n\tif ($id >= 0) {\n\t\t$post['ID'] = $id;\n\t\twp_update_post($post);\n\t\twp_set_post_terms( $id, $resource['competencies'], \"asn_index\" );\n\t\twp_set_post_terms( $id, $resource['topics'], \"asn_topic_index\" );\n\t\tif (isset($resource['interactivityType'])) \n\t\t\twp_set_post_terms($id, $resource['interactivityType'], \"asn_interactivity_type\");\n\t\tif (isset($resource['educationalAudience'])) \n\t\t\twp_set_post_terms($id, $resource['educationalAudience'], \"asn_educational_audience\");\n\t\tif (isset($resource['educationalUse'])) \n\t\t\twp_set_post_terms($id, $resource['educationalUse'], \"asn_educational_use\");\n\t\tif (isset($resource['proficiencyLevel'])) \n\t\t\twp_set_post_terms($id, $resource['proficiencyLevel'], \"asn_proficiency_level\");\n\t\t//$content .= '<b>Interactivity type:</b> ' . $resource['interactivityType'];\n\t\tif(get_post_meta($id, 'resource_uri', true)==\"\") {\n\t\t\tadd_post_meta($id, 'resource_uri', rawurlencode($resource['url']), true);\n\t\t}\n\t}\n\t//Create new post if appropriate\n\telse {\n\t\t$post_id = wp_insert_post( $post);\n\t\twp_set_post_terms( $post_id, $resource['competencies'], \"asn_index\" );\n\t\twp_set_post_terms( $post_id, $resource['topics'], \"asn_topic_index\" );\n\t\tif (isset($resource['interactivityType'])) \n\t\t\twp_set_post_terms($post_id, $resource['interactivityType'], \"asn_interactivity_type\");\n\t\tif (isset($resource['educationalAudience'])) \n\t\t\twp_set_post_terms($post_id, $resource['educationalAudience'], \"asn_educational_audience\");\n\t\tif (isset($resource['educationalUse'])) \n\t\t\twp_set_post_terms($post_id, $resource['educationalUse'], \"asn_educational_use\");\n\t\tif (isset($resource['proficiencyLevel'])) \n\t\t\twp_set_post_terms($post_id, $resource['proficiencyLevel'], \"asn_proficiency_level\");\n\t\tadd_post_meta($post_id, 'resource_uri', rawurlencode($resource['url']), true);\n\t}\n\t\n}", "function add_rew_apartment()\n{\n\t$lables = array(\n\t\t\t'name' => 'Apartments',\n\t\t\t'singular_name'=>'Apartment',\n\t\t\t'rewrite' => array( 'slug' => 'apartment' ),\n\t\t\t'all_items'=> 'All Apartments',\n\t\t\t'add_new'=>'Add New Apartment',\n\t\t\t'add_new_item'=>' Add New Apartment',\n \n\n\t\t );\n\n\t$tax = array(\n\n\t\t\t\t\t'category',\n\n\t\t\t\t\t\n\t\t);\n\t$args = array(\n\t\t'labels'=> $lables,\n\t\t'public'=>true,\n\t\t'show_in_menu'=>true,\n\t\t//'show_in_admin_bar'=>true,\n\t//\t'show_in_nav_menus'=>true,\n\t\t'description'=>'Enter your Description',\n\t\t'menu_position'=>10,\n\t\t'menu_icon'=>'dashicons-format-quote',\n\t\t'taxonomies'=>$tax,\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\n\t\t 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n 'query_var' => true,\n 'show_in_rest' => true,\n 'rest_base' => 'apartments',\n 'rest_controller_class' => 'WP_REST_Posts_Controller',\n\n\t\t);\t\n\tregister_post_type('Apartment', $args);\n\t//add_action('init' , 'codex_custom_init');\n\t\n}", "public function postCreateAdsense()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->adsenseForm->validate(Input::all());\n\n\n\t\t\t// Check if user has Adsense already set up\n\t\t\t$userId = Sentry::getUser()->id;\n\t\t\t$userAdsense = Adsense::whereUserId($userId)->first();\n\n\t\t\t// If User doesn't have Adsense table\n\t\t\tif(! $userAdsense)\n\t\t\t{\n\t\t\t\t$userAdsense = new Adsense;\n\t\t\t\t$userAdsense->user_id = Sentry::getUser()->id;\n\t\t\t}\n\n\t\t\t// Set the data\n\t\t\t$userAdsense->label\t\t\t= e(Input::get('label'));\n\t\t\t$userAdsense->publisher_id\t= Input::get('publisher_id');\n\t\t\t$userAdsense->ads\t\t\t= $this->setAdsArray();\n\n\t\t\t// Was the project created?\n\t\t\tif($userAdsense->save())\n\t\t\t{\n\t\t\t\t// Redirect to the new project page\n\t\t\t\tFlash::success('Your Adsense ad codes have been updated.');\n\n\t\t\t\treturn Redirect::route('adsense');\n\t\t\t}\n\n\t\t\t// Redirect to the project create page\n\t\t\tFlash::danger('Something went wrong.');\n\n\t\t\treturn Redirect::route('adsense');\n\t\t}\n\t\tcatch (FormValidationException $e)\n\t\t{\n\t\t\treturn Redirect::back()->withInput()->withErrors($e->getErrors());\n\t\t}\n\t}", "public function add(){\n\t\t\t\n\t\t\trequire_once('views/category/add.php');\n\t\t}", "public function actionAddpayment() {\n\n $paymentmodel = new Payment();\n $paymentmodel->price = Yii::$app->request->post('price');\n $paymentmodel->id_orders = Yii::$app->request->post('id_orders');\n $paymentmodel->card_number = Yii::$app->request->post('card_number');\n $paymentmodel->expiration_year = Yii::$app->request->post('expiration_year');\n $paymentmodel->expiration_month = Yii::$app->request->post('expiration_month');\n $paymentmodel->cvcode = Yii::$app->request->post('cvcode');\n\n if(!$paymentmodel->validate()){\n \\Yii::$app->response->statusCode=409;\n return $paymentmodel->getErrors();\n }\n\n $paymentmodel->save();\n\n $last_payment = Payment::find()->orderBy(['id'=>SORT_DESC])->one();\n\n return [\"payment\"=>$last_payment];\n\n }", "public function addAction(Request $request)\n {\n $entity = new Advertisement();\n\n $form = $this->createForm(new AdvertisementType(), $entity, [\n 'action' => $this->generateUrl('advertisement_add'),\n 'method' => 'PUT'\n ])->add('submit', 'submit', [\n 'attr' => ['class' => 'btn btn-default pull-left btn-add']\n ]);\n\n if ($request->isMethod('PUT')) {\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $advertisementService = $this->get('app.advertisement');\n $advertisementService->saveAdvertisement($entity);\n $this->addFlash('success', 'Successfully added new advertisement.');\n\n return $this->redirect($this->generateUrl('advertisement_list'));\n }\n }\n\n return $this->render('AppBundle:advertisement:add.html.twig', [\n 'entity' => $entity,\n 'form' => $form->createView()\n ]);\n }" ]
[ "0.5913132", "0.58678454", "0.58278376", "0.58107424", "0.57230884", "0.5622335", "0.5600925", "0.5542802", "0.551181", "0.5511493", "0.5466012", "0.54493946", "0.5449035", "0.5443068", "0.5326173", "0.53223664", "0.52826375", "0.52680004", "0.52639824", "0.5250351", "0.5237985", "0.5237985", "0.5206885", "0.51764244", "0.5144564", "0.51395345", "0.51361185", "0.5116923", "0.51046973", "0.50928843", "0.5044916", "0.5044217", "0.50413996", "0.5037036", "0.5037036", "0.5031863", "0.5015866", "0.50148183", "0.50148183", "0.50148183", "0.50125486", "0.50033385", "0.49931666", "0.49802202", "0.4974489", "0.49618393", "0.49369684", "0.49276918", "0.49276918", "0.49160314", "0.49087197", "0.49040282", "0.49039644", "0.48942098", "0.48862708", "0.48736474", "0.48719233", "0.48714492", "0.48709977", "0.4868365", "0.4868365", "0.4867659", "0.48619694", "0.48574752", "0.48565263", "0.48453814", "0.48373023", "0.48310196", "0.48169622", "0.48159125", "0.48049262", "0.48014137", "0.47952127", "0.47922522", "0.47881028", "0.47871175", "0.47865632", "0.47864592", "0.47851124", "0.47774777", "0.4776971", "0.47706395", "0.47679746", "0.47642848", "0.47620827", "0.47556648", "0.4755306", "0.47548372", "0.47529468", "0.4740811", "0.47380316", "0.4737667", "0.47358078", "0.4733027", "0.47317466", "0.47289115", "0.47275406", "0.47262913", "0.47243246", "0.47237754" ]
0.6543708
0
Handle AdcreativesApi adcreativesAddAsync function
public function addAsync(array $params = []) { return $this->handleMiddleware('add', $params, function(MiddlewareRequest $request) { $params = $request->getApiMethodArguments(); $data = $params; $response = $this->apiInstance->adcreativesAddAsync($data); return $response; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add(array $params = [])\n {\n return $this->handleMiddleware('add', $params, function(MiddlewareRequest $request) {\n $params = $request->getApiMethodArguments();\n $data = $params;\n $response = $this->apiInstance->adcreativesAdd($data);\n return $this->handleResponse($response);\n });\n }", "public function addCampaignBanners() {\n\n $data = $_POST;\n\n\n if (!isset($data)) {\n\n throw new RestException(HttpStatusCodes::BAD_REQUEST, \"Missing required params\");\n }\n try {\n\n $bannerDara = json_decode($data, true);\n $id = Campaign::addNewCampaign(array('name' => $bannerDara['name']));\n foreach ($bannerDara['banners'] as $key => $values) {\n\n $bannerDara['banners'][$key]['campaign_id'] = $id;\n }\n Banner::addMultipleBanner($bannerDara['banners']);\n\n return array(\"success\" => \"Campaign Banner, Updated \" . $id);\n\n http_response_code(HttpStatusCodes::CREATED);\n } catch (Exception $e) {\n throw new RestException($e->getCode(), $e->getMessage());\n }\n }", "function AddAdGroups($proxy, $campaignId, $adGroups)\n{\n $request = new AddAdGroupsRequest();\n $request->CampaignId = $campaignId;\n $request->AdGroups = $adGroups;\n \n return $proxy->GetService()->AddAdGroups($request);\n}", "function apsa_ajax_add_element() {\n if (!current_user_can('manage_options')) {\n die();\n }\n\n $success = 1;\n\n $campaign_id = $_POST['campaign_id'];\n $type = $_POST['type'];\n\n $new_element = apsa_insert_element($campaign_id, '', $type);\n\n if ($new_element['element_id'] === FALSE) {\n $success = 0;\n }\n\n $response = array('success' => $success, 'element_id' => $new_element['element_id'], 'creation_date' => $new_element['creation_date']);\n echo json_encode($response);\n\n wp_die();\n}", "function AddCampaigns($proxy, $accountId, $campaigns)\n{\n $request = new AddCampaignsRequest();\n $request->AccountId = $accountId;\n $request->Campaigns = $campaigns;\n \n return $proxy->GetService()->AddCampaigns($request);\n}", "public function add_postAction() {\n $info = $this->getPost(array('title', 'ad_ptype', 'img_day', 'img_night', 'start_time', 'end_time', 'status'));\n $info['ad_type'] = self::AD_TYPE;\n $this->cookData($info);\n $this->mergeImgParam($info);\n $result = Client_Service_Ad::addAd($info);\n if (! $result) $this->output(- 1, '操作失败');\n $this->output(0, '操作成功');\n }", "public function addAssets() {}", "public function addAssets() {}", "public function add_postAction() {\r\n\t\t$info = $this->getPost(array('sort', 'title', 'ad_type', 'ad_ptype', \r\n\t\t\t\t'link', 'activity', 'clientver', 'img', 'start_time', 'end_time', 'status', 'hits',\r\n\t\t\t\t'channel_id', 'module_id', 'cid', 'channel_code', 'ptype_id', 'is_recommend', 'action'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$result = Gou_Service_Ad::addAd($info);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "function smash_wp_footer_add_ads() {\n\n\t?>\n\n\t<?php /* appending the JS-File to the document */ ?>\n\t<script>try {\n\t\t\tSmashingAds.loadAds();\n\t\t} catch ( e ) {\n\t\t}</script>\n\n\t<?php /* rendering the ads after JS-File is added */ ?>\n\t<script>try {\n\t\t\tSmashingAds.render( OA_output );\n\t\t} catch ( e ) {\n\t\t}</script>\n\n\t<?php\n}", "function addads() \n\t{\n\t\t$view = $this->getView('ads');\n\t\t// Get/Create the model\n\t\tif ($model = $this->getModel('addads'))\n\t\t{\n\t\t\t//Push the model into the view (as default)\n\t\t\t//Second parameter indicates that it is the default model for the view\n\t\t\t$view->setModel($model, true);\n\t\t}\n\t\t$view->setLayout('adslayout');\n\t\t$view->ads();\n\t}", "function apsa_ajax_new_campaign() {\n if (!current_user_can('manage_options')) {\n die();\n }\n\n $success = 1;\n\n $type = $_POST['type'];\n\n $defaults = array();\n if ($type == 'popup' || $type == 'background') {\n $apsa_camps = apsa_get_campaigns('all', $type);\n if (!empty($apsa_camps)) {\n $success = 0;\n $response = array('success' => $success);\n echo json_encode($response);\n wp_die();\n }\n }\n $new_campaign = apsa_add_campaign($type, \"\", \"suspended\", $defaults);\n\n if (empty($new_campaign['campaign_id'])) {\n $success = 0;\n }\n\n $response = array('success' => $success, 'campaign_id' => $new_campaign['campaign_id'], 'creation_date' => $new_campaign['creation_date']);\n echo json_encode($response);\n\n wp_die();\n}", "public function createAdFromTag() {\n\n\t\ttry {\n\n\t\t\t$tagId = Request::input('tag_id');\n\n\t\t\t$tagObject = Tag::findOrFail($tagId);\n\n\t\t\t$connectContent = $tagObject->createAdContentForTag(\\Auth::User()->id);\n\t\t\t\n\t\t\tif (!$connectContent) {\n\t\t\t\tthrow new \\Exception(\"Unable to create new ad from tag.\");\n\t\t\t}\n\t\t\t\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('contentID' => $connectContent->id)));\n\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\n\t}", "public function process()\n\t{\t\n\t\t$this->template()\n ->setBreadCrumb(Phpfox::getPhrase('adsonfeed.add_new_ads'))\n ->setHeader(array(\n 'ad.js' => 'module_adsonfeed'\n ))\n ;\n $bIsEdit = false;\n if (($iId = $this->request()->getInt('id')) && ($aAds = phpfox::getService('adsonfeed')->getForEdit($iId)))\n {\n $bIsEdit = true; \n $this->template()->assign(array(\n 'aForms' => $aAds\n ));\n }\n $aVals = $this->request()->getArray('val');\n $aValidation = array(\n\t\t\t'name' => Phpfox::getPhrase('adsonfeed.provide_a_name_for_this_campaign')\n\t\t);\n if (is_array($aVals) && count($aVals) > 0)\n\t\t{\n\t\t\tif (isset($aVals['type_id']))\n\t\t\t{\n\t\t\t\tif ($aVals['type_id'] == 2)\n\t\t\t\t{\n\t\t\t\t\t$aValidation['url_link'] = Phpfox::getPhrase('adsonfeed.provide_a_link_for_your_banner');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n $oValidator = Phpfox::getLib('validator')->set(array('sFormName' => 'js_form', 'aParams' => $aValidation));\n if (is_array($aVals) && count($aVals) > 0)\n\t\t{\n\t\t\tif ($aVals['type_id'] == 1 && empty($aVals['html_code']))\n\t\t\t{\n\t\t\t\tPhpfox_Error::set(Phpfox::getPhrase('adsonfeed.provide_html_for_your_banner'));\t\n\t\t\t}\n\n\t\t\tif ($oValidator->isValid($aVals))\n\t\t\t{\n\t\t\t\tif ($bIsEdit)\n\t\t\t\t{\n\t\t\t\t\tif (Phpfox::getService('adsonfeed.process')->update($aVals['id'], $aVals))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->url()->send('admincp.adsonfeed.add', array('id' => $aVals['id']), Phpfox::getPhrase('adsonfeed.ad_successfully_updated'));\n\t\t\t\t\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\tif (Phpfox::getService('adsonfeed.process')->add($aVals))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->url()->send('admincp.adsonfeed.add', null, Phpfox::getPhrase('adsonfeed.ad_successfully_added'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n $this->template()->assign(array(\n 'bIsEdit' => $bIsEdit\n ));\n\t}", "function add() {\n Ad::addAd($_POST['title'], $_POST['url'], $_POST['description']);\n unset($_POST['title']);\n unset($_POST['url']);\n unset($_POST['description']);\n }", "public function createAdFromPreviewTag() {\n\n\t\ttry {\n\n\t\t\t$previewTagId = Request::input('tag_id');\n\n\t\t\t$previewTagObject = PreviewTag::findOrFail($previewTagId);\n\n\t\t\t$connectContent = $previewTagObject->createAdContentForTag(\\Auth::User()->id);\n\n\t\t\tif (!$connectContent) {\n\t\t\t\tthrow new \\Exception(\"Unable to create new ad from preview tag.\");\t\n\t\t\t}\n\t\t\t\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('contentID' => $connectContent->id)));\n\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\n\t}", "public function add() {\n $insertData = $this->data;\n $keepNullFields = [\n 'estimator_id', 'date_requested', 'date_service', 'class_id',\n 'date_service', 'lat', 'lng'\n ];\n foreach ($keepNullFields as $field) {\n if (!$insertData[$field]) {\n $insertData[$field] = null;\n }\n }\n $model = new ReferralModel;\n $ref = $model->create();\n $ref->set($insertData);\n $ref->save();\n $this->renderJson([\n 'success' => true,\n 'message' => 'Job request created successfully',\n 'data' => $ref->asArray()\n ]);\n }", "public function asyncAddList(Classes\\AsyncAddListRequest $arg) {\n\t\treturn $this->makeSoapCall(\"asyncAddList\", $arg);\n\t}", "function AddAdGroupRemarketingListAssociations($proxy, $adGroupRemarketingListAssociations)\n{\n $request = new AddAdGroupRemarketingListAssociationsRequest();\n $request->AdGroupRemarketingListAssociations = $adGroupRemarketingListAssociations;\n \n return $proxy->GetService()->AddAdGroupRemarketingListAssociations($request);\n}", "public function add_advert($data) {\n return $this->db->autoExecute($this->ecs->table(\"advert\"), $data, 'INSERT'); \n }", "public function createAdset()\n\t{\n\n\t\t$query=\"https://graph.facebook.com/v3.2/\".$this->ad_acc_id.\"/campaigns?fields=name,id&limit=100&access_token=\".$this->user_access_token.\"\";\n\n\n\n\t\t\t// Call to Graph api here\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch,CURLOPT_URL,$query);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_POST, 0);\n\n\n\t\t$resp = curl_exec($ch);\n\t\t$resp = json_decode($resp);\n\n\t\tcurl_close($ch);\n\t\tif(isset($resp->error->error_user_msg))\n\t\t\tSession::flash('message',$resp->error->error_user_msg);\n\t\telseif(isset($resp->error->message))\n\t\t\tSession::flash('message',$resp->error->message);\n\n\t\treturn view('social.adset',['campaigns'=>$resp->data]);\n\t}", "function ad_insert_post_ads( $content ) {\n\t\n\t//adding check for one off articles *for now\n\t$id = get_the_ID();\n\t\n\tif ($id == 201246) {\n\t//do nothing for a special reason\n\t}else{\n\t \n \t$ad_code = '<div style=\"text-align:center;\"><div id=\"div-gpt-ad-Cube_Article\" class=\"dfp-ad dfp-Cube_Article\" data-ad-unit=\"Cube_Article\">';\n\n\t$ad_code .= '<script type=\"text/javascript\">';\n\t$ad_code .= 'if ( \"undefined\" !== typeof googletag ) {\n\t\t\tgoogletag.cmd.push( function() { googletag.display(\"div-gpt-ad-Cube_Article\"); } );\n\t\t}';\n\t$ad_code .= '</script>';\n\t$ad_code .= '</div></div>';\n\t$ad_code .= \"<div></div>\";\n \n if ( is_single() && ! is_admin() ) {\n return ad_insert_after_paragraph( $ad_code, 2, $content );\n }\n\n\t}\n \n return $content;\n}", "public function create($data){\n\t\tif(empty($data['adgroup_id'])){\n\t\t\tthrow new \\Exception('adgroup id is required.');\n\t\t}\n\t\tif(empty($data['ad_headline']) || empty($data['ad_description1'])\n\t\t|| empty($data['ad_description2']) || empty($data['ad_displayurl'])){\n\t\t\tthrow new \\Exception('Incompleted ad data.');\n\t\t}\n\t\t$operations = array();\n\t\t// Create text ad.\n\t\t$textAd = new \\TextAd();\n\t\t$textAd->headline = $data['ad_headline'];\n\t\t$textAd->description1 = $data['ad_description1'];\n\t\t$textAd->description2 = $data['ad_description2'];\n\t\t$textAd->displayUrl = $data['ad_displayurl'];\n\t\t$textAd->url = $data['ad_url'];\n\n\t\t// Create ad group ad.\n\t\t$adGroupAd = new \\AdGroupAd();\n\t\t$adGroupAd->adGroupId = $data['adgroup_id'];\n\t\t$adGroupAd->ad = $textAd;\n\n\t\t// Set additional settings (optional).\n\t\t$adGroupAd->status = $this->mappingStatus($data['ad_status']);\n\n\t\t// Create operation.\n\t\t$operation = new \\AdGroupAdOperation();\n\t\t$operation->operand = $adGroupAd;\n\t\t$operation->operator = 'ADD';\n\t\t$operations[] = $operation;\n\n\t\t// Make the mutate request.\n\t\t$result = $this->adGroupAdService->mutate($operations);\n\t\t$adGroupAd = $result->value[0];\n\t\treturn $adGroupAd->ad->id;\n\t}", "public function adCreativereport()\n\t{\n\n\n\n\t\t$query=\"https://graph.facebook.com/v3.2/\".$this->ad_acc_id.\"/campaigns?fields=ads{adcreatives{id,name,thumbnail_url},insights.level(ad).metrics(ctr){cost_per_unique_click,spend,impressions,frequency,reach,unique_clicks,clicks,ctr,ad_name,adset_name,cpc,cpm,cpp,campaign_name,ad_id,adset_id,account_id,account_name}}&access_token=\".$this->user_access_token.\"\";\n\n\n\t\t\t// Call to Graph api here\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch,CURLOPT_URL,$query);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_POST, 0);\n\n\n\t\t$resp = curl_exec($ch);\n\t\t$resp = json_decode($resp);\n\t\tcurl_close($ch);\n\t\tif(isset($resp->error->error_user_msg))\n\t\t\tSession::flash('message',$resp->error->error_user_msg);\n\t\telseif(isset($resp->error->message))\n\t\t\tSession::flash('message',$resp->error->message);\n\n\n\t\treturn view('social.adcreative-reports',['resp'=>$resp]);\n\t}", "function add_car($car_data, $location)\n{\n $url = set_url('advert');\n $token = $_SESSION['token'];\n $params = array();\n $temp_array = array();\n $post_array = array();\n foreach ($car_data as $item) {\n $temp_array[$item->meta_key] = $item->meta_val;\n }\n $params['vin'] = $temp_array['vin'];\n $params['year'] = $temp_array['year'];\n $params['make'] = $temp_array['make'];\n $params['model'] = $temp_array['model'];\n $params['fuel_type'] = $temp_array['fuel_type'];\n $params['engine_power'] = $temp_array['engine_power'];\n $params['engine_capacity'] = $temp_array['engine_capacity'];\n $params['door_count'] = $temp_array['door_count'];\n $params['gearbox'] = $temp_array['gearbox'];\n $params['mileage'] = $temp_array['mileage'];\n $params['body_type'] = $temp_array['body_type'];\n $params['color'] = $temp_array['color'];\n $params['colour_type'] = $temp_array['colour_type'];\n $params['rhd'] = $temp_array['rhd'];\n $params['country_origin'] = $temp_array['country_origin'];\n $params['date_registration'] = $temp_array['date_registration'];\n $params['registered'] = $temp_array['registered'];\n $params['nr_seats'] = $temp_array['nr_seats'];\n $params['no_accident'] = $temp_array['no_accident'];\n $params['service_record'] = $temp_array['service_record'];\n $params['transmission'] = $temp_array['transmission'];\n $params['price'] = $temp_array['price'];\n //$params['video'] = $temp_array['video'];\n $params['features'] = $temp_array['features'];\n $post_array['title'] = $temp_array['title'];\n $temp_array['description'] = json_encode($temp_array['description']);\n $post_array['description'] = substr($temp_array['description'], 1, -1);\n $post_array['category_id'] = $temp_array['category_id'];\n $post_array['region_id'] = 1;\n $post_array['coordinates'] = '{\"latitude\": ' . $location['latitude'] . ',\"longitude\": ' . $location['longitude'] . '}';\n $post_array['contact'] = $temp_array['contact'];\n $post_array['new_used'] = $temp_array['new_used'];\n $post_array['params'] = otomoto_encode($params);\n $post_array['image_collection_id'] = $temp_array['image_collection_id'];\n $post_string = otomoto_encode($post_array);\n //print_r($post_string);\n //exit;\n $cURLConnection = curl_init($url);\n curl_setopt($cURLConnection, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Authorization: Bearer ' . $token,]);\n curl_setopt($cURLConnection, CURLOPT_POSTFIELDS, $post_string);\n curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);\n $apiResponse = json_decode(curl_exec($cURLConnection));\n curl_close($cURLConnection);\n return $apiResponse;\n}", "public function storeAd(Request $request)\n\t{\n\n\t\t$request->validate([\n\t\t\t'name' => 'required',\n\t\t\t'adset_id' => 'required',\n\t\t\t'adcreative_id'=>'required',\n\t\t\t'status' =>'required',\n\t\t]);\n\n\t\t$data['name']=$request->input('name');\n\t\t$data['adset_id']=$request->input('adset_id');\n\t\t$data['creative']=json_encode(['creative_id'=>$request->input('adcreative_id')]);\n\n\t\t$data['status']=$request->input('status');\n\n\t\t// Storing to fb via curl\n\n\t\ttry{\n\t\t\t$data['access_token']=$this->user_access_token;\n\n\n\n\t\t\t$url=\"https://graph.facebook.com/v3.2/\".$this->ad_acc_id.'/ads';\n\n\n\t\t\t// Call to Graph api here\n\t\t\t$curl = curl_init();\n\t\t\tcurl_setopt($curl, CURLOPT_URL, $url);\n\t\t\tcurl_setopt($curl, CURLOPT_POST, true);\n\t\t\tcurl_setopt($curl, CURLOPT_AUTOREFERER, true);\n\t\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\t\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n\n\n\t\t\t$resp = curl_exec($curl);\n\t\t\t$resp = json_decode($resp);\n\n\n\t\t\tcurl_close($curl);\n\n\t\t\tif(isset($resp->error->error_user_msg))\n\t\t\t\tSession::flash('message',$resp->error->error_user_msg);\n\t\t\telseif(isset($resp->error->message))\n\t\t\t\tSession::flash('message',$resp->error->error_user_msg);\n\t\t\telse\n\t\t\t\tSession::flash('message',\"Adset created successfully\");\n\n\n\t\t\treturn redirect()->route('social.ad.create');\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tSession::flash('message',$e);\n\t\t\treturn redirect()->route('social.ad.create');\n\t\t}\n\n\t}", "function addUserRecognizedActivity(){\n\n\t\tglobal $dclserver;\n\t\t$url=\"$dclserver/MMDataCurationRestfulService/webresources/InformationCuration/AddUserRecognizedActivity\";\n\t\t\n\t\t$data = array(\"userRecognizedActivityId\"=>NULL,\n\t\t\"userId\"=>39,\n\t\t\"activityId\"=>2,\n\t\t\"startTime\"=>\"2015 05 05 16:58:56\",\n\t\t\"endTime\"=>\"2015 05 05 16:58:59\",\n\t\t\"duration\"=>3\n\t\t\n\t\t);\n\t\t\n\t\n\t$json = json_encode($data,true);\n\t\n\t$result =postJsonRest($url,$json);\n\t\n\treturn $result;\n\n\t\t\n}", "public function addAction(Request $request)\n {\n $em = $this->getDoctrine()->getManager();\n\n $advert = new Advert();\n\n $advert->setTitle('Recherching');\n $advert->setAuthor('Alexander');\n $advert->setContent('blablabla');\n\n\n $image = new Image();\n\n $image->setUrl('http://sdz-upload.s3.amazonaws.com/prod/upload/job-de-reve.jpg');\n $image->setAlt('Job de rêve');\n\n $advert->setImage($image);\n\n $listSkills = $em->getRepository(\"OCPlatformBundle:Skill\")->findAll();\n\n foreach ($listSkills as $skill) {\n $advertSkill = new AdvertSkill();\n\n $advertSkill->setAdvert($advert);\n $advertSkill->setSkill($skill);\n $advertSkill->setLevel(\"Medium\");\n\n $em->persist($advertSkill);\n }\n\n\n for ($i = 0; $i < 5; $i++) {\n $app = new Application();\n $app->setAuthor(\"Author N°\".$i);\n $app->setContent(\"Content N°\".$i);\n $app->setAdvert($advert);\n $em->persist($app);\n }\n\n\n $em->persist($advert);\n $em->flush();\n\n\n if ($request->isMethod('POST')) {\n $request->getSession()->getFlashBag()->add('notice', 'Annonce bien enregistré');\n\n return $this->redirectToRoute('oc_platform_view', array('id' => 5));\n }\n\n return $this->render('OCPlatformBundle:Advert:add.html.twig');\n }", "public function addAction()\n {\n $ad = new ad();\n \n $form = $this->createForm(new AdType, $ad);\n \n $request = $this->get('request');\n \n if($request->getMethod() == 'POST')\n {\n $form->bind($request);\n \n if($form->isValid())\n {\n \n $em = $this->getDoctrine()->getManager();\n \n $em->persist($ad);\n $em->flush();\n \n $this->get('session')->getFlashBag()->add('info', 'The ad has been added.');\n \n return $this->redirect( $this->generateUrl('comem_newsroom_directory'));\n }\n }\n \n return $this->render('comemNewsroomBundle:Admin:add.html.twig', array(\n 'form' => $form->createView(),\n 'page' => 'annuaire'\n ));\n }", "public function AddArc(){\r\n $this->arc();\r\n $this->titlePost();\r\n $this->contentPost();\r\n $this->_arcsManager->addArc($this->_titlePostSecure,$this->_contentPostSecure);\r\n \r\n header('location: GestionArcEpisode'); \r\n }", "function caos_google_ads()\n{\n $adsId = 'YOUR-ADS-ID';\n\n if (CAOS_OPT_REMOTE_JS_FILE == 'gtag.js') {\n add_filter(\n 'caos_gtag_additional_config',\n function() use ($adsId) {\n return \"gtag('config', '$adsId');\";\n }\n );\n }\n}", "public function add_tag(Request $request, $campaign_id, $tag_id)\n {\n\n if ($request->ajax()) {\n $campaign = Campaign::find($campaign_id);\n //dd($campaign);\n $tag_id = [$tag_id];\n if ($campaign->tags()->attach($tag_id)) {\n return 200;\n } else {\n return 500;\n }\n }\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'ads_img' => 'required',\n \n 'ads_img.*' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048'\n \n ]);\n $file_count = count($request->ads_img);\n if($file_count > 5){\n return response()->json([\n 'success' => false,\n 'message' => ' upload max 5 images'\n ], 500);\n }\n \n $imageName = \"\";\n $adsimg = new Ads();\n \n $post->ads_img = $imageName;\n \n \n if (auth()->user()->adsimgs()->save($adsimg)){\n $res = $adsimg->toArray();\n if ($request->hasFile('ads_img')) {\n \n $image = $request->ads_img;\n $count = 1;\n foreach($image as $img){\n $count++;\n $imageName = time().$count.'.'.$img->getClientOriginalExtension();\n \n $t = Storage::disk('s3')->put($imageName, file_get_contents($img), 'public');\n $imageName = Storage::disk('s3')->url($imageName);\n $insert_image['ads_id'] = $res['id'];\n $insert_image['ads_img'] = $imageName;\n Adsimg::create($insert_image);\n }\n \n }\n return response()->json([\n 'success' => true,\n 'data' => $adsimg->toArray()\n ]);\n }\n else{\n return response()->json([\n 'success' => false,\n 'message' => 'Ads could not be added'\n ], 500);\n }\n }", "public function create()\n {\n $user_id = Auth::user()->id;\n $title = trans('app.post_an_ad');\n $categories = Category::where('category_id', 0)->get();\n $countries = Country::all();\n $ads_images = Media::whereUserId($user_id)->whereAdId(0)->whereRef('ad')->get();\n \n $previous_brands = Brand::where('category_id', old('category'))->get();\n $previous_states = State::where('country_id', old('country'))->get();\n $previous_cities = City::where('state_id', old('state'))->get();\n\n return view('admin.create_ad', compact('title', 'categories', 'countries', 'ads_images', 'previous_brands', 'previous_states', 'previous_cities'));\n }", "public function addAdminAssets() {}", "public function add_postAction() {\n\t\t$info = $this->getPost(array('sort', 'title', 'ad_type', 'ad_ptype', 'link', 'img', 'icon', 'start_time', 'end_time', 'status'));\n\t\t$info['ad_type'] = $this->ad_type;\n\t\t$info = $this->_cookData($info);\n\t\t\n\t\tif($info['ad_ptype'] == 1){\n\t\t\t$adInfo = Resource_Service_Games::getResourceGames($info['link']);\n\t\t\t$tip = \"内容\";\n\t\t} else if($info['ad_ptype'] == 2){\n\t\t\t$adInfo = Resource_Service_Attribute::getResourceAttributeByTypeId($info['link'],1);\n\t\t\t$tip = \"分类\";\n\t\t} else if($info['ad_ptype'] == 3){\n\t\t\t$adInfo = Client_Service_Subject::getSubject($info['link']);\n\t\t\t$tip = \"专题\";\n\t\t}\n\t\t$msg = $this->_getMsg($adInfo, $tip,$info['ad_ptype'],$info['link']);\n\t\t$result = Client_Service_Ad::addAd($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function onAwardcategoriesAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function createAdFromAudio() {\n\n\t\ttry {\n\n\t\t\t$attachment_id = Request::input('attachment_id');\n\n\t\t\t$attachmentObj = ConnectContentAttachment::findOrFail($attachment_id);\n\n\t\t\t$attachmentFileName = $attachmentObj->filename;\n\n\t\t\t$adKey = substr($attachmentFileName, 0, strripos($attachmentFileName, \".\"));\n\t\t\t$adKey = cleanupAdKey($adKey);\n\n\t\t\t$user = \\Auth::User();\n\n\t\t\t$data = array();\n\n\t\t\t$data['station_id'] = $user->station->id;\n\t\t\t$data['content_type_id'] = ContentType::findContentTypeIDByName('Ad');\n\t\t\t$data['connect_user_id'] = $user->id;\n\t\t\t$data['ad_key'] = $adKey;\n\t\t\t$data['is_temp'] = 0;\n\t\t\t$data['audio_enabled'] = 1;\n\n\t\t\t$connectContent = ConnectContent::create($data);\n\n\t\t\t$attachmentObj->content_id = $connectContent->id;\n\t\t\t$attachmentObj->save();\n\n\t\t\t$connectContent = ConnectContent::findOrFail($connectContent->id);\n\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('attachment_id' => $attachmentObj->id, 'filename' => $attachmentFileName, 'url' => $attachmentObj->saved_path, 'content' => $connectContent)));\n\n\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\t}", "function ajaxAdsReview()\n{\n header('Content-type: application/json');\n\n $retour = new \\stdClass();\n $retour->error = false;\n $retour->message = 'ok';\n\n $fields = $_POST['fields'];\n $fields = json_decode(stripslashes($fields));\n\n $refClient = $fields->choisir_client_leboncoin; // vaut false si prospect ou nouveau ou ref_eleve (si !prospect )\n\n $phone = $fields->phone;\n\n if (! $phone) {\n $phone = 'pas-de-num';\n }\n\n $lbcProcessMg = new \\spamtonprof\\stp_api\\LbcProcessManager();\n $lbcAcctMg = new \\spamtonprof\\stp_api\\LbcAccountManager();\n\n $ads = $lbcProcessMg->generateAds($refClient, 50, $phone);\n $lbcAccts = $lbcAcctMg->getAll(array(\n 'ref_client' => $refClient\n ));\n\n $emails = [];\n foreach ($lbcAccts as $lbcAcct) {\n $emails[] = $lbcAcct->getMail();\n }\n\n // récupération des prénoms du client\n \n $clientMg = new \\spamtonprof\\stp_api\\LbcClientManager();\n $client = $clientMg->get(array('ref_client' => $refClient));\n \n $prenomMg = new \\spamtonprof\\stp_api\\PrenomLbcManager();\n $prenoms = $prenomMg -> getAll(array('ref_cat_prenom' => $client->getRef_cat_prenom()));\n \n \n \n // récupération des réponses du client\n $texteMg = new \\spamtonprof\\stp_api\\LbcTexteManager();\n $reponses = $texteMg -> getAll(array(\"ref_type_texte\" => $client->getRef_reponse_lbc()));\n \n \n $retour->phone = $phone;\n $retour->refClient = $refClient;\n $retour->ads = $ads;\n $retour->emails = $emails;\n $retour->prenoms = $prenoms;\n $retour->reponses = $reponses;\n \n \n \n echo (json_encode($retour));\n\n die();\n}", "public function create()\n {\n if (Auth::guest()) {\n return redirect()->route('login');\n }\n\n $region = DB::table('region')->get();\n $parent_cat = Category::select('name','slug','icon', 'image')->where('status', 1)->where('parent_id',0)->get();\n\n $featured = FeaturedAds::first();\n\n $ads_type = Ads::$TYPE;\n \n return view('ads.create', compact('region', 'parent_cat', 'featured', 'ads_type'));\n }", "public function createAd(Request $request, EntityManagerInterface $manager) : Response\n {\n $ad = new Ad();\n $form = $this->createForm(AdType::class, $ad);\n $form->handleRequest($request);\n if($form->isSubmitted() && $form->isValid()){\n\n\n// $ad->initSlug();\n foreach($ad->getImages() as $image) {\n $image->setAd($ad);\n $manager->persist($image);\n }\n\n $ad->setAuthor($this->getUser());\n\n\n\n $manager->persist($ad);\n $manager->flush();\n// dump($ad);\n\n $this->addFlash(\n 'success',\"L'annonce: {$ad->getTitle()} est bien créée\"\n );\n return $this->redirectToRoute('show_ad',['slug' =>$ad->getSlug()]);\n\n\n }\n\n\n\n return $this->render('ad/new.html.twig', [\n 'form' => $form->createView()\n ]);\n }", "public function add() {\n\n if ($this -> input -> server('REQUEST_METHOD') == 'POST') {\n \n //Add Advertisement \n if(!$this -> input -> post('home_page'))\n {\n $this -> form_validation -> set_rules('MainCategoryId', 'Category', 'trim|required|xss_clean');\n } \n $this -> form_validation -> set_rules('AdvertisementTitle', 'Advertisement Title', 'trim|required|xss_clean'); \n $this -> form_validation -> set_rules('AdvertisementDescription', 'Description', 'trim|required|xss_clean'); \n $this -> form_validation -> set_rules('AdvertisementUrl', 'Advertisement Url', 'trim|required|xss_clean'); \n $this -> form_validation -> set_rules('StartDate', 'Start date', 'trim|required|xss_clean');\n $this -> form_validation -> set_rules('EndDate', 'End Date', 'trim|required|xss_clean');\n \n $client_type = $this -> input -> post('client_type');\n \n if($client_type == 'new' )\n {\n $this -> form_validation -> set_rules('CompanyName', 'Company Name', 'trim|required|xss_clean');\n $this -> form_validation -> set_rules('ClientEmail', 'Client Email', 'trim|required|xss_clean');\n $this -> form_validation -> set_rules('ContactNumber', 'Contact Number', 'trim|required|xss_clean');\n $this -> form_validation -> set_rules('ContactPerson', 'Contact Person', 'trim|required|xss_clean');\n }else if($client_type == 'existing' ){ \n $this -> form_validation -> set_rules('RetailerId', 'Retailer', 'trim|required|xss_clean');\n $this -> form_validation -> set_rules('StoreTypeId', 'Store Format', 'trim|required|xss_clean');\n $this -> form_validation -> set_rules('StoreId', 'Store', 'trim|required|xss_clean'); \n }\n\n if (!$this -> form_validation -> run() == FALSE) {\n\n $result = array();\n $image_path = \"\";\n\n //If image uploaded\n if (!empty($_FILES['AdvertisementImage']['name'])) {\n $result = $this -> do_upload('AdvertisementImage', 'advertisements', $this -> input -> post('image-x'), $this -> input -> post('image-y'), $this -> input -> post('image-width'), $this -> input -> post('image-height'));\n $image_path = $result['upload_data']['file_name'];\n }\n if (!isset($result['error'])) {\n $data = array(\n 'MainCategoryId' => $this -> input -> post('MainCategoryId'),\n 'AdvertisementTitle' => $this -> input -> post('AdvertisementTitle'),\n 'AdvertisementDescription' => $this -> input -> post('AdvertisementDescription'), \n 'AdvertisementUrl' => $this -> input -> post('AdvertisementUrl'), \n 'StartDate' => $this -> input -> post('StartDate'),\n 'EndDate' => $this -> input -> post('EndDate'), \n 'AdvertisementImage' => $image_path,\n 'home_page' => $this -> input -> post('home_page'),\n 'ClientType' => $this -> input -> post('client_type'),\n 'CompanyName' => $this -> input -> post('CompanyName'),\n 'ClientEmail' => $this -> input -> post('ClientEmail'),\n 'ContactNumber' => $this -> input -> post('ContactNumber'),\n 'ContactPerson' => $this -> input -> post('ContactPerson'),\n 'RetailerId' => $this -> input -> post('RetailerId'),\n 'StoreTypeId' => $this -> input -> post('StoreTypeId'),\n 'StoreId' => $this -> input -> post('StoreId'),\n 'CreatedBy' => $this -> session -> userdata('user_id'),\n 'CreatedOn' => date('Y-m-d H:i:s'),\n 'IsActive' => 1\n );\n $result = $this -> advertisementsmodel -> add_advertisement($data);\n if ($result) {\n $this -> session -> set_userdata('success_message', \"Advertisement added successfully\");\n $this -> result = 1;\n $this -> message = 'Advertisement added successfully';\n }else {\n $this -> session -> set_userdata('error_message', \"Failed to add advertisement\");\n $this -> result = 0;\n $this -> message = 'Failed to add advertisement';\n }\n redirect('/advertisements', 'refresh');\n exit(0);\n }\n else { \n // code to display error while image upload\n $this -> session -> set_userdata('error_message', $result['error']);\n $this -> result = 0;\n $this -> message = $result['error'];\n }\n }else{\n //echo validation_errors();\n }\n }\n\n $this -> breadcrumbs[0] = array('label' => 'Ads Management', 'url' => '');\n $this -> breadcrumbs[1] = array('label' => 'Advertisements', 'url' => '/advertisements');\n $this -> breadcrumbs[2] = array('label' => 'Add Advertisement', 'url' => 'advertisements/add');\n\n $data['title'] = $this -> page_title;\n $data['breadcrumbs'] = $this -> breadcrumbs;\n \n $data['main_categories'] = $data['parent_category'] = $data['sub_category'] = array();\n $data['main_categories'] = $this -> categorymodel -> get_main_categories();\n $data['retailers'] = $this -> retailermodel -> get_retailers();\n \n $this -> template -> view('admin/advertisements/add', $data);\n }", "public function addAdvertiesment()\r\n {\r\n fn_is_logged_in();\r\n\r\n $user_id = $this->session->userdata('logged_in_user_id');\r\n $advertiesment_details_id = $this->input->post('advertiesment_details_id');\r\n $newspaper_id = $this->input->post('newspaper_id');\r\n\r\n $booking_date = Date(DATETIME_FORMAT_1);\r\n $booking_number = fn_unique_code(3,2);\r\n\r\n $advertiesment_name = $this->input->post('advertiesment_name');\r\n //$advertiesment_height = $this->input->post('advertiesment_height');\r\n //$advertiesment_width = $this->input->post('advertiesment_width');\r\n $advertiesment_amount = $this->input->post('advertiesment_amount');\r\n //$category_type = $this->input->post('category_type');\r\n $description = $this->input->post('description');\r\n\r\n if ( (isset($user_id) && ($user_id != \"\"))\r\n && (isset($advertiesment_details_id) && ($advertiesment_details_id != \"\"))\r\n && (isset($newspaper_id) && ($newspaper_id != \"\"))\r\n && (isset($advertiesment_name) && ($advertiesment_name != \"\"))\r\n && (isset($advertiesment_amount) && ($advertiesment_amount != \"\"))\r\n && (isset($description) && ($description != \"\")) \r\n && (isset($booking_date) && ($booking_date != \"\"))\r\n && (isset($booking_number) && ($booking_number != \"\"))\r\n )\r\n {\r\n $data = Array(\r\n 'users_id' => $user_id, \r\n 'advertiesment_details_id' => $advertiesment_details_id,\r\n 'newspaper_id' => $newspaper_id,\r\n 'advertiesment_name' => $advertiesment_name,\r\n 'advertiesment_amount' => $advertiesment_amount,\r\n 'description' => $description,\r\n 'booking_date' => $booking_date,\r\n 'booking_number' => $booking_number,\r\n );\r\n $new_advertiesment_id = $this->Advertiesment_model->addAdvertiesment($data);\r\n\r\n if (isset($new_advertiesment_id))\r\n { \r\n $sess_data = array(\r\n 'success' => true,\r\n 'message' => 'Booking Done Successfully',\r\n );\r\n $this->session->set_flashdata($sess_data);\r\n\r\n redirect(base_url().\"advertiesment/advertiesment_details/advertiesment_details_id/\".$advertiesment_details_id);\r\n // $result = 'Advertiesment added Successfully';\r\n // echo $result; \r\n }\r\n else\r\n { \r\n $sess_data = array(\r\n 'success' => false,\r\n 'message' => 'No Booking Done',\r\n );\r\n $this->session->set_flashdata($sess_data);\r\n\r\n redirect(base_url().\"advertiesment/advertiesment_details/advertiesment_details_id/\".$advertiesment_details_id);\r\n \r\n /*$result = 'No Advertiesment added';\r\n echo $result;*/ \r\n } \r\n }\r\n else\r\n {\r\n $sess_data = array(\r\n 'success' => false,\r\n 'message' => 'All fields are required',\r\n );\r\n $this->session->set_flashdata($sess_data);\r\n\r\n redirect(base_url().\"advertiesment/advertiesment_details/advertiesment_details_id/\".$advertiesment_details_id);\r\n\r\n // $result = 'All fields are required';\r\n // echo $result; \r\n }\r\n \r\n }", "function addCreditCard($userDetails){\n\ttry{\n\t\t$cardRegister = new \\MangoPay\\CardRegistration();\n\t\t$cardRegister->UserId \t= $userDetails['userAccountId'];\n\t\t$cardRegister->Currency = $userDetails['userCurrency'];\n\t\t$createdCardRegister = $mangoPayApi->CardRegistrations->Create($cardRegister);\n\t\t$data\n\t\t\n\t\t$handle = curl_init();\n\t\tcurl_setopt($handle, CURLOPT_URL, $url);\n\t\tcurl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);\n\t\tcurl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($handle, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); \n\t\tcurl_setopt($handle, CURLOPT_POST, true);\n\t\tcurl_setopt($handle, CURLOPT_POSTFIELDS, $data);\n\t\t$response = curl_exec($handle);\n\t\t\n\t\t\n\t\t\n\t}\n\tcatch(Exception $e) {\n\t\treturn $e;//error in field values\n\t}\n\n}", "public function postCreateAdsense()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->adsenseForm->validate(Input::all());\n\n\n\t\t\t// Check if user has Adsense already set up\n\t\t\t$userId = Sentry::getUser()->id;\n\t\t\t$userAdsense = Adsense::whereUserId($userId)->first();\n\n\t\t\t// If User doesn't have Adsense table\n\t\t\tif(! $userAdsense)\n\t\t\t{\n\t\t\t\t$userAdsense = new Adsense;\n\t\t\t\t$userAdsense->user_id = Sentry::getUser()->id;\n\t\t\t}\n\n\t\t\t// Set the data\n\t\t\t$userAdsense->label\t\t\t= e(Input::get('label'));\n\t\t\t$userAdsense->publisher_id\t= Input::get('publisher_id');\n\t\t\t$userAdsense->ads\t\t\t= $this->setAdsArray();\n\n\t\t\t// Was the project created?\n\t\t\tif($userAdsense->save())\n\t\t\t{\n\t\t\t\t// Redirect to the new project page\n\t\t\t\tFlash::success('Your Adsense ad codes have been updated.');\n\n\t\t\t\treturn Redirect::route('adsense');\n\t\t\t}\n\n\t\t\t// Redirect to the project create page\n\t\t\tFlash::danger('Something went wrong.');\n\n\t\t\treturn Redirect::route('adsense');\n\t\t}\n\t\tcatch (FormValidationException $e)\n\t\t{\n\t\t\treturn Redirect::back()->withInput()->withErrors($e->getErrors());\n\t\t}\n\t}", "public function createImageFeaturesAsync($request) \n {\n $returnType = '';\n $isBinary = true;\n $hasReturnType = false;\n $request = $this->getHttpRequest($request, 'POST');\n $options = $this->createHttpClientOptions();\n\n return $this->client\n ->sendAsync($request, $options)\n ->then(\n function ($response) use ($request, $hasReturnType, $returnType, $isBinary) {\n return $this->processResponse($request, $response, $hasReturnType, $returnType, $isBinary);\n },\n function ($exception) use ($request) {\n $this->processException($exception);\n }\n );\n }", "public function addAsync(array $params = [])\n {\n return $this->handleMiddleware('add', $params, function(MiddlewareRequest $request) {\n $params = $request->getApiMethodArguments();\n $accountId = isset($params['account_id']) ? $params['account_id'] : null;\n $propertySetId = isset($params['property_set_id']) ? $params['property_set_id'] : null;\n $sessionId = isset($params['session_id']) ? $params['session_id'] : null;\n $fileName = isset($params['file_name']) ? $params['file_name'] : null;\n $file = isset($params['file']) ? $params['file'] : null;\n $response = $this->apiInstance->propertyFilesAddAsync($accountId, $propertySetId, $sessionId, $fileName, $file);\n return $response;\n });\n }", "function add() {\n if($this->request->isAsyncCall() || ($this->request->isApiCall() && $this->request->isSubmitted()) || true) {\n if(Invoices::canAdd($this->logged_user)) {\n $default_currency = Currencies::getDefault();\n \n if(!($default_currency instanceof Currency)) {\n $this->response->notFound();\n } // if\n\n $invoice_data = $this->request->post('invoice');\n \n if(!is_array($invoice_data)) {\n $duplicate_invoice_id = $this->request->getId('duplicate_invoice_id');\n \n // Duplicate an existing invoice\n if($duplicate_invoice_id) {\n $duplicate_invoice = Invoices::findById($duplicate_invoice_id);\n if($duplicate_invoice instanceof Invoice) {\n $invoice_data = array(\n 'company_id' => $duplicate_invoice->getCompanyId(),\n 'company_address' => $duplicate_invoice->getCompanyAddress(),\n 'private_note' => $duplicate_invoice->getPrivateNote(),\n 'status' => INVOICE_STATUS_DRAFT,\n 'project_id' => $duplicate_invoice->getProjectId(),\n 'note' => $duplicate_invoice->getNote(),\n 'currency_id' => $duplicate_invoice->getCurrencyId(),\n 'payment_type' => $duplicate_invoice->getAllowPayments(),\n 'second_tax_is_compound' => $duplicate_invoice->getSecondTaxIsCompound(),\n 'language_id' => $duplicate_invoice->getLanguageId()\n );\n \n if(is_foreachable($duplicate_invoice->getItems())) {\n $invoice_data['items'] = array();\n foreach($duplicate_invoice->getItems() as $item) {\n $invoice_data['items'][] = array(\n 'description' => $item->getDescription(),\n 'unit_cost' => $item->getUnitCost(),\n 'quantity' => $item->getQuantity(),\n 'first_tax_rate_id' => $item->getFirstTaxRateId(),\n 'second_tax_rate_id' => $item->getSecondTaxRateId(),\n 'total' => $item->getTotal(),\n 'subtotal' => $item->getSubtotal(),\n );\n } // foreach\n } // if\n } // if\n } // if\n \n // Blank invoice\n if(!is_array($invoice_data)) {\n $invoice_data = array(\n 'due_on' => null,\n 'currency_id' => $default_currency->getId(),\n 'time_record_ids' => null,\n 'payment_type' => -1,\n 'second_tax_is_compound' => $this->active_invoice->getSecondTaxIsCompound()\n );\n } // if\n } // if\n\n $this->response->assign('invoice_data', $invoice_data);\n $this->response->assign(Invoices::getSettingsForInvoiceForm($this->active_invoice));\n \n if($this->request->isSubmitted()) {\n \ttry {\n \tDB::beginWork('Creating a new invoice @ ' . __CLASS__);\n\n if (!is_foreachable($invoice_data['items'])) {\n throw new Error(lang('Invoice items data is not valid. All descriptions are required and there need to be at least one unit with cost set per item!'));\n } // if\n\n \t$this->active_invoice->setAttributes($invoice_data);\n \t $this->active_invoice->setCreatedBy($this->logged_user);\n\n if ($this->active_invoice->getSecondTaxIsEnabled()) {\n $this->active_invoice->setSecondTaxIsCompound(array_var($invoice_data, 'second_tax_is_compound', false));\n } // if\n\n $this->active_invoice->setItems($invoice_data['items']);\n $this->active_invoice->setState(STATE_VISIBLE);\n $this->active_invoice->save();\n\n \t DB::commit('Invoice created @ ' . __CLASS__);\n \t \n $this->response->respondWithData($this->active_invoice, array(\n \t'as' => 'invoice', \n 'detailed' => true,\n ));\n \t \n \t} catch (Exception $e) {\n \t DB::rollback('Failed to create invoice @ ' . __CLASS__);\n \t\t$this->response->exception($e);\n \t} // try\n } // if\n } else {\n $this->response->forbidden();\n } // if\n } else {\n $this->response->badRequest();\n } // if\n }", "public function store(Request $request)\n {\n $url = str_replace(' ', '-', $request->title);\n while (Advertisement::where('url', $url)->count()) {\n $url .= '-';\n }\n $info = array();\n $publish_at_array = \\Morilog\\Jalali\\jDateTime::toGregorian($request->year, $request->month, $request->day);\n $publish_at = strtotime($publish_at_array[0] . '-' . $publish_at_array[1] . '-' . $publish_at_array[2]);\n $advertisement = Advertisement::create(['user_id' => \\Auth::user()->id, 'type' => $request->type, 'name' => $request->name, 'phone' => $request->phone, 'tell' => $request->tell, 'email' => $request->email, 'address' => $request->address, 'title' => $request->title, 'url' => $url, 'description' => $request->description, 'category_id' => intval($request->category_id), 'state' => $request->state, 'city' => '', 'publish_at' => $publish_at, 'expire_at' => 0, 'info' => $info, 'updated_at' => strtotime(date('Y-m-d H:i:s')), 'created_at' => strtotime(date('Y-m-d H:i:s')), 'type_row' => 1]);\n foreach ($request->files as $file)\n foreach ($file as $key => $value) {\n $image = null;\n if (isset($value)) {\n $image = $advertisement->id . time() . md5(pathinfo($value->getClientOriginalName(), PATHINFO_FILENAME)) . '.' . $value->getClientOriginalExtension();\n \\Storage::disk('upload')->makeDirectory('/advertisement/' . $advertisement->id . '/');\n $exists = \\Storage::disk('upload')->has('/advertisement/' . $advertisement->id . '/' . $image);\n if ($exists == null)\n \\Storage::disk('upload')->put('/advertisement/' . $advertisement->id . '/' . $image, \\File::get($value->getRealPath()));\n AdvertisementGallery::create(['advertisement_id' => $advertisement->id, 'image' => $image, 'created_at' => strtotime(date('Y-m-d H:i:s'))]);\n }\n }\n return redirect('dashboard/advertisement/create')->with('success', 'کاربر گرامی ، اطلاعات با موفقیت ثبت شد.');\n }", "function wp_ajax_add_tag()\n {\n }", "public function add_client(array $data);", "public function store(Request $request)\n {\n $request->validate([\n 'titre' => 'required|string|max:255',\n 'description' => 'required|string',\n 'image[]' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n 'price' => 'required|string|max:255'\n ]);\n\n $ad = Ads::create([\n 'titre' => $request->titre,\n 'id' => auth()->user()->id,\n 'description' => $request->description,\n 'price' => $request->price\n ]);\n\n if ($request->hasFile('image')) {\n $images = $request->file('image');\n foreach ($images as $image) {\n $imageName = time() . '.' . $image->extension();\n $image->move(public_path('images'), $imageName);\n\n AdImage::create([\n 'ad_id' => $ad->ad_id,\n 'image_path' => $imageName\n ]);\n }\n }\n\n return redirect()->route('ads')->with('sucess', 'Advertisement created succesfully');\n }", "protected function add() {\n\t}", "public function addShoppingCampaign(AdWordsUser $user, $recordId, $dbHelper, $budgetService, $campaignService, $labelService, $adGroupService, $adGroupCriterionService, $campaignCriterionService) {\n\n// $dbHelper->addToTestTable('Entered Function');\n // Get the services, which loads the required classes.\n// $budgetService = $user->GetService('BudgetService', ADWORDS_VERSION); \n \n \n// $adGroupAdService = $user->GetService('AdGroupAdService', ADWORDS_VERSION);\n \n \n \n //check the budget if avaialble\n $budgetId = 0;\n// $dbHelper->addToTestTable('Services initiated and finding budgets started - api');\n \n $selector = new Selector ();\n $selector->fields = array (\n 'BudgetId'\n // 'Amount','BudgetId','BudgetName','BudgetReferenceCount','BudgetStatus','DeliveryMethod','IsBudgetExplicitlyShared'\n );\n $micro_amount = $this->budget*1000000;\n $selector->predicates[] = new Predicate('Amount', 'EQUALS', $micro_amount);\n $selector->paging = new Paging ( 0, AdWordsConstants::RECOMMENDED_PAGE_SIZE );\n $selector->predicates[] = new Predicate('IsBudgetExplicitlyShared', 'EQUALS', 'TRUE');\n $selector->predicates[] = new Predicate('BudgetStatus', 'NOT_EQUALS', 'REMOVED');\n $selector->paging = new Paging ( 0, 1 );\n $selector->ordering[] = new OrderBy('BudgetId', 'DESCENDING');\n \n $page = $budgetService->get ( $selector );\n if (isset ( $page->entries )) {\n foreach ( $page->entries as $budget ) {\n $budgetId = $budget->budgetId;\n }\n }\n \n// $dbHelper->addToTestTable('Budget finding finished - '.$budgetId);\n \n \n \n \tif($budgetId==0){\n// $dbHelper->addToTestTable('Creating budget started');\n // Create the shared budget (required).\n $budget = new Budget();\n $budget->name = 'Shopping Budget #' . uniqid();\n $budget->period = 'DAILY';\n $budget->amount = new Money($this->budget*1000000);\n $budget->deliveryMethod = 'ACCELERATED';\n $budget->isExplicitlyShared = TRUE;\n\n $operations = array();\n\n // Create operation.\n $operation = new BudgetOperation();\n $operation->operand = $budget;\n $operation->operator = 'ADD';\n $operations[] = $operation;\n\n // Make the mutate request.\n $result = $budgetService->mutate($operations);\n $budget = $result->value[0];\n $budgetId = $budget->budgetId;\n// $dbHelper->addToTestTable('Creating budget finished');\n \t}\n\n $dbHelper->addToTestTable(\"BudgetId = $budgetId\");\n// $campaignService = $user->GetService('CampaignService', ADWORDS_VERSION);\n // Create campaign.\n $campaign = new Campaign();\n $campaign->name = $this->campaignName;\n // The advertisingChannelType is what makes this a Shopping campaign\n $campaign->advertisingChannelType = 'SHOPPING';\n $campaign->status = 'PAUSED';\n\n // Set dedicated budget (required).\n $campaign->budget = new Budget();\n $campaign->budget->budgetId = $budgetId;\n\n // Set bidding strategy (required).\n $biddingStrategyConfiguration = new BiddingStrategyConfiguration();\n $biddingStrategyConfiguration->biddingStrategyType = 'MANUAL_CPC';\n\n $campaign->biddingStrategyConfiguration = $biddingStrategyConfiguration;\n\n // All Shopping campaigns need a ShoppingSetting.\n $shoppingSetting = new ShoppingSetting();\n $shoppingSetting->salesCountry = $this->country;\n $shoppingSetting->campaignPriority = $this->priority;\n $shoppingSetting->merchantId = $this->merchantId;\n // Set to \"true\" to enable Local Inventory Ads in your campaign.\n $shoppingSetting->enableLocal = true;\n $campaign->settings[] = $shoppingSetting;\n\n $operations = array();\n // Create operation.\n $operation = new CampaignOperation();\n $operation->operand = $campaign;\n $operation->operator = 'ADD';\n $operations[] = $operation;\n\n \n \n try {\n// $dbHelper->addToTestTable('Creating campaign initiated - api call');\n // Make the mutate request.\n $result = $campaignService->mutate($operations);\n $campaign = $result->value[0];\n $addedCampaignId = $dbHelper->addCampaign($campaign->id, $campaign->name, $this->merchantId, $recordId);\n $this->campaignStatus = 'Campaign Created';\n// $dbHelper->addToTestTable('Creating campaign finished - api call');\n } catch (Exception $ex) {\n $dbHelper->addToTestTable('Error creating campaign - '.addslashes($ex->getMessage()));\n //Get campaign Id, if campaign already exist\n if(strpos($ex->getMessage(),'DUPLICATE_CAMPAIGN_NAME')!==FALSE)\n {\n \n $campaign = GetCampaignByName($user, $campaignService, $this->campaignName);\n $addedCampaignId = $dbHelper->getCampaignId($campaign->id, $campaign->name, $this->merchantId, $recordId);\n $this->campaignStatus = 'Campaign Skipped';\n }\n else\n {\n $this->campaignStatus = 'Campaign Error';\n return array($this->campaignStatus,$this->adgroupStatus,$this->productStatus);\n }\n }\n// $dbHelper->addToTestTable('Geting labels initiated');\n // Create selector.\n $selector = new Selector();\n $selector->fields = array('LabelId', 'LabelName');\n $selector->ordering[] = new OrderBy('LabelName', 'ASCENDING');\n $selector->predicates[] = new Predicate('LabelName', 'EQUALS', $this->label );\n \n $deatil_label = array();\n $operationce = array();\n $operationz = array();\n \n// $dbHelper->addToTestTable('Geting labels initiated - api');\n \n// $labelService = $user->GetService('LabelService', ADWORDS_VERSION);\n \n // Make the get request.\n $page = $labelService->get($selector);\n// $dbHelper->addToTestTable('Geting labels finished - api');\n // Display results.\n if (isset($page->entries)) {\n foreach ($page->entries as $label) {\n $deatil_label[] = $label->id;\n }\n } \n \n if(count($deatil_label)>0)\n {\n// $dbHelper->addToTestTable('Creating campaign labels initiated for existing labels');\n // Label already exist, assign to campaign\n $label = new CampaignLabel();\n $label->campaignId = $campaign->id;\n $label->labelId = $deatil_label[0];\n \n $operation = new CampaignLabelOperation();\n $operation->operator = 'ADD';\n $operation->operand = $label;\n $operationz[] = $operation;\n }\n else\n {\n// $dbHelper->addToTestTable('Creating text labels initiated');\n //Label not exist, create label first then assign to campaign\n $label = new TextLabel();\n $label->name = $this->label;\n \n $operation = new LabelOperation();\n $operation->operand = $label;\n $operation->operator = 'ADD';\n $operationce[] = $operation;\n \n try {\n// $dbHelper->addToTestTable('Creating text labels initiated - api');\n $result = $labelService->mutate($operationce);\n// $dbHelper->addToTestTable('Creating text labels finished - api');\n } catch (Exception $ex) {\n $dbHelper->addToTestTable('Error creating label - '.addslashes($ex->getMessage()));\n echo $ex;\n }\n// $dbHelper->addToTestTable('Creating campaign labels initiated for new text labels');\n $label = new CampaignLabel();\n $label->campaignId = $campaign->id;\n $label->labelId = $result->value[0]->id;\n \n $operation = new CampaignLabelOperation();\n $operation->operator = 'ADD';\n $operation->operand = $label;\n $operationz[] = $operation;\n \n }\n try {\n// $dbHelper->addToTestTable('Creating campaign labels initiated - api');\n $campaignService->mutateLabel($operationz);\n// $dbHelper->addToTestTable('Creating campaign labels finished - api');\n }\n catch(Exception $Ex) {\n $dbHelper->addToTestTable('Error mutating label - '.addslashes($ex->getMessage()));\n }\n\n// $dbHelper->addToTestTable('Creating adgroups');\n// $adGroupService = $user->GetService('AdGroupService', ADWORDS_VERSION);\n // Create ad group.\n $adGroup = new AdGroup();\n $adGroup->campaignId = $campaign->id;\n $adGroup->name = $this->adgroupName;\n $adGroup->status = 'PAUSED';\n\n unset($operations);\n $operations = array();\n // Create operation.\n $operation = new AdGroupOperation();\n $operation->operand = $adGroup;\n $operation->operator = 'ADD';\n $operations[] = $operation;\n \n $isAdGroupNew = false;\n \n try{\n// $dbHelper->addToTestTable('Creating adgroups - api');\n // Make the mutate request.\n $result = $adGroupService->mutate($operations);\n// $dbHelper->addToTestTable('Creating adgroups finished - api');\n $adGroup = $result->value[0];\n $createdAdgroupId = $dbHelper->addAdgroup($adGroup->id, $adGroup->name, \n $addedCampaignId, $this->merchantId, $recordId);\n $this->adgroupStatus = 'Adgroup Created';\n } catch (Exception $ex){\n $dbHelper->addToTestTable('Error creating adgroup - '.addslashes($ex->getMessage()));\n \n// $dbHelper->addToTestTable('Getting adgroups - api');\n $adGroupsArray = $this->GetAdGroups($user, $campaign->id);\n// $dbHelper->addToTestTable('Getting adgroups finished - api');\n foreach ($adGroupsArray as $key => $val){\n if($val == $this->adgroupName){\n \n $adGroup->id = $key;\n $adGroup->name = $val;\n $isAdGroupNew = true;\n if(strpos($ex->getMessage(),'DUPLICATE_ADGROUP_NAME')!==FALSE) {\n $this->adgroupStatus = 'Adgroup Skipped';\n if(!$dbHelper->isAdgroupExist($val, $addedCampaignId)){\n $createdAdgroupId = $dbHelper->addAdgroup($key, $val, $addedCampaignId, $this->merchantId, $recordId);\n }else{\n $createdAdgroupId = $dbHelper->updateAdgroup($val, $recordId);\n }\n }\n else {\n $this->adgroupStatus = 'Adgroup Error';\n return array($this->campaignStatus,$this->adgroupStatus,$this->productStatus);\n }\n }\n }\n }\n\n// $dbHelper->addToTestTable('Set targetting - api');\n // Set Campaign Target Criteria \n $this->AddCampaignTargetingCriteria($user, $campaign->id, $campaignCriterionService);\n\n// $dbHelper->addToTestTable('Set targetting finished - api');\n \n // Creating Product partition\n try {\n $this->addProductPartitionTree($user, $adGroup->id, $isAdGroupNew, $dbHelper, \n $createdAdgroupId, $campaign->id, $recordId, $adGroupCriterionService);\n $this->productStatus = 'Product Group Created';\n } catch (Exception $e) {\n $dbHelper->addToTestTable('Error creating product group - '.addslashes($ex->getMessage()));\n if(strpos($e->getMessage(), 'PRODUCT_PARTITION_ALREADY_EXISTS')) {\n $this->productStatus = 'Product Group Skipped';\n } else {\n $this->productStatus = 'Product Group Error';\n }\n }\n\n //Return Sataus of each operation\n return array($this->campaignStatus,$this->adgroupStatus,$this->productStatus);\n }", "public function create( StoreAdWizardRequest $request )\n {\n try {\n // get first fb account\n $account = Auth::user()->accounts()->where('is_selected', 1)->first();\n\n $fb = $account->accessFacebook();\n\n // create campaign\n $campaign = $this->campaignRepository->create ( $request, $account );\n\n // create ad set\n $adsets = $this->adSetRepository->create ( $request, $campaign );\n\n // create creatives/ads\n $ads = $this->adRepository->create ( $request, $adsets );\n\n return $this->response([ \n 'account' => $account,\n 'campaign' => $campaign,\n 'adSets' => $adsets,\n 'ads' => $ads\n ]);\n }\n catch(Exception $e) {\n return $this->setError([ 'FB' => [$e->getMessage()] ])\n ->error(null);\n }\n }", "function template_preprocess_multibanner_add_list(&$variables) {\n $variables['bundles'] = [];\n if (!empty($variables['content'])) {\n foreach ($variables['content'] as $bundle) {\n /** @var \\Drupal\\multibanner\\MultibannerBundleInterface $bundle */\n $variables['bundles'][$bundle->id()] = [\n 'type' => $bundle->id(),\n 'add_link' => Link::createFromRoute($bundle->label(), 'multibanner.add', ['multibanner_bundle' => $bundle->id()]),\n 'description' => [\n '#markup' => $bundle->getDescription(),\n ],\n ];\n }\n }\n}", "public static function bkap_create_resource( $add_resource_name ) {\n\n\t\t$id = wp_insert_post( array(\n\t\t\t'post_title' => $add_resource_name,\n\t\t\t'menu_order' => 0,\n\t\t\t'post_content' => '',\n\t\t\t'post_status' => 'publish',\n\t\t\t'post_author' => get_current_user_id(),\n\t\t\t'post_type' => 'bkap_resource',\n\t\t), true );\n\n\t\tif ( $id && ! is_wp_error( $id ) ) {\n\t\t\t\n\t\t\tupdate_post_meta( $id, '_bkap_resource_qty', 1 );\n\t\t\tupdate_post_meta( $id, '_bkap_resource_availability', array() );\n\n\t\t\treturn $id;\n\t\t}\n\t}", "function wp_ajax_press_this_add_category()\n {\n }", "public function createTempAd() {\n\n\t\ttry {\n\n\t\t\t$connectContent = ConnectContent::create([\n\t\t\t\t'station_id' \t\t=> \\Auth::User()->station->id,\n\t\t\t\t'content_type_id'\t=> ContentType::findContentTypeIDByName('Ad'),\n\t\t\t\t'connect_user_id'\t=> \\Auth::User()->id,\n\t\t\t\t'is_temp' \t\t\t=> 1\n\t\t\t]);\n\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('id' => $connectContent->id, 'ad_rec_type' => '')));\n\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\n\t}", "function addPostponedclients(Request $request, $id){\n ClientPayments::Create($id,ClientPayments::PaymentValue($id,$request->postponed_value,'دفعات'));\n return back()->with(['success'=>'تم تسديد دفعة بنجاح']);\n }", "public function updateTempAd() {\n\t\ttry {\n\n\t\t\t$field_name = Request::input('name');\n\t\t\t$field_val = Request::input('value');\n\t\t\t$field_id = Request::input('pk');\n\t\t\t$child_content_date_id = Request::input('child_content_date_id');\n\t\t\t$check_client_details = Request::input('check_client_details');\n\t\t\t$check_talkbreak_suggestion = Request::input('check_talkbreak_suggestion');\n\n\t\t\t$contentObj = ConnectContent::find($field_id);\n\n\t\t\tif ($field_name == 'start_date' || $field_name == 'end_date') {\n\t\t\t\t$field_val = parseDateToMySqlFormat($field_val);\n\t\t\t\tif ($field_name == 'start_date') {\n\t\t\t\t\t$date_id = $contentObj->addContentStartDate($child_content_date_id, $field_val);\n\t\t\t\t} else if ($field_name == 'end_date') {\n\t\t\t\t\t$date_id = $contentObj->addContentEndDate($child_content_date_id, $field_val);\n\t\t\t\t}\n\t\t\t\tif ($child_content_date_id != $date_id) {\n\t\t\t\t\t$parent_id = Request::input('parent_content_id');\n\t\t\t\t\tConnectContentBelongs::setChildContentDate($parent_id, $field_id, $date_id);\n\t\t\t\t}\n\n\t\t\t\t$contentObj->updateContentToTagsLink();\n\n\t\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('pk' => $field_id, 'date_id' => $date_id)));\n\t\t\t}\n\n\t\t\tif ($field_name == 'ad_key') {\n\t\t\t\t$field_val = cleanupAdKey($field_val);\n\n\t\t\t\t$existingAdWithKey = ConnectContent::findAdContentOfKey(\\Auth::User()->station->id, $field_val);\n\t\t\t\tif ($existingAdWithKey && $existingAdWithKey->id != $field_id) {\n\t\t\t\t\treturn response()->json(array('code' => 100, 'msg' => 'Duplicate Key Number', 'data' => array('existing_id' => $existingAdWithKey->id, 'pk' => $field_id, 'date_id' => $child_content_date_id)));\n\t\t\t\t}\n\n\t\t\t\t$overwrite_existing = Request::input('overwrite_existing');\n\n\t\t\t\tif (empty($overwrite_existing) || $overwrite_existing == '0') { // should create new ad item\n\n\t\t\t\t\t$clonedContent = $contentObj->copyContent();\n\t\t\t\t\t$clonedContent->ad_key = $field_val;\n\t\t\t\t\t$clonedContent->save();\n\n\t\t\t\t\t$clonedContent->updateContentToTagsLink();\n\n\t\t\t\t\t$clonedContent->searchAudioFileAndLink();\n\n\t\t\t\t\t$clonedContentDate = null;\n\n\t\t\t\t\tif ($child_content_date_id) {\n\t\t\t\t\t\t$originalContentDate = $contentObj->getContentDate($child_content_date_id);\n\t\t\t\t\t\tif ($originalContentDate) {\n\t\t\t\t\t\t\t$clonedContentDate = $clonedContent->getContentDateByDateRange($originalContentDate->start_date, $originalContentDate->end_date);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$clonedContentArray = $clonedContent->toArray();\n\n\t\t\t\t\tif ($clonedContentDate) {\n\t\t\t\t\t\t$start_date = strtotime($clonedContentDate->start_date);\n\t\t\t\t\t\t$clonedContentArray['start_date'] = $start_date === FALSE ? '' : date(\"d-m-Y\", $start_date);\n\n\t\t\t\t\t\t$end_date = strtotime($clonedContentDate->end_date);\n\t\t\t\t\t\t$clonedContentArray['end_date'] = $end_date === FALSE ? '' : date(\"d-m-Y\", $end_date);\n\n\t\t\t\t\t\t$clonedContentArray['child_content_date_id'] = $clonedContentDate->id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$clonedContentArray['start_date'] = '';\n\t\t\t\t\t\t$clonedContentArray['end_date'] = '';\n\t\t\t\t\t\t$clonedContentArray['child_content_date_id'] = '0';\n\t\t\t\t\t}\n\n\t\t\t\t\treturn response()->json(array('code' => 200, 'msg' => 'Success with Clone', 'data' => array('newObj' => $clonedContentArray, 'pk' => $field_id, 'date_id' => $child_content_date_id )));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($field_name == 'content_rec_type' && $field_val == 'live') {\n\t\t\t\t$contentObj->audio_enabled = 1;\n\t\t\t}\n\n\t\t\tif($field_name == 'map_address1') {\n\t\t\t\t$map_address = $field_val;\n\t\t\t\tif(!empty($map_address)) {\n\t\t\t\t\t$geoInfo = getGEOFromAddress($map_address);\n\t\t\t\t}\n\t\t\t\tif (!empty($geoInfo)) {\n\t\t\t\t\t$contentObj->map_address1_lat = $geoInfo['lat'];\n\t\t\t\t\t$contentObj->map_address1_lng = $geoInfo['lng'];\n\t\t\t\t} else {\n\t\t\t\t\t$contentObj->map_address1_lat = '';\n\t\t\t\t\t$contentObj->map_address1_lng = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// autocomplete for client name\n\t\t\tif ($field_name == 'who' && $check_client_details) {\n\t\t\t\t$client = ConnectContentClient::GetConnectContentByTradingName($field_val, $contentObj->station_id);\n\t\t\t\tif ($client) { // client information is found, we copy them\n\t\t\t\t\t$contentObj->copyContentOfClient($client);\n\t\t\t\t\t$contentObj->updateWhoAndWhatForTagsAndEvents();\n\t\t\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('pk' => $field_id, 'date_id' => $child_content_date_id, 'require_reload' => 1)));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t\t// autocomplete for talk break\n\t\t\tif (($field_name == 'what' || $field_name == 'who') && $check_talkbreak_suggestion) {\n\t\t\t\t$autoSuggestId = Request::input(\"autoSuggestContentId\");\n\t\t\t\t\n\t\t\t\tif ($field_name == 'what') {\n\t\t\t\t\t$suggestedObjByText = ConnectContent::GetTalkBreakByWhat(\\Auth::User()->station->id, $field_val);\n\t\t\t\t} else if ($field_name == 'who') {\n\t\t\t\t\t$suggestedObjByText = ConnectContent::GetTalkBreakByWho(\\Auth::User()->station->id, $field_val);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$suggestedObjById = ConnectContent::find($autoSuggestId);\n\t\t\t\t\n\t\t\t\t$suggestedObj = null;\n\t\t\t\t\n\t\t\t\tif ($suggestedObjByText) {\n\t\t\t\t\t$suggestedObj = $suggestedObjByText;\n\t\t\t\t\tif ($suggestedObjById && ((strcasecmp($suggestedObjById->what, $field_val) == 0 && $field_name == 'what') || (strcasecmp($suggestedObjById->who, $field_val) == 0 && $field_name == 'who'))) {\n\t\t\t\t\t\t$suggestedObj = $suggestedObjById;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tagId = Request::input('tagId');\n\t\t\t\t$tagForContent = Tag::find($tagId);\n\t\t\t\t\n\t\t\t\t// found autocomplete suggestion?\n\t\t\t\tif ($tagForContent) {\n\t\t\t\t\t$newContentObj = null;\n\t\t\t\t\tif ($suggestedObj) {\n\t\t\t\t\t\t$newContentObj = $suggestedObj->copyContent();\n\t\t\t\t\t} else if (!$contentObj->isContentTalkBreak()) {\n\t\t\t\t\t\t$newContentObj = $contentObj->createTalkBreakFromContent();\n\t\t\t\t\t\tif ($field_name == 'what') {\n\t\t\t\t\t\t\t$newContentObj->what = $field_val;\n\t\t\t\t\t\t} else if ($field_name == 'who') {\n\t\t\t\t\t\t\t$newContentObj->who = $field_val;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$newContentObj->save();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($newContentObj) {\n\t\t\t\t\t\t$tagForContent->connect_content_id = $newContentObj->id;\n\t\t\t\t\t\t$tagForContent->save();\n\t\t\t\t\t\t$newContentObj->updateWhoAndWhatForTagsAndEvents();\n\t\t\t\t\t\t$newContentObj->sendCompetitonResultGenerationRequest(); // send competition generation request\n\t\t\t\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('pk' => $field_id, 'require_reload' => 1)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// autocomplete for talk break - vote\n\t\t\tif ($field_name == 'vote_question' && $check_talkbreak_suggestion) {\n\t\t\t\t$autoSuggestId = Request::input(\"autoSuggestContentId\");\n\t\t\n\t\t\t\t$suggestedObjByText = ConnectContent::GetTalkBreakByVoteQuestion(\\Auth::User()->station->id, $field_val);\n\t\t\t\n\t\t\t\t$suggestedObjById = ConnectContent::find($autoSuggestId);\n\t\t\t\n\t\t\t\t$suggestedObj = null;\n\t\t\t\n\t\t\t\tif ($suggestedObjByText) {\n\t\t\t\t\t$suggestedObj = $suggestedObjByText;\n\t\t\t\t\tif ($suggestedObjById && strcasecmp($suggestedObjById->vote_question, $field_val) == 0) {\n\t\t\t\t\t\t$suggestedObj = $suggestedObjById;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\t$tagId = Request::input('tagId');\n\t\t\t\t$tagForContent = Tag::find($tagId);\n\t\t\t\n\t\t\t\t// found autocomplete suggestion?\n\t\t\t\tif ($tagForContent) {\n\t\t\t\t\t$newContentObj = null;\n\t\t\t\t\tif ($suggestedObj) {\n\t\t\t\t\t\t$newContentObj = $suggestedObj->copyContent();\n\t\t\t\t\t} else if (!$contentObj->isContentTalkBreak()) {\n\t\t\t\t\t\t$newContentObj = $contentObj->createTalkBreakFromContent();\n\t\t\t\t\t\t$newContentObj->vote_question = $field_val;\n\t\t\t\t\t\t$newContentObj->save();\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tif ($newContentObj) {\n\t\t\t\t\t\tif ($tagForContent->setTagWithVote($newContentObj)) {\n\t\t\t\t\t\t\t$newContentObj->sendEventUpdateNotificationForContent();\n\t\t\t\t\t\t\t$newContentObj->sendVoteResultGenerationRequest(); // send vote generation request\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('pk' => $field_id, 'require_reload' => 1)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\n\t\t\t$contentObj->$field_name = $field_val;\n\n\t\t\t//Updating actions\n\t\t\tif($field_name == 'action_params') {\n\t\t\t\t$action_types = array();\n\n\t\t\t\t$actions = \\App\\ConnectContentAction::orderBy('id', 'desc')->get();\n\n\t\t\t\tforeach($actions as $action) {\n\t\t\t\t\t$action_types[$action['id']] = $action['action_type'] ;\n\t\t\t\t}\n\t\t\t\tif($field_val) {\n\t\t\t\t\tif ($contentObj->action_id == 0) {\n\t\t\t\t\t\t$contentObj->$field_name = '{\"website\":\"' . $field_val . '\"}';\n\t\t\t\t\t} else if ($action_types[$contentObj->action_id] == 'website' || $action_types[$contentObj->action_id] == 'get' || $action_types[$contentObj->action_id] == 'call') {\n\t\t\t\t\t\t$contentObj->$field_name = '{\"website\":\"' . $field_val . '\"}';\n\t\t\t\t\t} else if ($action_types[$contentObj->action_id] == 'phone' || $action_types[$contentObj->action_id] == 'sms') {\n\t\t\t\t\t\t$contentObj->$field_name = '{\"phone\":\"' . $field_val . '\"}';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$contentObj->$field_name = '';\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$contentObj->save();\n\t\t\t\n\t\t\t// for vote\n\t\t\tif ($field_name == 'vote_question' || $field_name == 'vote_option_1' || $field_name == 'vote_option_2') {\n\t\t\t\t$contentObj->sendEventUpdateNotificationForContent();\n\t\t\t}\n\t\t\t\n\t\t\tif ($field_name == 'vote_duration_minutes') {\n\t\t\t\t$tagId = Request::input('tagId');\n\t\t\t\t$tagForContent = Tag::find($tagId);\n\t\t\t\tif ($tagForContent) {\n\t\t\t\t\t$tagForContent->updateVoteDurationForTag($contentObj);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t\tif ($field_name == 'ad_key') {\n\t\t\t\t$contentObj->updateContentToTagsLink();\n\t\t\t\t$contentObj->searchAudioFileAndLink();\n\t\t\t}\n\n\t\t\tif ($field_name == 'who' || $field_name == 'what') {\n\t\t\t\t$contentObj->updateWhoAndWhatForTagsAndEvents();\n\t\t\t}\n\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('pk' => $field_id, 'date_id' => $child_content_date_id, 'content' => $contentObj)));\n\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\t}", "public function addNewBanner() {\n $_PUT = $this->getPutData();\n $data = isset($_PUT) ? $_PUT : $_POST;\n\n\n if (!isset($data)) {\n\n throw new RestException(HttpStatusCodes::BAD_REQUEST, \"Missing required params\");\n }\n try {\n if (isset($_POST) && isset($data['width']) && filter_var($data['width'], FILTER_VALIDATE_INT) && filter_var($data['height'], FILTER_VALIDATE_INT) && isset($data['height']) && isset($data['name']) && isset($data['content'])) {\n return Banner::addNewBanner($data);\n } else if (isset($_PUT) && filter_var($data['id'], FILTER_VALIDATE_INT)) {\n return Banner::updateBanner($data);\n } else {\n throw new RestException(HttpStatusCodes::BAD_REQUEST, \"Not valid data.\");\n }\n\n http_response_code(HttpStatusCodes::CREATED);\n } catch (Exception $e) {\n throw new RestException($e->getCode(), $e->getMessage());\n }\n }", "public function handleAdd()\n {\n $this->layout->content = View::make('grievance::grievance-add');\n }", "public function addThirdPartyVendor(Request $request){\n // return $request->all();\n\n if (isset($request->third_party_vendors)) {\n $restaurantThirdPartyVendors = RestaurantSettingsThirdPartyVendor::where('restaurant_id', Auth::guard('restaurantUser')->user()->restaurant_id)->get();\n\n for ($i = 0; $i < count($request->third_party_vendors); $i++) {\n\n //check for availability\n $status = false;\n\n foreach ($restaurantThirdPartyVendors as $key => $restaurantThirdPartyVendor) {\n if ($restaurantThirdPartyVendor->third_party_vendors_id == $request->third_party_vendors[$i]) {\n $status = true;\n\n }\n }\n\n if ($status == false) {\n $socialLink = new RestaurantSettingsThirdPartyVendor;\n $socialLink->third_party_vendors_id = $request->third_party_vendors[$i];\n $socialLink->restaurant_id = Auth::guard('restaurantUser')->user()->restaurant_id;\n $socialLink->user_id = Auth::guard('restaurantUser')->id();\n $socialLink->save();\n }\n\n }\n }\n\n return response()->json(['success'=> 'created successfully'], 200);\n\n\n }", "public function invokeAdvertisements()\r\n {\r\n if (!isset($_GET['adverisements'])) {\r\n\r\n $advertisements = $this->model->getAdvertisements();\r\n include 'view/advertisements.php';\r\n }\r\n }", "public function create_ad(Request $request)\n { \n \n $ad = new Ad;\n \n \n\n $ad->user_id = $request['user_id'];\n $ad->title = $request['title'];\n $ad->description = $request['description'];\n $ad->quantity = $request['quantity'];\n $ad->state_id = $request['state_id'];\n $ad->city_id = $request['city_id'];\n $ad->address = $request['address'];\n $ad->payment_term = $request['payment_term'];\n $ad->shipment_term = $request['shipment_term'];\n if($request->hasFile('image'))\n {\n $name=time().'-a'.$request->image->getClientOriginalName();\n $request->image->move(public_path().'/ad/', $name); \n }\n $ad->image =$name;\n \n $ad->save();\n \n return back()->with('success','Ad submit successfully');\n }", "public function store(Request $request)\n {\n $user = Auth::user();\n\n if ($request->has('image')) {\n $filename = 'ad_' . time() . '.' . $request->image->getClientOriginalExtension();\n Storage::disk('public')->put($filename, file_get_contents($request->image));\n }\n\n Ad::create([\n 'name' => $request->name,\n 'description' => $request->description ?? null,\n 'image' => $filename ?? null,\n 'ad_type' => $request->ad_type,\n 'action_link' => $request->action_link,\n 'width' => $request->width,\n 'height' => $request->height,\n 'ad_placement' => $request->ad_placement,\n 'currency' => $request->currency,\n 'rate' => Helper::getCurrencyRate($request->currency),\n 'daily_budget' => $request->daily_budget,\n 'tags' => json_decode($request->tags),\n 'status' => 'PENDING_REVIEW',\n 'start_time' => $request->start_time,\n 'end_time' => $request->end_time,\n 'user_id' => $user->id,\n ]);\n\n return redirect('/ads')->with('success', 'The ad was successfully created!');\n }", "function api_gallery_add($row, $options = array()) {\n $result = array(\n \"ok\" => false,\n \"data\" => array(),\n \"msg\" => \"\",\n );\n\n // check required fields\n if (empty($row[\"url\"])) {\n $result[\"msg\"] = _t(\"msg.gallery.nourl\");\n return $result;\n }\n\n // set defaults\n if (empty($row[\"published\"])) {\n $row[\"published\"] = 1;\n } else {\n $row[\"published\"] = (int)$row[\"published\"];\n }\n if (empty($row[\"date\"])) {\n $row[\"date\"] = date(\"Y-m-d H:i:s\");\n }\n if (empty($row[\"views\"])) {\n $row[\"views\"] = 0;\n } else {\n $row[\"views\"] = (int)$row[\"views\"];\n }\n if (empty($row[\"shares\"])) {\n $row[\"shares\"] = 0;\n } else {\n $row[\"shares\"] = (int)$row[\"shares\"];\n }\n if (empty($row[\"comments\"])) {\n $row[\"comments\"] = 0;\n } else {\n $row[\"comments\"] = (int)$row[\"comments\"];\n }\n\n // set empty fields\n if (empty($row[\"title\"])) $row[\"title\"] = \"\";\n if (empty($row[\"description\"])) $row[\"description\"] = \"\";\n if (empty($row[\"pic\"])) $row[\"pic\"] = \"\";\n if (empty($row[\"pic_preview\"])) $row[\"pic_preview\"] = \"\";\n\n if (in_array(\"LoadPictures\", $options)) {\n // try to load files\n $row[\"pic\"] = msv_process_uploadpic($row[\"pic\"], TABLE_GALLERY_ALBUM, \"pic\");\n $row[\"pic_preview\"] = msv_process_uploadpic($row[\"pic_preview\"], TABLE_GALLERY_ALBUM, \"pic_preview\");\n }\n\n $result = db_add(TABLE_GALLERY_ALBUM, $row);\n\n if ($result[\"ok\"]) {\n $result[\"msg\"] = _t(\"msg.gallery.saved\");\n\n $gallery = msv_get(\"website.gallery\");\n\n $item = array(\n \"url\" => $gallery->baseUrl.$row[\"url\"].\"/\",\n \"title\" => $row[\"title\"],\n \"description\" => $row[\"description\"],\n \"keywords\" => $row[\"description\"],\n \"sitemap\" => $row[\"published\"],\n );\n\n msv_add_seo($item);\n\n $albumID = $result[\"insert_id\"];\n\n // attach album photos\n if (!empty($row[\"photos\"]) && is_array($row[\"photos\"])) {\n foreach ($row[\"photos\"] as $itemPhoto) {\n $itemPhoto[\"published\"] = 1;\n $itemPhoto[\"album_id\"] = $albumID;\n\n if (in_array(\"LoadPictures\", $options)) {\n // try to load files\n $itemPhoto[\"pic\"] = msv_process_uploadpic($itemPhoto[\"pic\"], TABLE_GALLERY_PHOTOS, \"pic\");\n $itemPhoto[\"pic_preview\"] = msv_process_uploadpic($itemPhoto[\"pic_preview\"], TABLE_GALLERY_PHOTOS, \"pic_preview\");\n }\n $resultPhoto = db_add(TABLE_GALLERY_PHOTOS, $itemPhoto);\n if (!$resultPhoto[\"ok\"]) {\n $result[\"msg\"] .= $resultPhoto[\"msg\"].\"\\n\";\n }\n }\n }\n }\n return $result;\n}", "public function bhadd(){\n $this->autoRender = false;\n $this->BullhornConnection->BHConnect();\n $params = $this->request->data; \n if(!isset($params['candidate_id'])){\n echo json_encode(\n [\n 'status' => 0,\n 'message' => \"Candidate id is required!\"\n ]\n );\n exit;\n }\n if(isset($params['skill_ids']) && is_array($params['skill_ids'])){\n //pr($params);\n $skills = implode(',', $params['skill_ids']);\n $skillSetUpdate = \"\";\n list($categories,$skillsL,$catSkills) = $this->split_cat_skill($params['existingSkillSet']);\n $isDuplicated = array_count_values($skillsL);\n if(isset($params['existingSkillSet']) && isset($params['skillSet'])){\n $skillArr = array_filter(explode(',',$params['existingSkillSet']));\n $getIndex = array_search($params['skillSet'],$skillArr);\n //pr($skillArr);\n //echo $params['skillSet'];\n if($getIndex == false){\n $skillArr[] = $params['skillSet'];\n }\n\n $skillSetUpdate = implode(',',$skillArr);\n if(!isset($isDuplicated[$params['skill_ids'][0]])){\n $url = $_SESSION['BH']['restURL'] . '/entity/Candidate/'.$params['candidate_id'].'/primarySkills/'.$skills.'?BhRestToken=' . $_SESSION['BH']['restToken'];\n\n $post_params = json_encode([]);\n $req_method = 'PUT';\n $response = $this->BullhornCurl->curlFunction($url, $post_params, $req_method);\n }\n }\n /* if(isset($response['errors'])){ // if adding skill returns any errors\n echo json_encode([\n 'status' => 0,\n 'message' => $response \n ]); \n exit; \n }else{ */\n // $skillIds = []; \n $url = $_SESSION['BH']['restURL'] . '/entity/Candidate/' . $params['candidate_id'] . '?BhRestToken=' . $_SESSION['BH']['restToken'];\n\n $post_params = json_encode([\n 'id' => $params['candidate_id'],\n 'skillSet' => $skillSetUpdate\n ]);\n $req_method = 'POST';\n $response = $this->BullhornCurl->curlFunction($url, $post_params, $req_method);\n if(isset($response['data'])){\n list($categories,$skills,$catSkills) = $this->split_cat_skill($response['data']['skillSet']);\n /* foreach($response['data']['primarySkills']['data'] as $skill){\n $skillIds[] = $skill['id'];\n }*/\n if(empty($catSkills)){\n $result = $this->getSkills($skills); // returns duplicate skills with different category\n }else{\n $result = $this->getSkills($skills,'skill_id',$catSkills);\n }\n echo json_encode(\n [\n 'status' => 1,\n 'data' => isset($result['data'])?$result['data']:[],\n 'existingSkillSet' => $response['data']['skillSet'],\n ]\n );\n exit;\n }else{\n echo json_encode(\n [\n 'status' => 0,\n 'data' => $response\n ]\n );\n exit;\n }\n //}\n\n }else{\n echo json_encode(\n [\n 'status' => 0,\n 'message' => \"skill ids are required and also it need to be in array format!\"\n ]\n );\n exit;\n }\n }", "public function store(AdvertisementRequest $request)\n {\n $adv = Advertisement::where('block_position', $request->block_position)\n ->where('block_side', $request->block_side)\n ->get();\n try {\n\n if ($adv->isEmpty()){\n\n Advertisement::create($request->except('_token'));\n } elseif ($adv->isEmpty()){\n dd($adv);\n }\n\n\n\n } catch (\\Exception $e){\n\n session()->flash('flash_message', 'Что-то пошло не так, попробуйте еще раз!');\n\n return back()->withInput();\n }\n\n return redirect()->action('Admin\\AdvertisementController@index');\n }", "public function hook_after_add($id) { \n\t //Your code here\n\n\t }", "public function hook_after_add($id) { \n\t //Your code here\n\n\t }", "public function add($request){\n\n }", "public function add()\n {\n for ($i = 0 ; $i < func_num_args(); $i++) {\n $this->addSingle(func_get_arg($i));\n }\n }", "public function create()\n {\n //\n return view('advertisement-add');\n }", "public function add(Request $request) {\n $rules = array(\n 'id' => 'numeric',\n 'Title' => 'required',\n 'DisplayOrder' => 'required|numeric|min:1',\n 'Image' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048'\n );\n // run the validation rules on the inputs from the form\n $validator = Validator::make($request->all(), $rules);\n if ($validator->fails()) {\n return BaseResult::error(400, $validator->messages()->toJson());\n } else {\n $user = Session::get('user');\n $banner = new Banner;\n try {\n $banner->Title = $request->Title;\n $banner->DisplayOrder = $request->DisplayOrder; \n $banner->IsPublished = $request->has('IsPublished') ? true : false; \n $banner->IsDeleted = 0;\n $banner->CreatedDate = now();\n $banner->CreatedBy = $user->USE_ID;\n $banner->save();\n\n if ($request->hasFile('Image')) {\n $filename = pathinfo($request->Image->getClientOriginalName(), PATHINFO_FILENAME);\n $imageName = $banner->BAN_ID . '_' . $filename . '_' . time() . '.' . $request->Image->extension();\n $request->Image->move(public_path('data/banners'), $imageName);\n $banner->Banner = $imageName;\n $banner->save();\n }\n\n return BaseResult::withData($banner);\n } catch (\\Exception $e) {\n return BaseResult::error(500, $e->getMessage());\n }\n }\n }", "public function add_banner($campid=0,$adv=0)\n\t{\n\t\t/*-------------------------------------------------------------\n\t\tBreadcrumb Setup Start\n\t\t-------------------------------------------------------------*/\n\t\t$link = breadcrumb();\n\t\t$data['breadcrumb'] = $link;\n\t\t $data['sel_camp'] = $campid;\n\t\t $data['sel_adv'] = $adv;\n\t\t \n\t\t $data['sel_camp_type'] = $this->input->post('sel_camp_type');\n\t\t \n\t\t/*-------------------------------------------------------------\n\t\tGet Advertiser List\n\t\t-------------------------------------------------------------*/\n\t\t$adv_list = $this->mod_campaign->get_advertiser_list();\n\t\t$data['advertiser'] = $adv_list;\n\t\t$data['mob_screens']\t= $this->mod_banner->banner_screen();\n\t\t/*-------------------------------------------------------------*/\n\t\t\n\t\tif($adv!=0)\n\t\t{\n\t\t\t$where_adv = array('clientid'=>$adv);\n\t\t\t$camp_list = $this->mod_banner->filter_campaigns($where_adv);\n\t\t\t$data['campaigns'] = $camp_list;\n\t\n\t\t}\n\t\t\n\n\t/*-------------------------------------------------------------\n\t\t\t\tEmbed current page content into template layout\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_content'] = $this->load->view(\"admin/banners/add\",$data,true);\n\t\t\n\t\techo $this->load->view('page_layout',$data,true);\n\t\t\n\t\texit;\n\t}", "function add(KalturaCuePoint $annotation)\n\t{\n\t\t$kparams = array();\n\t\t$this->client->addParam($kparams, \"annotation\", $annotation->toParams());\n\t\t$this->client->queueServiceActionCall(\"annotation_annotation\", \"add\", $kparams);\n\t\tif ($this->client->isMultiRequest())\n\t\t\treturn $this->client->getMultiRequestResult();\n\t\t$resultObject = $this->client->doQueue();\n\t\t$this->client->throwExceptionIfError($resultObject);\n\t\t$this->client->validateObjectType($resultObject, \"KalturaAnnotation\");\n\t\treturn $resultObject;\n\t}", "public function addSearchImageAsync($request) \n {\n $returnType = '';\n $isBinary = true;\n $hasReturnType = false;\n $request = $this->getHttpRequest($request, 'POST');\n $options = $this->createHttpClientOptions();\n\n return $this->client\n ->sendAsync($request, $options)\n ->then(\n function ($response) use ($request, $hasReturnType, $returnType, $isBinary) {\n return $this->processResponse($request, $response, $hasReturnType, $returnType, $isBinary);\n },\n function ($exception) use ($request) {\n $this->processException($exception);\n }\n );\n }", "public function postAdd() {\n $isCreated = false;\n\n if ($this->repository->addOrUpdateSubscriptions ()) {\n $isCreated = true;\n $this->request->session ()->flash ( StringLiterals::SUCCESS, trans ( 'cms::subscription.add.success' ) );\n }\n\n return ($isCreated) ? $this->getSuccessJsonResponse ( [ 'message' => trans ( 'customer::subscription.add.success' ) ] ) : $this->getErrorJsonResponse ( [ ], trans ( 'customer::subscription.add.error' ) );\n }", "public function ajax_background_add()\n {\n }", "public function hook_after_add($id) {\n\n }", "public function postToggelAd(){\n\t\t$id = Input::get('compainId');\n\t\t$adId = Input::get('id');\n\t\t$user = auth()->user();\n\t\t$compain = $user->compains()->where('id', $id)->first();\n\t\tif(!$compain) return response('error occured, please try again', 500);\n\t\t$ad = $compain->ads()->where('id', $adId)->first();\n\t\tif(!$ad) return response('error occured, please try again', 500);\n\t\t\n\t\tif($ad->type != 2){\n\t\t\tif((($ad->paid + $ad->costPer) > $ad->budget) && ($ad->budget != 0)){\n\t\t\t\treturn response('you have insufficient budget.', 500);\n\t\t\t}\n\t\t}else{\n\t\t\t$now = Carbon::now();\n\t\t\t$ends = Carbon::parse($ad->target->end);\n\t\t\tif($now->gt($ends)){\n\t\t\t\t$ad->turnOff();\n\t\t\t\treturn response('ad period completed.', 500);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// change statu\n\t\tif($ad->turn){\n\t\t\t$ad->turnOff();\n\t\t}else{\n\t\t\t$ad->turnOn();\n\t\t}\n\t\treturn response('Ad unit '.$ad->name.' statu changed.', 200);\n\t}", "public function onAwardnominationsAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function createWebSiteImageFeaturesAsync($request) \n {\n $returnType = '';\n $isBinary = true;\n $hasReturnType = false;\n $request = $this->getHttpRequest($request, 'POST');\n $options = $this->createHttpClientOptions();\n\n return $this->client\n ->sendAsync($request, $options)\n ->then(\n function ($response) use ($request, $hasReturnType, $returnType, $isBinary) {\n return $this->processResponse($request, $response, $hasReturnType, $returnType, $isBinary);\n },\n function ($exception) use ($request) {\n $this->processException($exception);\n }\n );\n }", "protected abstract function loadAvailableAds();", "private function add()\n {\n return $this->app->renderView(\n 'campaigns.add',\n array(\n 'flashMessages' => $this->flashMessages\n )\n );\n }", "public function addAction() {\n $this->assign('ad_ptypes', $this->ad_ptypes);\n }", "public function postEngagement()\n\t{\n\t\t$reglas = array('location' => 'required|min:5|max:50');\n\n $validator = Validator::make(Input::all(), $reglas);\n\n if ($validator->passes()) {\n $engagement = new Engagement();\n $engagement->location = Input::get('location');\n $engagement->active = 1;\n\n if ($engagement->save()) {\n User::find(Auth::user()->id)->engagements()->attach($engagement->id, array('estate' => 1));\n return Response::json(array('message' => 'Engrane guardado',\n 'status' => 1));\n }\n }else{\n return Response::json(array('messages' => $validator->messages(),\n 'status' => 0));\n }\n\t}", "function wp_ajax_add_meta()\n {\n }", "public function addAction() {\n $configid = $this->getInput('id');\n $customAnimationEffect = Common::getConfig('deliveryConfig','customAnimationEffect');\n if($configid){\n \t$configInfo = Advertiser_Service_AdAppkeyConfigModel::getConfig($configid);\n \t$this->assign('config', $configInfo);\n }\n \t$this->assign('customAnimationEffect', $customAnimationEffect);\n }", "static function add_a_lead($lead_id, $log){\n\t\tglobal $wpdb;\n\t\t$table = self::get_offline_table();\n\t\t\n\t\treturn $wpdb->insert($table, array('lead_id'=>$lead_id, 'log'=>serialize($log)), array('%d', '%s'));\n\t}", "function addContact() {\n\t$request = Slim::getInstance()->request();\n\t$cont = json_decode($request->getBody());\n\n\t$sql = \"call AddContact(:p_name, :p_phone, :p_address)\";\n\ttry {\n\t\t$db = DB_Connection();\n\t\t$stmt = $db->prepare($sql); \n\t\t$stmt->bindParam(':p_name',$cont->name,PDO::PARAM_STR,30);\n\t\t$stmt->bindParam(':p_phone',$cont->phone,PDO::PARAM_STR,15);\n\t\t$stmt->bindParam(':p_address',$cont->address,PDO::PARAM_STR,100);\n\t\t$stmt->execute();\n\t\t$db = null;\n\t\techo json_encode($cont); \n\t} catch(PDOException $e) {\n\t\techo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n\t}\n}", "public function actionCreate()\n {\n $model = new AdvertiserApi();\n\n if ($model->load(Yii::$app->request->post())) {\n // && $model->save()\n $advertiser = Advertiser::getOneByUsername($model->adv_id);\n if (!empty($advertiser)) {\n $model->adv_id = $advertiser->id;\n if ($model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function __construct(Client $client) {\n $this->servicePath = 'games/v1/';\n $this->version = 'v1';\n $this->serviceName = 'games';\n\n $client->addService($this->serviceName, $this->version);\n $this->achievementDefinitions = new AchievementDefinitionsServiceResource($this, $this->serviceName, 'achievementDefinitions', json_decode('{\"methods\": {\"list\": {\"id\": \"games.achievementDefinitions.list\", \"path\": \"achievements\", \"httpMethod\": \"GET\", \"parameters\": {\"language\": {\"type\": \"string\", \"location\": \"query\"}, \"maxResults\": {\"type\": \"integer\", \"format\": \"int32\", \"minimum\": \"1\", \"maximum\": \"200\", \"location\": \"query\"}, \"pageToken\": {\"type\": \"string\", \"location\": \"query\"}}, \"response\": {\"$ref\": \"AchievementDefinitionsListResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}}}', true));\n $this->achievements = new AchievementsServiceResource($this, $this->serviceName, 'achievements', json_decode('{\"methods\": {\"increment\": {\"id\": \"games.achievements.increment\", \"path\": \"achievements/{achievementId}/increment\", \"httpMethod\": \"POST\", \"parameters\": {\"achievementId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}, \"requestId\": {\"type\": \"string\", \"format\": \"int64\", \"location\": \"query\"}, \"stepsToIncrement\": {\"type\": \"integer\", \"required\": true, \"format\": \"int32\", \"minimum\": \"1\", \"location\": \"query\"}}, \"response\": {\"$ref\": \"AchievementIncrementResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"list\": {\"id\": \"games.achievements.list\", \"path\": \"players/{playerId}/achievements\", \"httpMethod\": \"GET\", \"parameters\": {\"language\": {\"type\": \"string\", \"location\": \"query\"}, \"maxResults\": {\"type\": \"integer\", \"format\": \"int32\", \"minimum\": \"1\", \"maximum\": \"200\", \"location\": \"query\"}, \"pageToken\": {\"type\": \"string\", \"location\": \"query\"}, \"playerId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}, \"state\": {\"type\": \"string\", \"enum\": [\"ALL\", \"HIDDEN\", \"REVEALED\", \"UNLOCKED\"], \"location\": \"query\"}}, \"response\": {\"$ref\": \"PlayerAchievementListResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"reveal\": {\"id\": \"games.achievements.reveal\", \"path\": \"achievements/{achievementId}/reveal\", \"httpMethod\": \"POST\", \"parameters\": {\"achievementId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"response\": {\"$ref\": \"AchievementRevealResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"unlock\": {\"id\": \"games.achievements.unlock\", \"path\": \"achievements/{achievementId}/unlock\", \"httpMethod\": \"POST\", \"parameters\": {\"achievementId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"response\": {\"$ref\": \"AchievementUnlockResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}}}', true));\n $this->applications = new ApplicationsServiceResource($this, $this->serviceName, 'applications', json_decode('{\"methods\": {\"get\": {\"id\": \"games.applications.get\", \"path\": \"applications/{applicationId}\", \"httpMethod\": \"GET\", \"parameters\": {\"applicationId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}, \"language\": {\"type\": \"string\", \"location\": \"query\"}, \"platformType\": {\"type\": \"string\", \"enum\": [\"ANDROID\", \"IOS\", \"WEB_APP\"], \"location\": \"query\"}}, \"response\": {\"$ref\": \"Application\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}}}', true));\n $this->leaderboards = new LeaderboardsServiceResource($this, $this->serviceName, 'leaderboards', json_decode('{\"methods\": {\"get\": {\"id\": \"games.leaderboards.get\", \"path\": \"leaderboards/{leaderboardId}\", \"httpMethod\": \"GET\", \"parameters\": {\"language\": {\"type\": \"string\", \"location\": \"query\"}, \"leaderboardId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"response\": {\"$ref\": \"Leaderboard\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"list\": {\"id\": \"games.leaderboards.list\", \"path\": \"leaderboards\", \"httpMethod\": \"GET\", \"parameters\": {\"language\": {\"type\": \"string\", \"location\": \"query\"}, \"maxResults\": {\"type\": \"integer\", \"format\": \"int32\", \"minimum\": \"1\", \"maximum\": \"100\", \"location\": \"query\"}, \"pageToken\": {\"type\": \"string\", \"location\": \"query\"}}, \"response\": {\"$ref\": \"LeaderboardListResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}}}', true));\n $this->players = new PlayersServiceResource($this, $this->serviceName, 'players', json_decode('{\"methods\": {\"get\": {\"id\": \"games.players.get\", \"path\": \"players/{playerId}\", \"httpMethod\": \"GET\", \"parameters\": {\"playerId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"response\": {\"$ref\": \"Player\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}}}', true));\n $this->revisions = new RevisionsServiceResource($this, $this->serviceName, 'revisions', json_decode('{\"methods\": {\"check\": {\"id\": \"games.revisions.check\", \"path\": \"revisions/check\", \"httpMethod\": \"GET\", \"parameters\": {\"clientRevision\": {\"type\": \"string\", \"required\": true, \"location\": \"query\"}}, \"response\": {\"$ref\": \"RevisionCheckResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}}}', true));\n $this->rooms = new RoomsServiceResource($this, $this->serviceName, 'rooms', json_decode('{\"methods\": {\"create\": {\"id\": \"games.rooms.create\", \"path\": \"rooms/create\", \"httpMethod\": \"POST\", \"parameters\": {\"language\": {\"type\": \"string\", \"location\": \"query\"}}, \"request\": {\"$ref\": \"RoomCreateRequest\"}, \"response\": {\"$ref\": \"Room\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"decline\": {\"id\": \"games.rooms.decline\", \"path\": \"rooms/{roomId}/decline\", \"httpMethod\": \"POST\", \"parameters\": {\"roomId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"response\": {\"$ref\": \"Room\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"dismiss\": {\"id\": \"games.rooms.dismiss\", \"path\": \"rooms/{roomId}/dismiss\", \"httpMethod\": \"POST\", \"parameters\": {\"roomId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"get\": {\"id\": \"games.rooms.get\", \"path\": \"rooms/{roomId}\", \"httpMethod\": \"GET\", \"parameters\": {\"language\": {\"type\": \"string\", \"location\": \"query\"}, \"roomId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"response\": {\"$ref\": \"Room\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"join\": {\"id\": \"games.rooms.join\", \"path\": \"rooms/{roomId}/join\", \"httpMethod\": \"POST\", \"parameters\": {\"roomId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"request\": {\"$ref\": \"RoomJoinRequest\"}, \"response\": {\"$ref\": \"Room\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"leave\": {\"id\": \"games.rooms.leave\", \"path\": \"rooms/{roomId}/leave\", \"httpMethod\": \"POST\", \"parameters\": {\"roomId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"request\": {\"$ref\": \"RoomLeaveRequest\"}, \"response\": {\"$ref\": \"Room\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"list\": {\"id\": \"games.rooms.list\", \"path\": \"rooms\", \"httpMethod\": \"GET\", \"parameters\": {\"language\": {\"type\": \"string\", \"location\": \"query\"}, \"maxResults\": {\"type\": \"integer\", \"format\": \"int32\", \"minimum\": \"1\", \"maximum\": \"500\", \"location\": \"query\"}, \"pageToken\": {\"type\": \"string\", \"location\": \"query\"}}, \"response\": {\"$ref\": \"RoomList\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"reportStatus\": {\"id\": \"games.rooms.reportStatus\", \"path\": \"rooms/{roomId}/reportstatus\", \"httpMethod\": \"POST\", \"parameters\": {\"roomId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"request\": {\"$ref\": \"RoomP2PStatuses\"}, \"response\": {\"$ref\": \"RoomStatus\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}}}', true));\n $this->scores = new ScoresServiceResource($this, $this->serviceName, 'scores', json_decode('{\"methods\": {\"get\": {\"id\": \"games.scores.get\", \"path\": \"players/{playerId}/leaderboards/{leaderboardId}/scores/{timeSpan}\", \"httpMethod\": \"GET\", \"parameters\": {\"includeRankType\": {\"type\": \"string\", \"enum\": [\"ALL\", \"PUBLIC\", \"SOCIAL\"], \"location\": \"query\"}, \"language\": {\"type\": \"string\", \"location\": \"query\"}, \"leaderboardId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}, \"maxResults\": {\"type\": \"integer\", \"format\": \"int32\", \"minimum\": \"1\", \"maximum\": \"25\", \"location\": \"query\"}, \"pageToken\": {\"type\": \"string\", \"location\": \"query\"}, \"playerId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}, \"timeSpan\": {\"type\": \"string\", \"required\": true, \"enum\": [\"ALL\", \"ALL_TIME\", \"DAILY\", \"WEEKLY\"], \"location\": \"path\"}}, \"response\": {\"$ref\": \"PlayerLeaderboardScoreListResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"list\": {\"id\": \"games.scores.list\", \"path\": \"leaderboards/{leaderboardId}/scores/{collection}\", \"httpMethod\": \"GET\", \"parameters\": {\"collection\": {\"type\": \"string\", \"required\": true, \"enum\": [\"PUBLIC\", \"SOCIAL\"], \"location\": \"path\"}, \"language\": {\"type\": \"string\", \"location\": \"query\"}, \"leaderboardId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}, \"maxResults\": {\"type\": \"integer\", \"format\": \"int32\", \"minimum\": \"1\", \"maximum\": \"25\", \"location\": \"query\"}, \"pageToken\": {\"type\": \"string\", \"location\": \"query\"}, \"timeSpan\": {\"type\": \"string\", \"required\": true, \"enum\": [\"ALL_TIME\", \"DAILY\", \"WEEKLY\"], \"location\": \"query\"}}, \"response\": {\"$ref\": \"LeaderboardScores\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"listWindow\": {\"id\": \"games.scores.listWindow\", \"path\": \"leaderboards/{leaderboardId}/window/{collection}\", \"httpMethod\": \"GET\", \"parameters\": {\"collection\": {\"type\": \"string\", \"required\": true, \"enum\": [\"PUBLIC\", \"SOCIAL\"], \"location\": \"path\"}, \"language\": {\"type\": \"string\", \"location\": \"query\"}, \"leaderboardId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}, \"maxResults\": {\"type\": \"integer\", \"format\": \"int32\", \"minimum\": \"1\", \"maximum\": \"25\", \"location\": \"query\"}, \"pageToken\": {\"type\": \"string\", \"location\": \"query\"}, \"resultsAbove\": {\"type\": \"integer\", \"format\": \"int32\", \"location\": \"query\"}, \"returnTopIfAbsent\": {\"type\": \"boolean\", \"location\": \"query\"}, \"timeSpan\": {\"type\": \"string\", \"required\": true, \"enum\": [\"ALL_TIME\", \"DAILY\", \"WEEKLY\"], \"location\": \"query\"}}, \"response\": {\"$ref\": \"LeaderboardScores\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"submit\": {\"id\": \"games.scores.submit\", \"path\": \"leaderboards/{leaderboardId}/scores\", \"httpMethod\": \"POST\", \"parameters\": {\"language\": {\"type\": \"string\", \"location\": \"query\"}, \"leaderboardId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}, \"score\": {\"type\": \"string\", \"required\": true, \"format\": \"int64\", \"location\": \"query\"}}, \"response\": {\"$ref\": \"PlayerScoreResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"submitMultiple\": {\"id\": \"games.scores.submitMultiple\", \"path\": \"leaderboards/scores\", \"httpMethod\": \"POST\", \"parameters\": {\"language\": {\"type\": \"string\", \"location\": \"query\"}}, \"request\": {\"$ref\": \"PlayerScoreSubmissionList\"}, \"response\": {\"$ref\": \"PlayerScoreListResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}}}', true));\n\n }", "public function addAction(Request $request)\n {\n $banner = new Banner();\n\n $form = $this->createForm(new BannerType(), $banner);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n\n $banner->setUser($this->getUser());\n\n $em->persist($banner);\n $em->flush();\n\n $this->flash('flash_success', 'bannerAdded');\n\n return $this->redirectToRoute('bannerIndex');\n }\n\n return $this->renderEditForm($form);\n }", "public function addAppointment(){\n\t\t$cameras = Camera::all();\n\n\t\tforeach($cameras as $camera){\n\t\t\t$cameraAppointment = new CameraAppointment;\n\t\t\t$cameraAppointment->Date_Taken = date(\"Y-m-d H:i:j\", strtotime(Input::get('Date_Taken')));\n\t\t\t$cameraAppointment->Camera_ID = $camera->ID;\n\t\t\t$cameraAppointment->Interval = Input::get('Interval');\n\t\t\t$cameraAppointment->save();\n\t\t}\n\n\t\treturn Redirect::to('/');\n\t}", "public function actionAdd()\n\t{\n\t\t$tag = array(\n\t\t\t'tag_id' => 0\n\t\t);\n\n\t\treturn $this->_getTagAddEditResponse($tag);\n\t}", "public function updateAsync(array $params = [])\n {\n return $this->handleMiddleware('update', $params, function(MiddlewareRequest $request) {\n $params = $request->getApiMethodArguments();\n $data = $params;\n $response = $this->apiInstance->adcreativesUpdateAsync($data);\n return $response;\n });\n }", "function ajax_add()\n {\n\t\n }" ]
[ "0.5798104", "0.5592207", "0.53391373", "0.5269319", "0.52489495", "0.5034818", "0.5017347", "0.5017347", "0.50024414", "0.4985131", "0.49709845", "0.49517524", "0.49458686", "0.48700982", "0.4832725", "0.48250785", "0.48247936", "0.48159555", "0.48019624", "0.479709", "0.47909623", "0.47742286", "0.4774191", "0.4760943", "0.47488427", "0.4745512", "0.47138846", "0.47103792", "0.47052568", "0.47050753", "0.46498343", "0.4642628", "0.46312404", "0.46297953", "0.46232164", "0.46160078", "0.46126774", "0.46117464", "0.46054983", "0.45978203", "0.4572816", "0.45726752", "0.45724377", "0.45522302", "0.45368573", "0.4536718", "0.45306763", "0.4530533", "0.45176643", "0.45020223", "0.4482907", "0.44723105", "0.44694078", "0.44640914", "0.4463432", "0.44619358", "0.44613218", "0.44606453", "0.44582558", "0.44547823", "0.44530126", "0.44457048", "0.44347036", "0.44225237", "0.44066352", "0.4404695", "0.44010141", "0.43983734", "0.43943638", "0.4389147", "0.43763036", "0.43763036", "0.4374148", "0.43739063", "0.43667257", "0.4364559", "0.4358324", "0.43512338", "0.435093", "0.43393108", "0.4334564", "0.43123132", "0.43117237", "0.43097305", "0.43086088", "0.4306573", "0.4299656", "0.42964345", "0.42955047", "0.4294521", "0.42915425", "0.4283012", "0.42829508", "0.42818233", "0.42773712", "0.42734748", "0.42723498", "0.42676803", "0.42671964", "0.42640615" ]
0.69396174
0
Handle AdcreativesApi adcreativesDelete function
public function delete(array $params = []) { return $this->handleMiddleware('delete', $params, function(MiddlewareRequest $request) { $params = $request->getApiMethodArguments(); $data = $params; $response = $this->apiInstance->adcreativesDelete($data); return $this->handleResponse($response); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Gou_Service_Ad::getAd($id);\r\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\r\n//\t\tUtil_File::del(Common::getConfig('siteConfig', 'attachPath') . $info['img']);\r\n\t\t$result = Gou_Service_Ad::deleteAd($id);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Client_Service_Ad::getAd($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\t$result = Client_Service_Ad::deleteAd($id);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function deleteAction($request, $response, $args){\n // /api/experience/{cv_id}/{id}\n $cv_id = $args['cv_id'];\n $experience_id = $args['id'];\n\n //caut in baza de date cv-ul cu id-ul respectiv\n $cvObject = CV::where('pk_id','=',$cv_id)->first();\n\n //verific daca exista cv-ul cu id-ul respectiv;\n if(is_null($cvObject)){\n //obiectul cv este null, deci returnez mesaj de eroare\n return $response->withJson([\n 'message' => \"CV id invalid\",\n 'status' => 400\n ], 400);\n }\n\n //caut in baza de date informatia despre experienta cu id-ul respectiv\n $experienceObject = Experience::where('pk_id','=',$experience_id)->first();\n \n //verific daca experienceObject este null\n if(is_null($experienceObject)){\n //experienceObject este null, deci returnez mesaj de eroare\n return $response->withJson([\n 'message' => \"Experience id invalid\",\n 'status' => 400\n ], 400);\n }\n\n //sterg din baza de date\n Experience::where('pk_id','=',$experience_id)->delete();\n\n //returnez mesajul de success\n return $response->withJson([\n \"message\" => \"Delete success\",\n \"status\" => 200\n ], 200);\n }", "public function deleteAsync(array $params = [])\n {\n return $this->handleMiddleware('delete', $params, function(MiddlewareRequest $request) {\n $params = $request->getApiMethodArguments();\n $data = $params;\n $response = $this->apiInstance->adcreativesDeleteAsync($data);\n return $response;\n });\n }", "function DeleteAd() {\n\tglobal $smarty, $config, $dbconn;\n\t\n\t$id = intval($_REQUEST[\"id\"]);\n\t$dbconn->Execute(\"DELETE FROM \".SPONSORS_ADS_TABLE.\" WHERE id='\".$id.\"' \");\n\tListSponsors(\"list\");\n\t\n}", "public function delete()\r\n\t{\r\n\t\t$this->auth->restrict('Banner.Content.Delete');\r\n\r\n\t\t$id = $this->uri->segment(6);\r\n\r\n\t\tif (!empty($id))\r\n\t\t{\r\n\r\n\t\t\tif ($this->banner_group_model->delete($id))\r\n\t\t\t{\r\n\t\t\t\t// Log the activity\r\n\t\t\t\t$this->activity_model->log_activity($this->current_user->id, lang('banner_act_delete_record').': ' . $id . ' : ' . $this->input->ip_address(), 'banner');\r\n \r\n // Delete all banner in the group\r\n\t\t\t\t$this->banner_model->delete_where(array('banner.group_id' => $id));\r\n \r\n\t\t\t\tTemplate::set_message(lang('banner_delete_success'), 'success');\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tTemplate::set_message(lang('banner_delete_failure') . $this->banner_group_model->error, 'error');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tredirect(SITE_AREA .'/content/banner/groups');\r\n\t}", "public function deleteAdvertiser(Request $request){\n return $this->repository->delete((int) $request->route()->parameter('id'));\n }", "public function deleteAction($request, $response, $args){\n // /api/skills/{cv_id}/{id}\n $cv_id = $args['cv_id'];\n $skill_id = $args['id'];\n\n //caut in baza de date cv-ul cu id-ul respectiv\n $cvObject = CV::where('pk_id','=',$cv_id)->first();\n\n //verific daca exista cv-ul cu id-ul respectiv;\n if(is_null($cvObject)){\n //obiectul cv este null, deci returnez mesaj de eroare\n return $response->withJson([\n 'message' => \"CV id invalid\",\n 'status' => 400\n ], 400);\n }\n\n //caut in baza de date informatia despre educatie cu id-ul respectiv\n $skillObject = Skills::where('pk_id','=',$skill_id)->first();\n \n //verific daca skillObject este null\n if(is_null($skillObject)){\n //skillObject este null, deci returnez mesaj de eroare\n return $response->withJson([\n 'message' => \"Skill id invalid\",\n 'status' => 400\n ], 400);\n }\n\n //Stergere din baza de date\n Skills::where('pk_id','=',$skill_id)->delete();\n\n //returnez mesajul de success\n return $response->withJson([\n \"message\" => \"Delete success\",\n \"status\" => 200\n ], 200);\n }", "public function delete($id) { \n $this -> advertisementsmodel -> delete_advertisement($id);\n $this -> session -> set_userdata('success_message', \"Advertisement deleted successfully\");\n redirect('advertisements', 'refresh');\n }", "public function destroy($id)\n {\n $ads = Ads::find($id);\n $ads->delete();\n AdImage::where('ad_id', $id)->delete();\n return redirect()->route('ads')->with('success', 'Advertisement deleted successfully');\n }", "public function destroy(reciclaeducate $reciclaeducate)\n {\n //\n }", "public function deleteBanner() {\n $_DELETE = $this->getDeleteData();\n if (isset($_DELETE['id'])) {\n $id = $_DELETE['id'];\n } else {\n throw new RestException(HttpStatusCodes::BAD_REQUEST, \"Missing required params\");\n }\n try {\n\n Banner::deleteBanner($id);\n } catch (Exception $e) {\n throw new RestException($e->getCode(), $e->getMessage());\n }\n }", "public function deleteResourceAdhoc(Request $request)\n {\n try {\n $data = $request->all();\n $unavailable_adhocs = new UnavailableAdhocs();\n return $unavailable_adhocs->deleteAdhoc($data);\n\n } catch (Exception $exception) {\n return back()->withInput()\n ->withErrors(['unexpected_error' => $exception->getMessage()]);\n }\n }", "public function postDelete($interaction)\n {\n // Was the ad deleted?\n if($interaction->delete()) {\n // Redirect to the ad management page\n return Redirect::to('admin/successful-delete')->with('success', Lang::get('admin/interactions/messages.delete.success'));\n }\n\n // There was a problem deleting the ad\n return Redirect::to('admin/interactions')->with('error', Lang::get('admin/interactions/messages.delete.error'));\n }", "function DeleteAdGroupRemarketingListAssociations($proxy, $adGroupRemarketingListAssociations)\n{\n $request = new DeleteAdGroupRemarketingListAssociationsRequest();\n $request->AdGroupRemarketingListAssociations = $adGroupRemarketingListAssociations;\n \n return $proxy->GetService()->DeleteAdGroupRemarketingListAssociations($request);\n}", "public function delete($request, $response)\n {\n }", "function index_delete() {\n $id_diagnosa = $this->delete('id_diagnosa');\n $this->db->where('id_diagnosa', $id_diagnosa);\n $delete = $this->db->delete('diagnosa');\n if ($delete) {\n $this->response(array('status' => 'success'), 201);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "public function deleteServiceAdhoc(Request $request)\n {\n try {\n $data = $request->all();\n $available_adhocs = new AvailableAdhocs();\n return $available_adhocs->deleteAdhoc($data);\n\n } catch (Exception $exception) {\n return back()->withInput()\n ->withErrors(['unexpected_error' => $exception->getMessage()]);\n }\n }", "public function deleteAction(Request $request, MainGallery $mainGallery)\n {\n// $form = $this->createDeleteForm($mainGallery);\n// $form->handleRequest($request);\n//\n// if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($mainGallery);\n $em->flush();\n// }\n return new Response (null, 204);\n// return $this->redirectToRoute('maingallery_index');\n }", "public function delete($data){\n\t\tif(empty($data['adgroup_id'])){\n\t\t\tthrow new \\Exception('adgroup id is required.');\n\t\t}\n\t\tif(empty($data['ad_id'])){\n\t\t\tthrow new \\Exception('ad_id is required.');\n\t\t}\n\t\t$operations = array();\n\t\t$textAd = new \\TextAd();\n\t\t$textAd->id = $data['ad_id'];\n\t\t\n\t\t// Create ad group ad.\n\t\t$adGroupAd = new \\AdGroupAd();\n\t\t$adGroupAd->adGroupId = $adGroupId;\n\t\t$adGroupAd->ad = $textAd;\n\t\t\n\t\t// Create operation.\n\t\t$operation = new \\AdGroupAdOperation();\n\t\t$operation->operand = $adGroupAd;\n\t\t$operation->operator = 'REMOVE';\t\t\n\t\t$operations = array($operation);\n\n\t\t// Make the mutate request.\n\t\t$result = $this->adGroupAdService->mutate($operations);\n\t\t$adGroupAd = $result->value[0];\n\t\treturn TRUE;\n\t}", "public function destroy(Ad $ad)\n\t{\n\n $ad->delete();\n\n // redirect\n \\Session::flash('message','Ваше объявление было удалено!');\n return Redirect::to('ads');\n\t}", "protected function _postDelete() {}", "protected function _postDelete() {}", "function delete($id) {\n Ad::deleteAd($id);\n unset($_GET['delete']);\n }", "public function destroy(CandidateNonrelatives $nonRelatives)\n {\n $nonRelatives->delete();\n if(!Auth::guard('candidate')->user()->educations->count()){\n Auth::guard('candidate')->user()->progress->where('section_id',10)->first()->delete();\n }\n return redirect('/nonRelatives');\n }", "public function deleteAdvertiser($id)\n {\n BeAdvertiserModel::find($id)->delete();\n Session::flash('success', SimpleClass::success_notice('Delete an advertiser is successfully'));\n return redirect()->route('be-advertiser.show');\n }", "function delete_record($_DELETE)\n {\n $delete_data = json_decode($_DELETE[\"0\"], true);\n if (isset($delete_data[\"id\"])) {\n $id = $delete_data[\"id\"];\n if ($id <= 0) {\n $this->invalid_data_format(array(\n 'error' => 'Invalid Data Format',\n 'SampleJsonDataFormat' => '[{\"id\":24}]'\n ));\n return;\n }\n } else {\n $statusCode = 400;\n $this->setHttpHeaders(\"application/json\", $statusCode);\n $rows = array(\n 'error' => 'Invalid Data Format Gopi',\n 'SampleJsonDataFormat' => '{\"id\":24}'\n );\n $response = json_encode($rows);\n echo $response;\n return;\n }\n $db = new DB();\n $conn = $db->connect();\n if (empty($conn)) {\n $statusCode = 404;\n $rawData = array(\n 'error' => 'No databases found!'\n );\n $response = json_encode($rawData);\n echo $response;\n return;\n } else {\n $statusCode = 200;\n }\n $stmt = $conn->prepare(\"Delete from user_agents where id=?\");\n $stmt->bind_param('i', $id);\n $stmt->execute();\n $conn->close();\n\n $this->setHttpHeaders(\"application/json\", $statusCode);\n }", "public function business_service_gallery_delete() {\n $post_data = $this->input->post();\n $data['result'] = $this->Cs_vendor->delete_business_service_gallery_edit($post_data);\n\n echo json_encode($data);\n }", "public function destroy(Advertisement $advertisement)\n {\n //\n }", "public function actionDelete() {\n if (Yii::app()->request->isPostRequest) {\n //$ids = base64_decode($_POST['ids']);\n $ids = isset($_POST['ids']) ? $_POST['ids'] : 0;\n $res = new PERSONA;\n $arroout = $res->removerPersona($ids);\n header('Content-type: application/json');\n echo CJavaScript::jsonEncode($arroout);\n }\n }", "public function deleteAdditionalDesigner()\n { \n\t\tAditionalDesigner::find(Input::get('id'))->delete();\n\t\treturn Response::json(array('status' => 'deleted'),200);\n \n }", "public function delete($id)\n {\n $advertisement = Advertisement::findOrFail($id)->delete();\n \\Session::flash('success', 'Advertisement Delete Successfully');\n return back();\n }", "public function destroy(Request $request)\n {\n try {\n $query = $this->rlt_ads_categories_m->findOrFail(decrypt($request->input(RltAdsCategories_m::getPrimaryKey())));\n } catch (\\Illuminate\\Database\\Eloquent\\ModelNotFoundException $e) {\n return redirect(action('\\\\'.get_class($this).'@index'))->with('global_message', array('status' => 400,'message' => 'Token Mismatch, Try Again !'));\n }\n\n $this->authorize('delete-master-ads', $query);\n\n try {\n if($query->delete())\n {\n return redirect(action('\\\\'.get_class($this).'@index'))->with('global_message', array('status' => 200,'message' => 'Successfully Delete Ads Package!'));\n }\n \n } catch (\\Exception $e) {\n return redirect(action('\\\\'.get_class($this).'@index'))->with('global_message', array('status' => 400,'message' => 'Failed Delete Ads Package, It\\'s Has Been Used!'));\n }\n }", "#[CustomOpenApi\\Operation(id: 'leadDestroy', tags: [Tags::Lead, Tags::V1])]\n #[OpenApi\\Parameters(factory: DefaultHeaderParameters::class)]\n #[OpenApi\\Response(factory: GenericSuccessMessageResponse::class)]\n #[CustomOpenApi\\ErrorResponse(exception: UnauthorisedTenantAccessException::class)]\n public function destroy(Lead $lead): JsonResponse\n {\n $lead->checkTenantAccess()->delete();\n return GenericSuccessMessageResponse::getResponse();\n }", "public function delete()\n {\n try {\n $this->load->model('checkout/order');\n $this->load->model('extension/payment/maxipago');\n\n $response = array('success' => false, 'message' => '');\n $order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);\n $id_customer = $order_info['customer_id'];\n\n if ($id_customer) {\n $description = $this->request->post['ident'];\n $sql = 'SELECT *\n FROM ' . DB_PREFIX . 'maxipago_cc_token\n WHERE `id_customer` = \\'' . $id_customer . '\\'\n AND `description` = \\'' . $description . '\\'\n LIMIT 1; ';\n $ccSaved = $this->db->query($sql)->row;\n\n if ($this->model_extension_payment_maxipago->deleteCC($ccSaved)) {\n $response = array('success' => true);\n }\n }\n } catch (Exception $e) {\n $response['success'] = false;\n $response['message'] = $e->getMessage();\n }\n\n if (is_array($response) || is_object($response)) {\n $response = json_encode($response);\n }\n\n $this->response->addHeader('Content-Type: application/json');\n $this->response->setOutput($response);\n }", "public function delete(){\r\n $rsid_array = $this -> uri -> segment_array();\r\n\r\n foreach ($rsid_array as $key => $value) {\r\n \r\n //If the key is greater than 2 i.e is one of the the ids\r\n if ($key > 2) {\r\n\r\n //Run delete\r\n $this -> db -> delete('refSubs', array('id' => $value));\r\n\r\n } \r\n }\r\n\r\n }", "public function delete_delete(){\n $response = $this->PersonM->delete_person(\n $this->delete('id')\n );\n $this->response($response);\n }", "public function destroy($id)\n {\n $adds=Advertisement::findOrFail($id);\n unlink(public_path().$adds->image->photo->path);\n Photo::findOrfail($adds->image->photo->id)->delete();\n ImageAdvertisement::where('advertisement_id',$id)->delete();\n Session::flash('add_change','Advertisement has been successfully deleted!');\n $adds->delete();\n return redirect('advertisement');\n }", "function DeleteCampaigns($proxy, $accountId, $campaignIds)\n{\n $request = new DeleteCampaignsRequest();\n $request->AccountId = $accountId;\n $request->CampaignIds = $campaignIds;\n \n $proxy->GetService()->DeleteCampaigns($request);\n}", "public function destroy(leads $leads)\n {\n //\n }", "public function delete($ap_id){\n\t\t$mysqli = Configuration::mysqli_configation();\n\t\t$mainObj = Array(\"status\"=>false, \"msg\"=>\"Deleting failed, Please try one more time\");\t\t \t\t \n\t\t$update_query = \"DELETE FROM `tbl_article_published` WHERE ap_id = '$ap_id'\";\n\t\t$result = $mysqli->query($update_query); \t\t\t\n\t\tif($result){\t\t\t\n\t\t\t$mainObj['status'] = true;\n\t\t\t$mainObj['msg'] = 'Deleted successfully';\n\t\t}\n\t\treturn $mainObj;\n\t}", "public function destroy($id)\n { \n $id = Hashids::decode($id)[0];\n \n $ad = Ad::find($id);\n \n if($ad){\n updateSyncData('ad_delete',$ad->id,$ad->store_id);\n $ad->delete();\n $response['success'] = 'Ad deleted!';\n $status = $this->successStatus; \n }else{\n $response['error'] = 'Ad not exist against this id!';\n $status = $this->errorStatus; \n }\n return response()->json(['result'=>$response], $status);\n\n }", "public function destroy(MainAd $mainAd){\n if(MainAd::destroyIt($mainAd)) return redirect()->route('ads')->withSuccess('Reklama izbrisana');\n }", "public function deleteContactoAction()\n {\n \n $isAjax = $this->get('Request')->isXMLhttpRequest();\n \n $response = new JsonResponse();\n \n $idcontacto = $this->get('request')->request->get('idcontacto');\n \n \n foreach($idcontacto as $row){\n $em = $this->getDoctrine()->getManager();\n $detalleOrden = $em->getRepository('ERPAdminBundle:CrmContacto')->find($row);\n $em->remove($detalleOrden);\n $em->flush();\n \n }\n \n $response->setData(array(\n 'flag' => 0,\n \n )); \n return $response; \n \n \n \n \n }", "public function destroy(Advertisement $advertisement)\n {\n $advertisement->delete();\n return back()->with('msg','اطلاعات با موفقیت حذف شد');\n }", "protected function _delete()\r\n\t{\r\n\t\t$oFlexSliderSlider = new FlexSliderSlider($this -> _iId);\r\n\t\t$mStatus = $oFlexSliderSlider -> delete();\r\n\t\t//$this -> _removeSlides($this -> _iId);\r\n\t\t$this -> _aRedirect['id'] = false;\r\n\t\t$this -> _aRedirect['action'] = false;\r\n\t\t\t\r\n\t\tif (is_string($mStatus))\r\n\t\t{\r\n\t\t\t$this -> _aRedirect['message'] = $mStatus;\r\n\t\t}\r\n\t\telse if ($mStatus === true)\r\n\t\t{\r\n\t\t\t$this -> _aRedirect['message'] = 'removed';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this -> _aRedirect['message'] = 'error';\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function delete(Request $request){\n if($request->request->has(\"delete\")){\n $this->getDoctrine()->getManager()->getRepository('App:Articles')->deleteArticle($request->request->get('dA'));\n $this->getDoctrine()->getManager()->getRepository('App:Commandes')->deleteCommande($request->request->get('delete'));\n $this->getDoctrine()->getManager()->getRepository('App:Clients')->deleteClient($request->request->get('delete'));\n return $this->redirect(\"/\");\n }\n }", "function index_delete() {\n $calon = $this->delete('id_calon');\n $this->db->where('id_calon', $calon);\n $delete = $this->db->delete('calon');\n if ($delete) {\n $this->response(array('status' => 'success'), 201);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "public function destroy($id)\n {\n $ads = Ads::findOrFail($id);\n $image_name = $ads->image;\n if($ads->position === 'left1'){\n File::delete(public_path('uploads/ads_image/template1/adsLeft/' . $image_name));\n }\n elseif($ads->position === 'middle1'){\n File::delete(public_path('uploads/ads_image/template1/adsMiddle/' . $image_name));\n }\n elseif($ads->position === 'topRight1'){\n File::delete(public_path('uploads/ads_image/template1/adsTopRight/' . $image_name));\n }\n elseif($ads->position === 'bottomRight1'){\n File::delete(public_path('uploads/ads_image/template1/adsBottomRight/' . $image_name));\n }\n elseif($ads->position === 'left2'){\n File::delete(public_path('uploads/ads_image/template2/adsLeft/' . $image_name));\n }\n elseif($ads->position === 'topRight2'){\n File::delete(public_path('uploads/ads_image/template2/adsTopRight/' . $image_name));\n }\n elseif($ads->position === 'bottomRight2'){\n File::delete(public_path('uploads/ads_image/template2/adsBottomRight/' . $image_name));\n }\n elseif($ads->position === 'middle3'){\n File::delete(public_path('uploads/ads_image/template3/adsMiddle/' . $image_name));\n }\n $ads->delete();\n // return redirect()->route('ads.index');\n Alert::success('Delete Ads', 'Successfully Deleted Ads');\n return response()->json([\n 'success' => 'Record deleted successfully!'\n ]);\n }", "function cp_delete_form($form_id) {\r\n global $wpdb;\r\n\r\n\t$wpdb->query( $wpdb->prepare( \"DELETE FROM \" . $wpdb->prefix . \"cp_ad_forms WHERE id = %s\", $form_id ) );\r\n\t$wpdb->query( $wpdb->prepare( \"DELETE FROM \" . $wpdb->prefix . \"cp_ad_meta WHERE form_id = %s\", $form_id ) );\r\n}", "function delete_kardex_academico($kardexacad_id)\n {\n return $this->db->delete('kardex_academico',array('kardexacad_id'=>$kardexacad_id));\n }", "public function deleteAction()\n {\n Extra_ErrorREST::setInvalidHTTPMethod($this->getResponse());\n }", "public function deleting()\n {\n # code...\n }", "public function destroy($id)\n {\n try {\n \n $banner = Banner::find($id);\n $banner->delete();\n return Response::json(array('status' => 'success' , 'message' => 'Successfully deleted ! ' ),200);\n \n }catch (Exception $ex ){\n return Response::json(array('status' => 'error' , 'error' => $ex->getMessage() ),500);\n }\n }", "protected function _postDelete()\n\t{\n\t}", "public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Browser_Service_Recsite::getRecsite($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\tUtil_File::del(Common::getConfig('siteConfig', 'attachPath') . $info['img']);\n\t\t$result = Browser_Service_Recsite::deleteRecsite($id);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function deleteAdAction(Request $request, $id)\n\n {\n $em = $this->getDoctrine()->getManager();\n $advert = $em->getRepository('AppBundle:Advert')->find($id);\n\n //check if the advert exist\n if ($advert == null) {\n throw new NotFoundHttpException(\"The page with the id : \" . $id . \" dosen't exist\");\n }\n\n $form = $this->get('form.factory')->create();\n\n //check if we receive a post query => the user want to delete the advert\n if ($request->isMethod('POST') && $form->handleRequest($request)->isValid()) {\n //we remove the advert\n $em->remove($advert);\n $em->flush();\n\n //redirect to the home page\n return $this->redirectToRoute('app_homepage');\n }\n\n //if there is no POST method we return the delete page\n return $this->render('@App/Site/deleteAd.html.twig', array(\n 'advert' => $advert,\n 'form' => $form->createView(),\n\n ));\n }", "function dels(){\r\n if(!empty($_POST['ar_id']))\r\n {\r\n $page = (int)$this->input->post('page');\r\n $ar_id = $this->input->post('ar_id');\r\n for($i = 0; $i < sizeof($ar_id); $i ++) {\r\n if ($ar_id[$i]){\r\n if($this->vdb->delete('ads_right', array('id'=>$ar_id[$i])))\r\n $this->session->set_flashdata('message','Đã xóa thành công');\r\n else $this->session->set_flashdata('error','Xóa không thành công');\r\n }\r\n }\r\n }\r\n redirect('ads_right/listads/'.$page);\r\n }", "public function Admin_Action_Delete() {\n if (isset ( $_POST ['tagids'] )) {\n if (! is_array ( $_POST ['tagids'] )) {\n $_POST ['tagids'] = array ($_POST ['tagids'] );\n }\n $ids = implode ( \"','\", $_POST ['tagids'] );\n\n $this->db->StartTransaction ();\n $query = \"DELETE\" . \" FROM [|PREFIX|]dynamic_content_tags\" . \" WHERE tagid in ('\" . $ids . \"')\";\n\n if (! $result = $this->db->Query ( $query )) {\n // Error message\n $this->db->RollbackTransaction ();\n FlashMessage ( GetLang ( 'Addon_dynamiccontenttags_Delete_Failure' ), SS_FLASH_MSG_ERROR, $this->admin_url );\n return false;\n }\n $query = \"DELETE\" . \" FROM [|PREFIX|]dynamic_content_block\" . \" WHERE tagid in ('\" . $ids . \"')\";\n\n if (! $result = $this->db->Query ( $query )) {\n // Error message\n $this->db->RollbackTransaction ();\n FlashMessage ( GetLang ( 'Addon_dynamiccontenttags_Delete_Failure' ), SS_FLASH_MSG_ERROR, $this->admin_url );\n return false;\n }\n $this->db->CommitTransaction ();\n FlashMessage ( GetLang ( 'Addon_dynamiccontenttags_Delete_Success' ), SS_FLASH_MSG_SUCCESS, $this->admin_url );\n return true;\n } else {\n FlashMessage ( GetLang ( 'Addon_dynamiccontenttags_Delete_Failure' ), SS_FLASH_MSG_ERROR, $this->admin_url );\n return false;\n }\n }", "public function destroy(Request $request)\n {\n $Documentos_Adjuntos = new Documentos_Adjuntos;\n $val= $Documentos_Adjuntos::where(\"id_doc_adj\",\"=\",$request['id_doc_adj'] )->first();\n if(count($val)>=1)\n {\n $val->delete();\n }\n return \"destroy \".$request['id_doc_adj'];\n }", "public function actionDeleteEntryAttachement()\n {\n\n }", "public function AdminDeleteAirlineProcess(Request $request) {\n $airline = Airline::find($request->airline_id);\n\n /* delete image */\n\n\n /* End delete image */\n\n $airline->delete();\n\n return redirect()->route('admin-airline');\n }", "public function delete(Request $request, Response $response, ArgumentParser $args): Response\n\t{\n\t\t$response = parent::delete($request, $response, $args);\n//\t\t$this->sendNotificationEmail('Your account has been deleted. Bye.',\n// $entity = $this->getObject($this->getModifyId($args))->getEmail());\n\t\treturn $response;\n\t}", "function delete_campaign_list($id, $taxonomy) {\n if ($taxonomy === 'category') {\n require_once 'createsend-php-5.1.2/csrest_lists.php';\n $auth = array('api_key' => CM_API_KEY);\n $wrap = new CS_REST_Lists(get_term_meta($id, 'list_id', true), $auth);\n\n $result = $wrap->delete();\n }\n}", "public function handleGrievanceDelete($id)\n {\n $Grievance = new Grievance;\n $re=$Grievance->deleteGrievance($id);\n SentryHelper::setMessage('Grievance Deleted....');\n return Redirect::to('grievance/list');\n }", "function del(){\r\n $id = $this->uri->segment(3);\r\n $page = $this->uri->segment(4);\r\n if($this->vdb->delete('ads_right', array('id'=>$id)))\r\n $this->session->set_flashdata('message','Đã xóa thành công');\r\n else $this->session->set_flashdata('message','Xóa không thành công');\r\n redirect('ads_right/listads/'.$page);\r\n }", "function absenrich_delete(){\r\n\t\t$ids = $_POST['ids']; // Get our array back and translate it :\r\n\t\t$pkid = json_decode(stripslashes($ids));\r\n\t\t$result=$this->m_absensi_enrichment->absenrich_delete($pkid);\r\n\t\techo $result;\r\n\t}", "public function delete_assets_category() {\n\t\t\n\t\tif($this->input->post('type')=='delete_record') {\n\t\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t\t$Return = array('result'=>'', 'error'=>'', 'csrf_hash'=>'');\n\t\t\t$id = $this->uri->segment(4);\n\t\t\t$Return['csrf_hash'] = $this->security->get_csrf_hash();\n\t\t\t$result = $this->Assets_model->delete_assets_category_record($id);\n\t\t\tif(isset($id)) {\n\t\t\t\t$Return['result'] = $this->lang->line('xin_success_assets_category_deleted');\n\t\t\t} else {\n\t\t\t\t$Return['error'] = $this->lang->line('xin_error_msg');\n\t\t\t}\n\t\t\t$this->output($Return);\n\t\t}\n\t}", "protected function delete() {\n\t}", "public function remove_leads()\n {\n global $wpdb;\n $leads_to_delete = implode(',', $_POST['delete_lead']);\n\n // Update the prospect data\n $wpdb->query($wpdb->prepare(\n 'DELETE FROM `' . $this->table_name . '`\n\t\t\t WHERE `id` IN (' . $leads_to_delete . ')'\n ));\n\n wp_redirect(admin_url('edit.php?post_type=' . $this->token . '&page=' . $this->token . '_leads&deleted=true'));\n die();\n }", "protected function deleted()\n {\n $this->response = $this->response->withStatus(204);\n $this->jsonBody($this->payload->getOutput());\n }", "function gallery2_adminapi_deletehook($args)\n{\n // switch delete / purge roles and removemember hook calls\n if (isset($args['extrainfo']['uid'])) {\n // removemember hook call\n return _gallery2_adminapi_removememberhook($args);\n } else {\n // delete/purge role hook call\n return _gallery2_adminapi_deleterolehook($args);\n }\n}", "public function deleteImages()\n {\n if ($images = $this->getImages()->all()) {\n foreach ($images as $image) {\n /* @var $image AdImages */\n $image->delete();\n }\n }\n }", "public function destroy(Request $request)\n {\n try {\n (new AdmController)->delete( self::edit( $request->all()[ \"id\" ] ) , $this->model->getFillable() );\n return 1;\n } catch (\\Throwable $th) {\n return 0;\n }\n }", "public function destroy(Ad $ad)\n {\n //\n }", "public function destroy(Ad $ad)\n {\n //\n }", "public function delete($idPersonas);", "public function destroy($id)\n {\n $ad=Ad::find($id);\n \n $ad->delete($id);\n \n return back()->with('success','Ad delete successfully');\n }", "public function removeCareplanDiagnosis(Request $request){\r\n \r\n $delete = $this->careplan->deleteCareplanDiagnosisGoal($request);\r\n $status = 'success';\r\n if($delete){\r\n $message = trans('message.remove_careplan_diagnosis');\r\n }\r\n else{\r\n $status = 'error';\r\n $message = trans('message.error_remove_careplan_diagnosis');\r\n }\r\n $careplanId = encrypt_decrypt('decrypt', $request->get('careplanId'));\r\n $diagnosisList = $this->careplan->getCareplanDiagnosis($careplanId);\r\n $is_careplan_detail = '';\r\n $diagnosisHtml = view('patients.caseload.care_plan.careplan_diagnosis_list', compact('diagnosisList','is_careplan_detail'))->render();\r\n return $this->respond([\r\n 'status' => $status,\r\n 'message'=> $message,\r\n 'diagnosis_html' => $diagnosisHtml\r\n ]);\r\n }", "public function cliente_delete(){\n\t\t$cliente_id = $this->uri->segment(3);\n\n\t\t$respuesta = $this->Cliente_model->delete($cliente_id);\n\t\t\n\t\t$this->response($respuesta);\n\t}", "public function delete($request, $args) {\n $result = [];\n\n $id = $args['id'];\n \n $deleteResult = $this->videoGameService->delete($id);\n\n if (array_key_exists(\"error\", $deleteResult)) {\n $result[\"error\"] = true;\n }\n\n $result[\"message\"] = $deleteResult[\"message\"];\n \n return $result;\n }", "function alat_delete(){\r\n\t\t$ids = $_POST['ids']; // Get our array back and translate it :\r\n\t\t$pkid = json_decode(stripslashes($ids));\r\n\t\t$result=$this->m_alat->alat_delete($pkid);\r\n\t\techo $result;\r\n\t}", "function line_allowance_charge_delete($args)\n {\n global $_lib;\n $query = \"delete from $this->line_allowance_charge_table where InvoiceLineAllowanceChargeID = \" . $args['InvoiceLineAllowanceChargeID'];\n return $_lib['db']->db_delete($query);\n }", "public function deleteAction() {\n\t\t$id = filter_var($this->_request->getParam('id'), FILTER_VALIDATE_INT);\n\t\tif ($id !== false) {\n\t\t\treturn Models_Mapper_Tag::getInstance()->delete($id);\n\t\t} else {\n\t\t\t$this->_error(null, self::REST_STATUS_NOT_FOUND);\n\t\t}\n\t}", "public function delete_asset() {\n\t\t\n\t\tif($this->input->post('type')=='delete_record') {\n\t\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t\t$Return = array('result'=>'', 'error'=>'', 'csrf_hash'=>'');\n\t\t\t$id = $this->uri->segment(4);\n\t\t\t$Return['csrf_hash'] = $this->security->get_csrf_hash();\n\t\t\t$result = $this->Assets_model->delete_assets_record($id);\n\t\t\tif(isset($id)) {\n\t\t\t\t$Return['result'] = $this->lang->line('xin_success_asset_deleted');\n\t\t\t} else {\n\t\t\t\t$Return['error'] = $this->lang->line('xin_error_msg');\n\t\t\t}\n\t\t\t$this->output($Return);\n\t\t}\n\t}", "public function deletePost(Request $request)\n {\n \t$id \t\t\t= $request['id'];\n \t$arCategory \t= GalleryCategory::find($id);\n\n \t// Init Variable & Path\n \t$aum_id = Auth::user()->aum_list_id;\n $full_size_dir = $path = public_path('files'.DIRECTORY_SEPARATOR.'galeri'.DIRECTORY_SEPARATOR.$aum_id.DIRECTORY_SEPARATOR);\n $icon_size_dir = $path = public_path('files'.DIRECTORY_SEPARATOR.'galeri'.DIRECTORY_SEPARATOR.$aum_id.DIRECTORY_SEPARATOR.'thumb-');\n\n \t// Delete Gallery Items\n \t$images \t\t= Gallery::where('gallery_category_id',$id)->get();\n \tforeach ($images as $image) {\n\t \t$full_path1 = $full_size_dir . $image->filename;\n\t $full_path2 = $icon_size_dir . $image->filename;\n\n\t // Delete if any gallery item\n\t if ( File::exists( $full_path1 ) )\n\t {\n\t File::delete( $full_path1 );\n\t }\n\t if ( File::exists( $full_path2 ) )\n\t {\n\t File::delete( $full_path2 );\n\t }\n\t // EOF Delete if any gallery item\n\n\t // delete gallery items from db\n\t $image->delete();\n \t} // EOF Foreach\n\n \t$arCategory->delete(); // delete gallery category\n\n \treturn 'Galeri & semua gambar berhasil dihapus';\n }", "function deleteAuthor($id){\r\n $url = \"http://localhost:8080/WebServicesProjet/api/rest/authors/delete/\".$id;\r\n $result = delete($url);\r\n if(intval($result) != 200 && intval($result)<=503 && intval($result)>=400){\r\n header(\"Location: \".$_SERVER['HTTP_ORIGIN'].$_SERVER['PHP_SELF'].'?/authors');\r\n die();\r\n }else{\r\n header(\"Location: \".$_SERVER['HTTP_ORIGIN'].$_SERVER['PHP_SELF'].'?/authors');\r\n die();\r\n }\r\n\r\n}", "public function destroy($id)\n\t{\n\t\t\\App\\Gallery::find($id)->delete(); \n\t\treturn redirect('dashboard/adgallery');\n\t}", "public function deleteAudSeatsById($request, $response, $args){\n\t\t$id = $args['id'];\n\t\t\n $validations = [\n v::intVal()->validate($id)\n ];\n\n if ($this->validate($validations) === false) {\n return $response->withStatus(400);\n }\n\t\t\n\t\t$delete = Models\\AuditoriumSeatCategory::find($id)->delete();\n\t\t//return $response->withJson(json_encode(array(\"status\" => TRUE)));\n\t}", "public static function delete( $request ) {\n \n $params = $request->get_params();\n \n if( ! is_array( $params ) && !isset( $params['post_ids'] ) ) {\n return false;\n }\n \n $post_ids = $params['post_ids']; \n \n $removed = packages_delete( $post_ids );\n \n $retval = array( \n //'message' => $this->message, \n 'packages' => $removed,\n 'favorites_count' => favorites_count(), \n 'quotes_count' => quotes_count(), \n );\n \n return packages_get_response( $retval ); \n \n }", "public function destroy($id, $img)\n {\n \n $main_services = main_services::findOrfail($id);\n $main_services->destroy($id);\n \n return response()->json([\n 'success' => 'Record deleted successfully!',\n ]);\n }", "public function deleteLead($leads_id)\n {\n $leadDetails = LeadDetails::find($leads_id);\n if ($leadDetails) {\n $leadDetails->active = 0;\n $leadDetails->save();\n Session::flash('status', 'Lead deleted successfully.');\n return \"success\";\n }\n }", "public function delete($campaignId);", "public function destroy($rattrapge_id)\n {\n $rattrapage=Rattrapage::find($rattrapge_id);\n $rattrapage->delete();\n\n return redirect()->route('rattrapage.index');\n }", "public function destroy(Lead $lead)\n {\n //\n }", "public function delete() {}", "public function delete() {}", "public function delete() {}", "function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }", "function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }" ]
[ "0.62508714", "0.62396455", "0.6223387", "0.61689055", "0.6130596", "0.6074272", "0.5975844", "0.59694594", "0.5891316", "0.58311903", "0.58303595", "0.5820093", "0.5786759", "0.57838917", "0.57807374", "0.5780611", "0.5680963", "0.5671262", "0.5666077", "0.5652374", "0.5624899", "0.56236297", "0.5622795", "0.56075686", "0.5595621", "0.5579221", "0.55764323", "0.55655456", "0.556545", "0.55585456", "0.55571365", "0.55543494", "0.55477667", "0.55358046", "0.55324936", "0.55180746", "0.55144256", "0.54978", "0.5493732", "0.5490044", "0.5489699", "0.5488123", "0.54861355", "0.5478939", "0.54747355", "0.5472392", "0.54710615", "0.5470376", "0.546815", "0.5461834", "0.5458515", "0.54566616", "0.54562086", "0.54560333", "0.54535115", "0.54494214", "0.54453474", "0.5439962", "0.54284537", "0.54249465", "0.54236645", "0.5420517", "0.54175216", "0.5411594", "0.54040986", "0.5394018", "0.5393022", "0.5386733", "0.53804684", "0.5377953", "0.53767484", "0.53751236", "0.5374928", "0.5374876", "0.5372268", "0.5372268", "0.53692174", "0.5367454", "0.53651667", "0.53626126", "0.53546494", "0.5350964", "0.5349206", "0.5348012", "0.5347845", "0.53452927", "0.5339175", "0.53361374", "0.5335506", "0.5334562", "0.53325295", "0.53244126", "0.53240454", "0.53142196", "0.531212", "0.5311553", "0.53112763", "0.53112763", "0.53102607", "0.53102607" ]
0.66548175
0
Handle AdcreativesApi adcreativesDeleteAsync function
public function deleteAsync(array $params = []) { return $this->handleMiddleware('delete', $params, function(MiddlewareRequest $request) { $params = $request->getApiMethodArguments(); $data = $params; $response = $this->apiInstance->adcreativesDeleteAsync($data); return $response; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete(array $params = [])\n {\n return $this->handleMiddleware('delete', $params, function(MiddlewareRequest $request) {\n $params = $request->getApiMethodArguments();\n $data = $params;\n $response = $this->apiInstance->adcreativesDelete($data);\n return $this->handleResponse($response);\n });\n }", "public function deleteAdvertiser(Request $request){\n return $this->repository->delete((int) $request->route()->parameter('id'));\n }", "public function deleteAction($request, $response, $args){\n // /api/experience/{cv_id}/{id}\n $cv_id = $args['cv_id'];\n $experience_id = $args['id'];\n\n //caut in baza de date cv-ul cu id-ul respectiv\n $cvObject = CV::where('pk_id','=',$cv_id)->first();\n\n //verific daca exista cv-ul cu id-ul respectiv;\n if(is_null($cvObject)){\n //obiectul cv este null, deci returnez mesaj de eroare\n return $response->withJson([\n 'message' => \"CV id invalid\",\n 'status' => 400\n ], 400);\n }\n\n //caut in baza de date informatia despre experienta cu id-ul respectiv\n $experienceObject = Experience::where('pk_id','=',$experience_id)->first();\n \n //verific daca experienceObject este null\n if(is_null($experienceObject)){\n //experienceObject este null, deci returnez mesaj de eroare\n return $response->withJson([\n 'message' => \"Experience id invalid\",\n 'status' => 400\n ], 400);\n }\n\n //sterg din baza de date\n Experience::where('pk_id','=',$experience_id)->delete();\n\n //returnez mesajul de success\n return $response->withJson([\n \"message\" => \"Delete success\",\n \"status\" => 200\n ], 200);\n }", "public function delete($request, $response)\n {\n }", "public function deleteBanner() {\n $_DELETE = $this->getDeleteData();\n if (isset($_DELETE['id'])) {\n $id = $_DELETE['id'];\n } else {\n throw new RestException(HttpStatusCodes::BAD_REQUEST, \"Missing required params\");\n }\n try {\n\n Banner::deleteBanner($id);\n } catch (Exception $e) {\n throw new RestException($e->getCode(), $e->getMessage());\n }\n }", "public function deleteAction($request, $response, $args){\n // /api/skills/{cv_id}/{id}\n $cv_id = $args['cv_id'];\n $skill_id = $args['id'];\n\n //caut in baza de date cv-ul cu id-ul respectiv\n $cvObject = CV::where('pk_id','=',$cv_id)->first();\n\n //verific daca exista cv-ul cu id-ul respectiv;\n if(is_null($cvObject)){\n //obiectul cv este null, deci returnez mesaj de eroare\n return $response->withJson([\n 'message' => \"CV id invalid\",\n 'status' => 400\n ], 400);\n }\n\n //caut in baza de date informatia despre educatie cu id-ul respectiv\n $skillObject = Skills::where('pk_id','=',$skill_id)->first();\n \n //verific daca skillObject este null\n if(is_null($skillObject)){\n //skillObject este null, deci returnez mesaj de eroare\n return $response->withJson([\n 'message' => \"Skill id invalid\",\n 'status' => 400\n ], 400);\n }\n\n //Stergere din baza de date\n Skills::where('pk_id','=',$skill_id)->delete();\n\n //returnez mesajul de success\n return $response->withJson([\n \"message\" => \"Delete success\",\n \"status\" => 200\n ], 200);\n }", "public function delete()\r\n\t{\r\n\t\t$this->auth->restrict('Banner.Content.Delete');\r\n\r\n\t\t$id = $this->uri->segment(6);\r\n\r\n\t\tif (!empty($id))\r\n\t\t{\r\n\r\n\t\t\tif ($this->banner_group_model->delete($id))\r\n\t\t\t{\r\n\t\t\t\t// Log the activity\r\n\t\t\t\t$this->activity_model->log_activity($this->current_user->id, lang('banner_act_delete_record').': ' . $id . ' : ' . $this->input->ip_address(), 'banner');\r\n \r\n // Delete all banner in the group\r\n\t\t\t\t$this->banner_model->delete_where(array('banner.group_id' => $id));\r\n \r\n\t\t\t\tTemplate::set_message(lang('banner_delete_success'), 'success');\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tTemplate::set_message(lang('banner_delete_failure') . $this->banner_group_model->error, 'error');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tredirect(SITE_AREA .'/content/banner/groups');\r\n\t}", "#[CustomOpenApi\\Operation(id: 'leadDestroy', tags: [Tags::Lead, Tags::V1])]\n #[OpenApi\\Parameters(factory: DefaultHeaderParameters::class)]\n #[OpenApi\\Response(factory: GenericSuccessMessageResponse::class)]\n #[CustomOpenApi\\ErrorResponse(exception: UnauthorisedTenantAccessException::class)]\n public function destroy(Lead $lead): JsonResponse\n {\n $lead->checkTenantAccess()->delete();\n return GenericSuccessMessageResponse::getResponse();\n }", "public function destroy(CandidateNonrelatives $nonRelatives)\n {\n $nonRelatives->delete();\n if(!Auth::guard('candidate')->user()->educations->count()){\n Auth::guard('candidate')->user()->progress->where('section_id',10)->first()->delete();\n }\n return redirect('/nonRelatives');\n }", "function DeleteAdGroupRemarketingListAssociations($proxy, $adGroupRemarketingListAssociations)\n{\n $request = new DeleteAdGroupRemarketingListAssociationsRequest();\n $request->AdGroupRemarketingListAssociations = $adGroupRemarketingListAssociations;\n \n return $proxy->GetService()->DeleteAdGroupRemarketingListAssociations($request);\n}", "function DeleteCampaigns($proxy, $accountId, $campaignIds)\n{\n $request = new DeleteCampaignsRequest();\n $request->AccountId = $accountId;\n $request->CampaignIds = $campaignIds;\n \n $proxy->GetService()->DeleteCampaigns($request);\n}", "public function deleteResourceAdhoc(Request $request)\n {\n try {\n $data = $request->all();\n $unavailable_adhocs = new UnavailableAdhocs();\n return $unavailable_adhocs->deleteAdhoc($data);\n\n } catch (Exception $exception) {\n return back()->withInput()\n ->withErrors(['unexpected_error' => $exception->getMessage()]);\n }\n }", "protected function deleted()\n {\n $this->response = $this->response->withStatus(204);\n $this->jsonBody($this->payload->getOutput());\n }", "public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Client_Service_Ad::getAd($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\t$result = Client_Service_Ad::deleteAd($id);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function destroy($id)\n {\n $ads = Ads::find($id);\n $ads->delete();\n AdImage::where('ad_id', $id)->delete();\n return redirect()->route('ads')->with('success', 'Advertisement deleted successfully');\n }", "public function deleteAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Gou_Service_Ad::getAd($id);\r\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\r\n//\t\tUtil_File::del(Common::getConfig('siteConfig', 'attachPath') . $info['img']);\r\n\t\t$result = Gou_Service_Ad::deleteAd($id);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "public function postDelete($interaction)\n {\n // Was the ad deleted?\n if($interaction->delete()) {\n // Redirect to the ad management page\n return Redirect::to('admin/successful-delete')->with('success', Lang::get('admin/interactions/messages.delete.success'));\n }\n\n // There was a problem deleting the ad\n return Redirect::to('admin/interactions')->with('error', Lang::get('admin/interactions/messages.delete.error'));\n }", "public function destroy(reciclaeducate $reciclaeducate)\n {\n //\n }", "public function destroy($id)\n {\n try {\n \n $banner = Banner::find($id);\n $banner->delete();\n return Response::json(array('status' => 'success' , 'message' => 'Successfully deleted ! ' ),200);\n \n }catch (Exception $ex ){\n return Response::json(array('status' => 'error' , 'error' => $ex->getMessage() ),500);\n }\n }", "public function destroy(Request $request)\n {\n try {\n $query = $this->rlt_ads_categories_m->findOrFail(decrypt($request->input(RltAdsCategories_m::getPrimaryKey())));\n } catch (\\Illuminate\\Database\\Eloquent\\ModelNotFoundException $e) {\n return redirect(action('\\\\'.get_class($this).'@index'))->with('global_message', array('status' => 400,'message' => 'Token Mismatch, Try Again !'));\n }\n\n $this->authorize('delete-master-ads', $query);\n\n try {\n if($query->delete())\n {\n return redirect(action('\\\\'.get_class($this).'@index'))->with('global_message', array('status' => 200,'message' => 'Successfully Delete Ads Package!'));\n }\n \n } catch (\\Exception $e) {\n return redirect(action('\\\\'.get_class($this).'@index'))->with('global_message', array('status' => 400,'message' => 'Failed Delete Ads Package, It\\'s Has Been Used!'));\n }\n }", "public function deleteContactoAction()\n {\n \n $isAjax = $this->get('Request')->isXMLhttpRequest();\n \n $response = new JsonResponse();\n \n $idcontacto = $this->get('request')->request->get('idcontacto');\n \n \n foreach($idcontacto as $row){\n $em = $this->getDoctrine()->getManager();\n $detalleOrden = $em->getRepository('ERPAdminBundle:CrmContacto')->find($row);\n $em->remove($detalleOrden);\n $em->flush();\n \n }\n \n $response->setData(array(\n 'flag' => 0,\n \n )); \n return $response; \n \n \n \n \n }", "public function delete()\n {\n try {\n $this->load->model('checkout/order');\n $this->load->model('extension/payment/maxipago');\n\n $response = array('success' => false, 'message' => '');\n $order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);\n $id_customer = $order_info['customer_id'];\n\n if ($id_customer) {\n $description = $this->request->post['ident'];\n $sql = 'SELECT *\n FROM ' . DB_PREFIX . 'maxipago_cc_token\n WHERE `id_customer` = \\'' . $id_customer . '\\'\n AND `description` = \\'' . $description . '\\'\n LIMIT 1; ';\n $ccSaved = $this->db->query($sql)->row;\n\n if ($this->model_extension_payment_maxipago->deleteCC($ccSaved)) {\n $response = array('success' => true);\n }\n }\n } catch (Exception $e) {\n $response['success'] = false;\n $response['message'] = $e->getMessage();\n }\n\n if (is_array($response) || is_object($response)) {\n $response = json_encode($response);\n }\n\n $this->response->addHeader('Content-Type: application/json');\n $this->response->setOutput($response);\n }", "public function AdminDeleteAirlineProcess(Request $request) {\n $airline = Airline::find($request->airline_id);\n\n /* delete image */\n\n\n /* End delete image */\n\n $airline->delete();\n\n return redirect()->route('admin-airline');\n }", "public function deleteServiceAdhoc(Request $request)\n {\n try {\n $data = $request->all();\n $available_adhocs = new AvailableAdhocs();\n return $available_adhocs->deleteAdhoc($data);\n\n } catch (Exception $exception) {\n return back()->withInput()\n ->withErrors(['unexpected_error' => $exception->getMessage()]);\n }\n }", "public function deleteAction(Request $request, MainGallery $mainGallery)\n {\n// $form = $this->createDeleteForm($mainGallery);\n// $form->handleRequest($request);\n//\n// if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($mainGallery);\n $em->flush();\n// }\n return new Response (null, 204);\n// return $this->redirectToRoute('maingallery_index');\n }", "protected function _postDelete() {}", "protected function _postDelete() {}", "public function delete($request, $args) {\n $result = [];\n\n $id = $args['id'];\n \n $deleteResult = $this->videoGameService->delete($id);\n\n if (array_key_exists(\"error\", $deleteResult)) {\n $result[\"error\"] = true;\n }\n\n $result[\"message\"] = $deleteResult[\"message\"];\n \n return $result;\n }", "public function destroy(Atractivo $atractivo)\n {\n $atractivo->delete();\n return Response::json([\n 'success' => true,\n 'message' => 'Successfully deleted post.'\n ]);\n\n }", "public function destroy(Ad $ad)\n\t{\n\n $ad->delete();\n\n // redirect\n \\Session::flash('message','Ваше объявление было удалено!');\n return Redirect::to('ads');\n\t}", "public function destroy(Ac $ac)\n {\n $ac->delete();\nreturn response()->json(['message'=>'Eliminado correctamente'], 204);\n }", "public function destroy(Request $request)\n {\n $apartados = Apartado::where('id_apartado',$request->id_apartado)->delete();\n $response['message'] = \"Eliminaciòn exitosa\";\n $response['success'] = true;\n \n return $response;\n }", "public function destroy(Advertisement $advertisement)\n {\n //\n }", "public function delete($id) { \n $this -> advertisementsmodel -> delete_advertisement($id);\n $this -> session -> set_userdata('success_message', \"Advertisement deleted successfully\");\n redirect('advertisements', 'refresh');\n }", "public function delete(?AudienceRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise {\n $requestInfo = $this->toDeleteRequestInformation($requestConfiguration);\n try {\n $errorMappings = [\n '4XX' => [ODataError::class, 'createFromDiscriminatorValue'],\n '5XX' => [ODataError::class, 'createFromDiscriminatorValue'],\n ];\n return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings);\n } catch(Exception $ex) {\n return new RejectedPromise($ex);\n }\n }", "public function delete($data){\n\t\tif(empty($data['adgroup_id'])){\n\t\t\tthrow new \\Exception('adgroup id is required.');\n\t\t}\n\t\tif(empty($data['ad_id'])){\n\t\t\tthrow new \\Exception('ad_id is required.');\n\t\t}\n\t\t$operations = array();\n\t\t$textAd = new \\TextAd();\n\t\t$textAd->id = $data['ad_id'];\n\t\t\n\t\t// Create ad group ad.\n\t\t$adGroupAd = new \\AdGroupAd();\n\t\t$adGroupAd->adGroupId = $adGroupId;\n\t\t$adGroupAd->ad = $textAd;\n\t\t\n\t\t// Create operation.\n\t\t$operation = new \\AdGroupAdOperation();\n\t\t$operation->operand = $adGroupAd;\n\t\t$operation->operator = 'REMOVE';\t\t\n\t\t$operations = array($operation);\n\n\t\t// Make the mutate request.\n\t\t$result = $this->adGroupAdService->mutate($operations);\n\t\t$adGroupAd = $result->value[0];\n\t\treturn TRUE;\n\t}", "public function destroy(Advertisement $advertisement)\n {\n $advertisement->delete();\n return back()->with('msg','اطلاعات با موفقیت حذف شد');\n }", "public function deleteAdvertiser($id)\n {\n BeAdvertiserModel::find($id)->delete();\n Session::flash('success', SimpleClass::success_notice('Delete an advertiser is successfully'));\n return redirect()->route('be-advertiser.show');\n }", "function delete_record($_DELETE)\n {\n $delete_data = json_decode($_DELETE[\"0\"], true);\n if (isset($delete_data[\"id\"])) {\n $id = $delete_data[\"id\"];\n if ($id <= 0) {\n $this->invalid_data_format(array(\n 'error' => 'Invalid Data Format',\n 'SampleJsonDataFormat' => '[{\"id\":24}]'\n ));\n return;\n }\n } else {\n $statusCode = 400;\n $this->setHttpHeaders(\"application/json\", $statusCode);\n $rows = array(\n 'error' => 'Invalid Data Format Gopi',\n 'SampleJsonDataFormat' => '{\"id\":24}'\n );\n $response = json_encode($rows);\n echo $response;\n return;\n }\n $db = new DB();\n $conn = $db->connect();\n if (empty($conn)) {\n $statusCode = 404;\n $rawData = array(\n 'error' => 'No databases found!'\n );\n $response = json_encode($rawData);\n echo $response;\n return;\n } else {\n $statusCode = 200;\n }\n $stmt = $conn->prepare(\"Delete from user_agents where id=?\");\n $stmt->bind_param('i', $id);\n $stmt->execute();\n $conn->close();\n\n $this->setHttpHeaders(\"application/json\", $statusCode);\n }", "function DeleteAd() {\n\tglobal $smarty, $config, $dbconn;\n\t\n\t$id = intval($_REQUEST[\"id\"]);\n\t$dbconn->Execute(\"DELETE FROM \".SPONSORS_ADS_TABLE.\" WHERE id='\".$id.\"' \");\n\tListSponsors(\"list\");\n\t\n}", "public function destroy(Request $request)\n {\n $input = $request->all();\n $id = base64_decode($input['id']);\n\n $banner = Banner::findOrFail($id);\n $update = Banner::where('id',$id)\n ->update(['isDeleted'=>'Yes']);\n if($update){\n echo json_encode(['success'=>'success']);\n }else{\n echo json_encode(['error'=>'error']);\n }\n\n }", "public function destroy($id)\n { \n $id = Hashids::decode($id)[0];\n \n $ad = Ad::find($id);\n \n if($ad){\n updateSyncData('ad_delete',$ad->id,$ad->store_id);\n $ad->delete();\n $response['success'] = 'Ad deleted!';\n $status = $this->successStatus; \n }else{\n $response['error'] = 'Ad not exist against this id!';\n $status = $this->errorStatus; \n }\n return response()->json(['result'=>$response], $status);\n\n }", "public function handleGrievanceDelete($id)\n {\n $Grievance = new Grievance;\n $re=$Grievance->deleteGrievance($id);\n SentryHelper::setMessage('Grievance Deleted....');\n return Redirect::to('grievance/list');\n }", "public function deletePost(Request $request)\n {\n \t$id \t\t\t= $request['id'];\n \t$arCategory \t= GalleryCategory::find($id);\n\n \t// Init Variable & Path\n \t$aum_id = Auth::user()->aum_list_id;\n $full_size_dir = $path = public_path('files'.DIRECTORY_SEPARATOR.'galeri'.DIRECTORY_SEPARATOR.$aum_id.DIRECTORY_SEPARATOR);\n $icon_size_dir = $path = public_path('files'.DIRECTORY_SEPARATOR.'galeri'.DIRECTORY_SEPARATOR.$aum_id.DIRECTORY_SEPARATOR.'thumb-');\n\n \t// Delete Gallery Items\n \t$images \t\t= Gallery::where('gallery_category_id',$id)->get();\n \tforeach ($images as $image) {\n\t \t$full_path1 = $full_size_dir . $image->filename;\n\t $full_path2 = $icon_size_dir . $image->filename;\n\n\t // Delete if any gallery item\n\t if ( File::exists( $full_path1 ) )\n\t {\n\t File::delete( $full_path1 );\n\t }\n\t if ( File::exists( $full_path2 ) )\n\t {\n\t File::delete( $full_path2 );\n\t }\n\t // EOF Delete if any gallery item\n\n\t // delete gallery items from db\n\t $image->delete();\n \t} // EOF Foreach\n\n \t$arCategory->delete(); // delete gallery category\n\n \treturn 'Galeri & semua gambar berhasil dihapus';\n }", "public function delete(Request $request, Response $response, ArgumentParser $args): Response\n\t{\n\t\t$response = parent::delete($request, $response, $args);\n//\t\t$this->sendNotificationEmail('Your account has been deleted. Bye.',\n// $entity = $this->getObject($this->getModifyId($args))->getEmail());\n\t\treturn $response;\n\t}", "public function delete(?CloudPcOnPremisesConnectionItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise {\n $requestInfo = $this->toDeleteRequestInformation($requestConfiguration);\n try {\n $errorMappings = [\n '4XX' => [ODataError::class, 'createFromDiscriminatorValue'],\n '5XX' => [ODataError::class, 'createFromDiscriminatorValue'],\n ];\n return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings);\n } catch(Exception $ex) {\n return new RejectedPromise($ex);\n }\n }", "public function destroy(Tbl_leads $lead)\n {\n $lead->delete();\n\n return response()->json(['status'=>'Lead successfully deleted'], 200);\n }", "public function delete($id) {\n\n$annonce= Annonce:: findorfail($id) ; \n\n//$image->delete();\n$annonce->delete();\n\nreturn view('index');\n}", "public function bulk_destroy(Request $request)\n {\n $banners = Banners::find($request->ids);\n\n foreach ($banners as $item) {\n //languages\n $languages = Language::all();\n if($languages->count()){\n foreach ($request->language as $language) {\n $banners_trans = BannersTrans::where('lang', '=', $language)->where('tid', '=', $item->id)->first();\n\n if($banners_trans) {\n $banners_trans->delete();\n }\n }\n $check_banners_trans = BannersTrans::where('tid', '=', $item->id)->first();\n if(!$check_banners_trans){\n $item->delete();\n }\n }\n // end languages\n }\n \n Flash::success(trans('backend.deleted_successfully'));\n $Currentlanguage = Lang::getLocale();\n return redirect(''.$Currentlanguage.'/admin/banners');\n }", "public function delete($json){\n $_respuestas = new respuestas;\n $datos = json_decode($json,true);\n\n if(!isset($datos['token'])){\n return $_respuestas->error_401();\n }else{\n $this->token = $datos['token'];\n $arrayToken = $this->buscarToken();\n if($arrayToken){\n\n if(!isset($datos['idcita'])){\n return $_respuestas->error_400();\n }else{\n $this->idcita = $datos['idcita'];\n $resp = $this->eliminarCita();\n if($resp){\n $respuesta = $_respuestas->response;\n $respuesta[\"result\"] = array(\n \"idcita\" => $this->idcita\n );\n return $respuesta;\n }else{\n return $_respuestas->error_500();\n }\n }\n\n }else{\n return $_respuestas->error_401(\"El Token que envio es invalido o ha caducado\");\n }\n }\n\n\n\n \n }", "public function destroy($id)\n {\n $ads = Ads::findOrFail($id);\n $image_name = $ads->image;\n if($ads->position === 'left1'){\n File::delete(public_path('uploads/ads_image/template1/adsLeft/' . $image_name));\n }\n elseif($ads->position === 'middle1'){\n File::delete(public_path('uploads/ads_image/template1/adsMiddle/' . $image_name));\n }\n elseif($ads->position === 'topRight1'){\n File::delete(public_path('uploads/ads_image/template1/adsTopRight/' . $image_name));\n }\n elseif($ads->position === 'bottomRight1'){\n File::delete(public_path('uploads/ads_image/template1/adsBottomRight/' . $image_name));\n }\n elseif($ads->position === 'left2'){\n File::delete(public_path('uploads/ads_image/template2/adsLeft/' . $image_name));\n }\n elseif($ads->position === 'topRight2'){\n File::delete(public_path('uploads/ads_image/template2/adsTopRight/' . $image_name));\n }\n elseif($ads->position === 'bottomRight2'){\n File::delete(public_path('uploads/ads_image/template2/adsBottomRight/' . $image_name));\n }\n elseif($ads->position === 'middle3'){\n File::delete(public_path('uploads/ads_image/template3/adsMiddle/' . $image_name));\n }\n $ads->delete();\n // return redirect()->route('ads.index');\n Alert::success('Delete Ads', 'Successfully Deleted Ads');\n return response()->json([\n 'success' => 'Record deleted successfully!'\n ]);\n }", "public function destroy(DeleteRequest $request)\n {\n $agency = Agency::findOrFail($request->input('id'));\n\n if ($agency->delete()) {\n return response()->json([\n \"success\" => 1,\n \"message\" => \"deleted successfully\",\n \"agency\" => $agency\n ]);\n } else {\n return response()->json([\n \"success\" => 0,\n \"message\" => \"something went wrong\"\n ]);\n }\n }", "function my_callback_delete_post( $result ) {\n\twp_delete_post( $result->ID, true );\n}", "public function destroy(MainAd $mainAd){\n if(MainAd::destroyIt($mainAd)) return redirect()->route('ads')->withSuccess('Reklama izbrisana');\n }", "public function destroy(Request $request)\n {\n if ($request->isMethod('delete')){\n $idArray=json_decode($request->input('ids'));\n if(\\App\\Models\\Client::destroy($idArray)){\n return 'true';\n }else{\n return 'false';\n }\n }else{\n abort(500);\n }\n }", "abstract public static function deleted($callback);", "public function destroy($id, $img)\n {\n \n $main_services = main_services::findOrfail($id);\n $main_services->destroy($id);\n \n return response()->json([\n 'success' => 'Record deleted successfully!',\n ]);\n }", "function index_delete() {\n $id_diagnosa = $this->delete('id_diagnosa');\n $this->db->where('id_diagnosa', $id_diagnosa);\n $delete = $this->db->delete('diagnosa');\n if ($delete) {\n $this->response(array('status' => 'success'), 201);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "public function deleteImageFeaturesAsync($request) \n {\n $returnType = '';\n $isBinary = false;\n $hasReturnType = false;\n $request = $this->getHttpRequest($request, 'DELETE');\n $options = $this->createHttpClientOptions();\n\n return $this->client\n ->sendAsync($request, $options)\n ->then(\n function ($response) use ($request, $hasReturnType, $returnType, $isBinary) {\n return $this->processResponse($request, $response, $hasReturnType, $returnType, $isBinary);\n },\n function ($exception) use ($request) {\n $this->processException($exception);\n }\n );\n }", "public function deleting()\n {\n # code...\n }", "public function delete() {}", "public function delete() {}", "public function delete() {}", "function doDELETE (HttpRequest $request, HttpResponse $response) {\n throw new Exception(\"DELETE method not supported\");\n }", "public function delete() {}", "public function destroy(Request $request)\n {\n $Documentos_Adjuntos = new Documentos_Adjuntos;\n $val= $Documentos_Adjuntos::where(\"id_doc_adj\",\"=\",$request['id_doc_adj'] )->first();\n if(count($val)>=1)\n {\n $val->delete();\n }\n return \"destroy \".$request['id_doc_adj'];\n }", "public function delete(?GovernanceResourceItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise {\n $requestInfo = $this->toDeleteRequestInformation($requestConfiguration);\n try {\n $errorMappings = [\n '4XX' => [ODataError::class, 'createFromDiscriminatorValue'],\n '5XX' => [ODataError::class, 'createFromDiscriminatorValue'],\n ];\n return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings);\n } catch(Exception $ex) {\n return new RejectedPromise($ex);\n }\n }", "public function destroy(Request $request)\n {\n $slug = $request->slug;\n $ad = Ad::whereSlug($slug)->first();\n if ($ad){\n $media = Media::whereAdId($ad->id)->get();\n if ($media->count() > 0){\n foreach($media as $m){\n $storage = Storage::disk($m->storage);\n if ($storage->has('uploads/images/'.$m->media_name)){\n $storage->delete('uploads/images/'.$m->media_name);\n }\n if ($m->type == 'image'){\n if ($storage->has('uploads/images/thumbs/'.$m->media_name)){\n $storage->delete('uploads/images/thumbs/'.$m->media_name);\n }\n }\n $m->delete();\n }\n }\n $ad->delete();\n return ['success'=>1, 'msg' => trans('app.media_deleted_msg')];\n }\n return ['success'=>0, 'msg' => trans('app.error_msg')];\n }", "public function delete_delete(){\n $response = $this->PersonM->delete_person(\n $this->delete('id')\n );\n $this->response($response);\n }", "public function business_service_gallery_delete() {\n $post_data = $this->input->post();\n $data['result'] = $this->Cs_vendor->delete_business_service_gallery_edit($post_data);\n\n echo json_encode($data);\n }", "public function delete(){\r\n $rsid_array = $this -> uri -> segment_array();\r\n\r\n foreach ($rsid_array as $key => $value) {\r\n \r\n //If the key is greater than 2 i.e is one of the the ids\r\n if ($key > 2) {\r\n\r\n //Run delete\r\n $this -> db -> delete('refSubs', array('id' => $value));\r\n\r\n } \r\n }\r\n\r\n }", "public function destroy(Adviser $adviser)\n {\n $adviser->delete();\n return response()->json([\n \"adviser\" => $adviser,\n \"token\" => request()->get(\"token\"),\n ], Response::HTTP_OK);\n }", "public function actionDelete() {\n if (Yii::app()->request->isPostRequest) {\n //$ids = base64_decode($_POST['ids']);\n $ids = isset($_POST['ids']) ? $_POST['ids'] : 0;\n $res = new PERSONA;\n $arroout = $res->removerPersona($ids);\n header('Content-type: application/json');\n echo CJavaScript::jsonEncode($arroout);\n }\n }", "public function delete(?EdiscoverySearchItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise {\n $requestInfo = $this->toDeleteRequestInformation($requestConfiguration);\n try {\n $errorMappings = [\n '4XX' => [ODataError::class, 'createFromDiscriminatorValue'],\n '5XX' => [ODataError::class, 'createFromDiscriminatorValue'],\n ];\n return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings);\n } catch(Exception $ex) {\n return new RejectedPromise($ex);\n }\n }", "public function destroy($delete,$contact)\n {\n $val = [\n \"delete\"=>$delete,\n \"contact\"=>$contact \n ];\n\n $validator = Validator::make($val, [\n 'delete' => 'required',\n 'contact' => 'required'\n ]);\n\n if ($validator->fails()) {\n return response()->json([\n \"error\" => true ,\n \"statusCode\" => 3 ,\n \"message\"=> \"can't delete data\",\n \"tasks\"=> []\n ] , 203);\n }else{\n\n try{ \n \n // $uid = $request['user']->uid; \n $credentials = $validator->validated();\n \n $responseData = DB::affectingStatement('CALL delete_contacts( ? , ? )',array( $credentials['contact'], $credentials['delete']));\n\n\n if($responseData >0){\n\n return response()->json([\n \"error\"=> false,\n \"statusCode\" => 1,\n \"message\"=> $credentials['delete'] == 1 ? \"contact deleted\" : \"contact recoverd\", \n \"tasks\"=>[]\n ],201);\n }else{\n return response()->json([\n \"error\"=> false,\n \"statusCode\" => 2,\n \"message\"=> $credentials['delete'] == 1 ? \"contact already deleted\" : \"contact already recoverd\" ,\n \"tasks\"=> []\n ],203);\n }\n\n\n\n }catch(\\PDOException $ex){\n return response()->json([\n \"error\" => true ,\n \"statusCode\" => 3 ,\n \"message\"=> \"can't delete data\",\n \"tasks\"=> []\n ] , 203);\n } \n\n }\n\n }", "public function delete($id)\n {\n $advertisement = Advertisement::findOrFail($id)->delete();\n \\Session::flash('success', 'Advertisement Delete Successfully');\n return back();\n }", "public function destroy(Lead $lead)\n {\n //\n }", "public function destroy(leads $leads)\n {\n //\n }", "public function deleteDelete(Request $request){\n $delete_id = $request->input('delete_id');\n try {\n //Delete country from database, throw exception if not deleted and\n //return country's list view with success notice if\n //country is deleted.\n $delete_flag = $this->country_model->deleteCountry($delete_id);\n if($delete_flag == false):\n throw new Exception('Could not delete requested country. Please try again.');\n endif;\n $deleted_notice = \"Selected country has been deleted successfully.\";\n $countries = $this->country_model->allCountries();\n return view('countries.list_view', compact('countries', 'deleted_notice'));\n } catch (\\Exception $e) {\n return response()->json(['exc' => utf8_encode($e->getMessage()), 'custom_message' => 'Could not delete this country because it is being used by other modules.']);\n }//End try-catch\n }", "protected function _delete()\r\n\t{\r\n\t\t$oFlexSliderSlider = new FlexSliderSlider($this -> _iId);\r\n\t\t$mStatus = $oFlexSliderSlider -> delete();\r\n\t\t//$this -> _removeSlides($this -> _iId);\r\n\t\t$this -> _aRedirect['id'] = false;\r\n\t\t$this -> _aRedirect['action'] = false;\r\n\t\t\t\r\n\t\tif (is_string($mStatus))\r\n\t\t{\r\n\t\t\t$this -> _aRedirect['message'] = $mStatus;\r\n\t\t}\r\n\t\telse if ($mStatus === true)\r\n\t\t{\r\n\t\t\t$this -> _aRedirect['message'] = 'removed';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this -> _aRedirect['message'] = 'error';\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function delete($idPersonas);", "public function destroy(Request $request, Banner $banner)\n {\n $banner->delete();\n $request->session()->flash('status','Xóa Banner Thành Công');\n return 1;\n }", "function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }", "function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }", "protected function handleCustomerSubscriptionDeleted(array $payload)\n {\n if ($subscription = $this->getSubscription($payload['data']['object']['id'])) {\n if ($subscription->billingIsActive()) {\n $subscription->subscription()->refresh();\n }\n }\n \n return new Response('Webhook Handled', 200);\n }", "public function delete() {\n\n $input_data = $this->request->getJsonRawBody();\n $id = isset($input_data->id) ? $input_data->id : '';\n if (empty($id)):\n return $this->response->setJsonContent(['status' => 'Error', 'message' => 'Id is null']);\n else:\n $collection = GuidedLearningGamesMap::findFirstByid($id);\n if ($collection):\n if ($collection->delete()):\n return $this->response->setJsonContent(['status' => 'OK', 'Message' => 'Record has been deleted succefully ']);\n else:\n return $this->response->setJsonContent(['status' => 'Error', 'Message' => 'Data could not be deleted']);\n endif;\n else:\n return $this->response->setJsonContent(['status' => 'Error', 'Message' => 'ID doesn\\'t']);\n endif;\n endif;\n }", "public function delete(?ExactMatchDataStoreItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise {\n $requestInfo = $this->toDeleteRequestInformation($requestConfiguration);\n try {\n $errorMappings = [\n '4XX' => [ODataError::class, 'createFromDiscriminatorValue'],\n '5XX' => [ODataError::class, 'createFromDiscriminatorValue'],\n ];\n return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings);\n } catch(Exception $ex) {\n return new RejectedPromise($ex);\n }\n }", "function delete($url, $http_options = array()) {\n $http_options = $http_options + $this->http_options;\n $http_options[CURLOPT_CUSTOMREQUEST] = \"DELETE\";\n $this->handle = curl_init($url);\n\n if (!curl_setopt_array($this->handle, $http_options)) {\n throw new RestClientException(\"Error setting cURL request options.\");\n }\n\n $this->response_object = curl_exec($this->handle);\n $this->http_parse_message($this->response_object);\n\n curl_close($this->handle);\n return $this->response_object;\n }", "function delete_campaign_list($id, $taxonomy) {\n if ($taxonomy === 'category') {\n require_once 'createsend-php-5.1.2/csrest_lists.php';\n $auth = array('api_key' => CM_API_KEY);\n $wrap = new CS_REST_Lists(get_term_meta($id, 'list_id', true), $auth);\n\n $result = $wrap->delete();\n }\n}", "public function destroy(Asignatura $asignatura)\n {\n try {\n $asignatura->delete();\n return redirect()->route('asignaturas.index')->with(\"mensaje\", \"Asignatura borrado correctamente\");\n } catch (\\Exception $ex) {\n return redirect()->route('asignaturas.index')->with(\"mensaje\", \"Error:\" . $ex->getMessage());\n }\n }", "public function delete($campaignId);", "public function destroy( $abate)\n {\n $abates = Abate::find($abate);\n //$Abate->deleted_at = new DateTime();\n $abates->delete();\n //$deleted= $Abate->delete();\n session()->flash('flash_message','Abate was removed with success');\n\n if (Request::wantsJson()){\n return (string) $abates;\n }else{\n return redirect('abates');\n }\n }", "public static function delete( $request ) {\n \n $params = $request->get_params();\n \n if( ! is_array( $params ) && !isset( $params['post_ids'] ) ) {\n return false;\n }\n \n $post_ids = $params['post_ids']; \n \n $removed = packages_delete( $post_ids );\n \n $retval = array( \n //'message' => $this->message, \n 'packages' => $removed,\n 'favorites_count' => favorites_count(), \n 'quotes_count' => quotes_count(), \n );\n \n return packages_get_response( $retval ); \n \n }", "public function destroy(Request $request)\n {\n $id = $request->id;\n\n //languages\n $languages = Language::all();\n if($languages->count()){\n foreach ($request->language as $language) {\n $banners_trans = BannersTrans::where('lang', '=', $language)->where('tid', '=', $id)->first();\n if($banners_trans) {\n $banners_trans->delete();\n }\n }\n $check_banners_trans = BannersTrans::where('tid', '=', $id)->first();\n if(!$check_banners_trans){\n $banners = Banners::find($id);\n if (!empty($banners)){\n $banners->delete();\n }\n }\n }\n\n Flash::success(trans('backend.deleted_successfully'));\n $Currentlanguage = Lang::getLocale();\n\n return redirect(''.$Currentlanguage.'/admin/banners');\n }", "public function destroy(Asignatura $asignatura)\n {\n //\n }", "public function destroy(Request $request)\n {\n try {\n (new AdmController)->delete( self::edit( $request->all()[ \"id\" ] ) , $this->model->getFillable() );\n return 1;\n } catch (\\Throwable $th) {\n return 0;\n }\n }", "public function delete_age_group($agegroup_id){\n $address = AgeGroup::find($agegroup_id)->delete();\n\n return response()->json('Age Group successfully deleted', 200);\n }", "function delete()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$data = safePostGetVar('id');\n\t\t\t$promotion = new Promotion();\n\t\t\tforeach ($data as $id)\n\t\t\t{\n\t\t\t\t$promotion->id = $id;\n\t\t\t\t$promotion->delete();\n\t\t\t}\n\t\t\techo \"ok\";\n\n\t\t}catch (Exception $ex)\n\t\t{\n\t\t\tprint_r($ex->getMessage());\n\t\t}\n\t}", "public final function delete() {\n }", "public function destroy(Request $request,$id)\n {\n if ($request->ajax()) {\n $incident = incident::find($id);\n $incident->fill($request->all());\n $incident->is_delete = 1;\n $incident->save();\n\n //sacar ajustes que tendran que borrarse\n\n $adjust_delete = DB::table('adjust_link')\n ->where('incident_id',$incident->id)\n ->get();\n \n //$adjust_delete->toArray();\n\n for( $i = 0 ; count($adjust_delete) > $i ; $i++ ){\n $delete = prepayrollAdjust::where('id',$adjust_delete[$i]->adjust_id)->get();\n $delete[0]->is_delete = 1;\n $delete[0]->save();\n }\n\n $adjust_delete = DB::table('adjust_link')\n ->where('incident_id',$incident->id)\n ->delete();\n \n return response()->json(['mensaje' => 'ok']);\n } else {\n abort(404);\n }\n }" ]
[ "0.6238146", "0.6024383", "0.5937651", "0.5758007", "0.5752294", "0.5747543", "0.5658567", "0.564919", "0.56220895", "0.557961", "0.5566759", "0.5564715", "0.5559353", "0.5555197", "0.55336165", "0.5522851", "0.5502891", "0.548392", "0.5481326", "0.54716593", "0.5434618", "0.5422418", "0.54099774", "0.5396096", "0.5380572", "0.53801775", "0.53785235", "0.53759784", "0.5374866", "0.53727436", "0.53707093", "0.53595597", "0.5351055", "0.5333816", "0.5321392", "0.5320438", "0.531734", "0.5302303", "0.529799", "0.5296954", "0.5296915", "0.5293577", "0.52895224", "0.5285908", "0.52848333", "0.52784926", "0.52754766", "0.5269443", "0.52667993", "0.5266546", "0.52511275", "0.52363497", "0.5231923", "0.5231802", "0.5229081", "0.522286", "0.52196467", "0.5216424", "0.52157325", "0.5201843", "0.51991624", "0.51986736", "0.51986736", "0.51979226", "0.5197202", "0.5196799", "0.5193778", "0.51890635", "0.5184581", "0.5179289", "0.5179119", "0.51787853", "0.51782966", "0.5176238", "0.51740223", "0.5167021", "0.515972", "0.5158839", "0.51585835", "0.5155752", "0.51548886", "0.5147277", "0.51467097", "0.51467097", "0.51448846", "0.5142717", "0.51402974", "0.51398605", "0.5138821", "0.5138178", "0.5137351", "0.5137131", "0.5133558", "0.5127908", "0.51273197", "0.5127163", "0.51169235", "0.5116514", "0.5115477", "0.51151127" ]
0.7209654
0
Handle AdcreativesApi adcreativesGet function
public function get(array $params = []) { return $this->handleMiddleware('get', $params, function(MiddlewareRequest $request) { $params = $request->getApiMethodArguments(); $accountId = isset($params['account_id']) ? $params['account_id'] : null; $filtering = isset($params['filtering']) ? $params['filtering'] : null; $page = isset($params['page']) ? $params['page'] : null; $pageSize = isset($params['page_size']) ? $params['page_size'] : null; $isDeleted = isset($params['is_deleted']) ? $params['is_deleted'] : null; $linkPageTypeCompatible = isset($params['link_page_type_compatible']) ? $params['link_page_type_compatible'] : null; $weixinOfficialAccountsUpgradeEnabled = isset($params['weixin_official_accounts_upgrade_enabled']) ? $params['weixin_official_accounts_upgrade_enabled'] : null; $fields = isset($params['fields']) ? $params['fields'] : null; $response = $this->apiInstance->adcreativesGet($accountId, $filtering, $page, $pageSize, $isDeleted, $linkPageTypeCompatible, $weixinOfficialAccountsUpgradeEnabled, $fields); return $this->handleResponse($response); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function info_ad($id, $endpoint) {\n\n\techo \"getting info by ad id: \" . $id . \"\\r\\n\";\n\n\ttry {\n\n\t\t$page = json_decode(file_get_contents(sprintf($endpoint, $id) ), true);\n\n\t\tif (isset($page['errors'])) {\n\t\t\t//Возможно снято с публикации. Но скорее всего нет.\n\t\t\tadd_logs(\"get error with page: {$id}. body: $page\");\n\t\t\treturn null;\n\t\t}\n\t\telse {\n\t\t\t//Можно парсить аттрибуты\n\t\t\tif ($page['offer']['status'] != \"published\") {\n\t\t\t\t//Снято с публикации\n\t\t\t\tadd_logs(\"ad {$id} has been changed status.New status: {$page['offer']['status']}\");\n\t\t\t\treturn null;\n\t\t\t}\n\n\n\t\t}\n\n\t\t$attributes = [\n\n\t\t\t/* parsing only first time */\n\t\t\t\"constant\" => [\n\t\t\t\t'id' => $id,\n\t\t\t\t'description' => implode(' ', $page['offer']['description']), //строка\n\t\t\t\t'address' => get_adress($page['offer']['geo']['address']), //строка\n\t\t\t\t\n\n\t\t\t\t/* This attributes list can be not exist */\n\t\t\t\t'complex_name' => isset($page['offer']['building']['features']['name']) ? $page['offer']['building']['features']['name'] : null, //название ЖК строка\n\t\t\t\t'repair' => isset($page['offer']['general']['repair']) ? $page['offer']['general']['repair'] : null, //ремонт строка\n\t\t\t\t'balconies' => isset($page['offer']['general']['balconies']) ? $page['offer']['general']['balconies'] : null, //балкон строка\n\t\t\t\t'restroom' => isset($page['offer']['general']['restroom']) ? $page['offer']['general']['restroom'] : null, //Санузел строка\n\t\t\t\t'ceiling_height' => isset($page['offer']['general']['ceilingHeight']) ? $page['offer']['general']['ceilingHeight'] : null, //число дробное\n\t\t\t\t/* This attributes list can be not exist */\t\n\t\t\t\t\n\t\t\t\t'floor' => $page['offer']['features']['floorInfo'], //Пока храним как строку\n\t\t\t\t'objectType' => $page['offer']['features']['objectType'], //Однокмнатная двукомнатная и тд\n\t\t\t\t\n\t\t\t\t'ad_published' => get_date($page['offer']['meta']['addedAt']), //Храним как строку\n\t\t\t\t'total_area' => explode(' ', $page['offer']['features']['totalArea'])[0], //число\n\t\t\t\t'photos' => $page['offer']['media']\n\t\t\t],\n\t\t\t\"variable\" => [\n\t\t\t\t'price_actual' => $page['offer']['price']['value'], //число\n\t\t\t\t'price_start' => $page['offer']['price']['value'], //число\n\t\t\t\t'square_meter_price' => only_digit($page['offer']['additionalPrice']), //строка.\n\t\t\t\t'phones' => implode(', ', $page['offer']['phones']), //строка\n\t\t\t\t'views_all' => $page['offer']['meta']['views'], //число\n\t\t\t\t'ad_remove' => \"null\"\n\t\t\t\t//'ad_type' => -1, //будет строка платное, премиум, топ\t.while not using\n\t\t\t]\n\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t];\n\n\t\t$attributes['constant']['description'] = preg_replace('/[\"\\']/m', '', $attributes['constant']['description']);\n\t\t$attributes['variable']['phones'] = preg_replace('/[+][7]/m', '', $attributes['variable']['phones']); //replace +\n\t\t\n\t\t$attributes['constant']['total_area'] = preg_replace('/[?\\sм²]+/m', '', $attributes['constant']['total_area']); //replace m2\n\t\t$attributes['constant']['total_area'] = trim($attributes['constant']['total_area']);\n\n\t\t//if exist history. set start price and date publish from history\n\t\tif (isset($page['priceChange']))\n\t\t\tif (count($page['priceChange']) > 0) {\n\t\t\t\t//cnage price and date publicaiton\n\t\t\t\t$attributes['constant']['ad_published'] = $page['priceChange'][0]['date'];\n\t\t\t\t$attributes['variable']['price_start'] = $page['priceChange'][0]['price'];\n\t\t\t}\n\n\t\tif ($page['offer']['price']['currency'] != \"rur\") {\n\t\t\t//change all prices\n\n\t\t\t$attributes['variable']['price_start'] = only_digit($page['offer']['rublesPrice']);\n\t\t\t$attributes['variable']['price_actual'] = only_digit($page['offer']['rublesPrice']);\n\n\t\t\t$attributes['variable']['square_meter_price'] = intdiv($attributes['variable']['price_actual'],$attributes['constant']['total_area']); //recalc square_meter_price\n\n\t\t}\n\n\n\n\t\t$attributes['constant']['street'] = get_address_data($attributes['constant']['address'])['street'];\n\t\t$attributes['constant']['house'] = get_address_data($attributes['constant']['address'])['house'];\n\n\n\t\tif (isset($page['offer']['houseInfo']['info']['buildYear'])) {\n\t\t\t$attributes['constant']['building_year'] = \"построен: \" . $page['offer']['houseInfo']['info']['buildYear'];\n\t\t}\n\t\telse if (isset($page['offer']['building']['features']['deadline'])) {\n\t\t\t$attributes['constant']['building_year'] = \"срок сдачи: \" . $page['offer']['building']['features']['deadline'];\n\t\t}\n\t\telse {\n\t\t\t$attributes['constant']['building_year'] = 'нет данных';\n\t\t}\n\n\t\t//Где тот тут проверить опубликовано ли\n\t}\n\tcatch (Exception $e) {\n\t\tadd_logs(\"error: \" . $e->getMessage());\n\t\tadd_logs(\"body json (page): \" . json_encode($page));\n\t\tadd_logs(\"ad id :\" . $id);\n\t}\n\n\treturn $attributes;\n\n}", "public function get()\n {\n $this->_access(\"get\");\n $data = $this->Assets_model->getAdList(Assets_model::FULL_LIST);\n $this->_returnAjax(true, $data);\n }", "function getDynamicAds()\n\t\t{\n\t\t\t$dynamicBanner_1 = $this->manage_content->getValue_where('banner_info','banner_image','id',5);\n\t\t\t$dynamicBanner_2 = $this->manage_content->getValue_where('banner_info','banner_image','id',6);\n\t\t\t//print_r($dynamicBanner[0]['banner_image']);\n\t\t\t//get dynamic banner 1\n\t\t\tif($dynamicBanner_1[0]['banner_image'] == 'NULL')\n\t\t\t{\n\t\t\t\techo '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<div class=\"dynamic_banner\">'.$dynamicBanner_1[0]['banner_image'].'</div>';\n\t\t\t}\n\t\t\t//get the dynamic banner 2\n\t\t\tif($dynamicBanner_2[0]['banner_image'] == 'NULL')\n\t\t\t{\n\t\t\t\techo '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<div class=\"dynamic_banner\">'.$dynamicBanner_2[0]['banner_image'].'</div>';\n\t\t\t}\n\t\t}", "public function getAds(){\n return $this->ifsp->getAds();\n }", "public function getAsync(array $params = [])\n {\n return $this->handleMiddleware('get', $params, function(MiddlewareRequest $request) {\n $params = $request->getApiMethodArguments();\n $accountId = isset($params['account_id']) ? $params['account_id'] : null;\n $filtering = isset($params['filtering']) ? $params['filtering'] : null;\n $page = isset($params['page']) ? $params['page'] : null;\n $pageSize = isset($params['page_size']) ? $params['page_size'] : null;\n $isDeleted = isset($params['is_deleted']) ? $params['is_deleted'] : null;\n $linkPageTypeCompatible = isset($params['link_page_type_compatible']) ? $params['link_page_type_compatible'] : null;\n $weixinOfficialAccountsUpgradeEnabled = isset($params['weixin_official_accounts_upgrade_enabled']) ? $params['weixin_official_accounts_upgrade_enabled'] : null;\n $fields = isset($params['fields']) ? $params['fields'] : null;\n $response = $this->apiInstance->adcreativesGetAsync($accountId, $filtering, $page, $pageSize, $isDeleted, $linkPageTypeCompatible, $weixinOfficialAccountsUpgradeEnabled, $fields);\n return $response;\n });\n }", "public function get_initiatives() \n\t{\n\t\t$query = $this->initiatives_model->get_initiatives(12);\n\t\t\n\t\t$v_data['query'] = $query;\n\n\t\t$response['message'] = 'success';\n\t\t$response['result'] = $this->load->view('initiative', $v_data, true);\n\n\t\t\n\t\techo json_encode($response);\n\t}", "function entity_extraction($content)\n{\n // Your license key (obatined from api.opencalais.com)\n $contentType = \"text/txt\"; // simple text - try also text/html\n $outputFormat = \"Application/JSON\"; // simple output format - try also xml/rdf and text/microformats\n \n $restURL = \"http://api.opencalais.com/enlighten/rest/\";\n $paramsXML = \"<c:params xmlns:c=\\\"http://s.opencalais.com/1/pred/\\\" \" . \"xmlns:rdf=\\\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\\\"> \" . \"<c:processingDirectives c:contentType=\\\"\" . $contentType . \"\\\" \" . \"c:outputFormat=\\\"\" . $outputFormat . \"\\\"\" . \"></c:processingDirectives> \" . \"<c:userDirectives c:allowDistribution=\\\"false\\\" \" . \"c:allowSearch=\\\"false\\\" c:externalID=\\\" \\\" \" . \"c:submitter=\\\"Calais REST Sample\\\"></c:userDirectives> \" . \"<c:externalMetadata><c:Caller>Calais REST Sample</c:Caller>\" . \"</c:externalMetadata></c:params>\";\n \n // Construct the POST data string\n $data = \"licenseID=\" . urlencode(CALAIS_API_KEY);\n $data .= \"&paramsXML=\" . urlencode($paramsXML);\n $data .= \"&content=\" . urlencode($content);\n \n // Invoke the Web service via HTTP POST\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $restURL);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 60);\n $response = curl_exec($ch);\n\n \n curl_close($ch);\n \n $json = json_decode($response, true);\n \n \n if (!isset($json)) {\n echo \"The Open Calais API is down \";\n return array();\n } else {\n $return_value = array();\n \n $banned_array = array(\n 'gbp',\n 'eu',\n 'rt',\n 'http'\n );\n \n foreach ($json as $entity) {\n if (isset($entity['name'])) {\n $extracted['term'] = $entity['name'];\n $extracted['type'] = $entity['_type'];\n $extracted['frequency'] = count($entity['instances']);\n $extracted['source'] = \"entity\";\n if ($entity['_type'] == 'Organization' || $entity['_type'] == 'Person') {\n $extracted['frequency'] = $extracted['frequency'] * 1.5;\n echo $entity['name']. \"\\n\";\n echo $entity['_type']. \"\\n\";\n echo $extracted['frequency'] . \"\\n\";\n }\n \n if ($entity['_type'] != 'URL' && $extracted['frequency'] > 2 && !array_search(strtolower($extracted['term']), $banned_array)) {\n echo \"----\";\n \n $return_value[] = $extracted;\n }\n }\n }\n \n \n \n return $return_value;\n }\n}", "public function adCreativereport()\n\t{\n\n\n\n\t\t$query=\"https://graph.facebook.com/v3.2/\".$this->ad_acc_id.\"/campaigns?fields=ads{adcreatives{id,name,thumbnail_url},insights.level(ad).metrics(ctr){cost_per_unique_click,spend,impressions,frequency,reach,unique_clicks,clicks,ctr,ad_name,adset_name,cpc,cpm,cpp,campaign_name,ad_id,adset_id,account_id,account_name}}&access_token=\".$this->user_access_token.\"\";\n\n\n\t\t\t// Call to Graph api here\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch,CURLOPT_URL,$query);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_POST, 0);\n\n\n\t\t$resp = curl_exec($ch);\n\t\t$resp = json_decode($resp);\n\t\tcurl_close($ch);\n\t\tif(isset($resp->error->error_user_msg))\n\t\t\tSession::flash('message',$resp->error->error_user_msg);\n\t\telseif(isset($resp->error->message))\n\t\t\tSession::flash('message',$resp->error->message);\n\n\n\t\treturn view('social.adcreative-reports',['resp'=>$resp]);\n\t}", "public function invokeAdvertisements()\r\n {\r\n if (!isset($_GET['adverisements'])) {\r\n\r\n $advertisements = $this->model->getAdvertisements();\r\n include 'view/advertisements.php';\r\n }\r\n }", "function get_ads_ids($find_data, $endpoint) {\n\n\t$page = 0;\n\t$ads_pages_cnt = 0;\n\t$ads_ids = []; //list CianId\n\t$ads_cnt = 0;\n\n\t/*get ads ids*/\n\twhile ($page <= $ads_pages_cnt) {\n\n\t\ttry {\n\n\t\t\t$page++;\n\n\t\t\tchange_page($find_data, $page);\n\t\t\t$offers = send_post($endpoint, $find_data, [\"Content-Type: application/json\"]);\n\n\t\t\t//echo \"offers: \";\n\t\t\t//echo \"$offers\";\n\n\t\t\t/* calculate only first time */\n\t\t\t$pages = json_decode($offers, true);\n\t\t\tif ($page == 1) {\t\t\t\t\n\t\t\t\t$ads_cnt = $pages['aggregatedOffersCount']; //get count all ads\n\t\t\t\t$ads_pages_cnt = $ads_cnt / count($pages['offers']); //get count pages\n\t\t\t\t$ads_pages_cnt = (int)$ads_pages_cnt;\n\n\t\t\t\tif ( ($ads_cnt%$ads_pages_cnt) > 0)\n\t\t\t\t\t$ads_pages_cnt++; //if how minimum one element left, exist also one page\n\t\t\t}\n\n\t\t\techo \"all offers found: \" . $ads_cnt . \"\\r\\n\";\n\t\t\techo \"count pages: \" . $ads_pages_cnt . \"\\r\\n\";\n\t\t\techo \"current page: \" . $page . \"\\r\\n\";\n\n\t\t\techo \"\\r\\n--Offers--\\r\\n\";\n\n\t\t\tfor ($i=0; $i < count($pages['offers']); $i++) { \n\n\t\t\t\techo $pages['offers'][$i]['cianId'] . \"\\r\\n\";\n\t\t\t\t$ads_ids[] = $pages['offers'][$i]['cianId'];\n\t\t\t}\n\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\tadd_logs(\"parsing id list: \" . $e->getMessage());\n\t\t\tadd_logs(\"body json (offers): \" . $offers);\n\t\t\tadd_logs(\"page: \" . $page . \". pages count: \". $ads_pages_cnt . \". ads count: \" . $ads_cnt);\n\t\t}\n\t\t\n\n\t}\n\n\n\n\techo \"ads count: \" . $ads_cnt . \" cian id cnt: \" . count($ads_ids) . \"\\r\\n\";\n\n\t/* get attributes for each ad */\n\tif (count($ads_ids) - $ads_cnt >= 0) {\n\t\t//all so ok\n\t}\n\telse {\n\t\tadd_logs(\"didn't match cnt ads (ads_ids: {$ads_ids} vs. ads_cnt {$ad_cnt}), ads pages count: {$ads_pages_cnt}\");\n\t\tadd_logs(\"ads_ids list: \" . json_encode($ads_ids));\n\t}\n\n\treturn $ads_ids;\n\n}", "protected abstract function loadAvailableAds();", "public function getAds() {\n return $this->getAdsFromSettings($this->getSettings());\n }", "function tmt_gallery_get()\n\t{\n\t\t$galleries = $this->gallery_model->display_one_gallery();\n\t\t\n\t\t//$data = array('returned: '. $this->get('id'));\n\t\t$this->response($galleries);\n\t\t\n\t}", "public function bannerService($arrParam=array()){\n try{\n $return = array(); \n $bannerTag = array_get($arrParam, 'banner-tag', 'banner-home-principal');\n\n $param = array( \n 'url' => env(\"API_PATH\").\"/\".env(\"API_KEY\").\"/Banner/Itens/\".$bannerTag, \n ); \n $Util = new UtilService();\n $json = $Util->getResource( $param ); \n $return['content'] = json_decode($json);\n \n \n return $return;\n \n } catch (Exception $ex) {\n\n return $return;\n\n }\n }", "public function load_ads_by_pagination() {\n \n // Check if data was submitted\n if ($this->CI->input->post()) {\n \n // Add form validation\n $this->CI->form_validation->set_rules('url', 'Url', 'trim');\n \n // Get data\n $url = $this->CI->input->post('url');\n \n if ( $this->CI->form_validation->run() !== false ) {\n \n if ( !$url ) {\n \n // Get selected account\n $get_account = $this->CI->ads_account_model->get_account($this->CI->user_id, 'facebook');\n \n if ( $get_account ) {\n \n $response = $this->fb->get(\n '/' . $get_account[0]->net_id . '/ads?fields=insights,status,name,adset{name}&limit=10',\n $get_account[0]->token\n );\n \n $data = $response->getDecodedBody();\n \n if ( $data ) {\n \n $this->create_cache(MIDRUB_BASE_USER_APPS_FACEBOOK_ADS . 'cache/' . $get_account[0]->net_id . '-ads.json', json_encode($data, JSON_PRETTY_PRINT));\n \n $previous = '';\n\n if ( isset($data['paging']['previous']) ) {\n $previous = $data['paging']['previous'];\n } \n\n $next = '';\n\n if ( isset($data['paging']['next']) ) {\n $next = $data['paging']['next'];\n }\n\n $array = array(\n 'success' => TRUE,\n 'ads' => $data['data'],\n 'previous' => $previous,\n 'next' => $next\n );\n\n echo json_encode($array);\n exit();\n \n }\n \n }\n \n } else {\n\n $ads = json_decode(get($url), true);\n\n if ( $ads ) {\n\n $previous = '';\n\n if ( isset($ads['paging']['previous']) ) {\n $previous = $ads['paging']['previous'];\n } \n\n $next = '';\n\n if ( isset($ads['paging']['next']) ) {\n $next = $ads['paging']['next'];\n }\n\n $data = array(\n 'success' => TRUE,\n 'ads' => $ads['data'],\n 'previous' => $previous,\n 'next' => $next\n );\n\n echo json_encode($data);\n exit();\n\n }\n \n }\n \n }\n \n }\n \n $data = array(\n 'success' => FALSE,\n 'message' => $this->CI->lang->line('error_occurred')\n );\n\n echo json_encode($data); \n \n }", "public function featured_ad(){\n\t\t\t$date=date('Y-m-d');\n\t\t// echo \"SELECT * FROM featured_ad where effective_From<='$date' and effective_to>='$date' and status='1'\";\n\t\n\t\t$check = $this->db->query(\"SELECT * FROM featured_ad where effective_From<='$date' and effective_to>='$date' and status='1'\") or die(mysqli_query($this->db));\n\t\t$result = mysqli_num_rows($check); \n\t\tif ($result>0) { \n\t\t\twhile($data = mysqli_fetch_array($check)){\n\t\t\t\t$ad_data[]=$data;\n\t\t\t}\n\t\t}else{\n\t\t\t\t$ad_data=0;\n\t\t\t}\n\t\t\treturn $ad_data;\n\t}", "abstract function getPairsFromAPI();", "function getAllAccident(){\n $getStart = $_REQUEST[\"startPoint\"];\n $getEnd = $_REQUEST[\"endPoint\"];\n $startPoint = str_replace(' ', '', $getStart);\n $endPoint = str_replace(' ', '', $getEnd);\n $index = $_REQUEST[\"index\"];\n// $startPoint = \"Caulfield,vic\";\n// $endPoint = \"Carengie,vic\";\n// $index = 1;\n $r_googleMAPAPI_json = getRoute($startPoint, $endPoint);\n $StepArray = getSteps($r_googleMAPAPI_json, $index);\n $accidents = getAccident($StepArray);\n\n return json_encode($accidents);\n// return $r_googleMAPAPI_json;\n}", "public function getData(){\n\t\t$url = $this->host . \"/rest/v1/leads.json?access_token=\" . $this->getToken()\n\t\t\t\t\t\t. \"&filterType=\" . $this->filterType . \"&filterValues=\" . $this::csvString($this->filterValues);\n\t\t\n\t\tif (isset($this->batchSize)){\n\t\t\t$url = $url . \"&batchSize=\" . $this->batchSize;\n\t\t}\n\t\tif (isset($this->nextPageToken)){\n\t\t\t$url = $url . \"&nextPageToken=\" . $this->nextPageToken;\n\t\t}\n\t\tif(isset($this->fields)){\n\t\t\t$url = $url . \"&fields=\" . $this::csvString($this->fields);\n\t\t}\n\t\t\n\t\t//debug\n\t\t//echo '<p>url after = ' . $url . '</p>';\n\t\t\n\t\t$ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('accept: application/json',));\n\t\t$response = curl_exec($ch);\n\t\treturn $response;\n\t}", "public function get_all_ads($status = \"active\")\t{\n\n\t}", "public function iN_ShowAds() {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_advertisements WHERE ads_status = '1' ORDER BY RAND() LIMIT 2\") or die(mysqli_error($this->db));\n\t\twhile ($row = mysqli_fetch_array($query)) {\n\t\t\t$data[] = $row;\n\t\t}\n\t\tif (!empty($data)) {\n\t\t\treturn $data;\n\t\t}\n\t}", "public function anecdota_get() {\n $token = $this->uri->segment(3);\n $calificacionId = $this->uri->segment(4);\n\n $perfil = $this->User_model->revisa_perfil_x_token($token);\n\n if ($perfil == FALSE) {\n $respuesta = array(\n 'error' => true,\n 'mensaje' => 'Usuario no permitido.',\n 'data' => null\n );\n\n $this->response($respuesta, REST_Controller::HTTP_UNAUTHORIZED);\n exit;\n }\n\n $anecdotas = $this->Anecdota_model->anecdota_x_calificacion($calificacionId);\n\n if (isset($anecdotas)) {\n $respuesta = array(\n 'error' => FALSE,\n 'mensaje' => 'Registros consultados correctamente.',\n 'data' => $anecdotas\n );\n\n $this->response($respuesta);\n } else {\n $respuesta = array(\n 'error' => TRUE,\n 'mensaje' => 'No existen anécdotas todavia!!!',\n 'data' => null\n );\n\n $this->response($respuesta, REST_Controller::HTTP_NOT_FOUND);\n }\n \n }", "public function getAds(): string\n {\n $html = '';\n\n\n $adsService = new AdsService();\n $ads = $adsService->getAds();\n\n foreach ($ads as $ad) {\n $html .=\n '#' . $ad->getId() . ' ' .\n $ad->getTitle() . ' ' .\n $ad->getDescription() . ' ' .\n $ad->getUserId() . ' ' .\n $ad->getCarId() . '<br />';\n }\n\n return $html;\n }", "public function getCharges();", "public function anecdotaid_get(){\n $token = $this->uri->segment(3);\n $id = $this->uri->segment(4);\n\n $perfil = $this->User_model->revisa_perfil_x_token($token);\n\n if ($perfil == FALSE) {\n $respuesta = array(\n 'error' => true,\n 'mensaje' => 'Usuario no permitido.',\n 'data' => null\n );\n\n $this->response($respuesta, REST_Controller::HTTP_UNAUTHORIZED);\n exit;\n }\n\n $anecdota = $this->Anecdota_model->anecdota_x_id($id);\n\n if (isset($anecdota)) {\n $respuesta = array(\n 'error' => FALSE,\n 'mensaje' => 'Registro consultados correctamente.',\n 'data' => $anecdota\n );\n\n $this->response($respuesta);\n } else {\n $respuesta = array(\n 'error' => TRUE,\n 'mensaje' => 'No existen anécdotas todavia!!!',\n 'data' => null\n );\n\n $this->response($respuesta, REST_Controller::HTTP_NOT_FOUND);\n }\n }", "protected function serviceAccessGates()\n {\n //\n }", "public function ads(Request $request){\n\n $ads = Ad::filterBy(request()->all())->paginate(20);\n\n return response()->json($ads);\n\n if($request->has('mobile_brand')){\n $ads = Ad::whereHas('mobile_phone', function($query){\n $query->whereHas('mobile_brand', function($query){\n $query->where('slug', request()->mobile_brand);\n });\n })->paginate(10);\n }\n return response()->json($ads);\n\n }", "public function getSearchAds(Request $request)\n\t{\n\t\t$uid = $request->input('uid');\n\t\t$type = $request->input('type');\n\t\t$region = $request->input('region', 0.2);\n\t\t$lng = $request->input('lng');\n\t\t$lat = $request->input('lat');\n\t\t$keyword = $request->input('keyword');\n\n\t\t$earthRadius = 6378.138;\n\t\t$dlng = 2 * asin(sin($region / (2 * $earthRadius)) / cos(deg2rad($lat)));\n\t\t$dlng = rad2deg($dlng);\n\t\t$dlat = $region/$earthRadius;\n\t\t$dlat = rad2deg($dlat);\n\n\t\t//return 'region='.$region.', lnt='.$lng.', lat='.$lat.', dlng='.$dlng.', dlat='.$dlat;\n\t\t\n\t\tif ($uid)\n\t\t{\n\t\t\t$ads = Ad::where('uid', $uid);\n\t\t\t$ads = $ads->where('status', 1)->paginate(10);\n\n\t\t\treturn $ads->toJson();\n\t\t}\n\t\telse if ($type)\n\t\t{\n\t\t\t$ads = Ad::where('type', $type);\n\t\t\tif ($lng && $lat)\n\t\t\t{\n\t\t\t\t$ads = $ads->whereBetween('longitude', [$lng-$dlng, $lng+$dlng])\n\t\t\t\t\t\t\t->whereBetween('latitude', [$lat-$dlat, $lat+$dlat]);\n\t\t\t}\n\t\t\tif ($keyword)\n\t\t\t{\n\t\t\t\t$ads = $ads->where('title', 'like', '%'.$keyword.'%');\n\t\t\t}\n\t\t\t$ads = $ads->where('status', 1)->paginate(10);\n\n\t\t\treturn $ads->toJson();\n\t\t}\n\t\telse if ($lng && $lat)\n\t\t{\n\t\t\t$ads = Ad::whereBetween('longitude', [$lng-$dlng, $lng+$dlng])\n\t\t\t\t\t\t->whereBetween('latitude', [$lat-$dlat, $lat+$dlat]);\n\t\t\tif ($keyword)\n\t\t\t{\n\t\t\t\t$ads = $ads->where('title', 'like', '%'.$keyword.'%');\n\t\t\t}\n\t\t\t$ads = $ads->where('status', 1)->paginate(10);\n\t\t\t\n\t\t\treturn $ads->toJson();\n\t\t}\n\t\telse if ($keyword)\n\t\t{\n\t\t\t$ads = Ad::where('title', 'like', '%'.$keyword.'%');\n\t\t\t$ads = $ads->where('status', 1)->paginate(10);\n\t\t\t\n\t\t\treturn $ads->toJson();\n\t\t}\n\t}", "function get(){\n global $wpdb;\n global $DOPBSP;\n \n $calendars_ids = array();\n $query = array();\n $values = array();\n $api = isset($_GET['dopbsp_api']) && $_GET['dopbsp_api'] == 'true' ? true:false;\n \n if (!$api){\n $type = $_POST['type'];\n $calendar_id = $_POST['calendar_id'];\n $start_date = $_POST['start_date'];\n $end_date = $_POST['end_date'];\n $start_hour = $_POST['start_hour'];\n $end_hour = $_POST['end_hour'];\n $status_pending = $_POST['status_pending'] == 'true' ? true:false;\n $status_approved = $_POST['status_approved'] == 'true' ? true:false;\n $status_rejected = $_POST['status_rejected'] == 'true' ? true:false;\n $status_canceled = $_POST['status_canceled'] == 'true' ? true:false;\n $status_expired = $_POST['status_expired'] == 'true' ? true:false;\n $payment_methods = $_POST['payment_methods'] == '' ? array():explode(',', $_POST['payment_methods']);\n $search = $_POST['search'];\n $page = $_POST['page'];\n $per_page = $_POST['per_page'];\n $order = $_POST['order'];\n $order_by = $_POST['order_by'];\n }\n else{\n $type = isset($_GET['type']) ? $_GET['type']:'';\n \n if (isset($_GET['calendar_id'])\n && $_GET['calendar_id'] != ''){\n $calendars_requested = ','.$_GET['calendar_id'].',';\n }\n else{\n $calendars_requested = '';\n }\n \n if($type != 'ics') {\n $calendars_id = array();\n $key_pieces = explode('-', $_POST['key']);\n $calendars = $DOPBSP->classes->backend_calendars->get(array('user_id' => (int)$key_pieces[1]));\n\n foreach ($calendars as $calendar){\n if ($calendars_requested != ''){\n if (strpos($calendars_requested, ','.(string)$calendar->id.',') !== false){\n array_push($calendars_id, $calendar->id);\n }\n }\n else{\n array_push($calendars_id, $calendar->id);\n }\n }\n \n $calendar_id = implode(',', $calendars_id);\n } else {\n $calendar_id = $_GET['calendar_id'];\n }\n $start_date = isset($_GET['start_date']) ? $_GET['start_date']:'';\n $end_date = isset($_GET['end_date']) ? $_GET['end_date']:'';\n $start_hour = isset($_GET['start_hour']) ? $_GET['start_hour']:'00:00';\n $end_hour = isset($_GET['end_hour']) ? $_GET['end_hour']:'24:00';\n $status = isset($_GET['status']) ? $_GET['status']:'';\n $status_pending = strpos($status,'pending') !== false ? true:false;\n $status_approved = strpos($status,'approved') !== false ? true:false;\n $status_rejected = strpos($status,'rejected') !== false ? true:false;\n $status_canceled = strpos($status,'canceled') !== false ? true:false;\n $status_expired = strpos($status,'expired') !== false ? true:false;\n $payment_methods = isset($_GET['payment_methods']) && $_GET['payment_methods'] != '' ? explode(',', $_GET['payment_methods']):array();\n $search = isset($_GET['search']) ? $_GET['search']:'';\n $page = isset($_GET['page']) ? $_GET['page']:'1';\n $per_page = isset($_GET['per_page']) ? $_GET['per_page']:'10';\n $order = isset($_GET['order']) ? $_GET['order']:'ASC';\n $order_by = isset($_GET['order_by']) ? $_GET['order_by']:'check_in';\n \n if(strtolower($type) == 'ics') {\n $per_page = 1000000;\n }\n }\n \n /*\n * Calendars query.\n */\n if (strpos($calendar_id, ',') !== false){\n $calendars_ids = explode(',', $calendar_id);\n array_push($query, 'SELECT * FROM '.$DOPBSP->tables->reservations.' WHERE (calendar_id=%d');\n array_push($values, $calendars_ids[0]);\n \n for ($i=1; $i<count($calendars_ids); $i++){\n array_push($query, ' OR calendar_id=%d');\n array_push($values, $calendars_ids[$i]);\n }\n array_push($query, ')');\n }\n else{\n array_push($query, 'SELECT * FROM '.$DOPBSP->tables->reservations.' WHERE calendar_id=%d');\n array_push($values, $calendar_id);\n }\n \n\n /*\n * Days query.\n */\n if ($start_date != ''){\n if ($end_date != ''){\n array_push($query, ' AND (check_in >= %s AND check_in <= %s');\n array_push($values, $start_date);\n array_push($values, $end_date);\n \n array_push($query, ' OR check_out >= %s AND check_out <= %s AND check_out <> \"\")');\n array_push($values, $start_date);\n array_push($values, $end_date);\n }\n else{\n array_push($query, ' AND (check_in >= %s)');\n array_push($values, $start_date);\n }\n }\n elseif ($end_date != ''){\n array_push($query, ' AND check_in <= %s');\n array_push($values, $end_date);\n }\n \n /*\n * Source for sync\n */\n// if($type == 'ics') {\n array_push($query, ' AND reservation_from = %s');\n array_push($values, 'pinpoint');\n// }\n \n /*\n * Hours query.\n */\n array_push($query, ' AND (start_hour >= %s AND start_hour <= %s OR start_hour = \"\"');\n array_push($values, $start_hour);\n array_push($values, $end_hour);\n \n array_push($query, ' OR end_hour >= %s AND end_hour <= %s OR end_hour = \"\")');\n array_push($values, $start_hour);\n array_push($values, $end_hour);\n\n /*\n * Status query.\n */\n array_push($query, ' AND status = %s');\n array_push($values, 'approved');\n $status_init = true;\n \n\n /*\n * Payment query. \n */\n if (count($payment_methods) > 0){\n $payment_init = false;\n\n for ($i=0; $i < count($payment_methods); $i++){\n array_push($query, $payment_init ? ' OR payment_method=%s':' AND (payment_method=%s');\n array_push($values, $payment_methods[$i]);\n $payment_init = true;\n } \n array_push($query, ')'); \n }\n\n /*\n * Search query.\n */\n if ($search != ''){\n array_push($query, ' AND (id=%s OR transaction_id=%s OR form LIKE %s)');\n array_push($values, $search);\n array_push($values, $search);\n array_push($values, '%'.$search.'%');\n }\n \n /*\n * Exclude reservations with incomplete payment.\n */\n array_push($query, ' AND (token=\"\" OR (token<>\"\" AND (payment_method=\"none\" OR payment_method=\"default\")))');\n \n \n /*\n * Order query.\n */\n $order_value = $order == 'DESC' ? 'DESC':'ASC';\n \n switch ($order_by){\n case 'check_out':\n $order_by_value = 'check_out';\n break;\n case 'start_hour':\n $order_by_value = 'start_hour';\n break;\n case 'end_hour':\n $order_by_value = 'end_hour';\n break;\n case 'id':\n $order_by_value = 'id';\n break;\n case 'status':\n $order_by_value = 'status';\n break;\n case 'date_created':\n $order_by_value = 'date_created';\n break;\n default:\n $order_by_value = 'check_in';\n }\n \n array_push($query, ' ORDER BY '.$order_by_value.' '.($order_value));\n\n /*\n * ************************************************************* Get number of reservations.\n */\n if (!$api){\n $reservations_total = $wpdb->get_var($wpdb->prepare(str_replace('*', 'COUNT(*)', implode('', $query)), $values));\n }\n else{\n $reservations_total = 0;\n }\n\n /*\n * Pagination query.\n */\n array_push($query, ' LIMIT %d, %d');\n array_push($values, (($page-1)*$per_page));\n array_push($values, $per_page);\n \n /*\n * ************************************************************* Get reservations.\n */\n $reservations = $wpdb->get_results($wpdb->prepare(implode('', $query), $values));\n \n $csvReservations = array();\n $csvReservationHeader = array('ID', 'Calendar ID', 'Calendar Name', 'Check In', 'Check Out', 'Start Hour');\n $excelReservations = array();\n $excelReservationsData = array();\n $jsonReservationsData = array();\n $icsReservationsData = array();\n \n \n // ICS\n if(strtolower($type) == 'ics') {\n array_push($icsReservationsData, 'BEGIN:VCALENDAR');\n array_push($icsReservationsData, 'PRODID:-//Pinpoint.world//2.6.6//EN');\n array_push($icsReservationsData, 'CALSCALE:GREGORIAN');\n array_push($icsReservationsData, 'METHOD:PUBLISH');\n array_push($icsReservationsData, 'VERSION:2.0');\n \n// array_push($icsReservationsData, 'BEGIN:VTIMEZONE');\n \n \n// foreach($reservations as $reservation) {\n// /*\n// * Settings\n// */\n// $settings_calendar = $DOPBSP->classes->backend_settings->values($reservation->calendar_id, \n// 'calendar');\n// }\n \n array_push($icsReservationsData, 'X-WR-TIMEZONE:UTC');\n// array_push($icsReservationsData, 'BEGIN:STANDARD');\n// array_push($icsReservationsData, 'TZOFFSETFROM:+0200');\n// array_push($icsReservationsData, 'TZOFFSETTO:+0100');\n// array_push($icsReservationsData, 'END:STANDARD');\n// array_push($icsReservationsData, 'BEGIN:DAYLIGHT');\n// array_push($icsReservationsData, 'TZOFFSETFROM:+0100');\n// array_push($icsReservationsData, 'TZOFFSETTO:+0200');\n// array_push($icsReservationsData, 'END:DAYLIGHT');\n// array_push($icsReservationsData, 'END:VTIMEZONE');\n \n $timestamp = gmdate(\"Ymd\\THis\\Z\");\n \n foreach($reservations as $reservation) {\n \n \n $calendar = $wpdb->get_row($wpdb->prepare('SELECT * FROM '.$DOPBSP->tables->calendars.' WHERE id=%d',\n $reservation->calendar_id));\n /*\n * Settings\n */\n $settings_calendar = $DOPBSP->classes->backend_settings->values($reservation->calendar_id, \n 'calendar');\n \n // ICS\n array_push($icsReservationsData, 'BEGIN:VEVENT');\n array_push($icsReservationsData, 'UID:'.$reservation->uid);\n array_push($icsReservationsData, 'SUMMARY:['.$reservation->status.']'.' '.$calendar->name.' (R#'.$reservation->id.')');\n array_push($icsReservationsData, 'DTSTAMP:'.$timestamp);\n \n if($reservation->start_hour != '') {\n $reservation->check_out = $reservation->check_in;\n \n if($settings_calendar->timezone != '') {\n \n $dateTimeZone = new DateTimeZone($settings_calendar->timezone);\n \n // set hours to google timezone\n $start_hour_data = new DateTime($reservation->check_in.' '.$reservation->start_hour, $dateTimeZone);\n $start_hour_data->setTimeZone(new DateTimeZone('UTC'));\n $reservation->start_hour = $start_hour_data->format('H:i');\n $reservation->check_in = $start_hour_data->format('Y-m-d');\n \n if($settings_calendar->hours_interval_enabled == 'true'){\n $end_hour_data = new DateTime($reservation->check_out.' '.$reservation->end_hour, $dateTimeZone);\n $end_hour_data->setTimeZone(new DateTimeZone('UTC'));\n $reservation->end_hour = $end_hour_data->format('H:i');\n $reservation->check_out = $end_hour_data->format('Y-m-d');\n } else {\n $end_hour_data = new DateTime($reservation->check_out.' '.$reservation->end_hour, $dateTimeZone);\n $end_hour_data->setTimeZone(new DateTimeZone('UTC'));\n $end_hour_h = $end_hour_data->format('H').':'.$end_hour_data->format('i');\n\n $reservation->end_hour = $end_hour_h;\n $reservation->check_out = $end_hour_data->format('Y-m-d');\n }\n }\n array_push($icsReservationsData, 'DTSTART:'.str_replace('-','', $reservation->check_in).'T'.str_replace(':','',$reservation->start_hour).'00Z');\n } else {\n array_push($icsReservationsData, 'DTSTART;VALUE=DATE:'.str_replace('-','', $reservation->check_in));\n }\n \n if($reservation->end_hour != '') {\n array_push($icsReservationsData, 'DTEND:'.str_replace('-','', $reservation->check_out).'T'.str_replace(':','',$reservation->end_hour).'00Z');\n } else {\n \n if ($settings_calendar->days_morning_check_out == 'false'){\n // check_out + 1 day\n $check_out = new DateTime($reservation->check_out.' 00:00:00');\n $check_out->modify('+1 day');\n $reservation->check_out = $check_out->format('Y-m-d');\n }\n array_push($icsReservationsData, 'DTEND;VALUE=DATE:'.str_replace('-','', $reservation->check_out));\n }\n \n // \n $description = $this->getSyncDescription('|FORM|',\n $reservation);\n \n array_push($icsReservationsData, 'DESCRIPTION:'.substr($description, 0, 60));\n array_push($icsReservationsData, 'END:VEVENT');\n }\n \n array_push($icsReservationsData, 'END:VCALENDAR');\n \n echo implode(PHP_EOL, $icsReservationsData);\n exit;\n }\n\n foreach($reservations as $reservation) {\n $csvReservation = array();\n $reservations_form = json_decode($reservation->form);\n $reservation = (array)$reservation;\n \n $calendar = $wpdb->get_row($wpdb->prepare('SELECT * FROM '.$DOPBSP->tables->calendars.' WHERE id=%d',\n $reservation['calendar_id']));\n\n array_push($excelReservationsData, '<tr>');\n array_push($csvReservation, $reservation['id']);\n array_push($excelReservationsData, '<td>'.$reservation['id'].'</td>');\n\n if (!array_key_exists('id', $jsonReservationsData)) {\n $jsonReservationsData['id'] = array();\n }\n array_push($jsonReservationsData['id'], $reservation['id']);\n\n array_push($csvReservation, $reservation['calendar_id']);\n array_push($excelReservationsData, '<td>'.$reservation['calendar_id'].'</td>');\n\n array_push($csvReservation, $calendar->name);\n array_push($excelReservationsData, '<td>'.$calendar->name.'</td>');\n\n if (!array_key_exists('calendar_id', $jsonReservationsData)) {\n $jsonReservationsData['calendar_id'] = array();\n }\n array_push($jsonReservationsData['calendar_id'], $reservation['calendar_id']);\n\n array_push($csvReservation, $reservation['check_in']);\n array_push($excelReservationsData, '<td>'.$reservation['check_in'].'</td>');\n\n if (!array_key_exists('check_in', $jsonReservationsData)) {\n $jsonReservationsData['check_in'] = array();\n }\n array_push($jsonReservationsData['check_in'], $reservation['check_in']);\n \n if($reservation['check_out'] == '') {\n $reservation['check_out'] = ' ';\n }\n \n if($reservation['check_out'] == '') {\n unset($csvReservationHeader[3]);\n } else {\n array_push($csvReservation, $reservation['check_out']);\n array_push($excelReservationsData, '<td>'.$reservation['check_out'].'</td>');\n\n if (!array_key_exists('check_out', $jsonReservationsData)) {\n $jsonReservationsData['check_out'] = array();\n }\n array_push($jsonReservationsData['check_out'], $reservation['check_out']);\n }\n \n if($reservation['start_hour'] == '') {\n $reservation['start_hour'] = ' ';\n }\n\n if($reservation['start_hour'] == '') {\n\n if($reservation['check_out'] == '') {\n unset($csvReservationHeader[3]);\n } else {\n unset($csvReservationHeader[4]);\n }\n } else {\n array_push($csvReservation, $reservation['start_hour']);\n array_push($excelReservationsData, '<td>'.$reservation['start_hour'].'</td>');\n\n if (!array_key_exists('start_hour', $jsonReservationsData)) {\n $jsonReservationsData['start_hour'] = array();\n }\n array_push($jsonReservationsData['start_hour'], $reservation['start_hour']);\n }\n \n if($reservation['end_hour'] == '') {\n $reservation['end_hour'] = ' ';\n }\n\n// if($reservation['end_hour'] != '') {\n array_push($csvReservation, $reservation['end_hour']);\n array_push($excelReservationsData, '<td>'.$reservation['end_hour'].'</td>');\n\n if (!array_key_exists('end_hour', $jsonReservationsData)) {\n $jsonReservationsData['end_hour'] = array();\n array_push($csvReservationHeader, 'End hour');\n }\n array_push($jsonReservationsData['end_hour'], $reservation['end_hour']);\n// }\n\n if($reservation['price'] != 0) {\n array_push($csvReservation, $reservation['price']);\n array_push($excelReservationsData, '<td>'.$reservation['price'].'</td>');\n\n if (!array_key_exists('price', $jsonReservationsData)) {\n $jsonReservationsData['price'] = array();\n array_push($csvReservationHeader, 'Price');\n }\n array_push($jsonReservationsData['price'], $reservation['price']);\n }\n else{\n array_push($csvReservation, '0');\n array_push($excelReservationsData, '<td>0</td>');\n\n if (!array_key_exists('price', $jsonReservationsData)) {\n $jsonReservationsData['price'] = array();\n array_push($csvReservationHeader, 'Price');\n }\n }\n\n if($reservation['extras_price'] != 0) {\n array_push($csvReservation, $reservation['extras_price']);\n array_push($excelReservationsData, '<td>'.$reservation['extras_price'].'</td>');\n\n if (!array_key_exists('extras_price', $jsonReservationsData)) {\n $jsonReservationsData['extras_price'] = array();\n array_push($csvReservationHeader, 'Extras price');\n }\n array_push($jsonReservationsData['extras_price'], $reservation['extras_price']);\n }\n else{\n array_push($csvReservation, '0');\n array_push($excelReservationsData, '<td>0</td>');\n\n if (!array_key_exists('extras_price', $jsonReservationsData)) {\n $jsonReservationsData['extras_price'] = array();\n array_push($csvReservationHeader, 'Extras price');\n }\n }\n\n if($reservation['fees_price'] != 0) {\n array_push($csvReservation, $reservation['fees_price']);\n array_push($excelReservationsData, '<td>'.$reservation['fees_price'].'</td>');\n\n if (!array_key_exists('fees_price', $jsonReservationsData)) {\n $jsonReservationsData['fees_price'] = array();\n array_push($csvReservationHeader, 'Fees price');\n }\n array_push($jsonReservationsData['fees_price'], $reservation['fees_price']);\n }\n else{\n array_push($csvReservation, '0');\n array_push($excelReservationsData, '<td>0</td>');\n\n if (!array_key_exists('fees_price', $jsonReservationsData)) {\n $jsonReservationsData['fees_price'] = array();\n array_push($csvReservationHeader, 'Fees price');\n }\n }\n\n if($reservation['coupon_price'] != 0) {\n array_push($csvReservation, $reservation['coupon_price']);\n array_push($excelReservationsData, '<td>'.$reservation['coupon_price'].'</td>');\n\n if (!array_key_exists('coupon_price', $jsonReservationsData)) {\n $jsonReservationsData['coupon_price'] = array();\n array_push($csvReservationHeader, 'Coupon price');\n }\n array_push($jsonReservationsData['coupon_price'], $reservation['coupon_price']);\n }\n else{\n array_push($csvReservation, '0');\n array_push($excelReservationsData, '<td>0</td>');\n\n if (!array_key_exists('coupon_price', $jsonReservationsData)) {\n $jsonReservationsData['coupon_price'] = array();\n array_push($csvReservationHeader, 'Coupon price');\n }\n }\n\n if($reservation['deposit_price'] != 0) {\n array_push($csvReservation, $reservation['deposit_price']);\n array_push($excelReservationsData, '<td>'.$reservation['deposit_price'].'</td>');\n\n if (!array_key_exists('deposit_price', $jsonReservationsData)) {\n $jsonReservationsData['deposit_price'] = array();\n array_push($csvReservationHeader, 'Deposit price');\n }\n array_push($jsonReservationsData['deposit_price'], $reservation['deposit_price']);\n }\n else{\n array_push($csvReservation, '0');\n array_push($excelReservationsData, '<td>0</td>');\n\n if (!array_key_exists('deposit_price', $jsonReservationsData)) {\n $jsonReservationsData['deposit_price'] = array();\n array_push($csvReservationHeader, 'Deposit price');\n }\n }\n \n array_push($csvReservation, $reservation['price_total']);\n array_push($excelReservationsData, '<td>'.$reservation['price_total'].'</td>');\n\n if (!array_key_exists('price_total', $jsonReservationsData)) {\n $jsonReservationsData['price_total'] = array();\n array_push($csvReservationHeader, 'Total price');\n }\n array_push($jsonReservationsData['price_total'], $reservation['price_total']);\n array_push($csvReservation, $reservation['currency_code']);\n array_push($excelReservationsData, '<td>'.$reservation['currency_code'].'</td>');\n\n if (!array_key_exists('currency_code', $jsonReservationsData)) {\n $jsonReservationsData['currency_code'] = array();\n array_push($csvReservationHeader, 'Currency');\n }\n array_push($jsonReservationsData['currency_code'], $reservation['currency_code']);\n\n if($reservation['no_items'] != 0) {\n array_push($csvReservation, $reservation['no_items']);\n array_push($excelReservationsData, '<td>'.$reservation['no_items'].'</td>');\n\n if (!array_key_exists('no_items', $jsonReservationsData)) {\n $jsonReservationsData['no_items'] = array();\n array_push($csvReservationHeader, 'No. Items');\n }\n array_push($jsonReservationsData['no_items'], $reservation['no_items']);\n }\n else{\n array_push($csvReservation,'0');\n array_push($excelReservationsData, '<td>0</td>');\n\n if (!array_key_exists('no_items', $jsonReservationsData)) {\n $jsonReservationsData['no_items'] = array();\n array_push($csvReservationHeader, 'No. Items');\n }\n }\n \n // IP Address\n // if(isset($reservation['ip']) && $reservation['ip'] != '') {\n \n if (!array_key_exists('ip', $jsonReservationsData)) {\n $jsonReservationsData['ip'] = array();\n array_push($csvReservationHeader, 'IP address');\n }\n array_push($excelReservationsData, '<td>'.$reservation['ip'].'</td>');\n // }\n \n foreach($reservations_form as $key => $data) {\n\n if(!in_array($data->translation, $csvReservationHeader)) {\n array_push($csvReservationHeader, $data->translation);\n }\n array_push($csvReservation, $data->value);\n array_push($excelReservationsData, '<td>'.$data->value.'</td>');\n\n if (!array_key_exists(str_replace(\" \",\"\",strtolower($data->translation)), $jsonReservationsData)) {\n $jsonReservationsData[str_replace(\" \",\"\",strtolower($data->translation))] = array();\n }\n array_push($jsonReservationsData[str_replace(\" \",\"\",strtolower($data->translation))], $data->value);\n }\n array_push($csvReservations, implode(',', $csvReservation));\n array_push($excelReservationsData, '</tr>');\n }\n\n array_push($excelReservations, '<table>');\n array_push($excelReservations, ' <tr>');\n\n foreach($csvReservationHeader as $headerName) {\n array_push($excelReservations, ' <td>'.$headerName.'</td>');\n }\n array_push($excelReservations, ' </tr>');\n array_push($excelReservations, implode('', $excelReservationsData));\n\n array_push($excelReservations, '</table>');\n\n array_unshift($csvReservations, implode(',', $csvReservationHeader));\n \n if(strtolower($type) == 'csv') {\n echo implode('\\r\\n', $csvReservations);\n } else if(strtolower($type) == 'json') {\n echo json_encode($jsonReservationsData); \n } else {\n echo implode('', $excelReservations);\n }\n \n exit;\n }", "public function get_banners( $custom_args = array() ) \n\t{\t\n\t\t$args = array(\n\t\t\t'posts_per_page' => -1,\n\t\t\t'post_type' => 'banners',\n\t\t\t'post_status' => 'publish'\n\t\t);\n\t\t\n\t\t//$query = new WP_Query( array_merge( $args, $custom_args ) );\n\t\t//return $query->get_posts();\n\t\treturn get_posts( array_merge( $args, $custom_args ) );\n\t}", "public function getBanner($id){\n $validate = new IsINT();\n $validate->goCheck();\n\n //get the Banner data by banner ID\n //try{\n $banner = BannerModel::getBannerByID($id);\n// $banner = BannerModel::all(['banner_id'=>$id]);\n// }catch (Exception $ecp){\n// $rtnMsg = [\n// //get the error message\n// 'return_MSG' => 'This is test message!',\n// 'return_Code' => '10001',\n// ];\n// // return the error message\n// //json(array, code)\n// //array => return data\n// // code => Http state code, e.g. 400, 404, 500\n //return json($rtnMsg, 400);\n\n// }\n if($banner){\n //if no exception, return the correct data\n return json($banner,200);\n }else{\n //if have exception, then throw it to exception handler\n throw new NoBannerData();\n //this is GITHUB\n //throw new Exception();\n //return '11111111111';\n }\n // return json($rtnMsg,200);\n\n }", "function getAdsFront($gId) {\n\t\t$results = $this->select('*', \"status = 1 and gid = $gId\", array('position'=>'ASC'));\n\t\tif($results) {\n\t\t\t$adsInfo = array();\n\t\t\tforeach($results as $key => $result) {\n\t\t\t\t$adsInfo[] = new AdsInfo ($result['gid'],\n\t\t\t\t\t\t\t\t\t\t$result['logo_url'],\n\t\t\t\t\t\t\t\t\t\t$result['url'],\n\t\t\t\t\t\t\t\t\t\t$result['position'], \n\t\t\t\t\t\t\t\t\t\t$result['status'], \n\t\t\t\t\t\t\t\t\t\t$result['id']\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t}\n\t\t\treturn $adsInfo;\t\t\n\t\t}\n\t\treturn '';\n\t}", "function getDailyDeals(){\n\n global $flipkart_deals_page_transient_lifetime;\n $api_url = 'https://affiliate-api.flipkart.net/affiliate/offers/v1/dotd/json';\n\n function callFlipkartFeedsAPI($api_url){\n\n static $api_call_counter = 1;\n\n $api_response = wp_remote_get( $api_url ,\n array( 'timeout' => 10,\n 'headers' => array( 'Fk-Affiliate-Id' => 'couponmac',\n 'Fk-Affiliate-Token'=> '6eb39690116842ad937da289fa4e6e74' )\n ));\n\n if( is_array($api_response) ) {\n\n $api_response = $api_response['body'];\n $api_response = json_decode($api_response, true);\n\n set_transient( 'flipkart_daily_deals', $api_response, $flipkart_deals_page_transient_lifetime );\n\n return $api_response;\n }else{\n $api_call_counter++;\n if($api_call_counter>5){\n return '';\n }\n $api_response = callFlipkartFeedsAPI($api_url);\n return $api_response;\n }\n }\n\n return callFlipkartFeedsAPI($api_url);\n }", "function InfGetCreditCard($inf_contact_id, $inf_card_id) {\n\t$object_type = \"CreditCard\";\n\t$class_name = \"Infusionsoft_\" . $object_type;\n\t$object = new $class_name();\n\t$object->removeRestrictedFields(); // Remove CreditCard and CVV\n\t$objects = Infusionsoft_DataService::query(new $class_name(), array('Id' => $inf_card_id, 'ContactId' => $inf_contact_id, 'Status' => 3));\n\n $cards_array = array();\n foreach ($objects as $i => $object) {\n $cards_array = $object->toArray();\n }\n\treturn $cards_array; // Should only be one card\n}", "public function index()\n {\n $adverts = Advert::all();\n $categories = Category::all();\n $products = Product::orderBy('updated_at', 'desc')->take(15)->get();\n return response()->json([\n \"adverts\" => $adverts,\n \"categories\" => $categories,\n \"products\" => $products\n ]);\n }", "public function index()\n {\n $garages=Garage::paginate(15);\n return GarageResource::collection($garages);\n }", "protected function _get_locations_by_creative($creative_id)\n {\n\t\t\t$request = Request::factory('http://'.Servers::$api_server.\"/creatives/$creative_id/locations\")\n\t\t\t\t->method(Request::GET)\n\t\t\t\t->headers('Content-Type', 'application/json');\n\t\t\n\t\t\treturn json_decode($request->execute(),true);\n\n }", "function ajaxAdsReview()\n{\n header('Content-type: application/json');\n\n $retour = new \\stdClass();\n $retour->error = false;\n $retour->message = 'ok';\n\n $fields = $_POST['fields'];\n $fields = json_decode(stripslashes($fields));\n\n $refClient = $fields->choisir_client_leboncoin; // vaut false si prospect ou nouveau ou ref_eleve (si !prospect )\n\n $phone = $fields->phone;\n\n if (! $phone) {\n $phone = 'pas-de-num';\n }\n\n $lbcProcessMg = new \\spamtonprof\\stp_api\\LbcProcessManager();\n $lbcAcctMg = new \\spamtonprof\\stp_api\\LbcAccountManager();\n\n $ads = $lbcProcessMg->generateAds($refClient, 50, $phone);\n $lbcAccts = $lbcAcctMg->getAll(array(\n 'ref_client' => $refClient\n ));\n\n $emails = [];\n foreach ($lbcAccts as $lbcAcct) {\n $emails[] = $lbcAcct->getMail();\n }\n\n // récupération des prénoms du client\n \n $clientMg = new \\spamtonprof\\stp_api\\LbcClientManager();\n $client = $clientMg->get(array('ref_client' => $refClient));\n \n $prenomMg = new \\spamtonprof\\stp_api\\PrenomLbcManager();\n $prenoms = $prenomMg -> getAll(array('ref_cat_prenom' => $client->getRef_cat_prenom()));\n \n \n \n // récupération des réponses du client\n $texteMg = new \\spamtonprof\\stp_api\\LbcTexteManager();\n $reponses = $texteMg -> getAll(array(\"ref_type_texte\" => $client->getRef_reponse_lbc()));\n \n \n $retour->phone = $phone;\n $retour->refClient = $refClient;\n $retour->ads = $ads;\n $retour->emails = $emails;\n $retour->prenoms = $prenoms;\n $retour->reponses = $reponses;\n \n \n \n echo (json_encode($retour));\n\n die();\n}", "public function getAdsPlans()\r\n {\r\n /*$content_type = [];\r\n $objectManager = $this->blockObjectManager();\r\n $customerSession = $objectManager->create('Magento\\Customer\\Model\\Session');\r\n $customerid = $customerSession->getCustomerId();\r\n $model = $objectManager->create('Webkul\\MpAdvertisementManager\\Model\\Block')->getCollection();\r\n $data = $model->addFieldToFilter('seller_id', array('eq'=> $customerid));\r\n foreach ($data as $collections) {\r\n $content_type[] = $collections->getContentType();\r\n }\r\n $dataCollection = $this->_adsHelper->getAdsPlans()->addFieldToFilter('content_type', array('in'=> array_unique($content_type)));*/\r\n return $this->_adsHelper->getAdsPlans();\r\n // return $dataCollection;\r\n }", "public function getAction($request, $response, $args){\n // /api/experience/{cv_id}/{id}\n $cv_id = $args['cv_id'];\n $experience_id = $args['id'];\n\n //caut in baza de date cv-ul cu id-ul respectiv\n $cvObject = CV::where('pk_id','=',$cv_id)->first();\n\n //verific daca exista cv-ul cu id-ul respectiv;\n if(is_null($cvObject)){\n //obiectul cv este null, deci returnez mesaj de eroare\n return $response->withJson([\n 'message' => \"CV id invalid\",\n 'status' => 400\n ], 400);\n }\n\n //caut in baza de date informatia despre experienta cu id-ul respectiv\n $experienceObject = Experience::where('pk_id','=',$experience_id)->first();\n \n //verific daca experienceObject este null\n if(is_null($experienceObject)){\n //experienceObject este null, deci returnez mesaj de eroare\n return $response->withJson([\n 'message' => \"Experience id invalid\",\n 'status' => 400\n ], 400);\n }\n\n //returnez cu success obiectul cerut\n return $response->withJson($experienceObject, 200);\n }", "function getAllNews()\n{ \n\t $pubdate_params = array ( \n \"arg0\" => APPTIVO_BUSINESS_API_KEY,\n \"arg1\" => APPTIVO_BUSINESS_ACCESS_KEY\n\t );\n\t $plugin_params = array ( \n \"arg0\" => APPTIVO_BUSINESS_API_KEY,\n\t \"arg1\" => APPTIVO_BUSINESS_ACCESS_KEY\n );\n \n $response = get_data(APPTIVO_BUSINESS_SERVICES,'-news-publisheddate','-news-data','getLastPublishDate','getAllNews',$pubdate_params,$plugin_params);\n return $response;\n}", "function loadAds(){\n\t\t$adsStmt = $this->dbc->query('SELECT id FROM items');\n\t\t//creates new array $ads\n\t\t$ads = [];\n\n\t\t//calls fetch and stores new ad as a new row\n\t\twhile($row = $adsStmt->fetch(PDO::FETCH_ASSOC)){\n\n\t\t\t$ad = new Ad($this->dbc, $row['id']);\n\t\t\t//stores the row into new array\n\t\t\t$ads[] = $ad;\n\t\t}\n\t\treturn $ads;\n\t}", "function gc_get_url_and_print_json( $url ) {\n header( 'Content-type: application/json' );\n $args = array(\n 'headers' => array(\n 'Authentication' => $this->api_key\n )\n );\n $response = wp_remote_get( $url, $args );\n // $http_code = wp_remote_retrieve_response_code( $response );\n echo $response['body'];\n die();\n }", "public function get_all_ads_data()\n\t{\n\t\treturn $this->db->get('ads')->result();\n\t}", "function get_zone_links($czds_base_url){\n global $access_token;\n\n $links_url = $czds_base_url . \"/czds/downloads/links\";\n $links_response = do_get($links_url, $access_token);\n\n $status_code = $links_response['info']['http_code'];\n\n if($status_code == 200){\n $zone_links = json_decode($links_response['result'],true);\n echo now().\": The number of zone files to be downloaded is \".count($zone_links).PHP_EOL;\n return $zone_links;\n }elseif($status_code == 401){\n global $username, $password, $authen_base_url;\n echo \"The access_token has been expired. Re-authenticate user $username\".PHP_EOL;\n $access_token = authenticate($username, $password, $authen_base_url);\n return get_zone_links($czds_base_url);\n }else{\n echo \"Failed to get zone links from $links_url with error code $status_code\".PHP_EOL;\n return false;\n }\n}", "public function articles_get(){\r\n if($this->dx_auth->is_logged_in())\r\n $__uri = $this->get(\"m_uri\");\r\n else\r\n $__uri=array(\"id\"=>0);\r\n\r\n // $art[\"domain\"] = $__uri[\"domain\"];\r\n $art[\"art\"] = $this->articles(\"\",\"\",$__uri[\"id\"]);\r\n\r\n foreach ($art[\"art\"] as $key => &$value) {\r\n $img=explode(\",\",$value[\"name\"]);\r\n $value[\"name\"]=site_url('application/assets/application/img/post/post_'.$__uri[\"id\"].'/'.$img[0]);\r\n $value[\"description\"]=strip_tags(html_entity_decode($value[\"description\"]),\"<p>\");\r\n $value[\"description\"]=substr(strip_tags(html_entity_decode($value[\"description\"])),0,150).(strlen(html_entity_decode($value[\"description\"]))>150?\"....\":\"\");\r\n //$value[\"video\"]=($value[\"video\"] ? html_entity_decode($value[\"video\"]) : \"\");\r\n // $value[\"url_title\"]=site_url($__uri[\"domain\"].\"/\".urls_amigables($value['category']).\"/$value[id]/\".urls_amigables($value['title']));\r\n //$value[\"url_cat\"]=site_url($__uri[\"domain\"].\"/\".urls_amigables($value['category']));\r\n \r\n }\r\n\r\n if(count($art[\"art\"])==0)\r\n $art=\"\";\r\n \r\n $_res = format_response($art,'success','ok',false);\r\n $this->response($_res,200); \r\n\r\n }", "function getClientsCampaigns($db){\n // $fields = '*';\n // $on = array('a_id' => 'client_id', 'b_id' => 'id');\n $pre = getCampaigns($db);\n $results = array();\n $results['data'] = groupByKey($pre['data'], 'view_name');\n $results['status'] = $pre['status'];\n $results['message'] = $pre['message'];\n\n return $results;\n}", "function getCardSetsFromCategory($categoryId){\n $cardSets = [];\n try {\n $cardSets = json_decode(file_get_contents('http://localhost:8080/cardSet/category/'. $categoryId));\n } catch (Exception $e) {\n echo '<h5 class=\"communication-error\"><i class=\"fas fa-exclamation-triangle text-warning\"></i> Fehler bei der Verbindung zum Service!<br><br>Error: '.$e->getMessage().'</h5>';\n }\n return $cardSets;\n}", "public function get_ads($screen_code)\n {\n $screen = Screen::where('code', $screen_code)->first();\n if($screen) {\n return response()->json(new AdvertisementResource($screen), 200);\n }\n return response()->json(['error' => 'Invalid boardId'], 400);\n }", "public function get_add_preview_detail($id=null){\n\t\t$this->db->select('advertisements.*, category_id as list_cat_id');\n\t\t$this->db->where('advertisements.id',$id);\n\t\t$this->db->from('advertisements');\n\t\t$query = $this->db->get();\t\t\t\n\t\t$results=$query->row_array(); \n\t\treturn $results;\n\t}", "function gatherResults($conn, $advert_id)\n {\n $query = \"SELECT whwp_Advert.* FROM whwp_Advert \"\n . \"WHERE whwp_Advert.advert_id = :advert_id \";\n $conn->prepQuery($query);\n $conn->bind('advert_id', $advert_id);\n $advert=[];\n $advert = $conn->single();\n return $advert;\n }", "function getClientReviews($clientId) {\n $db = acmeConnect();\n //* means select everything\n $sql = 'SELECT reviews.reviewId, reviews.reviewText, reviews.reviewDate, inventory.invName FROM reviews INNER JOIN inventory ON reviews.invId = inventory.invId WHERE clientId = :clientId';\n $stmt = $db->prepare($sql);\n //treated as an integer\n $stmt->bindValue(':clientId', $clientId, PDO::PARAM_INT);\n $stmt->execute();\n //requesting an associative array \n $clientReviews = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $clientReviews; \n}", "function fsf_port_getImageCategories($fsf_port_image_id)\n { \n // Initialize Variables\n $fsf_port_getImageCategories_output = \"\";\n\n global $fsfcms_api_url; \n\n $fsf_api_file = \"fsf.port.getImageCategories.php\";\n $fsf_api_options = \"\";\n\n if($fsf_port_image_id !=\"\")\n {\n $fsf_api_options = \"?image_id=\" . $fsf_port_image_id;\n } else {\n $fsf_api_options = \"\";\n }\n\n $fsf_port_getImageCategories_json = fsf_preacher_curl($fsfcms_api_url, $fsf_api_file, $fsf_api_options);\n $fsf_port_getImageCategories_categories = json_decode($fsf_port_getImageCategories_json, true);\n $fsf_port_getImageCategories_output = array();\n \n // Process the categories \n if($fsf_port_getImageCategories_categories['0'] == \"FSFPGIC-None-Found\")\n {\n $fsf_port_getImageCategories_output = \"No categories were found for this image.\";\n } else { \n $fsf_port_getImageCategories_multiple = \"NO\";\n if (count($fsf_port_getImageCategories_categories) > 1)\n {\n $fsf_port_getImageCategories_multiple = \"YES\"; \n }\n $fsf_port_getImageCategories_output['multipleCategories'] = $fsf_port_getImageCategories_multiple;\n foreach($fsf_port_getImageCategories_categories as $fsf_port_getImageCategories_category)\n { \n $fsf_port_getImageCategories_links .= \"<a href=\\\"/categories/\" . strtolower($fsf_port_getImageCategories_category['categorySlug']) . \"\\\">\" . ucwords($fsf_port_getImageCategories_category['categoryName']) . \"</a>, \";\n } \n $fsf_port_getImageCategories_links = rtrim($fsf_port_getImageCategories_links,\", \"); \n $fsf_port_getImageCategories_output['categoriesWithLinks'] = $fsf_port_getImageCategories_links;\n } \n return $fsf_port_getImageCategories_output;\n }", "public function get_service_data($add_id=null){\n\t\t$this->db->select('categories.name as category_name,cities.name as city_name,areas.name as area_name');\n\t\t$this->db->join('categories','categories.id=advertisment_customer_service.category_id');\t\n\t\t$this->db->join('advertisements','advertisements.id=advertisment_customer_service.listing_id');\n\t\t$this->db->join('areas','areas.id=advertisment_customer_service.area_id');\n\t\t$this->db->join('cities','cities.id=advertisment_customer_service.city_id');\n\t $this->db->where('advertisment_customer_service.listing_id',$add_id);\n\t\t$this->db->where('categories.is_active',true);\n\t\t$this->db->from('advertisment_customer_service');\n\t $query = $this->db->get();\t\n\t\t$results=$query->result_array();\n\t\treturn $results;\n\t}", "function _campaign_resource_load_gallery($nid, $count = 25, $start = 0) {\n $params = array(\n 'nid' => $nid,\n 'status' => 'approved',\n );\n return dosomething_api_get_reportback_files($params, $count, $start);\n}", "public function get_all_ads($limit, $offset) {\n $data = $this->db->get('advertisement', $limit, $offset);\n return $data->result();\n // $sql = \"select * from advertisement\";\n // $data = $this->db->query($sql);\n // return $data->result();\n }", "public function _getCustomisedResponse() {\n if ( isset($_GET[\"p\"]) ) {\n if ( !is_null($_GET[\"p\"]) || trim($_GET[\"p\"]) !== \"\" ) {\n $__searchResult = $this->_getSingleArea($_GET[\"p\"]);\n } else {\n return $this->_throw404Response();\n }\n\n if (count($__searchResult) > 0) { \n //echo 'enemies<br/><br/>';\n // get the area_enemies' id array - the area_enemies mysql db column is of type JSON\n $__areaEnemiesIdArray = json_decode($__searchResult[0]->area_enemies);\n // get the detail of each enemy in the $__areaEnemiesIdArray & construct the output\n // in nested format\n $__areaEnemiesNestedArrayOutput = [];\n if (count($__areaEnemiesIdArray) > 0) {\n for ($__i=0; $__i<count($__areaEnemiesIdArray); $__i++) {\n array_push(\n $__areaEnemiesNestedArrayOutput,\n json_decode(\n json_encode($this->_enemiesController->_getDbRow($__areaEnemiesIdArray[$__i])[0]), \n true\n )\n ); \n }\n }\n //var_dump($__areaEnemiesNestedArrayOutput);\n //echo '<br/><br/>';\n\n //echo 'doors<br/><br/>';\n // get the area_doors' id array - the area_doors mysql db column is of type JSON\n $__areaDoorsIdArray = json_decode($__searchResult[0]->area_doors);\n // get the detail of each door in the $__areaDoorsIdArray & construct the output\n // in nested array format\n $__areaDoorsNestedArrayOutput = [];\n if (count($__areaDoorsIdArray) > 0) {\n for ($__i=0; $__i<count($__areaDoorsIdArray); $__i++) {\n array_push(\n $__areaDoorsNestedArrayOutput,\n json_decode(\n json_encode($this->_doorsController->_getDbRow($__areaDoorsIdArray[$__i])[0]), \n true\n )\n ); \n }\n }\n //var_dump($__areaDoorsNestedArrayOutput);\n //echo '<br/><br/>';\n\n //echo 'equipment<br/><br/>';\n // get the area_equipments' id array - the area_equipments mysql db column is of type JSON\n $__areaEquipmentIdArray = json_decode($__searchResult[0]->area_equipments);\n // get the detail of each equipment in the $__areaEquipmentIdArray & construct the output\n // in nested array format\n $__areaEquipmentNestedArrayOutput = [];\n if (count($__areaEquipmentIdArray) > 0) {\n for ($__i=0; $__i<count($__areaEquipmentIdArray); $__i++) {\n array_push(\n $__areaEquipmentNestedArrayOutput,\n json_decode(\n json_encode($this->_equipmentController->_getDbRow($__areaEquipmentIdArray[$__i])[0]), \n true\n )\n ); \n }\n }\n //var_dump($__areaEquipmentNestedArrayOutput);\n //echo '<br/><br/>'; \n\n //echo 'items<br/><br/>';\n // get the area_items' id array - the area_items mysql db column is of type JSON\n $__areaItemsIdArray = json_decode($__searchResult[0]->area_items);\n // get the detail of each equipment in the $__areaItemsIdArray & construct the output\n // in nested array format\n $__areaItemsNestedArrayOutput = [];\n if (count($__areaItemsIdArray) > 0) {\n for ($__i=0; $__i<count($__areaItemsIdArray); $__i++) {\n array_push(\n $__areaItemsNestedArrayOutput,\n // json_decode : 2nd arg = true -> 1st arg is an array\n json_decode(\n json_encode($this->_itemsController->_getDbRow($__areaItemsIdArray[$__i])[0]), \n true\n )\n ); \n }\n } \n //var_dump($__areaItemsNestedArrayOutput);\n //echo '<br/><br/>';\n\n //echo 'Consolidated Response<br/><br/>';\n $__response = \n array( \n 'code' => 200,\n 'area' => array ( \n 'id' => $__searchResult[0]->id,\n 'nextAreaId' => $__searchResult[0]->next_area_id,\n 'areaMap' => $__searchResult[0]->area_map,\n 'areaEnemies' => $__areaEnemiesNestedArrayOutput,\n 'areaItems' => $__areaItemsNestedArrayOutput,\n 'areaEquipments' => $__areaEquipmentNestedArrayOutput,\n 'areaDoors' => $__areaDoorsNestedArrayOutput\n ) \n );\n\n //echo '<br/><br/>'; \n } else {\n $__response = $this->_returnZeroRow(\"areas\");\n }\n \n return response()->json($__response, $__response['code']);\n } else {\n return $this->_throw404Response();\n }\n }", "function oneclick_call_wp_frontend_api()\r\r\n{\r\r\n $args = array(\r\r\n 'timeout' => 240\r\r\n );\r\r\n $json_feed_get_frontend = 'http://wp-samurai.com/wp-json/posts/?type=tutorials&filter[category_name]=frontend';\r\r\n $json_frontend = wp_remote_get($json_feed_get_frontend, $args);\r\r\n $tutorial_frontend_api = json_decode($json_frontend['body']);\r\r\n return $tutorial_frontend_api;\r\r\n}", "public function get_advertisment_detail($id=null){\n\t\t$this->db->select('advertisements.*,states.name as state_name,countries.name as country_name,GROUP_CONCAT(advertisment_phones.number) as contact_number');\n\t\t$this->db->where('advertisements.id',$id);\n\t\t$this->db->from('advertisements');\n\t\t$this->db->join('states','states.id=advertisements.state_id','left');\n\t\t$this->db->join('countries','countries.id=advertisements.country_id','left');\n\t\t$this->db->join('advertisment_phones','advertisment_phones.advertisment_id=advertisements.id','left');\n\t\t$query = $this->db->get();\t\t\t\n\t\treturn $query->row_array(); \n\t}", "public function moreVisits_get()\n {\n $em = $this->doctrine->em;\n $morevisitsRepo = $em->getRepository('Entities\\Service');\n $morevisits = $morevisitsRepo->findBy(array(), array('visits' => 'DESC'), 3);\n\n foreach ($morevisits as $service) {\n $service->loadRelatedData(null, null, site_url());\n }\n\n if ($morevisits) {\n $response[\"desc\"] = \"Servicios mas visitados\";\n $response[\"count\"] = count($morevisits);\n $response[\"data\"] = $morevisits;\n } else {\n $response[\"desc\"] = 'No existen servicios mas visitados';\n $response[\"count\"] = 0;\n $response[\"data\"] = array();\n }\n $this->set_response($response, REST_Controller::HTTP_OK);\n }", "function amo_get($entity, $data = [])\n{\n if (substr($entity, -1) == 's') {\n $return_all = true;\n } else {\n $return_all = false;\n if ($entity == 'company') {\n $entity = 'companies';\n } elseif ($entity != 'account') {\n $entity .= 's';\n }\n }\n\n $link = $entity . '?';\n\n if (is_array($data) && !empty($data)) {\n foreach ($data as $key => $value) {\n if (is_array($value)) {\n foreach ($value as $v) {\n $link .= '&' . $key . '[]=' . $v;\n }\n } else {\n $link .= '&' . $key . '=' . $value;\n }\n\n }\n } elseif (empty($data)) {\n $link .= '';\n } else {\n $link .= 'query=' . $data;\n }\n\n $result = run_curl($link);\n\n if (in_array($entity, ['contacts', 'leads', 'companies', 'tasks', 'catalog_elements'])) {\n $items = $result['_embedded']['items'];\n } else {\n return $result;\n }\n\n if (!empty($items)) {\n $count = count($items);\n\n if ($count == 500) {\n if (!is_array($data)) {\n $data = ['query' => $data];\n }\n\n $data['limit_rows'] = 500;\n $data['limit_offset'] += 500;\n $recieved_items = amo_get($entity, $data);\n\n if (!empty($recieved_items)) {\n foreach ($recieved_items as $item) {\n $items[] = $item;\n }\n }\n }\n\n logw('Найдено ' . $entity . ': ' . count($items));\n if ($return_all) {\n return $items;\n } else {\n return $items[0];\n }\n\n } else {\n logw($entity . ' не найдено');\n return array();\n }\n}", "public function getData(){\n\t\t$url = $this->host . \"/rest/v1/list/\" . $this->listId . \"/leads.json?access_token=\" . $this->getToken();\n\t\tif (isset($this->fields)){\n\t\t\t$url = $url . \"&fields=\" . $this::csvString($this->fields);\n\t\t}\n\t\tif (isset($this->batchSize)){\n\t\t\t$url = $url . \"&batchSize=\" . $this->batchSize;\n\t\t}\n\t\tif (isset($this->nextPageToken)){\n\t\t\t$url = $url . \"&nextPageToken=\" . $this->fields;\n\t\t}\n\t\t$ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('accept: application/json',));\n\t\t$response = curl_exec($ch);\n\t\treturn $response;\n\t}", "public function getAds()\n {\n $ads = Ad::with('store')->where('company_id',Auth::id())->get();\n return Datatables::of($ads)\n ->addColumn('store_name', function ($ad) {\n return $ad->store->name;\n })\n ->addColumn('time', function ($ad) {\n return $ad->time.' seconds';\n })\n ->addColumn('preview', function ($ad) {\n if($ad->media_type == 'image') {\n return '<img width=\"100\" src=\"'.checkImage('ads/'. $ad->media).'\" /> <span style=\"padding-left: 30px\">(Image)</span>';\n }\n else {\n //return '<embed src=\"'.checkImage('ads/'. $ad->media).'\" autostart=\"false\" height=\"30\" width=\"50\" />';\n return '<video width=\"100\" ><source src=\"'.checkImage('ads/'. $ad->media).'\" type=\"video/mp4\"></video> <span style=\"padding-left: 30px\">(Video)</span>';\n }\n })\n ->addColumn('action', function ($ad) {\n return '\n <a href=\"ads/'. Hashids::encode($ad->id).'/edit\" class=\"text-primary\" data-toggle=\"tooltip\" title=\"Edit Ad\"><i class=\"fa fa-edit action-padding\"></i> </a> \n <a href=\"javascript:void(0)\" class=\"text-danger btn-delete\" data-toggle=\"tooltip\" title=\"Delete Ad\" id=\"'.Hashids::encode($ad->id).'\"><i class=\"fa fa-trash action-padding\"></i></a>';\n })\n ->rawColumns(['action','store_name','preview'])\n ->editColumn('id', 'ID: {{$id}}')\n ->make(true);\n }", "function callRemitaApiGet($endPoint) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $endPoint);\n curl_setopt($ch, CURLOPT_ENCODING, \"\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_MAXREDIRS, 10);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Cache-Control: no-cache',\n 'Content-Type: application/json')\n );\n $output = curl_exec($ch);\n return $output;\n}", "function getChargeOptional(){\n $result=$this->model_app->getdatapaging(\"Reff_Account,ChargeCode,ChargeName,ChargeDetails\",\"ms_charge\",\"WHERE DefaultCharge='0' AND HouseMethode='OUT' AND LEFT(ChargeCode,1)='8' AND MID(ChargeCode,2,1)='4' ORDER BY ChargeName\");\n\tforeach($result as $list){\n\t\t$row = array(\n\t\t\t\t'ChargeCode' =>$list->ChargeCode,\n\t\t\t\t'ChargeName' =>$list->ChargeName,\n\t\t\t\t'Reff_Account' =>$list->Reff_Account,\n\t\t\t);\n\t\t\t$data[] = $row;\n\t\t} \n\t\techo json_encode($data);\n\t}", "function Fetch_API_Payments($application_id)\n{\n\tsettype($application_id, 'int');\n\n\t$db = ECash::getMasterDb();\n\t$query = '-- /* SQL LOCATED IN file=' . __FILE__ . ' line=' . __LINE__ . ' method=' . __METHOD__ . \" */\n\t\tSELECT\n\t\t\tapi_payment_id,\n\t\t\tname_short event_type,\n\t\t\tamount,\n\t\t\tdate_event\n\t\tFROM\n\t\t\tapi_payment\n\t\t\tJOIN event_type USING (event_type_id)\n\t\tWHERE\n\t\t\tapplication_id = {$application_id}\n\t\tAND\n\t\t\tapi_payment.active_status = 'active'\n\t\";\n\n\t$result = $db->query($query);\n\treturn $result->fetchAll(PDO::FETCH_OBJ);\n\n}", "public function listallactive($web_id=\"-1\",$cat_id=\"-1\",$a_id=\"\"){ \n\t\t$mysqli = Configuration::mysqli_configation();\n\t\t$mainObj = Array(\"status\"=>false, \"msg\"=>\"Cities not found\", \"data\"=>array());\n\t\t$sql = \"SELECT \n\t\t\t\t`ap_id`,\n\t\t\t\t`a_id`,\n\t\t\t\t`web_id`,\n\t\t\t\t`created_on`,\n\t\t\t\t`updated_on`\n\t\t\t from `tbl_article_published` where 1=1 \";\n\t\t\t\n\t\t if($web_id != '-1'){\n\t\t \t$sql .= \" and web_id = '$web_id'\";\n\t\t }\n\t\t if($cat_id != '-1'){\n\t\t \t$sql .= \" and a_id in (SELECT `a_id` FROM `tbl_article` WHERE ac_id = '$cat_id')\";\n\t\t }\n\t\t if($a_id != ''){\n\t\t \t$sql .= \" and a_id = '$a_id'\";\n\t\t }\n\t\t//echo $sql;\n\t\t$result = $mysqli->query($sql);\n\t\tif ($result->num_rows > 0) {\n\t\t\t// output data of each row\n\t\t\tinclude(\"../data/TBL_ARTICLE.php\");\n\t\t\tinclude(\"../data/TBL_WEBSITE.php\");\n\t\t\t$objArticle = new TBL_ARTICLE();\n\t\t\t$objWebsite = new TBL_WEBSITE();\n\t\t\t$i=0;\n\t\t\twhile($row = $result->fetch_assoc()) {\n\t\t\t\t$mainObj[\"status\"] = true;\n\t\t\t\t$mainObj[\"data\"][$i] = Array(\n\t\t\t\t\t\t\n\t\t\t\t\t\t'ap_id' => $row['ap_id'],\n\t\t\t\t\t\t'article' => $objArticle->getdetails($row['a_id']),\n\t\t\t\t\t\t'website' => $objWebsite->getdetails($row['web_id']),\n\t\t\t\t\t\t'created_on' => $row['created_on'],\n\t\t\t\t\t\t'updated_on' => $row['updated_on']\n\t\t\t\t\t);\t\n\n\t\t\t\t$i++;\n\t\t\t}\n\t\t} \t\n\t\treturn $mainObj;\n\t}", "function caos_google_ads()\n{\n $adsId = 'YOUR-ADS-ID';\n\n if (CAOS_OPT_REMOTE_JS_FILE == 'gtag.js') {\n add_filter(\n 'caos_gtag_additional_config',\n function() use ($adsId) {\n return \"gtag('config', '$adsId');\";\n }\n );\n }\n}", "public function getCampaignActivityIntegrations($params)\n\t{\n\t\t$response = array();\n\t\t$company_id = !empty($params['companyId']) ? $params['companyId'] : (!empty($params['companyid']) ? $params['companyid'] : '');\n\t\t$campaign_ids = !empty($params['campaignId']) ? $params['campaignId'] : (!empty($params['campaignid']) ? $params['campaignid'] : '');\n\t\t//$start_date = $params['startDate'];\n\t\t$start_date = !empty($params['startDate']) ? $params['startDate'] : (!empty($params['startdate']) ? $params['startdate'] :'');\n\t\t//$end_date = $params['endDate'];\n\t\t$end_date = !empty($params['endDate']) ? $params['endDate'] : (!empty($params['enddate']) ? $params['enddate'] :'');\n\t\t//$interval = !empty($params['timeIntervalSeconds']) ? $params['timeIntervalSeconds'] : 3600;\n\t\t$interval = !empty($params['timeIntervalSeconds']) ? $params['timeIntervalSeconds'] : (!empty($params['timeintervalseconds']) ? $params['timeintervalseconds'] : 3600 );\n\t\t//$in_the_last = !empty($params['inTheLast']) ? $params['inTheLast'] : 0;\n\t\t$in_the_last = !empty($params['inTheLast']) ? $params['inTheLast'] : (!empty($params['inthelast']) ? $params['inthelast'] :0 );\n\t\t$time_zone = !empty($params['timezone']) ? $params['timezone'] : '-0500';\n\t\t//$activity_type = !empty($params['activityType']) ? $params['activityType'] : 'all';\n\t\t$activity_type = !empty($params['activityType']) ? $params['activityType'] : (!empty($params['activitytype']) ? $params['activitytype'] :'all');\n\t\t$source = !empty($params['source']) ? $params['source'] : 'all';\n\t\t\n\t\t$integration_type = !empty($params['integrationType']) ? $params['integrationType'] : (!empty($params['integrationtype']) ? $params['integrationtype'] : 'et');\n\t\t\n\t\tif(empty($company_id))\n\t\t{\n\t\t\t$errors[] = array(\n\t\t\t\t'message' => \"Invalid or Empty value provided for parameter 'companyId'\",\n\t\t\t\t'code' => 'InvalidParamErr'\n\t\t\t);\n\t\t}\n\t\t\n\t\t$str_date_sub_start = \"\";\n\t\t$str_date_sub_end = \"\";\n\t\t$str_time_zone = 'UTC';\n\t\tswitch($time_zone)\n\t\t{\n\t\t\tcase '-0500':\n\t\t\t\t$str_date_sub_start = \"date_sub(\";\n\t\t\t\t$str_date_sub_end = \", interval 5 hour)\";\n\t\t\t\t$str_time_zone = 'EST';\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t//\t1.\tCalculating Interval specific variables\n\t\tswitch($interval)\n\t\t{\n\t\t\tcase 60:\t//\tMinute\n\t\t\t\t$mysql_date_format = \"%m/%d/%Y\\T%H:%i:00$time_zone\";\n\t\t\t\t$php_date_format = \"m/d/Y\\TH:i:00$time_zone\";\n\t\t\t\t$interval_type = 'minute';\n\t\t\t\tbreak;\n\t\n\t\t\tcase 3600:\t//\tHour\n\t\t\t\t$mysql_date_format = \"%m/%d/%Y\\T%H:00:00$time_zone\";\n\t\t\t\t$php_date_format = \"m/d/Y\\TH:00:00$time_zone\";\n\t\t\t\t$interval_type = 'hour';\n\t\t\t\tbreak;\n\t\n\t\t\tcase 86400:\t//\tDay\n\t\t\t\t// $mysql_date_format = '%m/%d/%Y';\n\t\t\t\t// $php_date_format = 'm/d/Y';\n\t\t\t\t$mysql_date_format = \"%m/%d/%Y\\T00:00:00$time_zone\";\n\t\t\t\t$php_date_format = \"m/d/Y\\T00:00:00$time_zone\";\n\t\t\t\t$interval_type = 'day';\n\t\t\t\tbreak;\n\t\t}\n\t\tif(!empty($in_the_last))\n\t\t{\n\t\t\t$sql = \"select \" . $str_date_sub_start . \"now()\" . $str_date_sub_end . \" as end_date, date_sub(\" . $str_date_sub_start . \"now()\" . $str_date_sub_end . \", interval $in_the_last $interval_type) as start_date\";\n\t\t\t// error_log(\"sql for finding start date and end date: \" . $sql);\n\t\t\t$row = BasicDataObject::getDataRow($sql);\n\t\t\t$start_date = $row['start_date'];\n\t\t\t$end_date = $row['end_date'];\n\t\t}\n\t\t\n\t\t$arr_where_clause = array();\n\t\t$arr_where_clause_views = array();\n\t\t$arr_where_clause_claims = array();\n\t\t$arr_where_clause_shares = array();\n\t\t$arr_where_clause_redeems = array();\n\t\t\n\t\t$join_clause = \"\";\n\t\tif(empty($campaign_ids))\n\t\t{\n \t\t\t$arr_where_clause_claims[] = \"ui.company_id = '$company_id'\";\n \t\t\t$arr_where_clause_redeems[] = \"ui.company_id = '$company_id'\";\n\t\t}\n\t\telse\n\t\t{\n \t\t\t$arr_where_clause_claims[] = \"ui.item_id in (\" . $campaign_ids . \")\";\n \t\t\t$arr_where_clause_redeems[] = \"ui.item_id in (\" . $campaign_ids . \")\";\n\t\t}\n\t\t\n\t\tif(!empty($activity_type))\n\t\t{\n\t\t\t// $arr_where_clause[] = \" ea.activity_type = '$activity_type'\";\n\t\t}\n\t\t\n\t\t\n\t\tif(!empty($start_date) && !empty($end_date))\n\t\t{\n\t\t\t$arr_where_clause_claims[] = \" \" . $str_date_sub_start . \"ui.date_claimed\" . $str_date_sub_end. \" between '$start_date' and '$end_date'\";\n\t\t\t$arr_where_clause_redeems[] = \" \" . $str_date_sub_start . \"ui.date_redeemed\" . $str_date_sub_end. \" between '$start_date' and '$end_date'\";\n\n\t\t}\n\t\telse if(!empty($start_date))\n\t\t{\n\t\t\t$arr_where_clause_claims[] = \" \" . $str_date_sub_start . \"ui.date_claimed\" . $str_date_sub_end. \" >= '$start_date'\";\n\t\t\t$arr_where_clause_redeems[] = \" \" . $str_date_sub_start . \"ui.date_redeemed\" . $str_date_sub_end. \" >= '$start_date'\";\n\t\t}\n\t\telse if(!empty($end_date))\n\t\t{\n\t\t\t$arr_where_clause_claims[] = \" \" . $str_date_sub_start . \"ui.date_claimed\" . $str_date_sub_end. \" <= '$end_date'\";\n\t\t\t$arr_where_clause_redeems[] = \" \" . $str_date_sub_start . \"ui.date_redeemed\" . $str_date_sub_end. \" <= '$end_date'\";\n\t\t}\n\t\t\n\t\t\n\t\t// SQL for Claims\n\t\t$sql_claims = \"select date_format(\" . $str_date_sub_start . \"ui.date_claimed\" . $str_date_sub_end. \", '$mysql_date_format') as date, ui.date_claimed as sort_date, 'claim' as activity_type, count(id) as activity_count from customer_email_codes ui where ui.date_claimed is not null\";\n\t\tif(!empty($arr_where_clause_claims))\n\t\t\t$sql_claims .= \" and \" . implode(\" and \", $arr_where_clause_claims);\n\t\t$sql_claims .= \" group by date_format(\" . $str_date_sub_start . \"ui.date_claimed\" . $str_date_sub_end. \", '$mysql_date_format'), activity_type\";\n\t\t\n\t\t// SQL for redeems\n\t\t$sql_redeems = \"select date_format(\" . $str_date_sub_start . \"ui.date_redeemed\" . $str_date_sub_end. \", '$mysql_date_format') as date, ui.date_redeemed as sort_date, 'redeem' as activity_type, count(id) as activity_count from customer_email_codes ui where ui.date_redeemed is not null\";\n\t\tif(!empty($arr_where_clause_redeems))\n\t\t\t$sql_redeems .= \" and \" .implode(\" and \", $arr_where_clause_redeems);\n\t\t$sql_redeems .= \" group by date_format(\" . $str_date_sub_start . \"ui.date_redeemed\" . $str_date_sub_end. \", '$mysql_date_format'), activity_type\";\n\t\t\n\t\t\n\t\tswitch($activity_type)\n\t\t{\n\t\t\t\n\t\t\tcase 'claim':\n\t\t\t\t$sql = $sql_claims;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'redeem':\n\t\t\t\t$sql = $sql_redeems;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'all':\n\t\t\t\t$sql = implode(' union all ', array($sql_claims, $sql_redeems));\n\t\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t$sql = \"select t.* from ( \n\t\t\" . $sql . \"\n\t\t) as t \n\t\torder by t.sort_date\";\n\t\t\n\t\t// error_log(\"SQL in CSAPI::getCampaignActivityInteractions(): \" . $sql);\n\t\t\n\t\t$timer_start = array_sum(explode(\" \", microtime()));\n\t\t$rs = Database::mysqli_query($sql);\n\t\t// error_log(\"CSAPI::getCampaignActivity(): Time taken to run the SQL: \" . (array_sum(explode(\" \", microtime())) - $timer_start));\n\t\t\n\t\t$response = array(\n\t\t\t'settings' => $params,\n\t\t\t'data' => array(),\n\t\t\t'graph_data' => array(),\n\t\t\t'totals' => array(),\n\t\t);\n\t\t\n\t\t$tmp_data = array();\n\t\twhile($row = Database::mysqli_fetch_assoc($rs))\n\t\t{\n\t\t\t$activity_type = $row['activity_type'];\n\t\t\t$tmp_date = $row['date'];\n\t\t\t$activity_count = $row['activity_count'] + 0;\n\t\t\t$tmp_data[$activity_type][$tmp_date] = $activity_count;\n\t\t\t$response['totals'][$activity_type] += $activity_count;\n\t\t}\n\t\t// error_log(\"CSAPI::getCampaignActivity(): Time taken to iterate through the records: \" . (array_sum(explode(\" \", microtime())) - $timer_start));\n\t\t\n\t\t// Getting start date\n\t\tif(empty($start_date))\n\t\t{\n\t\t\tDatabase::mysqli_data_seek($rs, 0);\n\t\t\t$row = Database::mysqli_fetch_assoc($rs);\n\t\t\t$start_date = $row['date'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$obj_dt = new DateTime($start_date);\n\t\t\t$start_date = date_format($obj_dt, $php_date_format);\n\t\t}\n\t\t\n\t\t// Getting End Date\n\t\tif(empty($end_date))\n\t\t{\n\t\t\tDatabase::mysqli_data_seek($rs, Database::mysqli_num_rows($rs) - 1);\n\t\t\t$row = Database::mysqli_fetch_assoc($rs);\n\t\t\t$end_date = $row['date'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$obj_dt = new DateTime($end_date);\n\t\t\t$end_date = date_format($obj_dt, $php_date_format);\n\t\t}\n\t\t// error_log(\"tmp_data: \" . var_export($tmp_data, true));\n\t\t\n\t\t// error_log(\"CSAPI::getCampaignActivity(): Time taken to set the start and end pointers: \" . (array_sum(explode(\" \", microtime())) - $timer_start));\n\t\t\n\t\t$start_date_val = strtotime($start_date . \" $str_time_zone\");\n\t\t$end_date_val = strtotime($end_date . \" $str_time_zone\");\n\t\t\n\t\t// error_log(\"start_date: \" . $start_date . \", start_date_val: \" . $start_date_val . \", end_date: \" . $end_date . \", start_date_val: \" . $end_date_val);\n\t\t\n\n\t\t\n\t\t$time_interval = new DateInterval('PT' . $interval . 'S');\n\t\t$pointStart = $start_date_val * 1000;\n\t\t$pointInterval = $interval * 1000;\n\t\t$activity_titles = array('view' => 'Views', 'claim' => 'Claims', 'redeem' => 'Redeems', 'share' => 'Shares', 'referral' => 'Referrals');\n\t\tforeach($tmp_data as $activity_type => $activity_data)\n\t\t{\n\t\t\t$total_activity_count = !empty($response['totals'][$activity_type]) ? $response['totals'][$activity_type] : 0;\n\t\t\t$activity_name = $activity_titles[$activity_type] . \" (Total: \" . $total_activity_count . \")\";\n\t\t\t// $response['data'][$activity_type] = array();\n\t\t\t$cumm_entrant_count = 0;\n\t\t\t$tmp_date = $start_date;\n\t\t\t$series_data = array(\n\t\t\t\t'data' => array(),\n\t\t\t\t'name' => $activity_name,\n\t\t\t\t'pointStart' => $pointStart,\n\t\t\t\t'pointInterval' => $pointInterval,\n\t\t\t);\n\t\t\tfor($i = $start_date_val; $i <= $end_date_val; $i += $interval)\n\t\t\t{\n\t\t\t\t// $tmp_date = date($php_date_format, $i);\n\t\t\t\tif(isset($activity_data[$tmp_date]))\n\t\t\t\t{\n\t\t\t\t\t$cumm_entrant_count += $activity_data[$tmp_date];\n\t\t\t\t}\n\t\t\t\t// $response['data'][$activity_type][$tmp_date] = $cumm_entrant_count;\n\t\t\t\t$series_data['data'][] = !empty($activity_data[$tmp_date]) ? $activity_data[$tmp_date] + 0 : 0; //$cumm_entrant_count;\n\t\t\t\t$dt = DateTime::CreateFromFormat($php_date_format, $tmp_date);\n\t\t\t\tif(!$dt)\n\t\t\t\t\terror_log(\"failed to created date object! using format $php_date_format having date $tmp_date\");\n\t\t\t\t$tmp_date = date_format($dt->add($time_interval), $php_date_format);\n\t\t\t}\n\t\t\t$response['graph_data'][] = $series_data;\n\t\t}\n\t\t\n\t\t// error_log(\"CSAPI::getCampaignActivity(): Time taken to set the final data: \" . (array_sum(explode(\" \", microtime())) - $timer_start));\n\t\tDatabase::mysqli_free_result($rs);\n\n\t\tif(!empty($errors))\n\t\t\treturn $errors;\n\t\t\t\n\t\treturn $response;\n\t}", "public function _getpayments()\r\n {\r\n try\r\n {\r\n $mysql = \"SELECT Payment_Id, Payment_Amount_paid, Payment_Amount_due, Payment_Type, Payment_Invoice_Id, Client_Name, Payment_Status FROM payments INNER JOIN clients ON Client_Id = Payment_Client_Id\";\r\n\r\n //Execute the query\r\n $result = $this->db->getData($mysql);\r\n\r\n //Return the values\r\n return ($result);\r\n }\r\n catch(Exception $e)\r\n {\r\n echo \"Couldn't Get Payments\";\r\n }\r\n }", "function getAds($per_page){\n // this function for get ads by category\n if(isset($_GET['cat_id'])){\n global $con;\n if(isset($_GET['page'])){\n $page = $_GET['page'];\n }\n else{\n $page = 1;\n }\n $start = ($page - 1) * $per_page;\n $cat_id = $_GET['cat_id'];\n // if p_cat != all then show ads in database by his p_cat number\n if($cat_id != 'all'){\n $query = $con->prepare(\"SELECT * FROM products where p_cat_id = '$cat_id' ORDER BY 1 DESC LIMIT $start,$per_page\");\n $query->execute();\n }\n // if p_cat = all then show all ads in database\n else{\n $query = $con->prepare(\"SELECT * FROM products ORDER BY 1 DESC LIMIT $start,$per_page\");\n $query->execute();\n }\n if($query->rowCount() > 0){\n while($result = $query->fetch(PDO::FETCH_ASSOC)){\n $product_id = $result['product_id'];\n $user_id = $result['user_id'];\n $product_title = $result['product_title'];\n $product_images = explode(\",\",$result['product_images']);\n $product_watch = $result['product_watch'];\n $product_status = $result['product_status'];\n $status_color = \"\";\n if($product_status == \"جديد\"){\n $status_color = \"orange\";\n }\n else if($product_status == \"إعلان\"){\n $status_color = \"blue\";\n }\n else{\n $status_color = \"violet\";\n }\n // get user name by user user_id\n $second_query = $con->prepare(\"SELECT * FROM users where user_id = '$user_id'\");\n $second_query->execute();\n $result2 = $second_query->fetch(PDO::FETCH_ASSOC);\n $user_name = $result2['username']; \n $user_image = $result2['user_image'];\n $last_login = $result2['last_login'];\n $class = 'offline';\n // for check if user is connect now\n if($last_login > time())\n $class = 'online';\n echo \"\n <div class='col-sm-6 col-lg-4'>\n <a href='show-ads.php?p_id=$product_id'>\n <div class='item'>\n <div class='ads-title row'>\n <div class='col-1 col-sm-2 col-md-2 col-lg-2 user-img'>\n <div class='img-box'\"; if($user_image != \"\") echo 'style=background-color:transparent'; echo \">\";\n if($user_image != \"\"){\n echo \"<img src='Profile/Layout/Images/users-images/$user_image' class='img-responsive' alt='$user_image'>\";\n }\n else{\n preg_match(\"/./u\",$user_name,$first_char);\n $first_char = strtoupper($first_char[0]);\n echo \"<span>$first_char</span>\";\n }\n echo \"<div class='user-connection $class'></div>\";\n echo \"</div>\n </div>\n <div class='col-9 col-sm-8 col-md-9 col-lg-8 user-info'>\n <div class='username'>\n <h6>\n $user_name\n </h6>\n <p>$product_title</p>\n </div>\n </div> \n <div class='col-2 col-sm-2 col-md-1 col-lg-2 watches'>\n <div class='watch'>\n $product_watch <i class='fa fa-eye'></i> \n </div>\n </div>\n\n </div>\n <div class='ads-image'>\n <img src='Layout/Images/products/$product_images[0]' class='img-responsive' alt='$product_images[0]'>\n <div class='product-type $status_color'>$product_status</div>\n </div>\n </div>\n </a>\n </div>\n \";\n }\n }\n else{\n echo \"\n <div class='no-ads'>\n <p>لايوجد اي إعلانات مضافة</p>\n </div>\n \";\n }\n }\n}", "function GetAdGroupRemarketingListAssociations($proxy, $adGroupIds)\n{\n $request = new GetAdGroupRemarketingListAssociationsRequest();\n $request->AdGroupIds = $adGroupIds;\n \n return $proxy->GetService()->GetAdGroupRemarketingListAssociations($request);\n}", "function fsf_cms_getAnnouncements($fsfcms_announcement_id)\n {\n global $fsfcms_api_url;\n \n $fsf_api_file = \"fsf.cms.getAnnouncements.php\";\n if($fsfcms_announcement_id !=\"\")\n {\n $fsf_api_options = \"?announcement_id=\" . $fsfcms_announcement_id;\n } else {\n $fsf_api_options = \"\";\n } \n $fsf_cms_getAnnouncements_content = fsf_preacher_curl($fsfcms_api_url, $fsf_api_file, $fsf_api_options);\n \n return $fsf_cms_getAnnouncements_content; \n }", "public function getAllLeadsOfAgent(Request $request){\n try{\n if(!empty($request->agent_id)){\n $data['leads'] = Customer::where('agent_id', $request->agent_id)->get();\n \n if($data['leads']){\n return response()->json([\n 'agent_customers'=>$data,\n 'status' =>'success',\n 'code' =>200,\n ]);\n }else{\n response()->json([\n 'message'=>'Data not found',\n 'status' =>'error',\n ]);\n }\n }else{\n response()->json([\n 'message'=>'Something went wrong with this request.Please Contact your administrator',\n 'status' =>'error',\n ]);\n }\n }catch(\\Exception $e){\n return response()->json([\n 'message'=>\"something went wrong.Please contact administrator.\".$e->getMessage(),\n 'error' =>true,\n ]);\n }\n }", "public function get_ad_byID($id) {\n $sql = \"select * from advertisement where ID=? and StatusID <>3\";\n $data = $this->db->query($sql, array($id));\n return $data->row();\n }", "function GetCustomerPilotFeatures($customerId)\n{ \n $GLOBALS['proxy'] = $GLOBALS['customerProxy']; \n\n $request = new GetCustomerPilotFeaturesRequest();\n $request->CustomerId = $customerId;\n\n return $GLOBALS['proxy']->GetService()->GetCustomerPilotFeatures($request)->FeaturePilotFlags;\n}", "public function index()\n\t{\n\t\t$ciudads = $this->ciudadRepository->all();\n\n\t\treturn $this->sendResponse($ciudads->toArray(), \"Ciudads retrieved successfully\");\n\t}", "function getAccident($stepArray)\n{\n\n $queryRoad = null;\n\n// get the road name from stepArray and put into one string\n foreach ($stepArray as $step) {\n $road = $step->getRoadName();\n\n// $nRoad = \"ROAD_NAME%3D'\" . \"%25\" . $road . \"%25'%20or%20\";\n $nRoad = \"INITIAL_ROAD_NAME%3D'\".$road.\"'%20or%20ENDING_ROAD_NAME%3D'\".$road.\"'%20or%20\";\n\n $newRoad = str_replace(\" \", \"%20\", $nRoad);\n\n $queryRoad .= $newRoad;\n\n }\n //cut the end extra part\n $query = substr($queryRoad, 0, strlen($queryRoad) - 8);\n\n// form a url to get connect with DB\n\n\n $curlAccident = \"https://dsp-acer-believe.cloud.dreamfactory.com:443/rest/DigisoftDB/ACCIDENTS?filter=$query\";\n\n\n //use the getResult Function to get result\n $result = getResult($curlAccident);\n $array_result = json_decode($result);\n\n //get result into array\n $records = $array_result->record;\n $accident_array = array();\n\n foreach ($stepArray as $step) {\n\n foreach ($records as $record) {\n //if the roadname is equal description, execute\n if (stristr($record->INITIAL_ROAD_NAME, $step->getRoadName())||stristr($record->ENDING_ROAD_NAME, $step->getRoadName())) {\n //if the latitude and longtitude is in the middle of the startpoint and end point, put the accident into array\n if ($record->LATITUDE != min($step->getStartLocationLat(), $step->getEndLocationLat(), $record->LATITUDE) && $record->LATITUDE != max($step->getStartLocationLat(), $step->getEndLocationLat(), $record->LATITUDE) &&\n $record->LONGITUDE != min($step->getStartLocationLng(), $step->getEndLocationLng(), $record->LONGITUDE) && $record->LONGITUDE != max($step->getStartLocationLng(), $step->getEndLocationLng(), $record->LONGITUDE)\n ) {\n array_push($accident_array, $record);\n\n }\n\n }\n }\n }\n\n // $result = array(\"result\" => $accident_array);\n\n //return $result;\n return $accident_array;\n}", "public function get_ads_byID($id, $adid){\n $sql = \"select *,(select Images from advertisement_image where AdsID=advertisement.ID and StatusID <>3 limit 1) as image from advertisement where UserID=? and ID=? and StatusID <>3\";\n $data = $this->db->query($sql, array($id,$adid));\n return $data->row();\n }", "public static function getExperienceResponses($designerId, $experienceId){\n $response = array();\n try{ \n //Check if the designerId owns the experience\n if($designerId == ADMIN_ID){//admin\n $ex = SharcExperience::find($experienceId);\n $designerId = $ex->designerId;\n }\n $rs = SharcExperience::where('id',$experienceId)->where('designerId',$designerId)->get();\n if ($rs->count() == 0){ //Not exists \n $response[\"status\"] = FAILED; \n $response[\"data\"] = EXPERIENCE_NOT_EXIST;\n return $response; \n }\n else {\n $response[\"status\"] = SUCCESS;\n //Get all responses\n $objResponses = SharcResponse::where('experienceId',$experienceId)->get();\n $tmpResponse = $objResponses->toArray(); \n $i = 0;\n for ($i; $i< $objResponses->count(); $i++) {\n $rs = SharcUser::find($objResponses[$i]->userId);\n if ($rs != null)\n $tmpResponse[$i][\"userId\"] = $rs->username;\n //get entity name as well\n switch($objResponses[$i]->entityType){\n case \"POI\":\n $obj = SharcPoiExperience::find($objResponses[$i]->entityId); \n $tmpResponse[$i][\"entityId\"] = SharcPoiDesigner::find($obj->poiDesignerId)->name;\n break;\n case \"EOI\":\n $obj = SharcEoiExperience::find($objResponses[$i]->entityId); \n $tmpResponse[$i][\"entityId\"] = SharcEoiDesigner::find($obj->eoiDesignerId)->name;\n break;\n case \"ROUTE\":\n $obj = SharcRouteExperience::find($objResponses[$i]->entityId); \n $tmpResponse[$i][\"entityId\"] = SharcRouteDesigner::find($obj->routeDesignerId)->name;\n break;\n case \"media\":\n break; \n }\n } \n $response[\"data\"] = $tmpResponse;\n return $response;\n }\n }\n catch(Exception $e){\n $response[\"status\"] = ERROR;\n $response[\"data\"] = Utils::getExceptionMessage($e);\n }\n return $response; \n }", "function get_available_app_interface_compute_resources($id)\n{\n global $airavataclient;\n $computeResources = null;\n\n try\n {\n $computeResources = $airavataclient->getAvailableAppInterfaceComputeResources($id);\n }\n catch (InvalidRequestException $ire)\n {\n print_error_message('<p>There was a problem getting compute resources.\n Please try again later or submit a bug report using the link in the Help menu.</p>' .\n '<p>InvalidRequestException: ' . $ire->getMessage() . '</p>');\n }\n catch (AiravataClientException $ace)\n {\n print_error_message('<p>There was a problem getting compute resources.\n Please try again later or submit a bug report using the link in the Help menu.</p>' .\n '<p>Airavata Client Exception: ' . $ace->getMessage() . '</p>');\n }\n catch (AiravataSystemException $ase)\n {\n print_error_message('<p>There was a problem getting compute resources.\n Please try again later or submit a bug report using the link in the Help menu.</p>' .\n '<p>Airavata System Exception: ' . $ase->getMessage() . '</p>');\n }\n\n return $computeResources;\n}", "function adsFn($id){\r\n\t$strSLQAds=\"select * from banner_sum where pic_position='$id' and\r\n\t\t(main_menu_id='home' or main_menu_id='All') and pic_display='Y'\";\r\n\t$resultAds=mysql_query($strSLQAds);\r\n\treturn $resultAds;\r\n}", "public function getAcById($ac_id) {\n\t\t$result = array();\n\n\t\t$stmt = $this->conn->prepare(\"SELECT ac_id, ac_brand, ac_series, ac_location, ac_note, user_id, ac_lastservice, ac_nextservice, ac_status, ac_picture from tb_ac WHERE ac_id = ?\");\n\t\t$stmt->bind_param(\"i\", $ac_id);\n\n\t\tif($stmt->execute()) {\n\t\t\t$data = $stmt->get_result()->fetch_all(MYSQLI_ASSOC);\n\t\t\t$stmt->fetch();\n\t\t\t$stmt->close();\n\n\t\t\t$result[\"status\"] = true;\n\t\t\t$result[\"message\"] = $data;\n\n\t\t\treturn $result;\n\t\t} else {\n\t\t\t$result[\"status\"] = true;\n\t\t\t$result[\"message\"] = \"We have no result for you\";\n\n\t\t\treturn $result;\n\t\t}\n\t}", "function geographyEndpoints($media_id) {\n \n \t$geography_endpoints_request_url = sprintf($this->api_urls['geography_endpoints'], $media_id, $this->access_token);\n \t\n \treturn $this->__apiCall($geography_endpoints_request_url);\n \n }", "function get_districts($id)\n{\n $url = set_url('disctricts');\n $url .= '?city_id=' . $id;\n $token = $_SESSION['token'];\n $cURLConnection = curl_init($url);\n curl_setopt($cURLConnection, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Authorization: Bearer ' . $token,]);\n curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);\n $apiResponse = curl_exec($cURLConnection);\n curl_close($cURLConnection);\n print_r($apiResponse);\n exit;\n}", "function getListAgencias($age=false)\n{\n global $conn;\n\n /*\n *query da disciplina\n */\n $sqla = \"SELECT\n adm_id,\n adm_nome,\n adm_status,\n (SELECT age_id FROM \".TP.\"_agencia WHERE age_adm_id=adm_id) age_id,\n adm_email\n\n FROM \".TABLE_PREFIX.\"_administrador\n WHERE adm_tipo='Agência'\n ORDER BY adm_nome\";\n\n $agencia = $agenciaage = array();\n if(!$qrya = $conn->prepare($sqla))\n return false;\n\n else {\n\n $qrya->execute();\n $qrya->bind_result($id, $nome, $status, $age_id, $email);\n\n while ($qrya->fetch()) {\n $agencia[$id] = array('id'=>$id, 'age_id'=>$age_id, 'nome'=>$nome, 'email'=>$email, 'status'=>$status);\n $agenciaage[$age_id] = array('id'=>$id, 'age_id'=>$age_id, 'nome'=>$nome, 'email'=>$email, 'status'=>$status);\n }\n\n if (!$age)\n return $agencia;\n else\n return $agenciaage;\n\n $qrya->close();\n\n\n }\n\n}", "public function index()\n {\n $adverts = Advert::orderBy('updated_at', 'desc')->paginate(15);\n //->get();\n //->paginate(15);\n\n // Palauta kaikki resurssina\n return IlmoitusResource::collection($adverts);\n }", "public function getAd($adid)\n\t\t{\n\t\t\t$this->db->select('*'); \n\t\t\t $this->db->from('ads');\n \t\t\t $this->db->join('users','ads.owner = users.userid','left');\n \t\t\t $this->db->join('persons','users.personid=persons.personid');\n \t\t\t $this->db->where('ads.adid',$adid);\n \t\t\n return $this->db->get();\n\t\t}", "function display_json_shortcode($atts ){\n $a = shortcode_atts( array(\n 'base_uri' => 'https://api.creol.ucf.edu/test.aspx',\n 'group' => 1\n ), $atts );\n\n $result = build_uri_string_directory($a);\n $json_string = curl_url($result);\n $json_obj = jsonifyier($json_string);\n layout_people($json_obj);\n}", "public function getCampaign();", "function getInvReviews($invId) {\n $db = acmeConnect();\n $sql = 'SELECT reviews.reviewText, reviews.reviewDate, clients.clientFirstName, clients.clientLastName FROM reviews INNER JOIN clients ON reviews.clientId = clients.clientId WHERE invId = :invId ORDER BY reviews.reviewDate';\n $stmt = $db->prepare($sql);\n //treated as an integer\n $stmt->bindValue(':invId', $invId, PDO::PARAM_INT);\n $stmt->execute();\n //requesting an associative array \n $allReviews = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $allReviews;\n}", "public function load_ad_sets_by_pagination() {\n \n // Check if data was submitted\n if ($this->CI->input->post()) {\n \n // Add form validation\n $this->CI->form_validation->set_rules('url', 'Url', 'trim');\n \n // Get data\n $url = $this->CI->input->post('url');\n \n if ( $this->CI->form_validation->run() !== false ) {\n \n if ( !$url ) {\n \n // Get selected account\n $get_account = $this->CI->ads_account_model->get_account($this->CI->user_id, 'facebook');\n \n if ( $get_account ) {\n \n $response = $this->fb->get(\n '/' . $get_account[0]->net_id . '/adsets?fields=status,insights,name,campaign{name}&limit=10',\n $get_account[0]->token\n );\n \n $data = $response->getDecodedBody();\n \n if ( $data ) {\n \n $this->create_cache(MIDRUB_BASE_USER_APPS_FACEBOOK_ADS . 'cache/' . $get_account[0]->net_id . '-adsets.json', json_encode($data, JSON_PRETTY_PRINT));\n \n $previous = '';\n\n if ( isset($data['paging']['previous']) ) {\n $previous = $data['paging']['previous'];\n } \n\n $next = '';\n\n if ( isset($data['paging']['next']) ) {\n $next = $data['paging']['next'];\n }\n\n $array = array(\n 'success' => TRUE,\n 'adsets' => $data['data'],\n 'previous' => $previous,\n 'next' => $next\n );\n\n echo json_encode($array);\n exit();\n \n }\n \n }\n \n } else {\n\n $adsets = json_decode(get($url), true);\n\n if ( $adsets ) {\n\n $previous = '';\n\n if ( isset($adsets['paging']['previous']) ) {\n $previous = $adsets['paging']['previous'];\n } \n\n $next = '';\n\n if ( isset($adsets['paging']['next']) ) {\n $next = $adsets['paging']['next'];\n }\n\n $data = array(\n 'success' => TRUE,\n 'adsets' => $adsets['data'],\n 'previous' => $previous,\n 'next' => $next\n );\n\n echo json_encode($data);\n exit();\n\n }\n \n }\n \n }\n \n }\n \n $data = array(\n 'success' => FALSE,\n 'message' => $this->CI->lang->line('error_occurred')\n );\n\n echo json_encode($data); \n \n }", "public function index()\n {\n return LeadResource::collection(\n auth()->user()\n ->tbl_leads()\n ->with(\n 'users',\n 'tbl_accounts',\n 'tbl_leadsource',\n 'tbl_leadstatus',\n 'tbl_industrytypes',\n 'tbl_leadsource',\n 'tbl_leadstatus',\n 'tbl_industrytypes',\n 'tbl_countries',\n 'tbl_states')\n ->latest()\n ->paginate(15));\n }", "public static function get_activities_returns() {\n\n $data = new external_multiple_structure(\n new external_single_structure(\n [\n 'instance' => new external_value(PARAM_INT, 'instance'),\n 'name' => new external_value(PARAM_ALPHANUMEXT, 'name'),\n 'modname' => new external_value(PARAM_ALPHANUMEXT, 'modname'),\n //'shortname' => new external_value(PARAM_ALPHANUMEXT, 'course name'),\n ]\n )\n );\n }", "function getCreativeVideoId($creative_id, $network_id, $tab, $parameters = array())\n{\n $network_filter = '';\n $get_result = array();\n if (!empty($network_id) && $network_id != \"\") {\n $network_filter = \" AND a.`network_id` IN ($network_id) \";\n }\n $params['creative_id'] = $creative_id;\n $params['network_filter'] = $network_filter;\n $params['tab'] = $tab;\n $params['where'] = !empty($parameters) ? $parameters['where'] : '';\n $get_result = get_query_result('__query_get_video_id', $params, 'FETCH_OBJ');\n if (empty($get_result)) {\n $params['network_filter'] = '';\n $get_result = get_query_result('__query_get_video_id', $params, 'FETCH_OBJ');\n }\n if (empty($get_result)) {\n $get_result = getAiringDetailByCreativeId($params);\n }\n\n return $get_result;\n}", "public function index()\n {\n \n if(isset( $_GET['search']) && $_GET['search']!='' ){\n $searched= $_GET['search'];\n $banners=Banner::where('content', 'like',\"%{$searched}%\")\n ->latest()->paginate(2);\n \n }else{\n $banners=Banner::latest()->paginate(2);\n\n }\n return BannerResource::collection($banners);\n }", "function display_charges_list(GuzzleHttp\\Message\\Response $response)\n{\n if (count($response->json()['response'])) {\n $charges = $response->json()['response'];\n print \"Available charges\\n\";\n foreach ($charges as $charge) {\n printf(\n \"token: %s | transaction date: %s | currency: %s | amount: %s | fees: %s\\n\",\n $charge['token'], $charge['created_at'], $charge['currency'],\n money_format('%(#5n', $charge['amount']),\n money_format('%(#5n', $charge['total_fees'])\n );\n }\n } else {\n print \"\\nNo charges available in response object\\n\";\n }\n}", "function InfGetCreditCards($inf_contact_id) {\n\t$object_type = \"CreditCard\";\n\t$class_name = \"Infusionsoft_\" . $object_type;\n\t$object = new $class_name();\n\t$object->removeRestrictedFields(); // Remove CreditCard and CVV\n\t$objects = Infusionsoft_DataService::query(new $class_name(), array('ContactId' => $inf_contact_id, 'Status' => 3));\n\n $cards_array = array();\n foreach ($objects as $i => $object) {\n\t\t// Give it a userful index, ie, card_id\n\t\t$array = $object->toArray();\n $cards_array[$array['Id']] = $array;\n }\n\treturn $cards_array; // Maybe multiple cards\n}", "private function getActivities()\n {\n // Fetch the activity endpoint of the API\n $apiUrl = $this->eagleApi . '/activity';\n $activitiesString = file_get_contents($apiUrl);\n\n // Decode the response and return\n return json_decode($activitiesString);\n }", "function getCharge($charge_id) {\r\n $end_point = $this->tpi_server_domain.'/payment/xendit/credit-card/charges/'.$charge_id;\r\n\r\n $args = array(\r\n 'headers' => $this->defaultHeader(),\r\n 'timeout' => WC_Xendit_PG_API::DEFAULT_TIME_OUT\r\n );\r\n\r\n try {\r\n $response = wp_remote_get($end_point, $args);\r\n $this->handleNetworkError($response);\r\n $jsonResponse = json_decode($response['body'], true);\r\n\r\n return $jsonResponse;\r\n } catch (Exception $e) {\r\n throw new Exception($e->getMessage());\r\n }\r\n }" ]
[ "0.568663", "0.5575248", "0.5560076", "0.5468266", "0.5422234", "0.5352861", "0.53416526", "0.5331108", "0.53300774", "0.5328966", "0.5314666", "0.5221521", "0.5175429", "0.513572", "0.5117382", "0.50658786", "0.5059331", "0.505496", "0.5018039", "0.5016311", "0.49996087", "0.49634337", "0.49407357", "0.49323994", "0.4929915", "0.49168277", "0.48985893", "0.48964307", "0.48917773", "0.48883992", "0.4858035", "0.4851844", "0.4851079", "0.48490906", "0.48445043", "0.4817677", "0.48167497", "0.48121175", "0.48108554", "0.4809792", "0.48089135", "0.48019892", "0.48018909", "0.4798251", "0.4795954", "0.47947773", "0.47851852", "0.47828904", "0.4780244", "0.4777687", "0.47767767", "0.47766915", "0.4767267", "0.47622356", "0.47560555", "0.4752654", "0.47490752", "0.4744793", "0.47442308", "0.47377384", "0.47350484", "0.47329244", "0.4731965", "0.47203398", "0.47182488", "0.47135785", "0.47123688", "0.47070387", "0.47050452", "0.4703998", "0.47019765", "0.46994832", "0.4698301", "0.46835575", "0.46769062", "0.46679753", "0.4667294", "0.46642387", "0.46634552", "0.46621287", "0.46586633", "0.46567127", "0.46539852", "0.46496505", "0.46475536", "0.46398142", "0.46379602", "0.4636221", "0.46357682", "0.46298483", "0.4629786", "0.46263582", "0.4623654", "0.46201637", "0.46199217", "0.46177444", "0.46173546", "0.46100318", "0.4608789", "0.46081126" ]
0.59241635
0
Handle AdcreativesApi adcreativesGetAsync function
public function getAsync(array $params = []) { return $this->handleMiddleware('get', $params, function(MiddlewareRequest $request) { $params = $request->getApiMethodArguments(); $accountId = isset($params['account_id']) ? $params['account_id'] : null; $filtering = isset($params['filtering']) ? $params['filtering'] : null; $page = isset($params['page']) ? $params['page'] : null; $pageSize = isset($params['page_size']) ? $params['page_size'] : null; $isDeleted = isset($params['is_deleted']) ? $params['is_deleted'] : null; $linkPageTypeCompatible = isset($params['link_page_type_compatible']) ? $params['link_page_type_compatible'] : null; $weixinOfficialAccountsUpgradeEnabled = isset($params['weixin_official_accounts_upgrade_enabled']) ? $params['weixin_official_accounts_upgrade_enabled'] : null; $fields = isset($params['fields']) ? $params['fields'] : null; $response = $this->apiInstance->adcreativesGetAsync($accountId, $filtering, $page, $pageSize, $isDeleted, $linkPageTypeCompatible, $weixinOfficialAccountsUpgradeEnabled, $fields); return $response; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function loadAvailableAds();", "public function get()\n {\n $this->_access(\"get\");\n $data = $this->Assets_model->getAdList(Assets_model::FULL_LIST);\n $this->_returnAjax(true, $data);\n }", "public function get(array $params = [])\n {\n return $this->handleMiddleware('get', $params, function(MiddlewareRequest $request) {\n $params = $request->getApiMethodArguments();\n $accountId = isset($params['account_id']) ? $params['account_id'] : null;\n $filtering = isset($params['filtering']) ? $params['filtering'] : null;\n $page = isset($params['page']) ? $params['page'] : null;\n $pageSize = isset($params['page_size']) ? $params['page_size'] : null;\n $isDeleted = isset($params['is_deleted']) ? $params['is_deleted'] : null;\n $linkPageTypeCompatible = isset($params['link_page_type_compatible']) ? $params['link_page_type_compatible'] : null;\n $weixinOfficialAccountsUpgradeEnabled = isset($params['weixin_official_accounts_upgrade_enabled']) ? $params['weixin_official_accounts_upgrade_enabled'] : null;\n $fields = isset($params['fields']) ? $params['fields'] : null;\n $response = $this->apiInstance->adcreativesGet($accountId, $filtering, $page, $pageSize, $isDeleted, $linkPageTypeCompatible, $weixinOfficialAccountsUpgradeEnabled, $fields);\n return $this->handleResponse($response);\n });\n }", "function get_ads_ids($find_data, $endpoint) {\n\n\t$page = 0;\n\t$ads_pages_cnt = 0;\n\t$ads_ids = []; //list CianId\n\t$ads_cnt = 0;\n\n\t/*get ads ids*/\n\twhile ($page <= $ads_pages_cnt) {\n\n\t\ttry {\n\n\t\t\t$page++;\n\n\t\t\tchange_page($find_data, $page);\n\t\t\t$offers = send_post($endpoint, $find_data, [\"Content-Type: application/json\"]);\n\n\t\t\t//echo \"offers: \";\n\t\t\t//echo \"$offers\";\n\n\t\t\t/* calculate only first time */\n\t\t\t$pages = json_decode($offers, true);\n\t\t\tif ($page == 1) {\t\t\t\t\n\t\t\t\t$ads_cnt = $pages['aggregatedOffersCount']; //get count all ads\n\t\t\t\t$ads_pages_cnt = $ads_cnt / count($pages['offers']); //get count pages\n\t\t\t\t$ads_pages_cnt = (int)$ads_pages_cnt;\n\n\t\t\t\tif ( ($ads_cnt%$ads_pages_cnt) > 0)\n\t\t\t\t\t$ads_pages_cnt++; //if how minimum one element left, exist also one page\n\t\t\t}\n\n\t\t\techo \"all offers found: \" . $ads_cnt . \"\\r\\n\";\n\t\t\techo \"count pages: \" . $ads_pages_cnt . \"\\r\\n\";\n\t\t\techo \"current page: \" . $page . \"\\r\\n\";\n\n\t\t\techo \"\\r\\n--Offers--\\r\\n\";\n\n\t\t\tfor ($i=0; $i < count($pages['offers']); $i++) { \n\n\t\t\t\techo $pages['offers'][$i]['cianId'] . \"\\r\\n\";\n\t\t\t\t$ads_ids[] = $pages['offers'][$i]['cianId'];\n\t\t\t}\n\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\tadd_logs(\"parsing id list: \" . $e->getMessage());\n\t\t\tadd_logs(\"body json (offers): \" . $offers);\n\t\t\tadd_logs(\"page: \" . $page . \". pages count: \". $ads_pages_cnt . \". ads count: \" . $ads_cnt);\n\t\t}\n\t\t\n\n\t}\n\n\n\n\techo \"ads count: \" . $ads_cnt . \" cian id cnt: \" . count($ads_ids) . \"\\r\\n\";\n\n\t/* get attributes for each ad */\n\tif (count($ads_ids) - $ads_cnt >= 0) {\n\t\t//all so ok\n\t}\n\telse {\n\t\tadd_logs(\"didn't match cnt ads (ads_ids: {$ads_ids} vs. ads_cnt {$ad_cnt}), ads pages count: {$ads_pages_cnt}\");\n\t\tadd_logs(\"ads_ids list: \" . json_encode($ads_ids));\n\t}\n\n\treturn $ads_ids;\n\n}", "function info_ad($id, $endpoint) {\n\n\techo \"getting info by ad id: \" . $id . \"\\r\\n\";\n\n\ttry {\n\n\t\t$page = json_decode(file_get_contents(sprintf($endpoint, $id) ), true);\n\n\t\tif (isset($page['errors'])) {\n\t\t\t//Возможно снято с публикации. Но скорее всего нет.\n\t\t\tadd_logs(\"get error with page: {$id}. body: $page\");\n\t\t\treturn null;\n\t\t}\n\t\telse {\n\t\t\t//Можно парсить аттрибуты\n\t\t\tif ($page['offer']['status'] != \"published\") {\n\t\t\t\t//Снято с публикации\n\t\t\t\tadd_logs(\"ad {$id} has been changed status.New status: {$page['offer']['status']}\");\n\t\t\t\treturn null;\n\t\t\t}\n\n\n\t\t}\n\n\t\t$attributes = [\n\n\t\t\t/* parsing only first time */\n\t\t\t\"constant\" => [\n\t\t\t\t'id' => $id,\n\t\t\t\t'description' => implode(' ', $page['offer']['description']), //строка\n\t\t\t\t'address' => get_adress($page['offer']['geo']['address']), //строка\n\t\t\t\t\n\n\t\t\t\t/* This attributes list can be not exist */\n\t\t\t\t'complex_name' => isset($page['offer']['building']['features']['name']) ? $page['offer']['building']['features']['name'] : null, //название ЖК строка\n\t\t\t\t'repair' => isset($page['offer']['general']['repair']) ? $page['offer']['general']['repair'] : null, //ремонт строка\n\t\t\t\t'balconies' => isset($page['offer']['general']['balconies']) ? $page['offer']['general']['balconies'] : null, //балкон строка\n\t\t\t\t'restroom' => isset($page['offer']['general']['restroom']) ? $page['offer']['general']['restroom'] : null, //Санузел строка\n\t\t\t\t'ceiling_height' => isset($page['offer']['general']['ceilingHeight']) ? $page['offer']['general']['ceilingHeight'] : null, //число дробное\n\t\t\t\t/* This attributes list can be not exist */\t\n\t\t\t\t\n\t\t\t\t'floor' => $page['offer']['features']['floorInfo'], //Пока храним как строку\n\t\t\t\t'objectType' => $page['offer']['features']['objectType'], //Однокмнатная двукомнатная и тд\n\t\t\t\t\n\t\t\t\t'ad_published' => get_date($page['offer']['meta']['addedAt']), //Храним как строку\n\t\t\t\t'total_area' => explode(' ', $page['offer']['features']['totalArea'])[0], //число\n\t\t\t\t'photos' => $page['offer']['media']\n\t\t\t],\n\t\t\t\"variable\" => [\n\t\t\t\t'price_actual' => $page['offer']['price']['value'], //число\n\t\t\t\t'price_start' => $page['offer']['price']['value'], //число\n\t\t\t\t'square_meter_price' => only_digit($page['offer']['additionalPrice']), //строка.\n\t\t\t\t'phones' => implode(', ', $page['offer']['phones']), //строка\n\t\t\t\t'views_all' => $page['offer']['meta']['views'], //число\n\t\t\t\t'ad_remove' => \"null\"\n\t\t\t\t//'ad_type' => -1, //будет строка платное, премиум, топ\t.while not using\n\t\t\t]\n\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t];\n\n\t\t$attributes['constant']['description'] = preg_replace('/[\"\\']/m', '', $attributes['constant']['description']);\n\t\t$attributes['variable']['phones'] = preg_replace('/[+][7]/m', '', $attributes['variable']['phones']); //replace +\n\t\t\n\t\t$attributes['constant']['total_area'] = preg_replace('/[?\\sм²]+/m', '', $attributes['constant']['total_area']); //replace m2\n\t\t$attributes['constant']['total_area'] = trim($attributes['constant']['total_area']);\n\n\t\t//if exist history. set start price and date publish from history\n\t\tif (isset($page['priceChange']))\n\t\t\tif (count($page['priceChange']) > 0) {\n\t\t\t\t//cnage price and date publicaiton\n\t\t\t\t$attributes['constant']['ad_published'] = $page['priceChange'][0]['date'];\n\t\t\t\t$attributes['variable']['price_start'] = $page['priceChange'][0]['price'];\n\t\t\t}\n\n\t\tif ($page['offer']['price']['currency'] != \"rur\") {\n\t\t\t//change all prices\n\n\t\t\t$attributes['variable']['price_start'] = only_digit($page['offer']['rublesPrice']);\n\t\t\t$attributes['variable']['price_actual'] = only_digit($page['offer']['rublesPrice']);\n\n\t\t\t$attributes['variable']['square_meter_price'] = intdiv($attributes['variable']['price_actual'],$attributes['constant']['total_area']); //recalc square_meter_price\n\n\t\t}\n\n\n\n\t\t$attributes['constant']['street'] = get_address_data($attributes['constant']['address'])['street'];\n\t\t$attributes['constant']['house'] = get_address_data($attributes['constant']['address'])['house'];\n\n\n\t\tif (isset($page['offer']['houseInfo']['info']['buildYear'])) {\n\t\t\t$attributes['constant']['building_year'] = \"построен: \" . $page['offer']['houseInfo']['info']['buildYear'];\n\t\t}\n\t\telse if (isset($page['offer']['building']['features']['deadline'])) {\n\t\t\t$attributes['constant']['building_year'] = \"срок сдачи: \" . $page['offer']['building']['features']['deadline'];\n\t\t}\n\t\telse {\n\t\t\t$attributes['constant']['building_year'] = 'нет данных';\n\t\t}\n\n\t\t//Где тот тут проверить опубликовано ли\n\t}\n\tcatch (Exception $e) {\n\t\tadd_logs(\"error: \" . $e->getMessage());\n\t\tadd_logs(\"body json (page): \" . json_encode($page));\n\t\tadd_logs(\"ad id :\" . $id);\n\t}\n\n\treturn $attributes;\n\n}", "public function load_ads_by_pagination() {\n \n // Check if data was submitted\n if ($this->CI->input->post()) {\n \n // Add form validation\n $this->CI->form_validation->set_rules('url', 'Url', 'trim');\n \n // Get data\n $url = $this->CI->input->post('url');\n \n if ( $this->CI->form_validation->run() !== false ) {\n \n if ( !$url ) {\n \n // Get selected account\n $get_account = $this->CI->ads_account_model->get_account($this->CI->user_id, 'facebook');\n \n if ( $get_account ) {\n \n $response = $this->fb->get(\n '/' . $get_account[0]->net_id . '/ads?fields=insights,status,name,adset{name}&limit=10',\n $get_account[0]->token\n );\n \n $data = $response->getDecodedBody();\n \n if ( $data ) {\n \n $this->create_cache(MIDRUB_BASE_USER_APPS_FACEBOOK_ADS . 'cache/' . $get_account[0]->net_id . '-ads.json', json_encode($data, JSON_PRETTY_PRINT));\n \n $previous = '';\n\n if ( isset($data['paging']['previous']) ) {\n $previous = $data['paging']['previous'];\n } \n\n $next = '';\n\n if ( isset($data['paging']['next']) ) {\n $next = $data['paging']['next'];\n }\n\n $array = array(\n 'success' => TRUE,\n 'ads' => $data['data'],\n 'previous' => $previous,\n 'next' => $next\n );\n\n echo json_encode($array);\n exit();\n \n }\n \n }\n \n } else {\n\n $ads = json_decode(get($url), true);\n\n if ( $ads ) {\n\n $previous = '';\n\n if ( isset($ads['paging']['previous']) ) {\n $previous = $ads['paging']['previous'];\n } \n\n $next = '';\n\n if ( isset($ads['paging']['next']) ) {\n $next = $ads['paging']['next'];\n }\n\n $data = array(\n 'success' => TRUE,\n 'ads' => $ads['data'],\n 'previous' => $previous,\n 'next' => $next\n );\n\n echo json_encode($data);\n exit();\n\n }\n \n }\n \n }\n \n }\n \n $data = array(\n 'success' => FALSE,\n 'message' => $this->CI->lang->line('error_occurred')\n );\n\n echo json_encode($data); \n \n }", "public function invokeAdvertisements()\r\n {\r\n if (!isset($_GET['adverisements'])) {\r\n\r\n $advertisements = $this->model->getAdvertisements();\r\n include 'view/advertisements.php';\r\n }\r\n }", "function entity_extraction($content)\n{\n // Your license key (obatined from api.opencalais.com)\n $contentType = \"text/txt\"; // simple text - try also text/html\n $outputFormat = \"Application/JSON\"; // simple output format - try also xml/rdf and text/microformats\n \n $restURL = \"http://api.opencalais.com/enlighten/rest/\";\n $paramsXML = \"<c:params xmlns:c=\\\"http://s.opencalais.com/1/pred/\\\" \" . \"xmlns:rdf=\\\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\\\"> \" . \"<c:processingDirectives c:contentType=\\\"\" . $contentType . \"\\\" \" . \"c:outputFormat=\\\"\" . $outputFormat . \"\\\"\" . \"></c:processingDirectives> \" . \"<c:userDirectives c:allowDistribution=\\\"false\\\" \" . \"c:allowSearch=\\\"false\\\" c:externalID=\\\" \\\" \" . \"c:submitter=\\\"Calais REST Sample\\\"></c:userDirectives> \" . \"<c:externalMetadata><c:Caller>Calais REST Sample</c:Caller>\" . \"</c:externalMetadata></c:params>\";\n \n // Construct the POST data string\n $data = \"licenseID=\" . urlencode(CALAIS_API_KEY);\n $data .= \"&paramsXML=\" . urlencode($paramsXML);\n $data .= \"&content=\" . urlencode($content);\n \n // Invoke the Web service via HTTP POST\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $restURL);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 60);\n $response = curl_exec($ch);\n\n \n curl_close($ch);\n \n $json = json_decode($response, true);\n \n \n if (!isset($json)) {\n echo \"The Open Calais API is down \";\n return array();\n } else {\n $return_value = array();\n \n $banned_array = array(\n 'gbp',\n 'eu',\n 'rt',\n 'http'\n );\n \n foreach ($json as $entity) {\n if (isset($entity['name'])) {\n $extracted['term'] = $entity['name'];\n $extracted['type'] = $entity['_type'];\n $extracted['frequency'] = count($entity['instances']);\n $extracted['source'] = \"entity\";\n if ($entity['_type'] == 'Organization' || $entity['_type'] == 'Person') {\n $extracted['frequency'] = $extracted['frequency'] * 1.5;\n echo $entity['name']. \"\\n\";\n echo $entity['_type']. \"\\n\";\n echo $extracted['frequency'] . \"\\n\";\n }\n \n if ($entity['_type'] != 'URL' && $extracted['frequency'] > 2 && !array_search(strtolower($extracted['term']), $banned_array)) {\n echo \"----\";\n \n $return_value[] = $extracted;\n }\n }\n }\n \n \n \n return $return_value;\n }\n}", "public function adCreativereport()\n\t{\n\n\n\n\t\t$query=\"https://graph.facebook.com/v3.2/\".$this->ad_acc_id.\"/campaigns?fields=ads{adcreatives{id,name,thumbnail_url},insights.level(ad).metrics(ctr){cost_per_unique_click,spend,impressions,frequency,reach,unique_clicks,clicks,ctr,ad_name,adset_name,cpc,cpm,cpp,campaign_name,ad_id,adset_id,account_id,account_name}}&access_token=\".$this->user_access_token.\"\";\n\n\n\t\t\t// Call to Graph api here\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch,CURLOPT_URL,$query);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_POST, 0);\n\n\n\t\t$resp = curl_exec($ch);\n\t\t$resp = json_decode($resp);\n\t\tcurl_close($ch);\n\t\tif(isset($resp->error->error_user_msg))\n\t\t\tSession::flash('message',$resp->error->error_user_msg);\n\t\telseif(isset($resp->error->message))\n\t\t\tSession::flash('message',$resp->error->message);\n\n\n\t\treturn view('social.adcreative-reports',['resp'=>$resp]);\n\t}", "function getDynamicAds()\n\t\t{\n\t\t\t$dynamicBanner_1 = $this->manage_content->getValue_where('banner_info','banner_image','id',5);\n\t\t\t$dynamicBanner_2 = $this->manage_content->getValue_where('banner_info','banner_image','id',6);\n\t\t\t//print_r($dynamicBanner[0]['banner_image']);\n\t\t\t//get dynamic banner 1\n\t\t\tif($dynamicBanner_1[0]['banner_image'] == 'NULL')\n\t\t\t{\n\t\t\t\techo '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<div class=\"dynamic_banner\">'.$dynamicBanner_1[0]['banner_image'].'</div>';\n\t\t\t}\n\t\t\t//get the dynamic banner 2\n\t\t\tif($dynamicBanner_2[0]['banner_image'] == 'NULL')\n\t\t\t{\n\t\t\t\techo '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<div class=\"dynamic_banner\">'.$dynamicBanner_2[0]['banner_image'].'</div>';\n\t\t\t}\n\t\t}", "abstract function getPairsFromAPI();", "public function getData(){\n\t\t$url = $this->host . \"/rest/v1/leads.json?access_token=\" . $this->getToken()\n\t\t\t\t\t\t. \"&filterType=\" . $this->filterType . \"&filterValues=\" . $this::csvString($this->filterValues);\n\t\t\n\t\tif (isset($this->batchSize)){\n\t\t\t$url = $url . \"&batchSize=\" . $this->batchSize;\n\t\t}\n\t\tif (isset($this->nextPageToken)){\n\t\t\t$url = $url . \"&nextPageToken=\" . $this->nextPageToken;\n\t\t}\n\t\tif(isset($this->fields)){\n\t\t\t$url = $url . \"&fields=\" . $this::csvString($this->fields);\n\t\t}\n\t\t\n\t\t//debug\n\t\t//echo '<p>url after = ' . $url . '</p>';\n\t\t\n\t\t$ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('accept: application/json',));\n\t\t$response = curl_exec($ch);\n\t\treturn $response;\n\t}", "public function getAds() {\n return $this->getAdsFromSettings($this->getSettings());\n }", "public function get_initiatives() \n\t{\n\t\t$query = $this->initiatives_model->get_initiatives(12);\n\t\t\n\t\t$v_data['query'] = $query;\n\n\t\t$response['message'] = 'success';\n\t\t$response['result'] = $this->load->view('initiative', $v_data, true);\n\n\t\t\n\t\techo json_encode($response);\n\t}", "public function deleteAsync(array $params = [])\n {\n return $this->handleMiddleware('delete', $params, function(MiddlewareRequest $request) {\n $params = $request->getApiMethodArguments();\n $data = $params;\n $response = $this->apiInstance->adcreativesDeleteAsync($data);\n return $response;\n });\n }", "function getDailyDeals(){\n\n global $flipkart_deals_page_transient_lifetime;\n $api_url = 'https://affiliate-api.flipkart.net/affiliate/offers/v1/dotd/json';\n\n function callFlipkartFeedsAPI($api_url){\n\n static $api_call_counter = 1;\n\n $api_response = wp_remote_get( $api_url ,\n array( 'timeout' => 10,\n 'headers' => array( 'Fk-Affiliate-Id' => 'couponmac',\n 'Fk-Affiliate-Token'=> '6eb39690116842ad937da289fa4e6e74' )\n ));\n\n if( is_array($api_response) ) {\n\n $api_response = $api_response['body'];\n $api_response = json_decode($api_response, true);\n\n set_transient( 'flipkart_daily_deals', $api_response, $flipkart_deals_page_transient_lifetime );\n\n return $api_response;\n }else{\n $api_call_counter++;\n if($api_call_counter>5){\n return '';\n }\n $api_response = callFlipkartFeedsAPI($api_url);\n return $api_response;\n }\n }\n\n return callFlipkartFeedsAPI($api_url);\n }", "function display_charges_list(GuzzleHttp\\Message\\Response $response)\n{\n if (count($response->json()['response'])) {\n $charges = $response->json()['response'];\n print \"Available charges\\n\";\n foreach ($charges as $charge) {\n printf(\n \"token: %s | transaction date: %s | currency: %s | amount: %s | fees: %s\\n\",\n $charge['token'], $charge['created_at'], $charge['currency'],\n money_format('%(#5n', $charge['amount']),\n money_format('%(#5n', $charge['total_fees'])\n );\n }\n } else {\n print \"\\nNo charges available in response object\\n\";\n }\n}", "function oneclick_call_wp_frontend_api()\r\r\n{\r\r\n $args = array(\r\r\n 'timeout' => 240\r\r\n );\r\r\n $json_feed_get_frontend = 'http://wp-samurai.com/wp-json/posts/?type=tutorials&filter[category_name]=frontend';\r\r\n $json_frontend = wp_remote_get($json_feed_get_frontend, $args);\r\r\n $tutorial_frontend_api = json_decode($json_frontend['body']);\r\r\n return $tutorial_frontend_api;\r\r\n}", "public function iN_ShowAds() {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_advertisements WHERE ads_status = '1' ORDER BY RAND() LIMIT 2\") or die(mysqli_error($this->db));\n\t\twhile ($row = mysqli_fetch_array($query)) {\n\t\t\t$data[] = $row;\n\t\t}\n\t\tif (!empty($data)) {\n\t\t\treturn $data;\n\t\t}\n\t}", "public function getAds(){\n return $this->ifsp->getAds();\n }", "public function get_ads($screen_code)\n {\n $screen = Screen::where('code', $screen_code)->first();\n if($screen) {\n return response()->json(new AdvertisementResource($screen), 200);\n }\n return response()->json(['error' => 'Invalid boardId'], 400);\n }", "public function index()\n {\n $adverts = Advert::all();\n $categories = Category::all();\n $products = Product::orderBy('updated_at', 'desc')->take(15)->get();\n return response()->json([\n \"adverts\" => $adverts,\n \"categories\" => $categories,\n \"products\" => $products\n ]);\n }", "function salesforceAPIGetAsync( $urlSegment, $data = array() ) {\n global $browser;\n $sfAuth = getSFAuth();\n $url = $sfAuth->instance_url . '/services/data/v44.0/' . $urlSegment . '.json?' . http_build_query( $data );\n $headers = array( 'Authorization' => 'Bearer ' . $sfAuth->access_token );\n \n addToLog( 'GET: ' . $url );\n addToLog( 'headers:', $headers );\n\n // add access token to header and make the request\n return $browser->get( $url, $headers )->then( function($response) {\n $responseBody = getJsonBodyFromResponse( $response );\n addToLog( 'response:', $responseBody );\n return $responseBody;\n });\n}", "public function getAsync(array $params = [])\n {\n return $this->handleMiddleware('get', $params, function(MiddlewareRequest $request) {\n $params = $request->getApiMethodArguments();\n $adcreativeTemplateId = isset($params['adcreative_template_id']) ? $params['adcreative_template_id'] : null;\n $promotedObjectType = isset($params['promoted_object_type']) ? $params['promoted_object_type'] : null;\n $accountId = isset($params['account_id']) ? $params['account_id'] : null;\n $automaticSiteEnabled = isset($params['automatic_site_enabled']) ? $params['automatic_site_enabled'] : null;\n $siteSet = isset($params['site_set']) ? $params['site_set'] : null;\n $isDynamicCreativeAd = isset($params['is_dynamic_creative_ad']) ? $params['is_dynamic_creative_ad'] : null;\n $fields = isset($params['fields']) ? $params['fields'] : null;\n $response = $this->apiInstance->adcreativeTemplateDetailGetAsync($adcreativeTemplateId, $promotedObjectType, $accountId, $automaticSiteEnabled, $siteSet, $isDynamicCreativeAd, $fields);\n return $response;\n });\n }", "function getCardSetsFromCategory($categoryId){\n $cardSets = [];\n try {\n $cardSets = json_decode(file_get_contents('http://localhost:8080/cardSet/category/'. $categoryId));\n } catch (Exception $e) {\n echo '<h5 class=\"communication-error\"><i class=\"fas fa-exclamation-triangle text-warning\"></i> Fehler bei der Verbindung zum Service!<br><br>Error: '.$e->getMessage().'</h5>';\n }\n return $cardSets;\n}", "function gc_get_url_and_print_json( $url ) {\n header( 'Content-type: application/json' );\n $args = array(\n 'headers' => array(\n 'Authentication' => $this->api_key\n )\n );\n $response = wp_remote_get( $url, $args );\n // $http_code = wp_remote_retrieve_response_code( $response );\n echo $response['body'];\n die();\n }", "function getAllAccident(){\n $getStart = $_REQUEST[\"startPoint\"];\n $getEnd = $_REQUEST[\"endPoint\"];\n $startPoint = str_replace(' ', '', $getStart);\n $endPoint = str_replace(' ', '', $getEnd);\n $index = $_REQUEST[\"index\"];\n// $startPoint = \"Caulfield,vic\";\n// $endPoint = \"Carengie,vic\";\n// $index = 1;\n $r_googleMAPAPI_json = getRoute($startPoint, $endPoint);\n $StepArray = getSteps($r_googleMAPAPI_json, $index);\n $accidents = getAccident($StepArray);\n\n return json_encode($accidents);\n// return $r_googleMAPAPI_json;\n}", "function _campaign_resource_load_gallery($nid, $count = 25, $start = 0) {\n $params = array(\n 'nid' => $nid,\n 'status' => 'approved',\n );\n return dosomething_api_get_reportback_files($params, $count, $start);\n}", "public function getData(){\n\t\t$url = $this->host . \"/rest/v1/list/\" . $this->listId . \"/leads.json?access_token=\" . $this->getToken();\n\t\tif (isset($this->fields)){\n\t\t\t$url = $url . \"&fields=\" . $this::csvString($this->fields);\n\t\t}\n\t\tif (isset($this->batchSize)){\n\t\t\t$url = $url . \"&batchSize=\" . $this->batchSize;\n\t\t}\n\t\tif (isset($this->nextPageToken)){\n\t\t\t$url = $url . \"&nextPageToken=\" . $this->fields;\n\t\t}\n\t\t$ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('accept: application/json',));\n\t\t$response = curl_exec($ch);\n\t\treturn $response;\n\t}", "public function bannerService($arrParam=array()){\n try{\n $return = array(); \n $bannerTag = array_get($arrParam, 'banner-tag', 'banner-home-principal');\n\n $param = array( \n 'url' => env(\"API_PATH\").\"/\".env(\"API_KEY\").\"/Banner/Itens/\".$bannerTag, \n ); \n $Util = new UtilService();\n $json = $Util->getResource( $param ); \n $return['content'] = json_decode($json);\n \n \n return $return;\n \n } catch (Exception $ex) {\n\n return $return;\n\n }\n }", "function get_zone_links($czds_base_url){\n global $access_token;\n\n $links_url = $czds_base_url . \"/czds/downloads/links\";\n $links_response = do_get($links_url, $access_token);\n\n $status_code = $links_response['info']['http_code'];\n\n if($status_code == 200){\n $zone_links = json_decode($links_response['result'],true);\n echo now().\": The number of zone files to be downloaded is \".count($zone_links).PHP_EOL;\n return $zone_links;\n }elseif($status_code == 401){\n global $username, $password, $authen_base_url;\n echo \"The access_token has been expired. Re-authenticate user $username\".PHP_EOL;\n $access_token = authenticate($username, $password, $authen_base_url);\n return get_zone_links($czds_base_url);\n }else{\n echo \"Failed to get zone links from $links_url with error code $status_code\".PHP_EOL;\n return false;\n }\n}", "public function addAsync(array $params = [])\n {\n return $this->handleMiddleware('add', $params, function(MiddlewareRequest $request) {\n $params = $request->getApiMethodArguments();\n $data = $params;\n $response = $this->apiInstance->adcreativesAddAsync($data);\n return $response;\n });\n }", "private function getActivities()\n {\n // Fetch the activity endpoint of the API\n $apiUrl = $this->eagleApi . '/activity';\n $activitiesString = file_get_contents($apiUrl);\n\n // Decode the response and return\n return json_decode($activitiesString);\n }", "public function index()\n {\n \n try {\n $banners = Banner::orderBy('created_at', 'desc');\n $banners = $banners->Paginate(Config::get('app.banner_per_page'));\n return Response::json(array('status' => 'success', 'data' => $banners->toArray(),'page' => $banners->paginateObject()), 200);\n } Catch (Exception $ex) {\n return Response::json(array('status' => 'error', 'error' => $ex->getMessage(), 'line' => $ex->getLine()), 500);\n }\n }", "function display_cars()\n{\n //displays posted cars\n $url = set_url('advert');\n $url .= '?limit=10&page=1';\n $token = $_SESSION['token'];\n $cURLConnection = curl_init($url);\n curl_setopt($cURLConnection, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Authorization: Bearer ' . $token,]);\n curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);\n $apiResponse = json_decode(curl_exec($cURLConnection));\n curl_close($cURLConnection);\n print_r($apiResponse);\n exit;\n}", "public function getBanner($id){\n $validate = new IsINT();\n $validate->goCheck();\n\n //get the Banner data by banner ID\n //try{\n $banner = BannerModel::getBannerByID($id);\n// $banner = BannerModel::all(['banner_id'=>$id]);\n// }catch (Exception $ecp){\n// $rtnMsg = [\n// //get the error message\n// 'return_MSG' => 'This is test message!',\n// 'return_Code' => '10001',\n// ];\n// // return the error message\n// //json(array, code)\n// //array => return data\n// // code => Http state code, e.g. 400, 404, 500\n //return json($rtnMsg, 400);\n\n// }\n if($banner){\n //if no exception, return the correct data\n return json($banner,200);\n }else{\n //if have exception, then throw it to exception handler\n throw new NoBannerData();\n //this is GITHUB\n //throw new Exception();\n //return '11111111111';\n }\n // return json($rtnMsg,200);\n\n }", "function get_districts($id)\n{\n $url = set_url('disctricts');\n $url .= '?city_id=' . $id;\n $token = $_SESSION['token'];\n $cURLConnection = curl_init($url);\n curl_setopt($cURLConnection, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Authorization: Bearer ' . $token,]);\n curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);\n $apiResponse = curl_exec($cURLConnection);\n curl_close($cURLConnection);\n print_r($apiResponse);\n exit;\n}", "function tmt_gallery_get()\n\t{\n\t\t$galleries = $this->gallery_model->display_one_gallery();\n\t\t\n\t\t//$data = array('returned: '. $this->get('id'));\n\t\t$this->response($galleries);\n\t\t\n\t}", "public function ads(Request $request){\n\n $ads = Ad::filterBy(request()->all())->paginate(20);\n\n return response()->json($ads);\n\n if($request->has('mobile_brand')){\n $ads = Ad::whereHas('mobile_phone', function($query){\n $query->whereHas('mobile_brand', function($query){\n $query->where('slug', request()->mobile_brand);\n });\n })->paginate(10);\n }\n return response()->json($ads);\n\n }", "function ajaxAdsReview()\n{\n header('Content-type: application/json');\n\n $retour = new \\stdClass();\n $retour->error = false;\n $retour->message = 'ok';\n\n $fields = $_POST['fields'];\n $fields = json_decode(stripslashes($fields));\n\n $refClient = $fields->choisir_client_leboncoin; // vaut false si prospect ou nouveau ou ref_eleve (si !prospect )\n\n $phone = $fields->phone;\n\n if (! $phone) {\n $phone = 'pas-de-num';\n }\n\n $lbcProcessMg = new \\spamtonprof\\stp_api\\LbcProcessManager();\n $lbcAcctMg = new \\spamtonprof\\stp_api\\LbcAccountManager();\n\n $ads = $lbcProcessMg->generateAds($refClient, 50, $phone);\n $lbcAccts = $lbcAcctMg->getAll(array(\n 'ref_client' => $refClient\n ));\n\n $emails = [];\n foreach ($lbcAccts as $lbcAcct) {\n $emails[] = $lbcAcct->getMail();\n }\n\n // récupération des prénoms du client\n \n $clientMg = new \\spamtonprof\\stp_api\\LbcClientManager();\n $client = $clientMg->get(array('ref_client' => $refClient));\n \n $prenomMg = new \\spamtonprof\\stp_api\\PrenomLbcManager();\n $prenoms = $prenomMg -> getAll(array('ref_cat_prenom' => $client->getRef_cat_prenom()));\n \n \n \n // récupération des réponses du client\n $texteMg = new \\spamtonprof\\stp_api\\LbcTexteManager();\n $reponses = $texteMg -> getAll(array(\"ref_type_texte\" => $client->getRef_reponse_lbc()));\n \n \n $retour->phone = $phone;\n $retour->refClient = $refClient;\n $retour->ads = $ads;\n $retour->emails = $emails;\n $retour->prenoms = $prenoms;\n $retour->reponses = $reponses;\n \n \n \n echo (json_encode($retour));\n\n die();\n}", "public function index()\n\t{\n\t\t$ciudads = $this->ciudadRepository->all();\n\n\t\treturn $this->sendResponse($ciudads->toArray(), \"Ciudads retrieved successfully\");\n\t}", "private function requestAnimeList () {\n\t\t$curl = curl_init ();\n\t\t\n\t\tcurl_setopt ($curl, CURLOPT_URL, $this->api_url);\n\t\tcurl_setopt ($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t\n\t\t$response = curl_exec ($curl);\n\t\t\n\t\tcurl_close($curl);\n\t\t\n\t\treturn ($response);\n\t}", "function _recast_analysis_api_retrieve($uuid) {\r\n $query = new EntityFieldQuery();\r\n $entity = $query\r\n ->entityCondition('entity_type', 'node', '=')\r\n ->entityCondition('bundle', 'analysis')\r\n ->propertyCondition('status', 1) \r\n ->propertyCondition('uuid', $uuid) \r\n ->execute();\r\n \r\n $nodes = node_load_multiple(array_keys($entity['node']));\r\n foreach($nodes as $n) {\r\n $query = new EntityFieldQuery();\r\n $requests = $query\r\n ->entityCondition('entity_type', 'node', '=')\r\n ->entityCondition('bundle', 'recast_request')\r\n ->fieldCondition('field_request_analysis', 'target_id' , $n->nid)\r\n ->propertyCondition('status', 1) \r\n ->count()->execute();\r\n\r\n $lang = $n->language;\r\n if(isset($uuid) && $uuid != '') {\r\n //create run conditions array\r\n $runc = array();\r\n $rc = entity_load('field_collection_item', array($n->field_run_condition[$lang][0]['value']));\r\n if(isset($rc) && $rc !='') {\r\n foreach($rc as $entity_id => $obj) {\r\n $runc[] = array(\r\n 'run_condition_internal_id' => $entity_id,\r\n 'run_condition' => $obj -> field_run_condition_name[$lang][0]['value'],\r\n 'run_condition_description' => $obj -> field_run_condition_description[$lang][0]['value'],\r\n \r\n );\r\n }\r\n }\r\n $arr[] = array(\r\n 'uuid' => $n->uuid,\r\n 'title' => $n->title,\r\n 'number_of_requests' => $requests,\r\n 'collaboration' => $n->field_analysis_collaboration[$lang][0]['value'],\r\n 'journal' => $n->field_analysis_journal[$lang][0]['value'],\r\n 'doi' => $n->field_analysis_doi[$lang][0]['value'],\r\n 'description' => $n->field_analysis_description[$lang][0]['value'],\r\n 'ownership' => ($n->field_analysis_ownership[$lang][0]['value'] == 0) ? t('Unowned') : t('Owned'),\r\n 'owner' => $n->field_analysis_owner[$lang][0]['value'], \r\n 'inspire' => $n->field_analysis_inspire[$lang][0]['url'], \r\n 'eprint' => $n->field_analysis_eprint[$lang][0]['url'], \r\n 'created_by' => $n->name, \r\n //now the following are the run conditions\r\n 'run_conditions' => $runc\r\n );\r\n }\r\n else { //this condition **probably** should never happen... I like to have a fallback here anyways\r\n $arr[] = array(\r\n 'uuid' => $n->uuid,\r\n 'title' => $n->title,\r\n 'number_of_requests' => $requests,\r\n );\r\n }\r\n }\r\n return $arr;\r\n }", "public function getAds(): string\n {\n $html = '';\n\n\n $adsService = new AdsService();\n $ads = $adsService->getAds();\n\n foreach ($ads as $ad) {\n $html .=\n '#' . $ad->getId() . ' ' .\n $ad->getTitle() . ' ' .\n $ad->getDescription() . ' ' .\n $ad->getUserId() . ' ' .\n $ad->getCarId() . '<br />';\n }\n\n return $html;\n }", "public function getSearchAds(Request $request)\n\t{\n\t\t$uid = $request->input('uid');\n\t\t$type = $request->input('type');\n\t\t$region = $request->input('region', 0.2);\n\t\t$lng = $request->input('lng');\n\t\t$lat = $request->input('lat');\n\t\t$keyword = $request->input('keyword');\n\n\t\t$earthRadius = 6378.138;\n\t\t$dlng = 2 * asin(sin($region / (2 * $earthRadius)) / cos(deg2rad($lat)));\n\t\t$dlng = rad2deg($dlng);\n\t\t$dlat = $region/$earthRadius;\n\t\t$dlat = rad2deg($dlat);\n\n\t\t//return 'region='.$region.', lnt='.$lng.', lat='.$lat.', dlng='.$dlng.', dlat='.$dlat;\n\t\t\n\t\tif ($uid)\n\t\t{\n\t\t\t$ads = Ad::where('uid', $uid);\n\t\t\t$ads = $ads->where('status', 1)->paginate(10);\n\n\t\t\treturn $ads->toJson();\n\t\t}\n\t\telse if ($type)\n\t\t{\n\t\t\t$ads = Ad::where('type', $type);\n\t\t\tif ($lng && $lat)\n\t\t\t{\n\t\t\t\t$ads = $ads->whereBetween('longitude', [$lng-$dlng, $lng+$dlng])\n\t\t\t\t\t\t\t->whereBetween('latitude', [$lat-$dlat, $lat+$dlat]);\n\t\t\t}\n\t\t\tif ($keyword)\n\t\t\t{\n\t\t\t\t$ads = $ads->where('title', 'like', '%'.$keyword.'%');\n\t\t\t}\n\t\t\t$ads = $ads->where('status', 1)->paginate(10);\n\n\t\t\treturn $ads->toJson();\n\t\t}\n\t\telse if ($lng && $lat)\n\t\t{\n\t\t\t$ads = Ad::whereBetween('longitude', [$lng-$dlng, $lng+$dlng])\n\t\t\t\t\t\t->whereBetween('latitude', [$lat-$dlat, $lat+$dlat]);\n\t\t\tif ($keyword)\n\t\t\t{\n\t\t\t\t$ads = $ads->where('title', 'like', '%'.$keyword.'%');\n\t\t\t}\n\t\t\t$ads = $ads->where('status', 1)->paginate(10);\n\t\t\t\n\t\t\treturn $ads->toJson();\n\t\t}\n\t\telse if ($keyword)\n\t\t{\n\t\t\t$ads = Ad::where('title', 'like', '%'.$keyword.'%');\n\t\t\t$ads = $ads->where('status', 1)->paginate(10);\n\t\t\t\n\t\t\treturn $ads->toJson();\n\t\t}\n\t}", "function gatherResults($conn, $advert_id)\n {\n $query = \"SELECT whwp_Advert.* FROM whwp_Advert \"\n . \"WHERE whwp_Advert.advert_id = :advert_id \";\n $conn->prepQuery($query);\n $conn->bind('advert_id', $advert_id);\n $advert=[];\n $advert = $conn->single();\n return $advert;\n }", "function callRemitaApiGet($endPoint) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $endPoint);\n curl_setopt($ch, CURLOPT_ENCODING, \"\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_MAXREDIRS, 10);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Cache-Control: no-cache',\n 'Content-Type: application/json')\n );\n $output = curl_exec($ch);\n return $output;\n}", "function get_available_app_interface_compute_resources($id)\n{\n global $airavataclient;\n $computeResources = null;\n\n try\n {\n $computeResources = $airavataclient->getAvailableAppInterfaceComputeResources($id);\n }\n catch (InvalidRequestException $ire)\n {\n print_error_message('<p>There was a problem getting compute resources.\n Please try again later or submit a bug report using the link in the Help menu.</p>' .\n '<p>InvalidRequestException: ' . $ire->getMessage() . '</p>');\n }\n catch (AiravataClientException $ace)\n {\n print_error_message('<p>There was a problem getting compute resources.\n Please try again later or submit a bug report using the link in the Help menu.</p>' .\n '<p>Airavata Client Exception: ' . $ace->getMessage() . '</p>');\n }\n catch (AiravataSystemException $ase)\n {\n print_error_message('<p>There was a problem getting compute resources.\n Please try again later or submit a bug report using the link in the Help menu.</p>' .\n '<p>Airavata System Exception: ' . $ase->getMessage() . '</p>');\n }\n\n return $computeResources;\n}", "public function load_ad_sets_by_pagination() {\n \n // Check if data was submitted\n if ($this->CI->input->post()) {\n \n // Add form validation\n $this->CI->form_validation->set_rules('url', 'Url', 'trim');\n \n // Get data\n $url = $this->CI->input->post('url');\n \n if ( $this->CI->form_validation->run() !== false ) {\n \n if ( !$url ) {\n \n // Get selected account\n $get_account = $this->CI->ads_account_model->get_account($this->CI->user_id, 'facebook');\n \n if ( $get_account ) {\n \n $response = $this->fb->get(\n '/' . $get_account[0]->net_id . '/adsets?fields=status,insights,name,campaign{name}&limit=10',\n $get_account[0]->token\n );\n \n $data = $response->getDecodedBody();\n \n if ( $data ) {\n \n $this->create_cache(MIDRUB_BASE_USER_APPS_FACEBOOK_ADS . 'cache/' . $get_account[0]->net_id . '-adsets.json', json_encode($data, JSON_PRETTY_PRINT));\n \n $previous = '';\n\n if ( isset($data['paging']['previous']) ) {\n $previous = $data['paging']['previous'];\n } \n\n $next = '';\n\n if ( isset($data['paging']['next']) ) {\n $next = $data['paging']['next'];\n }\n\n $array = array(\n 'success' => TRUE,\n 'adsets' => $data['data'],\n 'previous' => $previous,\n 'next' => $next\n );\n\n echo json_encode($array);\n exit();\n \n }\n \n }\n \n } else {\n\n $adsets = json_decode(get($url), true);\n\n if ( $adsets ) {\n\n $previous = '';\n\n if ( isset($adsets['paging']['previous']) ) {\n $previous = $adsets['paging']['previous'];\n } \n\n $next = '';\n\n if ( isset($adsets['paging']['next']) ) {\n $next = $adsets['paging']['next'];\n }\n\n $data = array(\n 'success' => TRUE,\n 'adsets' => $adsets['data'],\n 'previous' => $previous,\n 'next' => $next\n );\n\n echo json_encode($data);\n exit();\n\n }\n \n }\n \n }\n \n }\n \n $data = array(\n 'success' => FALSE,\n 'message' => $this->CI->lang->line('error_occurred')\n );\n\n echo json_encode($data); \n \n }", "protected function _get_locations_by_creative($creative_id)\n {\n\t\t\t$request = Request::factory('http://'.Servers::$api_server.\"/creatives/$creative_id/locations\")\n\t\t\t\t->method(Request::GET)\n\t\t\t\t->headers('Content-Type', 'application/json');\n\t\t\n\t\t\treturn json_decode($request->execute(),true);\n\n }", "function fsf_cms_getAnnouncements($fsfcms_announcement_id)\n {\n global $fsfcms_api_url;\n \n $fsf_api_file = \"fsf.cms.getAnnouncements.php\";\n if($fsfcms_announcement_id !=\"\")\n {\n $fsf_api_options = \"?announcement_id=\" . $fsfcms_announcement_id;\n } else {\n $fsf_api_options = \"\";\n } \n $fsf_cms_getAnnouncements_content = fsf_preacher_curl($fsfcms_api_url, $fsf_api_file, $fsf_api_options);\n \n return $fsf_cms_getAnnouncements_content; \n }", "public function banners()\n {\n $banners = DB::table('banners')->latest('created_at')->limit(5)->get();\n\n return response()->json($banners);\n }", "public function getResults($urlRequest, $asObjects=true)\n {\n $httpResult = $this->getHTTPResult($urlRequest);\n $xml = new SimpleXMLElement($httpResult);\n $aNS = $xml->getDocNamespaces();\n if(isset($aNS[''])) // Check for default NS (no prefix defined in xml doc)\n {\n $this->xmlNS = $aNS[''];\n $this->NSPrefix = 'default:';\n $xml->registerXPathNamespace('default', $aNS['']);\n }\n \n // Check response validity. Will throw an exception if not valid\n try\n {\n $this->checkAWSResponseValidity($xml);\n }\n catch(JVAmazonAWSException $e)\n {\n // If we get a AWS_NO_MATCHING_RESULT, juste write a notice. And empty array will be returned\n if($e->getCode() == JVAmazonAWSException::AWS_NO_MATCHING_RESULT)\n eZDebug::writeNotice($e->getMessage(), 'jvAmazonAdvertising');\n else\n throw $e;\n }\n \n if($asObjects) // Hydrate Result Items\n {\n $items = $xml->Items->Item;\n $result = array();\n \n // Class for result item. Must implement IJVAmazonAdvertisingItem\n $resultItemClass = $this->amazonINI->variable('ResultSettings', 'ResultItemClass');\n $impl = class_implements($resultItemClass);\n if(!in_array('IJVAmazonAdvertisingItem', $impl))\n throw new RuntimeException(\"ResultItemClass '$resultItemClass' does not implement IJVAmazonAdvertisingItem\");\n \n $aResponseGroupHandlers = $this->amazonINI->variable('ResponseGroupSettings', 'ResponseGroupHandlers');\n foreach($items as $i => $item)\n {\n $attributes = array(\n 'id' => (string)$item->ASIN,\n );\n \n // Search a handler for each ResponseGroup\n foreach($this->aResponseGroup as $responseGroup)\n {\n try\n {\n // Check if a handler is declared\n if(!isset($aResponseGroupHandlers[$responseGroup]))\n throw new JVAmazonAWSException(\"Undeclared ResponseGroupHandler for '$responseGroup' ResponseGroup\",\n JVAmazonAWSException::RESPONSE_GROUP_ERROR);\n \n $handlerClass = $aResponseGroupHandlers[$responseGroup];\n $responseGroupHandler = new $handlerClass();\n if(!$responseGroupHandler instanceof IJVAmazonAdvertisingResponseGroupHandler) // Check interface implementation\n throw new RuntimeException(\"ResponseGroup handler '$handlerClass' for '$responseGroup' does not implement IJVAmazonAdvertisingResponseGroupHandler interface\");\n \n $handlerResult = $responseGroupHandler->handleResult($item);\n $attributes = array_merge($attributes, $handlerResult);\n\n unset($responseGroupHandler, $handlerResult);\n }\n catch(Exception $e)\n {\n eZDebug::writeError(\"[$handlerClass] : \".$e->getMessage(), 'jvAmazonAdvertising');\n eZLog::write(\"jvAmazonAdvertising [$handlerClass] : \".$e->getMessage(), 'error.log');\n continue;\n }\n }\n \n $hydratedItem = new $resultItemClass();\n $hydratedItem->fromArray($attributes);\n $result[] = $hydratedItem;\n }\n }\n else // $asObjects = false => return root SimpleXMLElement for further treatment\n {\n $result = $xml;\n }\n \n return $result;\n }", "function getAssetById($assetid)\n {\n global $conn;\n $query=\"SELECT * FROM tbl_asset where id=\".$assetid;\n $response=array();\n $result=mysqli_query($conn, $query);\n $rows=mysqli_num_rows($result);\n if($rows > 0){\n while($row = mysqli_fetch_assoc($result))\n {\n $response[]=$row;\n }\n }\n else{\n array_push($response,\"No Data Found\");\n }\n\n header('Content-Type: application/json');\n echo json_encode($response);\n }", "public function featured_ad(){\n\t\t\t$date=date('Y-m-d');\n\t\t// echo \"SELECT * FROM featured_ad where effective_From<='$date' and effective_to>='$date' and status='1'\";\n\t\n\t\t$check = $this->db->query(\"SELECT * FROM featured_ad where effective_From<='$date' and effective_to>='$date' and status='1'\") or die(mysqli_query($this->db));\n\t\t$result = mysqli_num_rows($check); \n\t\tif ($result>0) { \n\t\t\twhile($data = mysqli_fetch_array($check)){\n\t\t\t\t$ad_data[]=$data;\n\t\t\t}\n\t\t}else{\n\t\t\t\t$ad_data=0;\n\t\t\t}\n\t\t\treturn $ad_data;\n\t}", "function display_json_shortcode($atts ){\n $a = shortcode_atts( array(\n 'base_uri' => 'https://api.creol.ucf.edu/test.aspx',\n 'group' => 1\n ), $atts );\n\n $result = build_uri_string_directory($a);\n $json_string = curl_url($result);\n $json_obj = jsonifyier($json_string);\n layout_people($json_obj);\n}", "public function createAdset()\n\t{\n\n\t\t$query=\"https://graph.facebook.com/v3.2/\".$this->ad_acc_id.\"/campaigns?fields=name,id&limit=100&access_token=\".$this->user_access_token.\"\";\n\n\n\n\t\t\t// Call to Graph api here\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch,CURLOPT_URL,$query);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_POST, 0);\n\n\n\t\t$resp = curl_exec($ch);\n\t\t$resp = json_decode($resp);\n\n\t\tcurl_close($ch);\n\t\tif(isset($resp->error->error_user_msg))\n\t\t\tSession::flash('message',$resp->error->error_user_msg);\n\t\telseif(isset($resp->error->message))\n\t\t\tSession::flash('message',$resp->error->message);\n\n\t\treturn view('social.adset',['campaigns'=>$resp->data]);\n\t}", "function airtableCallByCurl($url, $headers) {\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_HTTPGET, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($ch, CURLOPT_URL, $url);\n $entries = curl_exec($ch);\n curl_close($ch);\n $airtableResponse = json_decode($entries, TRUE);\n\n return $airtableResponse;\n}", "protected function curlKivaApis($kiva_api_url)\n {\n $response = null;\n $curl_err = null;\n \n try {\n $curl = curl_init();\n \n curl_setopt_array($curl, array(\n CURLOPT_URL => $kiva_api_url,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_CUSTOMREQUEST => 'GET',\n CURLOPT_HTTPHEADER => array('cache-control: no-cache')\n ));\n \n $response = curl_exec($curl);\n $curl_err = curl_error($curl);\n return $response;\n } catch (Exception $e) {\n error_log(json_encode(array('ERROR' => 'curlKivaApis()', 'errmsg: ' => $e->GetMessage(), 'FAIL' => true)));\n\t return false;\n }\n }", "public function load_campaigns_by_pagination() {\n \n // Check if data was submitted\n if ($this->CI->input->post()) {\n \n // Add form validation\n $this->CI->form_validation->set_rules('url', 'Url', 'trim');\n \n // Get data\n $url = $this->CI->input->post('url');\n \n if ( $this->CI->form_validation->run() !== false ) {\n \n if ( !$url ) {\n \n // Get selected account\n $get_account = $this->CI->ads_account_model->get_account($this->CI->user_id, 'facebook');\n \n if ( $get_account ) {\n \n $response = $this->fb->get(\n '/' . $get_account[0]->net_id . '/campaigns?fields=name,status,insights,objective&limit=10',\n $get_account[0]->token\n );\n \n $data = $response->getDecodedBody();\n \n if ( $data['data'] ) {\n \n $this->create_cache(MIDRUB_BASE_USER_APPS_FACEBOOK_ADS . 'cache/' . $get_account[0]->net_id . '-campaigns.json', json_encode($data, JSON_PRETTY_PRINT));\n \n $previous = '';\n\n if ( isset($data['paging']['previous']) ) {\n $previous = $data['paging']['previous'];\n } \n\n $next = '';\n\n if ( isset($data['paging']['next']) ) {\n $next = $data['paging']['next'];\n }\n\n $array = array(\n 'success' => TRUE,\n 'campaigns' => $data['data'],\n 'previous' => $previous,\n 'next' => $next\n );\n\n echo json_encode($array);\n exit();\n \n }\n \n }\n \n } else {\n\n $campaigns = json_decode(get($url), true);\n\n if ( $campaigns['data'] ) {\n\n $previous = '';\n\n if ( isset($campaigns['paging']['previous']) ) {\n $previous = $campaigns['paging']['previous'];\n } \n\n $next = '';\n\n if ( isset($campaigns['paging']['next']) ) {\n $next = $campaigns['paging']['next'];\n }\n\n $data = array(\n 'success' => TRUE,\n 'campaigns' => $campaigns['data'],\n 'previous' => $previous,\n 'next' => $next\n );\n\n echo json_encode($data);\n exit();\n\n }\n \n }\n \n }\n \n }\n \n $data = array(\n 'success' => FALSE,\n 'message' => $this->CI->lang->line('error_occurred')\n );\n\n echo json_encode($data); \n \n }", "public function get_banners( $custom_args = array() ) \n\t{\t\n\t\t$args = array(\n\t\t\t'posts_per_page' => -1,\n\t\t\t'post_type' => 'banners',\n\t\t\t'post_status' => 'publish'\n\t\t);\n\t\t\n\t\t//$query = new WP_Query( array_merge( $args, $custom_args ) );\n\t\t//return $query->get_posts();\n\t\treturn get_posts( array_merge( $args, $custom_args ) );\n\t}", "public function index()\n {\n $adverts = Advert::orderBy('updated_at', 'desc')->paginate(15);\n //->get();\n //->paginate(15);\n\n // Palauta kaikki resurssina\n return IlmoitusResource::collection($adverts);\n }", "function loadAds(){\n\t\t$adsStmt = $this->dbc->query('SELECT id FROM items');\n\t\t//creates new array $ads\n\t\t$ads = [];\n\n\t\t//calls fetch and stores new ad as a new row\n\t\twhile($row = $adsStmt->fetch(PDO::FETCH_ASSOC)){\n\n\t\t\t$ad = new Ad($this->dbc, $row['id']);\n\t\t\t//stores the row into new array\n\t\t\t$ads[] = $ad;\n\t\t}\n\t\treturn $ads;\n\t}", "public function index(): JsonResource\n {\n return CampaignResource::collection($this->repository->fetchCampaigns());\n }", "function caos_google_ads()\n{\n $adsId = 'YOUR-ADS-ID';\n\n if (CAOS_OPT_REMOTE_JS_FILE == 'gtag.js') {\n add_filter(\n 'caos_gtag_additional_config',\n function() use ($adsId) {\n return \"gtag('config', '$adsId');\";\n }\n );\n }\n}", "public function get_all_ads($status = \"active\")\t{\n\n\t}", "public function getAcById($ac_id) {\n\t\t$result = array();\n\n\t\t$stmt = $this->conn->prepare(\"SELECT ac_id, ac_brand, ac_series, ac_location, ac_note, user_id, ac_lastservice, ac_nextservice, ac_status, ac_picture from tb_ac WHERE ac_id = ?\");\n\t\t$stmt->bind_param(\"i\", $ac_id);\n\n\t\tif($stmt->execute()) {\n\t\t\t$data = $stmt->get_result()->fetch_all(MYSQLI_ASSOC);\n\t\t\t$stmt->fetch();\n\t\t\t$stmt->close();\n\n\t\t\t$result[\"status\"] = true;\n\t\t\t$result[\"message\"] = $data;\n\n\t\t\treturn $result;\n\t\t} else {\n\t\t\t$result[\"status\"] = true;\n\t\t\t$result[\"message\"] = \"We have no result for you\";\n\n\t\t\treturn $result;\n\t\t}\n\t}", "function getAccident($stepArray)\n{\n\n $queryRoad = null;\n\n// get the road name from stepArray and put into one string\n foreach ($stepArray as $step) {\n $road = $step->getRoadName();\n\n// $nRoad = \"ROAD_NAME%3D'\" . \"%25\" . $road . \"%25'%20or%20\";\n $nRoad = \"INITIAL_ROAD_NAME%3D'\".$road.\"'%20or%20ENDING_ROAD_NAME%3D'\".$road.\"'%20or%20\";\n\n $newRoad = str_replace(\" \", \"%20\", $nRoad);\n\n $queryRoad .= $newRoad;\n\n }\n //cut the end extra part\n $query = substr($queryRoad, 0, strlen($queryRoad) - 8);\n\n// form a url to get connect with DB\n\n\n $curlAccident = \"https://dsp-acer-believe.cloud.dreamfactory.com:443/rest/DigisoftDB/ACCIDENTS?filter=$query\";\n\n\n //use the getResult Function to get result\n $result = getResult($curlAccident);\n $array_result = json_decode($result);\n\n //get result into array\n $records = $array_result->record;\n $accident_array = array();\n\n foreach ($stepArray as $step) {\n\n foreach ($records as $record) {\n //if the roadname is equal description, execute\n if (stristr($record->INITIAL_ROAD_NAME, $step->getRoadName())||stristr($record->ENDING_ROAD_NAME, $step->getRoadName())) {\n //if the latitude and longtitude is in the middle of the startpoint and end point, put the accident into array\n if ($record->LATITUDE != min($step->getStartLocationLat(), $step->getEndLocationLat(), $record->LATITUDE) && $record->LATITUDE != max($step->getStartLocationLat(), $step->getEndLocationLat(), $record->LATITUDE) &&\n $record->LONGITUDE != min($step->getStartLocationLng(), $step->getEndLocationLng(), $record->LONGITUDE) && $record->LONGITUDE != max($step->getStartLocationLng(), $step->getEndLocationLng(), $record->LONGITUDE)\n ) {\n array_push($accident_array, $record);\n\n }\n\n }\n }\n }\n\n // $result = array(\"result\" => $accident_array);\n\n //return $result;\n return $accident_array;\n}", "function GetAdGroupRemarketingListAssociations($proxy, $adGroupIds)\n{\n $request = new GetAdGroupRemarketingListAssociationsRequest();\n $request->AdGroupIds = $adGroupIds;\n \n return $proxy->GetService()->GetAdGroupRemarketingListAssociations($request);\n}", "public function index()\n {\n \n if(isset( $_GET['search']) && $_GET['search']!='' ){\n $searched= $_GET['search'];\n $banners=Banner::where('content', 'like',\"%{$searched}%\")\n ->latest()->paginate(2);\n \n }else{\n $banners=Banner::latest()->paginate(2);\n\n }\n return BannerResource::collection($banners);\n }", "protected function handle()\n {\n $response = [];\n $data = Experience::where('ubicacion_id','=',$this->params['ubicacion_id'])\n ->where('type','=','erp')\n ->orderBy('experiencia_id')\n ->get();\n\n foreach ($data as $exp) {\n if ($exp->front_page) {\n $exp->front_page = UrlGenerator::generate('storage.image', ['image' => str_replace('/', '-', $exp->front_page)]);\n }\n }\n\n $response['res'] = count($data);\n $response['msg'] = 'Experiencias de la ubicacion '.$this->params['ubicacion_id'];\n $response['data'] = $data;\n\n return $response;\n }", "public function achievements()\n {\n return $this->query($this->userEndpoint . 'achievements');\n }", "public function getAdvertiser(Request $request){\n return $this->repository->find((int) $request->route()->parameter('id'));\n }", "public function __construct(Client $client) {\n $this->servicePath = 'games/v1/';\n $this->version = 'v1';\n $this->serviceName = 'games';\n\n $client->addService($this->serviceName, $this->version);\n $this->achievementDefinitions = new AchievementDefinitionsServiceResource($this, $this->serviceName, 'achievementDefinitions', json_decode('{\"methods\": {\"list\": {\"id\": \"games.achievementDefinitions.list\", \"path\": \"achievements\", \"httpMethod\": \"GET\", \"parameters\": {\"language\": {\"type\": \"string\", \"location\": \"query\"}, \"maxResults\": {\"type\": \"integer\", \"format\": \"int32\", \"minimum\": \"1\", \"maximum\": \"200\", \"location\": \"query\"}, \"pageToken\": {\"type\": \"string\", \"location\": \"query\"}}, \"response\": {\"$ref\": \"AchievementDefinitionsListResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}}}', true));\n $this->achievements = new AchievementsServiceResource($this, $this->serviceName, 'achievements', json_decode('{\"methods\": {\"increment\": {\"id\": \"games.achievements.increment\", \"path\": \"achievements/{achievementId}/increment\", \"httpMethod\": \"POST\", \"parameters\": {\"achievementId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}, \"requestId\": {\"type\": \"string\", \"format\": \"int64\", \"location\": \"query\"}, \"stepsToIncrement\": {\"type\": \"integer\", \"required\": true, \"format\": \"int32\", \"minimum\": \"1\", \"location\": \"query\"}}, \"response\": {\"$ref\": \"AchievementIncrementResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"list\": {\"id\": \"games.achievements.list\", \"path\": \"players/{playerId}/achievements\", \"httpMethod\": \"GET\", \"parameters\": {\"language\": {\"type\": \"string\", \"location\": \"query\"}, \"maxResults\": {\"type\": \"integer\", \"format\": \"int32\", \"minimum\": \"1\", \"maximum\": \"200\", \"location\": \"query\"}, \"pageToken\": {\"type\": \"string\", \"location\": \"query\"}, \"playerId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}, \"state\": {\"type\": \"string\", \"enum\": [\"ALL\", \"HIDDEN\", \"REVEALED\", \"UNLOCKED\"], \"location\": \"query\"}}, \"response\": {\"$ref\": \"PlayerAchievementListResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"reveal\": {\"id\": \"games.achievements.reveal\", \"path\": \"achievements/{achievementId}/reveal\", \"httpMethod\": \"POST\", \"parameters\": {\"achievementId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"response\": {\"$ref\": \"AchievementRevealResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"unlock\": {\"id\": \"games.achievements.unlock\", \"path\": \"achievements/{achievementId}/unlock\", \"httpMethod\": \"POST\", \"parameters\": {\"achievementId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"response\": {\"$ref\": \"AchievementUnlockResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}}}', true));\n $this->applications = new ApplicationsServiceResource($this, $this->serviceName, 'applications', json_decode('{\"methods\": {\"get\": {\"id\": \"games.applications.get\", \"path\": \"applications/{applicationId}\", \"httpMethod\": \"GET\", \"parameters\": {\"applicationId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}, \"language\": {\"type\": \"string\", \"location\": \"query\"}, \"platformType\": {\"type\": \"string\", \"enum\": [\"ANDROID\", \"IOS\", \"WEB_APP\"], \"location\": \"query\"}}, \"response\": {\"$ref\": \"Application\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}}}', true));\n $this->leaderboards = new LeaderboardsServiceResource($this, $this->serviceName, 'leaderboards', json_decode('{\"methods\": {\"get\": {\"id\": \"games.leaderboards.get\", \"path\": \"leaderboards/{leaderboardId}\", \"httpMethod\": \"GET\", \"parameters\": {\"language\": {\"type\": \"string\", \"location\": \"query\"}, \"leaderboardId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"response\": {\"$ref\": \"Leaderboard\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"list\": {\"id\": \"games.leaderboards.list\", \"path\": \"leaderboards\", \"httpMethod\": \"GET\", \"parameters\": {\"language\": {\"type\": \"string\", \"location\": \"query\"}, \"maxResults\": {\"type\": \"integer\", \"format\": \"int32\", \"minimum\": \"1\", \"maximum\": \"100\", \"location\": \"query\"}, \"pageToken\": {\"type\": \"string\", \"location\": \"query\"}}, \"response\": {\"$ref\": \"LeaderboardListResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}}}', true));\n $this->players = new PlayersServiceResource($this, $this->serviceName, 'players', json_decode('{\"methods\": {\"get\": {\"id\": \"games.players.get\", \"path\": \"players/{playerId}\", \"httpMethod\": \"GET\", \"parameters\": {\"playerId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"response\": {\"$ref\": \"Player\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}}}', true));\n $this->revisions = new RevisionsServiceResource($this, $this->serviceName, 'revisions', json_decode('{\"methods\": {\"check\": {\"id\": \"games.revisions.check\", \"path\": \"revisions/check\", \"httpMethod\": \"GET\", \"parameters\": {\"clientRevision\": {\"type\": \"string\", \"required\": true, \"location\": \"query\"}}, \"response\": {\"$ref\": \"RevisionCheckResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}}}', true));\n $this->rooms = new RoomsServiceResource($this, $this->serviceName, 'rooms', json_decode('{\"methods\": {\"create\": {\"id\": \"games.rooms.create\", \"path\": \"rooms/create\", \"httpMethod\": \"POST\", \"parameters\": {\"language\": {\"type\": \"string\", \"location\": \"query\"}}, \"request\": {\"$ref\": \"RoomCreateRequest\"}, \"response\": {\"$ref\": \"Room\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"decline\": {\"id\": \"games.rooms.decline\", \"path\": \"rooms/{roomId}/decline\", \"httpMethod\": \"POST\", \"parameters\": {\"roomId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"response\": {\"$ref\": \"Room\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"dismiss\": {\"id\": \"games.rooms.dismiss\", \"path\": \"rooms/{roomId}/dismiss\", \"httpMethod\": \"POST\", \"parameters\": {\"roomId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"get\": {\"id\": \"games.rooms.get\", \"path\": \"rooms/{roomId}\", \"httpMethod\": \"GET\", \"parameters\": {\"language\": {\"type\": \"string\", \"location\": \"query\"}, \"roomId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"response\": {\"$ref\": \"Room\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"join\": {\"id\": \"games.rooms.join\", \"path\": \"rooms/{roomId}/join\", \"httpMethod\": \"POST\", \"parameters\": {\"roomId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"request\": {\"$ref\": \"RoomJoinRequest\"}, \"response\": {\"$ref\": \"Room\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"leave\": {\"id\": \"games.rooms.leave\", \"path\": \"rooms/{roomId}/leave\", \"httpMethod\": \"POST\", \"parameters\": {\"roomId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"request\": {\"$ref\": \"RoomLeaveRequest\"}, \"response\": {\"$ref\": \"Room\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"list\": {\"id\": \"games.rooms.list\", \"path\": \"rooms\", \"httpMethod\": \"GET\", \"parameters\": {\"language\": {\"type\": \"string\", \"location\": \"query\"}, \"maxResults\": {\"type\": \"integer\", \"format\": \"int32\", \"minimum\": \"1\", \"maximum\": \"500\", \"location\": \"query\"}, \"pageToken\": {\"type\": \"string\", \"location\": \"query\"}}, \"response\": {\"$ref\": \"RoomList\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"reportStatus\": {\"id\": \"games.rooms.reportStatus\", \"path\": \"rooms/{roomId}/reportstatus\", \"httpMethod\": \"POST\", \"parameters\": {\"roomId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}}, \"request\": {\"$ref\": \"RoomP2PStatuses\"}, \"response\": {\"$ref\": \"RoomStatus\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}}}', true));\n $this->scores = new ScoresServiceResource($this, $this->serviceName, 'scores', json_decode('{\"methods\": {\"get\": {\"id\": \"games.scores.get\", \"path\": \"players/{playerId}/leaderboards/{leaderboardId}/scores/{timeSpan}\", \"httpMethod\": \"GET\", \"parameters\": {\"includeRankType\": {\"type\": \"string\", \"enum\": [\"ALL\", \"PUBLIC\", \"SOCIAL\"], \"location\": \"query\"}, \"language\": {\"type\": \"string\", \"location\": \"query\"}, \"leaderboardId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}, \"maxResults\": {\"type\": \"integer\", \"format\": \"int32\", \"minimum\": \"1\", \"maximum\": \"25\", \"location\": \"query\"}, \"pageToken\": {\"type\": \"string\", \"location\": \"query\"}, \"playerId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}, \"timeSpan\": {\"type\": \"string\", \"required\": true, \"enum\": [\"ALL\", \"ALL_TIME\", \"DAILY\", \"WEEKLY\"], \"location\": \"path\"}}, \"response\": {\"$ref\": \"PlayerLeaderboardScoreListResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"list\": {\"id\": \"games.scores.list\", \"path\": \"leaderboards/{leaderboardId}/scores/{collection}\", \"httpMethod\": \"GET\", \"parameters\": {\"collection\": {\"type\": \"string\", \"required\": true, \"enum\": [\"PUBLIC\", \"SOCIAL\"], \"location\": \"path\"}, \"language\": {\"type\": \"string\", \"location\": \"query\"}, \"leaderboardId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}, \"maxResults\": {\"type\": \"integer\", \"format\": \"int32\", \"minimum\": \"1\", \"maximum\": \"25\", \"location\": \"query\"}, \"pageToken\": {\"type\": \"string\", \"location\": \"query\"}, \"timeSpan\": {\"type\": \"string\", \"required\": true, \"enum\": [\"ALL_TIME\", \"DAILY\", \"WEEKLY\"], \"location\": \"query\"}}, \"response\": {\"$ref\": \"LeaderboardScores\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"listWindow\": {\"id\": \"games.scores.listWindow\", \"path\": \"leaderboards/{leaderboardId}/window/{collection}\", \"httpMethod\": \"GET\", \"parameters\": {\"collection\": {\"type\": \"string\", \"required\": true, \"enum\": [\"PUBLIC\", \"SOCIAL\"], \"location\": \"path\"}, \"language\": {\"type\": \"string\", \"location\": \"query\"}, \"leaderboardId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}, \"maxResults\": {\"type\": \"integer\", \"format\": \"int32\", \"minimum\": \"1\", \"maximum\": \"25\", \"location\": \"query\"}, \"pageToken\": {\"type\": \"string\", \"location\": \"query\"}, \"resultsAbove\": {\"type\": \"integer\", \"format\": \"int32\", \"location\": \"query\"}, \"returnTopIfAbsent\": {\"type\": \"boolean\", \"location\": \"query\"}, \"timeSpan\": {\"type\": \"string\", \"required\": true, \"enum\": [\"ALL_TIME\", \"DAILY\", \"WEEKLY\"], \"location\": \"query\"}}, \"response\": {\"$ref\": \"LeaderboardScores\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"submit\": {\"id\": \"games.scores.submit\", \"path\": \"leaderboards/{leaderboardId}/scores\", \"httpMethod\": \"POST\", \"parameters\": {\"language\": {\"type\": \"string\", \"location\": \"query\"}, \"leaderboardId\": {\"type\": \"string\", \"required\": true, \"location\": \"path\"}, \"score\": {\"type\": \"string\", \"required\": true, \"format\": \"int64\", \"location\": \"query\"}}, \"response\": {\"$ref\": \"PlayerScoreResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}, \"submitMultiple\": {\"id\": \"games.scores.submitMultiple\", \"path\": \"leaderboards/scores\", \"httpMethod\": \"POST\", \"parameters\": {\"language\": {\"type\": \"string\", \"location\": \"query\"}}, \"request\": {\"$ref\": \"PlayerScoreSubmissionList\"}, \"response\": {\"$ref\": \"PlayerScoreListResponse\"}, \"scopes\": [\"https://www.googleapis.com/auth/plus.login\"]}}}', true));\n\n }", "public function agencyList() {\n\t\t$station = \\Auth::User()->station;\n\t\t$agencyList = ConnectContentAgency::where('station_id', '=', $station->id)->get();\n\t\t$agencies = array();\n\t\tforeach($agencyList as $agency) {\n\t\t\t$agencies[] = $agency->agency_name;\n\t\t}\n\t\ttry {\n\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => $agencies));\n\n\t\t} catch(\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\t}", "public function index()\n {\n $garages=Garage::paginate(15);\n return GarageResource::collection($garages);\n }", "public function anecdotaid_get(){\n $token = $this->uri->segment(3);\n $id = $this->uri->segment(4);\n\n $perfil = $this->User_model->revisa_perfil_x_token($token);\n\n if ($perfil == FALSE) {\n $respuesta = array(\n 'error' => true,\n 'mensaje' => 'Usuario no permitido.',\n 'data' => null\n );\n\n $this->response($respuesta, REST_Controller::HTTP_UNAUTHORIZED);\n exit;\n }\n\n $anecdota = $this->Anecdota_model->anecdota_x_id($id);\n\n if (isset($anecdota)) {\n $respuesta = array(\n 'error' => FALSE,\n 'mensaje' => 'Registro consultados correctamente.',\n 'data' => $anecdota\n );\n\n $this->response($respuesta);\n } else {\n $respuesta = array(\n 'error' => TRUE,\n 'mensaje' => 'No existen anécdotas todavia!!!',\n 'data' => null\n );\n\n $this->response($respuesta, REST_Controller::HTTP_NOT_FOUND);\n }\n }", "function amo_get($entity, $data = [])\n{\n if (substr($entity, -1) == 's') {\n $return_all = true;\n } else {\n $return_all = false;\n if ($entity == 'company') {\n $entity = 'companies';\n } elseif ($entity != 'account') {\n $entity .= 's';\n }\n }\n\n $link = $entity . '?';\n\n if (is_array($data) && !empty($data)) {\n foreach ($data as $key => $value) {\n if (is_array($value)) {\n foreach ($value as $v) {\n $link .= '&' . $key . '[]=' . $v;\n }\n } else {\n $link .= '&' . $key . '=' . $value;\n }\n\n }\n } elseif (empty($data)) {\n $link .= '';\n } else {\n $link .= 'query=' . $data;\n }\n\n $result = run_curl($link);\n\n if (in_array($entity, ['contacts', 'leads', 'companies', 'tasks', 'catalog_elements'])) {\n $items = $result['_embedded']['items'];\n } else {\n return $result;\n }\n\n if (!empty($items)) {\n $count = count($items);\n\n if ($count == 500) {\n if (!is_array($data)) {\n $data = ['query' => $data];\n }\n\n $data['limit_rows'] = 500;\n $data['limit_offset'] += 500;\n $recieved_items = amo_get($entity, $data);\n\n if (!empty($recieved_items)) {\n foreach ($recieved_items as $item) {\n $items[] = $item;\n }\n }\n }\n\n logw('Найдено ' . $entity . ': ' . count($items));\n if ($return_all) {\n return $items;\n } else {\n return $items[0];\n }\n\n } else {\n logw($entity . ' не найдено');\n return array();\n }\n}", "public function getAllLeadsOfAgent(Request $request){\n try{\n if(!empty($request->agent_id)){\n $data['leads'] = Customer::where('agent_id', $request->agent_id)->get();\n \n if($data['leads']){\n return response()->json([\n 'agent_customers'=>$data,\n 'status' =>'success',\n 'code' =>200,\n ]);\n }else{\n response()->json([\n 'message'=>'Data not found',\n 'status' =>'error',\n ]);\n }\n }else{\n response()->json([\n 'message'=>'Something went wrong with this request.Please Contact your administrator',\n 'status' =>'error',\n ]);\n }\n }catch(\\Exception $e){\n return response()->json([\n 'message'=>\"something went wrong.Please contact administrator.\".$e->getMessage(),\n 'error' =>true,\n ]);\n }\n }", "public function getBannersByDimensions() {\n\n try {\n $result = Banner::getBannersByDimensions($_GET);\n return $result;\n } catch (Exception $e) {\n throw new RestException($e->getCode(), $e->getMessage());\n }\n }", "public function handle()\n {\n $channels = Channel::select('channel_id', 'kind')\n ->where('facebook_campaign_id', '=', '')\n ->Where('adwords_campaign_id', '=', '')\n ->where('tracking_phone', '=', '')\n ->where('kind', '=', 'offline')\n ->orderBy('id', 'desc')\n ->get();\n \n foreach($channels as $channel)\n {\n $leads = Form::where('channel_id', '=', $channel->channel_id)->count();\n\n if($leads > 0)\n {\n $arr = array(\n 'type' => $this->type,\n 'channel_id' => $channel->channel_id,\n 'leads' => $leads\n );\n $val = json_encode($arr);\n \n $url = env(\"ALPHA_API\");\n $url .= \"checking-leads-data\";\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\"); \n \n curl_setopt($ch, CURLOPT_VERBOSE, true);\n \n curl_setopt($ch, CURLOPT_POSTFIELDS, $val);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); \n curl_setopt($ch, CURLOPT_HTTPHEADER, array( \n 'Content-Type: application/json', \n 'Content-Length: ' . strlen($val))\n ); \n $response_json = curl_exec($ch);\n $info = curl_getinfo($ch, CURLINFO_HTTP_CODE); \n curl_close($ch);\n\n $response = json_decode($response_json, true);\n\n $array_leadservice_id = array();\n \n if($response[\"status\"] == \"not equal\")\n { \n\n $forms = Form::select('id', 'channel_id', 'name', 'phone', 'email', 'is_duplicated', 'parent_id_duplicated', 'custom_attributes', 'created_at_forms')\n ->where('channel_id', '=', $channel->channel_id)\n ->whereNotIn('id', $response[\"lead_service_ids\"])\n ->orderBy('id', 'desc')\n ->get();\n\n foreach($forms as $formKey => $form)\n { \n $dt = Carbon::createFromFormat('Y-m-d H:i:s', $form->created_at_forms);\n $dt->setTimezone($this->timezone);\n $submitted_date_time = $dt->format(DateTime::ISO8601); \n\n if($form->is_duplicated == 0)\n {\n $is_duplicated = false;\n }\n else\n {\n $is_duplicated = true;\n }\n\n $param = app()->make('App\\Http\\Controllers\\Api\\LandingPageCallServiceController');\n $param->call_alpha(\n $channel->channel_id, \n $form->name, \n $form->phone, \n $form->email, \n $submitted_date_time, \n Null, \n $form->id, \n $is_duplicated, \n $form->parent_id_duplicated, \n $form->custom_attributes, \n $channel->kind\n );\n \n $array_leadservice_id[$formKey] = $form->id;\n } \n }\n \n $LogUpdateLeads = new LogUpdateLeads;\n $LogUpdateLeads->type = $this->type;\n $LogUpdateLeads->request = $val;\n $LogUpdateLeads->response = $response_json;\n $LogUpdateLeads->status = $response[\"status\"];\n $LogUpdateLeads->leadservice_id_existing = json_encode($response[\"lead_service_ids\"]);\n $LogUpdateLeads->leadservice_id_insert = json_encode($array_leadservice_id);\n $LogUpdateLeads->save();\n }\n }\n \n return response(array(\n 'Status' => 'Success'\n ), '200');\n }", "function geographyEndpoints($media_id) {\n \n \t$geography_endpoints_request_url = sprintf($this->api_urls['geography_endpoints'], $media_id, $this->access_token);\n \t\n \treturn $this->__apiCall($geography_endpoints_request_url);\n \n }", "public function get_all_ads($limit, $offset) {\n $data = $this->db->get('advertisement', $limit, $offset);\n return $data->result();\n // $sql = \"select * from advertisement\";\n // $data = $this->db->query($sql);\n // return $data->result();\n }", "public function anecdota_get() {\n $token = $this->uri->segment(3);\n $calificacionId = $this->uri->segment(4);\n\n $perfil = $this->User_model->revisa_perfil_x_token($token);\n\n if ($perfil == FALSE) {\n $respuesta = array(\n 'error' => true,\n 'mensaje' => 'Usuario no permitido.',\n 'data' => null\n );\n\n $this->response($respuesta, REST_Controller::HTTP_UNAUTHORIZED);\n exit;\n }\n\n $anecdotas = $this->Anecdota_model->anecdota_x_calificacion($calificacionId);\n\n if (isset($anecdotas)) {\n $respuesta = array(\n 'error' => FALSE,\n 'mensaje' => 'Registros consultados correctamente.',\n 'data' => $anecdotas\n );\n\n $this->response($respuesta);\n } else {\n $respuesta = array(\n 'error' => TRUE,\n 'mensaje' => 'No existen anécdotas todavia!!!',\n 'data' => null\n );\n\n $this->response($respuesta, REST_Controller::HTTP_NOT_FOUND);\n }\n \n }", "function rest_get_data($url)\n{\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n curl_close($ch);\n return $result;\n}", "public function getInstagramPosts($instagram_accout_id) {\n $mode = \\Drupal::request()->get('mode');\n // \\Drupal::logger('social media insta')->warning('<pre><code>' . print_r($mode , TRUE) . '</code></pre>');\n if (isset($mode)) {\n // \\Drupal::logger('social media insta')->warning('<pre><code>' . print_r('$markup', TRUE) . '</code></pre>');\n $getData = \\Drupal::request()->get('data');\n $option = \\Drupal::request()->get('option');\n $data['insta_posts'] = $getData;\n $twigFilePath = drupal_get_path('module', 'social_media') . '/templates/instagram/instagram-post.html.twig';\n $template = $this->twig->loadTemplate($twigFilePath);\n $markup = $template->render(array('data' => $data));\n $output = array('response' => array('data' => $markup));\n $json_response = json_encode($output);\n return new JsonResponse($json_response); \n } else {\n $current_uid = isset($_GET['team']) ? $_GET['muid'] : \\Drupal::currentUser()->id();\n $facebookHelper = new FacebookHelperFunction();\n $fb = $facebookHelper->getFBObject();\n $properties = ['token_access', 'id', 'status'];\n $network_properties = $this->getKabbodeNetworkStatusProperty(168, $current_uid, $properties);\n $access_token = $network_properties['token_access'];\n // we need to validate token\n $validToken = $facebookHelper->getFBTokenProperty($access_token, 'is_valid');\n if ($validToken) {\n $access_token_val = $access_token->getValue();\n try {\n // Returns a `FacebookFacebookResponse` object\n $response = $fb->get('/' . $instagram_accout_id . '/media?fields=caption,comments_count,ig_id,media_type,like_count,media_url,username,timestamp,children{media_type,media_url,timestamp},is_comment_enabled,comments.limit(3){like_count,text,username,timestamp,replies.limit(2){timestamp,text,like_count,username}}&limit=2', $access_token_val);\n }\n catch(\\Facebook\\Exceptions\\FacebookResponseException $e) {\n $output = array('error' => array('msg' => $e->getMessage(), 'code' => $e->getCode(), 'type' => 'Graph SDK Exception', 'custom_type' => 'Facebook Error Reported',));\n echo json_encode($output);\n exit;\n }\n catch(\\Facebook\\Exceptions\\FacebookSDKException $e) {\n $output = array('error' => array('msg' => $e->getMessage(), 'code' => $e->getCode(), 'type' => 'Facebook SDK Exception', 'custom_type' => 'Facebook Error Reported',));\n echo json_encode($output);\n exit;\n }\n $insta_posts = $response->getDecodedBody();\n return $insta_posts;\n }\n }\n }", "public function resultCampaigns(Request $request){\n \t $resultCampaign=new campaignMetadata();\n \t $result=$resultCampaign->fetchData($request);//based on request criteria\n \t //call view to display the results.\n }", "public function getAsync(): string;", "public function listAction()\n {\n $this->getHelper('contextSwitch')->addActionContext('list', 'json')->initContext();\n $response = array();\n\n $params = $this->request->getParams();\n if (isset($params['section_id'])) {\n $sectionIds = array((int) $params['section_id']);\n } else {\n $sectionIds = array(6, 7, 8, 9, 10, 11, 25); // @todo config\n }\n\n $listAds = $this->getArticleListAds('newshighlight');\n $sectionRank = 1;\n $articlesInResponse = array();\n $ad = 0;\n\n foreach ($sectionIds as $sectionId) {\n $limit = 3;\n \n if ($sectionId == 6) {\n $limit = 5;\n }\n\n $playlistRepository = $this->_helper->entity->getRepository('Newscoop\\Entity\\Playlist');\n $playlist = $playlistRepository->findOneBy(array('id' => $sectionId));\n if ($playlist) {\n\n $articleArray = $playlistRepository->articles($playlist, null, false, $limit, null, true, $articlesInResponse);\n $rank = 1;\n foreach ($articleArray as $articleItem) {\n // inject newshighlight ad \n if (($sectionRank == 1 && $rank == 3) ||\n ($sectionRank == 3 && $rank == 2) ||\n ($sectionRank == 5 && $rank == 2)) {\n if ((!empty($listAds[$ad])) && ($this->getAdImageUrl($listAds[$ad]))) {\n $this->response[] = array_merge($this->formatArticle($listAds[$ad]), array(\n 'rank' => (int) $rank++,\n 'section_id' => (int) $sectionId,\n 'section_name' => $playlist->getName(),\n 'section_rank' => $sectionRank));\n $ad++;\n }\n }\n\n if (!in_array($articleItem['articleId'], $articlesInResponse)){\n $articles = $this->_helper->service('article')->findBy(array('number' => $articleItem['articleId']));\n $article = $articles[0];\n if (!$article->isPublished()) {\n continue;\n }\n\n // gets the article image in the proper size\n if ($sectionId == 6 && $rank == 1) {\n $normalSize = array(self::IMAGE_TOP_WIDTH, self::IMAGE_TOP_HEIGHT);\n $retinaSize = array(self::IMAGE_TOP_WIDTH * self::IMAGE_RETINA_FACTOR, self::IMAGE_TOP_HEIGHT * self::IMAGE_RETINA_FACTOR);\n $image = $this->getRenditionUrl($article, self::IMAGE_TOP_RENDITION, $normalSize, $retinaSize);\n } else {\n $normalSize = array(self::IMAGE_STANDARD_WIDTH, self::IMAGE_STANDARD_HEIGHT);\n $retinaSize = array(self::IMAGE_STANDARD_WIDTH * self::IMAGE_RETINA_FACTOR, self::IMAGE_STANDARD_HEIGHT * self::IMAGE_RETINA_FACTOR);\n $image = $this->getRenditionUrl($article, self::IMAGE_STANDARD_RENDITION, $normalSize, $retinaSize);\n }\n\n $response = array_merge(parent::formatArticle($article), array(\n 'image_url' => $image,\n 'rank' => $rank++,\n 'section_id' => (int) $sectionId,\n 'section_name' => $playlist->getName(),\n 'section_url' => $this->getSectionUrl($sectionId),\n 'section_rank' => $sectionRank,\n ));\n\n // Hack for WOBS-2783\n if (array_key_exists('dateline', $response) && $article->getType() == 'link') {\n $response['dateline'] = 'Linkempfehlung';\n }\n\n $articlesInResponse[] = (int) $article->getNumber();\n $this->response[] = $response;\n }\n }\n $sectionRank++;\n }\n }\n\n $this->_helper->json($this->response);\n }", "public function getAction($request, $response, $args){\n // /api/experience/{cv_id}/{id}\n $cv_id = $args['cv_id'];\n $experience_id = $args['id'];\n\n //caut in baza de date cv-ul cu id-ul respectiv\n $cvObject = CV::where('pk_id','=',$cv_id)->first();\n\n //verific daca exista cv-ul cu id-ul respectiv;\n if(is_null($cvObject)){\n //obiectul cv este null, deci returnez mesaj de eroare\n return $response->withJson([\n 'message' => \"CV id invalid\",\n 'status' => 400\n ], 400);\n }\n\n //caut in baza de date informatia despre experienta cu id-ul respectiv\n $experienceObject = Experience::where('pk_id','=',$experience_id)->first();\n \n //verific daca experienceObject este null\n if(is_null($experienceObject)){\n //experienceObject este null, deci returnez mesaj de eroare\n return $response->withJson([\n 'message' => \"Experience id invalid\",\n 'status' => 400\n ], 400);\n }\n\n //returnez cu success obiectul cerut\n return $response->withJson($experienceObject, 200);\n }", "function posts_get()\n{\n try {\n $args = array(\n 'numberposts' => 100\n );\n\n $posts = get_posts($args);\n $body = array();\n\n foreach ($posts as $post) {\n $new_post[\"id\"] = $post->ID;\n $new_post[\"title\"] = $post->post_title;\n $new_post[\"extract\"] = generate_extract($post->post_content, 35);\n $new_post[\"date\"] = $post->post_date;\n $new_post[\"categories\"] = get_post_categories($post->ID);\n $new_post[\"author\"] = get_the_author_meta(\"display_name\", $post->post_author);\n $new_post[\"thumbnailLink\"] = get_the_post_thumbnail_url($post->ID);\n\n array_push($body, $new_post);\n }\n $resp = new WP_REST_Response($body);\n $resp->set_status(200);\n $resp->header('Content-type', 'application/json');\n return $resp;\n } catch (Exception $e) {\n $resp = new WP_REST_Response(generate_error_body($e));\n $resp->set_status(500);\n $resp->header('Content-type', 'application/json');\n return $resp;\n }\n}", "function njnp_json_expenses_callback( $request ) {\n $posts_data = array();\n // Receive and set the page parameter from the $request for pagination purposes\n $paged = $request->get_param( 'page' );\n $paged = ( isset( $paged ) || ! ( empty( $paged ) ) ) ? $paged : 1; \n // Get the posts using the 'post' and 'news' post types\n $posts = get_posts( array(\n 'paged' => $paged,\n 'posts_per_page' => 40, \n 'post_type' => array( 'expenses' ) // This is the line that allows to fetch multiple post types. \n )\n ); \n // Loop through the posts and push the desired data to the array we've initialized earlier in the form of an object\n \n \n //set expense default fields\n $category_selected_option='';\n$category_label='';\n$amount='';\n$receipts='';\n$vendor='';\n$notes='';\n$expense_status='';\n$receipt_date='';\n$approver='';\n$approver_name='';\n \n \n \n foreach( $posts as $post ) {\n $id = $post->ID; \n $category_selected_option = get_field('category', $post->ID);\n $category_label = $category_selected_option['label'];\n $amount = get_field( 'amount', $post->ID ); \n if (empty($amount)) {$amount=0;}\n $receipts = get_field( 'receipts', $post->ID ); \n \n if (empty($receipts)) {$receipts='missing';}\n$vendor = get_field( 'vendor', $post->ID ); \n$notes = get_field( 'notes' , $post->ID); \n$expense_status = get_field( 'expense_status' , $post->ID); \n if (empty($expense_status)) {$expense_status='Error - incomplete information';}\n$receipt_date = get_field( 'receipt_date' , $post->ID); \n$approver = get_field( 'approver' , $post->ID); \nif ( $approver ) : \n\t$expense_approver_user_data = get_userdata( $approver ); \n\tif ( $expense_approver_user_data ) : \n\t\t$approver_name= esc_html( $expense_approver_user_data->display_name ); \n\tendif; \nendif; \n $author_ID= get_userdata( $post->post_author ); \n $author_name= esc_html( $author_ID->display_name ); \n if (empty($vendor)) {$vender ='Not provided';} else {$vendor = $vendor;} \n $posts_data[] = (object) array( \n 'id' => $id, \n 'link' => \"<a href='https://njnpcommunity.org/expenses/\".$post->post_name.\"'>\".$post->post_title.\"</a>\",\n 'expense_status' => $expense_status,\n 'category' => $category_label,\n 'receipts' => \"<a href='\".$receipts.\"' target='_blank'><img class='thumbnail' style='width:auto; height:60px;' src='\".$receipts.\"'/></a>\",\n 'amount' => $amount,\n 'vendor' => $vendor,\n 'receipt_date' => $receipt_date,\n 'notes' => $notes,\n 'approver_name' => $approver_name\n );\n } \n return $posts_data; \n}", "function get(){\n global $wpdb;\n global $DOPBSP;\n \n $calendars_ids = array();\n $query = array();\n $values = array();\n $api = isset($_GET['dopbsp_api']) && $_GET['dopbsp_api'] == 'true' ? true:false;\n \n if (!$api){\n $type = $_POST['type'];\n $calendar_id = $_POST['calendar_id'];\n $start_date = $_POST['start_date'];\n $end_date = $_POST['end_date'];\n $start_hour = $_POST['start_hour'];\n $end_hour = $_POST['end_hour'];\n $status_pending = $_POST['status_pending'] == 'true' ? true:false;\n $status_approved = $_POST['status_approved'] == 'true' ? true:false;\n $status_rejected = $_POST['status_rejected'] == 'true' ? true:false;\n $status_canceled = $_POST['status_canceled'] == 'true' ? true:false;\n $status_expired = $_POST['status_expired'] == 'true' ? true:false;\n $payment_methods = $_POST['payment_methods'] == '' ? array():explode(',', $_POST['payment_methods']);\n $search = $_POST['search'];\n $page = $_POST['page'];\n $per_page = $_POST['per_page'];\n $order = $_POST['order'];\n $order_by = $_POST['order_by'];\n }\n else{\n $type = isset($_GET['type']) ? $_GET['type']:'';\n \n if (isset($_GET['calendar_id'])\n && $_GET['calendar_id'] != ''){\n $calendars_requested = ','.$_GET['calendar_id'].',';\n }\n else{\n $calendars_requested = '';\n }\n \n if($type != 'ics') {\n $calendars_id = array();\n $key_pieces = explode('-', $_POST['key']);\n $calendars = $DOPBSP->classes->backend_calendars->get(array('user_id' => (int)$key_pieces[1]));\n\n foreach ($calendars as $calendar){\n if ($calendars_requested != ''){\n if (strpos($calendars_requested, ','.(string)$calendar->id.',') !== false){\n array_push($calendars_id, $calendar->id);\n }\n }\n else{\n array_push($calendars_id, $calendar->id);\n }\n }\n \n $calendar_id = implode(',', $calendars_id);\n } else {\n $calendar_id = $_GET['calendar_id'];\n }\n $start_date = isset($_GET['start_date']) ? $_GET['start_date']:'';\n $end_date = isset($_GET['end_date']) ? $_GET['end_date']:'';\n $start_hour = isset($_GET['start_hour']) ? $_GET['start_hour']:'00:00';\n $end_hour = isset($_GET['end_hour']) ? $_GET['end_hour']:'24:00';\n $status = isset($_GET['status']) ? $_GET['status']:'';\n $status_pending = strpos($status,'pending') !== false ? true:false;\n $status_approved = strpos($status,'approved') !== false ? true:false;\n $status_rejected = strpos($status,'rejected') !== false ? true:false;\n $status_canceled = strpos($status,'canceled') !== false ? true:false;\n $status_expired = strpos($status,'expired') !== false ? true:false;\n $payment_methods = isset($_GET['payment_methods']) && $_GET['payment_methods'] != '' ? explode(',', $_GET['payment_methods']):array();\n $search = isset($_GET['search']) ? $_GET['search']:'';\n $page = isset($_GET['page']) ? $_GET['page']:'1';\n $per_page = isset($_GET['per_page']) ? $_GET['per_page']:'10';\n $order = isset($_GET['order']) ? $_GET['order']:'ASC';\n $order_by = isset($_GET['order_by']) ? $_GET['order_by']:'check_in';\n \n if(strtolower($type) == 'ics') {\n $per_page = 1000000;\n }\n }\n \n /*\n * Calendars query.\n */\n if (strpos($calendar_id, ',') !== false){\n $calendars_ids = explode(',', $calendar_id);\n array_push($query, 'SELECT * FROM '.$DOPBSP->tables->reservations.' WHERE (calendar_id=%d');\n array_push($values, $calendars_ids[0]);\n \n for ($i=1; $i<count($calendars_ids); $i++){\n array_push($query, ' OR calendar_id=%d');\n array_push($values, $calendars_ids[$i]);\n }\n array_push($query, ')');\n }\n else{\n array_push($query, 'SELECT * FROM '.$DOPBSP->tables->reservations.' WHERE calendar_id=%d');\n array_push($values, $calendar_id);\n }\n \n\n /*\n * Days query.\n */\n if ($start_date != ''){\n if ($end_date != ''){\n array_push($query, ' AND (check_in >= %s AND check_in <= %s');\n array_push($values, $start_date);\n array_push($values, $end_date);\n \n array_push($query, ' OR check_out >= %s AND check_out <= %s AND check_out <> \"\")');\n array_push($values, $start_date);\n array_push($values, $end_date);\n }\n else{\n array_push($query, ' AND (check_in >= %s)');\n array_push($values, $start_date);\n }\n }\n elseif ($end_date != ''){\n array_push($query, ' AND check_in <= %s');\n array_push($values, $end_date);\n }\n \n /*\n * Source for sync\n */\n// if($type == 'ics') {\n array_push($query, ' AND reservation_from = %s');\n array_push($values, 'pinpoint');\n// }\n \n /*\n * Hours query.\n */\n array_push($query, ' AND (start_hour >= %s AND start_hour <= %s OR start_hour = \"\"');\n array_push($values, $start_hour);\n array_push($values, $end_hour);\n \n array_push($query, ' OR end_hour >= %s AND end_hour <= %s OR end_hour = \"\")');\n array_push($values, $start_hour);\n array_push($values, $end_hour);\n\n /*\n * Status query.\n */\n array_push($query, ' AND status = %s');\n array_push($values, 'approved');\n $status_init = true;\n \n\n /*\n * Payment query. \n */\n if (count($payment_methods) > 0){\n $payment_init = false;\n\n for ($i=0; $i < count($payment_methods); $i++){\n array_push($query, $payment_init ? ' OR payment_method=%s':' AND (payment_method=%s');\n array_push($values, $payment_methods[$i]);\n $payment_init = true;\n } \n array_push($query, ')'); \n }\n\n /*\n * Search query.\n */\n if ($search != ''){\n array_push($query, ' AND (id=%s OR transaction_id=%s OR form LIKE %s)');\n array_push($values, $search);\n array_push($values, $search);\n array_push($values, '%'.$search.'%');\n }\n \n /*\n * Exclude reservations with incomplete payment.\n */\n array_push($query, ' AND (token=\"\" OR (token<>\"\" AND (payment_method=\"none\" OR payment_method=\"default\")))');\n \n \n /*\n * Order query.\n */\n $order_value = $order == 'DESC' ? 'DESC':'ASC';\n \n switch ($order_by){\n case 'check_out':\n $order_by_value = 'check_out';\n break;\n case 'start_hour':\n $order_by_value = 'start_hour';\n break;\n case 'end_hour':\n $order_by_value = 'end_hour';\n break;\n case 'id':\n $order_by_value = 'id';\n break;\n case 'status':\n $order_by_value = 'status';\n break;\n case 'date_created':\n $order_by_value = 'date_created';\n break;\n default:\n $order_by_value = 'check_in';\n }\n \n array_push($query, ' ORDER BY '.$order_by_value.' '.($order_value));\n\n /*\n * ************************************************************* Get number of reservations.\n */\n if (!$api){\n $reservations_total = $wpdb->get_var($wpdb->prepare(str_replace('*', 'COUNT(*)', implode('', $query)), $values));\n }\n else{\n $reservations_total = 0;\n }\n\n /*\n * Pagination query.\n */\n array_push($query, ' LIMIT %d, %d');\n array_push($values, (($page-1)*$per_page));\n array_push($values, $per_page);\n \n /*\n * ************************************************************* Get reservations.\n */\n $reservations = $wpdb->get_results($wpdb->prepare(implode('', $query), $values));\n \n $csvReservations = array();\n $csvReservationHeader = array('ID', 'Calendar ID', 'Calendar Name', 'Check In', 'Check Out', 'Start Hour');\n $excelReservations = array();\n $excelReservationsData = array();\n $jsonReservationsData = array();\n $icsReservationsData = array();\n \n \n // ICS\n if(strtolower($type) == 'ics') {\n array_push($icsReservationsData, 'BEGIN:VCALENDAR');\n array_push($icsReservationsData, 'PRODID:-//Pinpoint.world//2.6.6//EN');\n array_push($icsReservationsData, 'CALSCALE:GREGORIAN');\n array_push($icsReservationsData, 'METHOD:PUBLISH');\n array_push($icsReservationsData, 'VERSION:2.0');\n \n// array_push($icsReservationsData, 'BEGIN:VTIMEZONE');\n \n \n// foreach($reservations as $reservation) {\n// /*\n// * Settings\n// */\n// $settings_calendar = $DOPBSP->classes->backend_settings->values($reservation->calendar_id, \n// 'calendar');\n// }\n \n array_push($icsReservationsData, 'X-WR-TIMEZONE:UTC');\n// array_push($icsReservationsData, 'BEGIN:STANDARD');\n// array_push($icsReservationsData, 'TZOFFSETFROM:+0200');\n// array_push($icsReservationsData, 'TZOFFSETTO:+0100');\n// array_push($icsReservationsData, 'END:STANDARD');\n// array_push($icsReservationsData, 'BEGIN:DAYLIGHT');\n// array_push($icsReservationsData, 'TZOFFSETFROM:+0100');\n// array_push($icsReservationsData, 'TZOFFSETTO:+0200');\n// array_push($icsReservationsData, 'END:DAYLIGHT');\n// array_push($icsReservationsData, 'END:VTIMEZONE');\n \n $timestamp = gmdate(\"Ymd\\THis\\Z\");\n \n foreach($reservations as $reservation) {\n \n \n $calendar = $wpdb->get_row($wpdb->prepare('SELECT * FROM '.$DOPBSP->tables->calendars.' WHERE id=%d',\n $reservation->calendar_id));\n /*\n * Settings\n */\n $settings_calendar = $DOPBSP->classes->backend_settings->values($reservation->calendar_id, \n 'calendar');\n \n // ICS\n array_push($icsReservationsData, 'BEGIN:VEVENT');\n array_push($icsReservationsData, 'UID:'.$reservation->uid);\n array_push($icsReservationsData, 'SUMMARY:['.$reservation->status.']'.' '.$calendar->name.' (R#'.$reservation->id.')');\n array_push($icsReservationsData, 'DTSTAMP:'.$timestamp);\n \n if($reservation->start_hour != '') {\n $reservation->check_out = $reservation->check_in;\n \n if($settings_calendar->timezone != '') {\n \n $dateTimeZone = new DateTimeZone($settings_calendar->timezone);\n \n // set hours to google timezone\n $start_hour_data = new DateTime($reservation->check_in.' '.$reservation->start_hour, $dateTimeZone);\n $start_hour_data->setTimeZone(new DateTimeZone('UTC'));\n $reservation->start_hour = $start_hour_data->format('H:i');\n $reservation->check_in = $start_hour_data->format('Y-m-d');\n \n if($settings_calendar->hours_interval_enabled == 'true'){\n $end_hour_data = new DateTime($reservation->check_out.' '.$reservation->end_hour, $dateTimeZone);\n $end_hour_data->setTimeZone(new DateTimeZone('UTC'));\n $reservation->end_hour = $end_hour_data->format('H:i');\n $reservation->check_out = $end_hour_data->format('Y-m-d');\n } else {\n $end_hour_data = new DateTime($reservation->check_out.' '.$reservation->end_hour, $dateTimeZone);\n $end_hour_data->setTimeZone(new DateTimeZone('UTC'));\n $end_hour_h = $end_hour_data->format('H').':'.$end_hour_data->format('i');\n\n $reservation->end_hour = $end_hour_h;\n $reservation->check_out = $end_hour_data->format('Y-m-d');\n }\n }\n array_push($icsReservationsData, 'DTSTART:'.str_replace('-','', $reservation->check_in).'T'.str_replace(':','',$reservation->start_hour).'00Z');\n } else {\n array_push($icsReservationsData, 'DTSTART;VALUE=DATE:'.str_replace('-','', $reservation->check_in));\n }\n \n if($reservation->end_hour != '') {\n array_push($icsReservationsData, 'DTEND:'.str_replace('-','', $reservation->check_out).'T'.str_replace(':','',$reservation->end_hour).'00Z');\n } else {\n \n if ($settings_calendar->days_morning_check_out == 'false'){\n // check_out + 1 day\n $check_out = new DateTime($reservation->check_out.' 00:00:00');\n $check_out->modify('+1 day');\n $reservation->check_out = $check_out->format('Y-m-d');\n }\n array_push($icsReservationsData, 'DTEND;VALUE=DATE:'.str_replace('-','', $reservation->check_out));\n }\n \n // \n $description = $this->getSyncDescription('|FORM|',\n $reservation);\n \n array_push($icsReservationsData, 'DESCRIPTION:'.substr($description, 0, 60));\n array_push($icsReservationsData, 'END:VEVENT');\n }\n \n array_push($icsReservationsData, 'END:VCALENDAR');\n \n echo implode(PHP_EOL, $icsReservationsData);\n exit;\n }\n\n foreach($reservations as $reservation) {\n $csvReservation = array();\n $reservations_form = json_decode($reservation->form);\n $reservation = (array)$reservation;\n \n $calendar = $wpdb->get_row($wpdb->prepare('SELECT * FROM '.$DOPBSP->tables->calendars.' WHERE id=%d',\n $reservation['calendar_id']));\n\n array_push($excelReservationsData, '<tr>');\n array_push($csvReservation, $reservation['id']);\n array_push($excelReservationsData, '<td>'.$reservation['id'].'</td>');\n\n if (!array_key_exists('id', $jsonReservationsData)) {\n $jsonReservationsData['id'] = array();\n }\n array_push($jsonReservationsData['id'], $reservation['id']);\n\n array_push($csvReservation, $reservation['calendar_id']);\n array_push($excelReservationsData, '<td>'.$reservation['calendar_id'].'</td>');\n\n array_push($csvReservation, $calendar->name);\n array_push($excelReservationsData, '<td>'.$calendar->name.'</td>');\n\n if (!array_key_exists('calendar_id', $jsonReservationsData)) {\n $jsonReservationsData['calendar_id'] = array();\n }\n array_push($jsonReservationsData['calendar_id'], $reservation['calendar_id']);\n\n array_push($csvReservation, $reservation['check_in']);\n array_push($excelReservationsData, '<td>'.$reservation['check_in'].'</td>');\n\n if (!array_key_exists('check_in', $jsonReservationsData)) {\n $jsonReservationsData['check_in'] = array();\n }\n array_push($jsonReservationsData['check_in'], $reservation['check_in']);\n \n if($reservation['check_out'] == '') {\n $reservation['check_out'] = ' ';\n }\n \n if($reservation['check_out'] == '') {\n unset($csvReservationHeader[3]);\n } else {\n array_push($csvReservation, $reservation['check_out']);\n array_push($excelReservationsData, '<td>'.$reservation['check_out'].'</td>');\n\n if (!array_key_exists('check_out', $jsonReservationsData)) {\n $jsonReservationsData['check_out'] = array();\n }\n array_push($jsonReservationsData['check_out'], $reservation['check_out']);\n }\n \n if($reservation['start_hour'] == '') {\n $reservation['start_hour'] = ' ';\n }\n\n if($reservation['start_hour'] == '') {\n\n if($reservation['check_out'] == '') {\n unset($csvReservationHeader[3]);\n } else {\n unset($csvReservationHeader[4]);\n }\n } else {\n array_push($csvReservation, $reservation['start_hour']);\n array_push($excelReservationsData, '<td>'.$reservation['start_hour'].'</td>');\n\n if (!array_key_exists('start_hour', $jsonReservationsData)) {\n $jsonReservationsData['start_hour'] = array();\n }\n array_push($jsonReservationsData['start_hour'], $reservation['start_hour']);\n }\n \n if($reservation['end_hour'] == '') {\n $reservation['end_hour'] = ' ';\n }\n\n// if($reservation['end_hour'] != '') {\n array_push($csvReservation, $reservation['end_hour']);\n array_push($excelReservationsData, '<td>'.$reservation['end_hour'].'</td>');\n\n if (!array_key_exists('end_hour', $jsonReservationsData)) {\n $jsonReservationsData['end_hour'] = array();\n array_push($csvReservationHeader, 'End hour');\n }\n array_push($jsonReservationsData['end_hour'], $reservation['end_hour']);\n// }\n\n if($reservation['price'] != 0) {\n array_push($csvReservation, $reservation['price']);\n array_push($excelReservationsData, '<td>'.$reservation['price'].'</td>');\n\n if (!array_key_exists('price', $jsonReservationsData)) {\n $jsonReservationsData['price'] = array();\n array_push($csvReservationHeader, 'Price');\n }\n array_push($jsonReservationsData['price'], $reservation['price']);\n }\n else{\n array_push($csvReservation, '0');\n array_push($excelReservationsData, '<td>0</td>');\n\n if (!array_key_exists('price', $jsonReservationsData)) {\n $jsonReservationsData['price'] = array();\n array_push($csvReservationHeader, 'Price');\n }\n }\n\n if($reservation['extras_price'] != 0) {\n array_push($csvReservation, $reservation['extras_price']);\n array_push($excelReservationsData, '<td>'.$reservation['extras_price'].'</td>');\n\n if (!array_key_exists('extras_price', $jsonReservationsData)) {\n $jsonReservationsData['extras_price'] = array();\n array_push($csvReservationHeader, 'Extras price');\n }\n array_push($jsonReservationsData['extras_price'], $reservation['extras_price']);\n }\n else{\n array_push($csvReservation, '0');\n array_push($excelReservationsData, '<td>0</td>');\n\n if (!array_key_exists('extras_price', $jsonReservationsData)) {\n $jsonReservationsData['extras_price'] = array();\n array_push($csvReservationHeader, 'Extras price');\n }\n }\n\n if($reservation['fees_price'] != 0) {\n array_push($csvReservation, $reservation['fees_price']);\n array_push($excelReservationsData, '<td>'.$reservation['fees_price'].'</td>');\n\n if (!array_key_exists('fees_price', $jsonReservationsData)) {\n $jsonReservationsData['fees_price'] = array();\n array_push($csvReservationHeader, 'Fees price');\n }\n array_push($jsonReservationsData['fees_price'], $reservation['fees_price']);\n }\n else{\n array_push($csvReservation, '0');\n array_push($excelReservationsData, '<td>0</td>');\n\n if (!array_key_exists('fees_price', $jsonReservationsData)) {\n $jsonReservationsData['fees_price'] = array();\n array_push($csvReservationHeader, 'Fees price');\n }\n }\n\n if($reservation['coupon_price'] != 0) {\n array_push($csvReservation, $reservation['coupon_price']);\n array_push($excelReservationsData, '<td>'.$reservation['coupon_price'].'</td>');\n\n if (!array_key_exists('coupon_price', $jsonReservationsData)) {\n $jsonReservationsData['coupon_price'] = array();\n array_push($csvReservationHeader, 'Coupon price');\n }\n array_push($jsonReservationsData['coupon_price'], $reservation['coupon_price']);\n }\n else{\n array_push($csvReservation, '0');\n array_push($excelReservationsData, '<td>0</td>');\n\n if (!array_key_exists('coupon_price', $jsonReservationsData)) {\n $jsonReservationsData['coupon_price'] = array();\n array_push($csvReservationHeader, 'Coupon price');\n }\n }\n\n if($reservation['deposit_price'] != 0) {\n array_push($csvReservation, $reservation['deposit_price']);\n array_push($excelReservationsData, '<td>'.$reservation['deposit_price'].'</td>');\n\n if (!array_key_exists('deposit_price', $jsonReservationsData)) {\n $jsonReservationsData['deposit_price'] = array();\n array_push($csvReservationHeader, 'Deposit price');\n }\n array_push($jsonReservationsData['deposit_price'], $reservation['deposit_price']);\n }\n else{\n array_push($csvReservation, '0');\n array_push($excelReservationsData, '<td>0</td>');\n\n if (!array_key_exists('deposit_price', $jsonReservationsData)) {\n $jsonReservationsData['deposit_price'] = array();\n array_push($csvReservationHeader, 'Deposit price');\n }\n }\n \n array_push($csvReservation, $reservation['price_total']);\n array_push($excelReservationsData, '<td>'.$reservation['price_total'].'</td>');\n\n if (!array_key_exists('price_total', $jsonReservationsData)) {\n $jsonReservationsData['price_total'] = array();\n array_push($csvReservationHeader, 'Total price');\n }\n array_push($jsonReservationsData['price_total'], $reservation['price_total']);\n array_push($csvReservation, $reservation['currency_code']);\n array_push($excelReservationsData, '<td>'.$reservation['currency_code'].'</td>');\n\n if (!array_key_exists('currency_code', $jsonReservationsData)) {\n $jsonReservationsData['currency_code'] = array();\n array_push($csvReservationHeader, 'Currency');\n }\n array_push($jsonReservationsData['currency_code'], $reservation['currency_code']);\n\n if($reservation['no_items'] != 0) {\n array_push($csvReservation, $reservation['no_items']);\n array_push($excelReservationsData, '<td>'.$reservation['no_items'].'</td>');\n\n if (!array_key_exists('no_items', $jsonReservationsData)) {\n $jsonReservationsData['no_items'] = array();\n array_push($csvReservationHeader, 'No. Items');\n }\n array_push($jsonReservationsData['no_items'], $reservation['no_items']);\n }\n else{\n array_push($csvReservation,'0');\n array_push($excelReservationsData, '<td>0</td>');\n\n if (!array_key_exists('no_items', $jsonReservationsData)) {\n $jsonReservationsData['no_items'] = array();\n array_push($csvReservationHeader, 'No. Items');\n }\n }\n \n // IP Address\n // if(isset($reservation['ip']) && $reservation['ip'] != '') {\n \n if (!array_key_exists('ip', $jsonReservationsData)) {\n $jsonReservationsData['ip'] = array();\n array_push($csvReservationHeader, 'IP address');\n }\n array_push($excelReservationsData, '<td>'.$reservation['ip'].'</td>');\n // }\n \n foreach($reservations_form as $key => $data) {\n\n if(!in_array($data->translation, $csvReservationHeader)) {\n array_push($csvReservationHeader, $data->translation);\n }\n array_push($csvReservation, $data->value);\n array_push($excelReservationsData, '<td>'.$data->value.'</td>');\n\n if (!array_key_exists(str_replace(\" \",\"\",strtolower($data->translation)), $jsonReservationsData)) {\n $jsonReservationsData[str_replace(\" \",\"\",strtolower($data->translation))] = array();\n }\n array_push($jsonReservationsData[str_replace(\" \",\"\",strtolower($data->translation))], $data->value);\n }\n array_push($csvReservations, implode(',', $csvReservation));\n array_push($excelReservationsData, '</tr>');\n }\n\n array_push($excelReservations, '<table>');\n array_push($excelReservations, ' <tr>');\n\n foreach($csvReservationHeader as $headerName) {\n array_push($excelReservations, ' <td>'.$headerName.'</td>');\n }\n array_push($excelReservations, ' </tr>');\n array_push($excelReservations, implode('', $excelReservationsData));\n\n array_push($excelReservations, '</table>');\n\n array_unshift($csvReservations, implode(',', $csvReservationHeader));\n \n if(strtolower($type) == 'csv') {\n echo implode('\\r\\n', $csvReservations);\n } else if(strtolower($type) == 'json') {\n echo json_encode($jsonReservationsData); \n } else {\n echo implode('', $excelReservations);\n }\n \n exit;\n }", "function portal_client()\n {\n // try{\n if (isset($_REQUEST['AuthToken'])) {\n $AuthToken = $_REQUEST['AuthToken'];\n } else {\n $AuthToken = '';\n }\n if (!Master::check_master_token($AuthToken)) {\n return response([\n 'message' => \"Token Expired\",\n 'status' => 'TokenExpired'\n ], 400);\n }\n\n $offset = ($_GET['page'] - 1) * $_GET['per_page'];\n $sort_field = (isset($_GET['sort_field'])) ? $_GET['sort_field'] : \"id\";\n $sort_order = (isset($_GET['sort_order'])) ? $_GET['sort_order'] : \"desc\";\n\n $data = array();\n $data_count = 0;\n\n if (Schema::hasTable('zc_contacts')) {\n $sql = DB::table('zc_contacts')->where('Portal_Status', 'Active');\n //search conditions\n if (isset($_GET['search']) && ($_GET['search'] != \"\")) {\n $q = $_GET['search'];\n $sql->where(function ($query) use ($q) {\n $query->where('module_id', 'LIKE', '%' . $q . '%')\n ->orWhere('Account_Name', 'LIKE', '%' . $q . '%')\n ->orWhere('Full_Name', 'LIKE', '%' . $q . '%')\n ->orWhere('Email', 'LIKE', '%' . $q . '%');\n });\n }\n $data = $sql->offset($offset)->limit($_GET['per_page'])->orderBy($sort_field, $sort_order)->get();\n\n $newdata = array();\n foreach ($data as $key => $value) {\n $single_row_data = array();\n\n $layout_role_name = DB::table('users')->where('contact_id', $value->module_id)->first();\n\n $single_row_data = array(\n \"module_id\" => $value->module_id,\n \"Full_Name\" => $value->Full_Name,\n \"Account_Name\" => $value->Account_Name,\n \"Email\" => $value->Email,\n \"Phone\" => $value->Phone,\n \"portal_layout_role_name\" => isset($layout_role_name->id) ? $layout_role_name->portal_layout_role_name : '',\n \"portal_layout_role\" => isset($layout_role_name->id) ? $layout_role_name->portal_layout_role : '',\n\n );\n\n $newdata[] = $single_row_data;\n }\n\n //count of total tasks\n $csql = DB::table('zc_contacts')->where('Portal_Status', 'Active');\n //search conditions for count\n if (isset($_GET['search']) && ($_GET['search'] != \"\")) {\n $q = $_GET['search'];\n $csql->where(function ($query) use ($q) {\n $query->where('module_id', 'LIKE', '%' . $q . '%')\n ->orWhere('Account_Name', 'LIKE', '%' . $q . '%')\n ->orWhere('Full_Name', 'LIKE', '%' . $q . '%')\n ->orWhere('Email', 'LIKE', '%' . $q . '%');\n });\n }\n $data_count = $csql->count();\n }\n\n //response\n return response([\n 'message' => \"\",\n 'pgData' => $newdata,\n 'totalRows' => $data_count,\n ], 200);\n\n // }catch(Exception $e){\n // return response([\n // 'message' => $e->getMessage()\n // ], 400);\n // }\n }", "public function index(Request $request)\n {\n\n \n //SEARCH QUERIES\n $searchquery_date = $request->input('date');\n $searchquery_title = $request->input('title');\n $searchquery_orderBy = $request->input('order-by'); //default order by ascending\n\n\n //overide order by if filter is set\n if (empty($searchquery_orderBy) || !$searchquery_orderBy) {\n $searchquery_orderBy = 'ASC';\n }\n\n //The datepicker's month starts from index zero instead of one\n if(!empty($searchquery_date) && $searchquery_date){\n $time = strtotime($searchquery_date);\n $searchquery_date = date(\"Y-m-d\", strtotime(\"+1 month\", $time));\n }\n\n $advertisements = Advertisement::orderBy('id', $searchquery_orderBy)\n ->where([\n ['visible', '=', 'Y'],\n ['user_id', '=', Auth::user()->id],\n ['title', 'LIKE', \"%{$searchquery_title}%\"]\n ])\n ->paginate(15)->toArray();\n\n $advertisements['links'] = HelperController::paginator($advertisements);\n\n $results = [];\n foreach ($advertisements['data'] as $ad) {\n\n //APPLY SEARCH FILTERS:: DATE\n if (!empty($searchquery_date) && $searchquery_date) {\n if($searchquery_date !== date('Y-m-d', (strtotime($ad['created_at'])))) continue;\n\n\n }\n\n $results[] = [\n \"title\" => $ad[\"title\"],\n \"description\" => $ad[\"description\"],\n \"photo_1\" => $ad[\"photo_1\"] ? asset('storage' . $ad[\"photo_1\"]) : null,\n \"photo_2\" => $ad[\"photo_2\"] ? asset('storage' . $ad[\"photo_2\"]) : null,\n \"photo_3\" => $ad[\"photo_3\"] ? asset('storage' . $ad[\"photo_3\"]) : null,\n \"uuid\" => $ad[\"uuid\"],\n ];\n }\n\n\n $data = [\n 'ads' => $results,\n 'advertisements' => $advertisements,\n 'query' => [\n 'date' => $searchquery_date,\n 'title' => $searchquery_title,\n 'orderBy' => $searchquery_orderBy,\n ]\n ];\n\n\n\n return view('advertisement-index', ['data' => $data]);\n }", "public function getCampaignActivityIntegrations($params)\n\t{\n\t\t$response = array();\n\t\t$company_id = !empty($params['companyId']) ? $params['companyId'] : (!empty($params['companyid']) ? $params['companyid'] : '');\n\t\t$campaign_ids = !empty($params['campaignId']) ? $params['campaignId'] : (!empty($params['campaignid']) ? $params['campaignid'] : '');\n\t\t//$start_date = $params['startDate'];\n\t\t$start_date = !empty($params['startDate']) ? $params['startDate'] : (!empty($params['startdate']) ? $params['startdate'] :'');\n\t\t//$end_date = $params['endDate'];\n\t\t$end_date = !empty($params['endDate']) ? $params['endDate'] : (!empty($params['enddate']) ? $params['enddate'] :'');\n\t\t//$interval = !empty($params['timeIntervalSeconds']) ? $params['timeIntervalSeconds'] : 3600;\n\t\t$interval = !empty($params['timeIntervalSeconds']) ? $params['timeIntervalSeconds'] : (!empty($params['timeintervalseconds']) ? $params['timeintervalseconds'] : 3600 );\n\t\t//$in_the_last = !empty($params['inTheLast']) ? $params['inTheLast'] : 0;\n\t\t$in_the_last = !empty($params['inTheLast']) ? $params['inTheLast'] : (!empty($params['inthelast']) ? $params['inthelast'] :0 );\n\t\t$time_zone = !empty($params['timezone']) ? $params['timezone'] : '-0500';\n\t\t//$activity_type = !empty($params['activityType']) ? $params['activityType'] : 'all';\n\t\t$activity_type = !empty($params['activityType']) ? $params['activityType'] : (!empty($params['activitytype']) ? $params['activitytype'] :'all');\n\t\t$source = !empty($params['source']) ? $params['source'] : 'all';\n\t\t\n\t\t$integration_type = !empty($params['integrationType']) ? $params['integrationType'] : (!empty($params['integrationtype']) ? $params['integrationtype'] : 'et');\n\t\t\n\t\tif(empty($company_id))\n\t\t{\n\t\t\t$errors[] = array(\n\t\t\t\t'message' => \"Invalid or Empty value provided for parameter 'companyId'\",\n\t\t\t\t'code' => 'InvalidParamErr'\n\t\t\t);\n\t\t}\n\t\t\n\t\t$str_date_sub_start = \"\";\n\t\t$str_date_sub_end = \"\";\n\t\t$str_time_zone = 'UTC';\n\t\tswitch($time_zone)\n\t\t{\n\t\t\tcase '-0500':\n\t\t\t\t$str_date_sub_start = \"date_sub(\";\n\t\t\t\t$str_date_sub_end = \", interval 5 hour)\";\n\t\t\t\t$str_time_zone = 'EST';\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t//\t1.\tCalculating Interval specific variables\n\t\tswitch($interval)\n\t\t{\n\t\t\tcase 60:\t//\tMinute\n\t\t\t\t$mysql_date_format = \"%m/%d/%Y\\T%H:%i:00$time_zone\";\n\t\t\t\t$php_date_format = \"m/d/Y\\TH:i:00$time_zone\";\n\t\t\t\t$interval_type = 'minute';\n\t\t\t\tbreak;\n\t\n\t\t\tcase 3600:\t//\tHour\n\t\t\t\t$mysql_date_format = \"%m/%d/%Y\\T%H:00:00$time_zone\";\n\t\t\t\t$php_date_format = \"m/d/Y\\TH:00:00$time_zone\";\n\t\t\t\t$interval_type = 'hour';\n\t\t\t\tbreak;\n\t\n\t\t\tcase 86400:\t//\tDay\n\t\t\t\t// $mysql_date_format = '%m/%d/%Y';\n\t\t\t\t// $php_date_format = 'm/d/Y';\n\t\t\t\t$mysql_date_format = \"%m/%d/%Y\\T00:00:00$time_zone\";\n\t\t\t\t$php_date_format = \"m/d/Y\\T00:00:00$time_zone\";\n\t\t\t\t$interval_type = 'day';\n\t\t\t\tbreak;\n\t\t}\n\t\tif(!empty($in_the_last))\n\t\t{\n\t\t\t$sql = \"select \" . $str_date_sub_start . \"now()\" . $str_date_sub_end . \" as end_date, date_sub(\" . $str_date_sub_start . \"now()\" . $str_date_sub_end . \", interval $in_the_last $interval_type) as start_date\";\n\t\t\t// error_log(\"sql for finding start date and end date: \" . $sql);\n\t\t\t$row = BasicDataObject::getDataRow($sql);\n\t\t\t$start_date = $row['start_date'];\n\t\t\t$end_date = $row['end_date'];\n\t\t}\n\t\t\n\t\t$arr_where_clause = array();\n\t\t$arr_where_clause_views = array();\n\t\t$arr_where_clause_claims = array();\n\t\t$arr_where_clause_shares = array();\n\t\t$arr_where_clause_redeems = array();\n\t\t\n\t\t$join_clause = \"\";\n\t\tif(empty($campaign_ids))\n\t\t{\n \t\t\t$arr_where_clause_claims[] = \"ui.company_id = '$company_id'\";\n \t\t\t$arr_where_clause_redeems[] = \"ui.company_id = '$company_id'\";\n\t\t}\n\t\telse\n\t\t{\n \t\t\t$arr_where_clause_claims[] = \"ui.item_id in (\" . $campaign_ids . \")\";\n \t\t\t$arr_where_clause_redeems[] = \"ui.item_id in (\" . $campaign_ids . \")\";\n\t\t}\n\t\t\n\t\tif(!empty($activity_type))\n\t\t{\n\t\t\t// $arr_where_clause[] = \" ea.activity_type = '$activity_type'\";\n\t\t}\n\t\t\n\t\t\n\t\tif(!empty($start_date) && !empty($end_date))\n\t\t{\n\t\t\t$arr_where_clause_claims[] = \" \" . $str_date_sub_start . \"ui.date_claimed\" . $str_date_sub_end. \" between '$start_date' and '$end_date'\";\n\t\t\t$arr_where_clause_redeems[] = \" \" . $str_date_sub_start . \"ui.date_redeemed\" . $str_date_sub_end. \" between '$start_date' and '$end_date'\";\n\n\t\t}\n\t\telse if(!empty($start_date))\n\t\t{\n\t\t\t$arr_where_clause_claims[] = \" \" . $str_date_sub_start . \"ui.date_claimed\" . $str_date_sub_end. \" >= '$start_date'\";\n\t\t\t$arr_where_clause_redeems[] = \" \" . $str_date_sub_start . \"ui.date_redeemed\" . $str_date_sub_end. \" >= '$start_date'\";\n\t\t}\n\t\telse if(!empty($end_date))\n\t\t{\n\t\t\t$arr_where_clause_claims[] = \" \" . $str_date_sub_start . \"ui.date_claimed\" . $str_date_sub_end. \" <= '$end_date'\";\n\t\t\t$arr_where_clause_redeems[] = \" \" . $str_date_sub_start . \"ui.date_redeemed\" . $str_date_sub_end. \" <= '$end_date'\";\n\t\t}\n\t\t\n\t\t\n\t\t// SQL for Claims\n\t\t$sql_claims = \"select date_format(\" . $str_date_sub_start . \"ui.date_claimed\" . $str_date_sub_end. \", '$mysql_date_format') as date, ui.date_claimed as sort_date, 'claim' as activity_type, count(id) as activity_count from customer_email_codes ui where ui.date_claimed is not null\";\n\t\tif(!empty($arr_where_clause_claims))\n\t\t\t$sql_claims .= \" and \" . implode(\" and \", $arr_where_clause_claims);\n\t\t$sql_claims .= \" group by date_format(\" . $str_date_sub_start . \"ui.date_claimed\" . $str_date_sub_end. \", '$mysql_date_format'), activity_type\";\n\t\t\n\t\t// SQL for redeems\n\t\t$sql_redeems = \"select date_format(\" . $str_date_sub_start . \"ui.date_redeemed\" . $str_date_sub_end. \", '$mysql_date_format') as date, ui.date_redeemed as sort_date, 'redeem' as activity_type, count(id) as activity_count from customer_email_codes ui where ui.date_redeemed is not null\";\n\t\tif(!empty($arr_where_clause_redeems))\n\t\t\t$sql_redeems .= \" and \" .implode(\" and \", $arr_where_clause_redeems);\n\t\t$sql_redeems .= \" group by date_format(\" . $str_date_sub_start . \"ui.date_redeemed\" . $str_date_sub_end. \", '$mysql_date_format'), activity_type\";\n\t\t\n\t\t\n\t\tswitch($activity_type)\n\t\t{\n\t\t\t\n\t\t\tcase 'claim':\n\t\t\t\t$sql = $sql_claims;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'redeem':\n\t\t\t\t$sql = $sql_redeems;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'all':\n\t\t\t\t$sql = implode(' union all ', array($sql_claims, $sql_redeems));\n\t\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t$sql = \"select t.* from ( \n\t\t\" . $sql . \"\n\t\t) as t \n\t\torder by t.sort_date\";\n\t\t\n\t\t// error_log(\"SQL in CSAPI::getCampaignActivityInteractions(): \" . $sql);\n\t\t\n\t\t$timer_start = array_sum(explode(\" \", microtime()));\n\t\t$rs = Database::mysqli_query($sql);\n\t\t// error_log(\"CSAPI::getCampaignActivity(): Time taken to run the SQL: \" . (array_sum(explode(\" \", microtime())) - $timer_start));\n\t\t\n\t\t$response = array(\n\t\t\t'settings' => $params,\n\t\t\t'data' => array(),\n\t\t\t'graph_data' => array(),\n\t\t\t'totals' => array(),\n\t\t);\n\t\t\n\t\t$tmp_data = array();\n\t\twhile($row = Database::mysqli_fetch_assoc($rs))\n\t\t{\n\t\t\t$activity_type = $row['activity_type'];\n\t\t\t$tmp_date = $row['date'];\n\t\t\t$activity_count = $row['activity_count'] + 0;\n\t\t\t$tmp_data[$activity_type][$tmp_date] = $activity_count;\n\t\t\t$response['totals'][$activity_type] += $activity_count;\n\t\t}\n\t\t// error_log(\"CSAPI::getCampaignActivity(): Time taken to iterate through the records: \" . (array_sum(explode(\" \", microtime())) - $timer_start));\n\t\t\n\t\t// Getting start date\n\t\tif(empty($start_date))\n\t\t{\n\t\t\tDatabase::mysqli_data_seek($rs, 0);\n\t\t\t$row = Database::mysqli_fetch_assoc($rs);\n\t\t\t$start_date = $row['date'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$obj_dt = new DateTime($start_date);\n\t\t\t$start_date = date_format($obj_dt, $php_date_format);\n\t\t}\n\t\t\n\t\t// Getting End Date\n\t\tif(empty($end_date))\n\t\t{\n\t\t\tDatabase::mysqli_data_seek($rs, Database::mysqli_num_rows($rs) - 1);\n\t\t\t$row = Database::mysqli_fetch_assoc($rs);\n\t\t\t$end_date = $row['date'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$obj_dt = new DateTime($end_date);\n\t\t\t$end_date = date_format($obj_dt, $php_date_format);\n\t\t}\n\t\t// error_log(\"tmp_data: \" . var_export($tmp_data, true));\n\t\t\n\t\t// error_log(\"CSAPI::getCampaignActivity(): Time taken to set the start and end pointers: \" . (array_sum(explode(\" \", microtime())) - $timer_start));\n\t\t\n\t\t$start_date_val = strtotime($start_date . \" $str_time_zone\");\n\t\t$end_date_val = strtotime($end_date . \" $str_time_zone\");\n\t\t\n\t\t// error_log(\"start_date: \" . $start_date . \", start_date_val: \" . $start_date_val . \", end_date: \" . $end_date . \", start_date_val: \" . $end_date_val);\n\t\t\n\n\t\t\n\t\t$time_interval = new DateInterval('PT' . $interval . 'S');\n\t\t$pointStart = $start_date_val * 1000;\n\t\t$pointInterval = $interval * 1000;\n\t\t$activity_titles = array('view' => 'Views', 'claim' => 'Claims', 'redeem' => 'Redeems', 'share' => 'Shares', 'referral' => 'Referrals');\n\t\tforeach($tmp_data as $activity_type => $activity_data)\n\t\t{\n\t\t\t$total_activity_count = !empty($response['totals'][$activity_type]) ? $response['totals'][$activity_type] : 0;\n\t\t\t$activity_name = $activity_titles[$activity_type] . \" (Total: \" . $total_activity_count . \")\";\n\t\t\t// $response['data'][$activity_type] = array();\n\t\t\t$cumm_entrant_count = 0;\n\t\t\t$tmp_date = $start_date;\n\t\t\t$series_data = array(\n\t\t\t\t'data' => array(),\n\t\t\t\t'name' => $activity_name,\n\t\t\t\t'pointStart' => $pointStart,\n\t\t\t\t'pointInterval' => $pointInterval,\n\t\t\t);\n\t\t\tfor($i = $start_date_val; $i <= $end_date_val; $i += $interval)\n\t\t\t{\n\t\t\t\t// $tmp_date = date($php_date_format, $i);\n\t\t\t\tif(isset($activity_data[$tmp_date]))\n\t\t\t\t{\n\t\t\t\t\t$cumm_entrant_count += $activity_data[$tmp_date];\n\t\t\t\t}\n\t\t\t\t// $response['data'][$activity_type][$tmp_date] = $cumm_entrant_count;\n\t\t\t\t$series_data['data'][] = !empty($activity_data[$tmp_date]) ? $activity_data[$tmp_date] + 0 : 0; //$cumm_entrant_count;\n\t\t\t\t$dt = DateTime::CreateFromFormat($php_date_format, $tmp_date);\n\t\t\t\tif(!$dt)\n\t\t\t\t\terror_log(\"failed to created date object! using format $php_date_format having date $tmp_date\");\n\t\t\t\t$tmp_date = date_format($dt->add($time_interval), $php_date_format);\n\t\t\t}\n\t\t\t$response['graph_data'][] = $series_data;\n\t\t}\n\t\t\n\t\t// error_log(\"CSAPI::getCampaignActivity(): Time taken to set the final data: \" . (array_sum(explode(\" \", microtime())) - $timer_start));\n\t\tDatabase::mysqli_free_result($rs);\n\n\t\tif(!empty($errors))\n\t\t\treturn $errors;\n\t\t\t\n\t\treturn $response;\n\t}", "function ajax_lf_email_get_for_rest_post_campaigns_id() {\n\t\n\t// Set Campaign Ids\n\t$campaign_ids = $_REQUEST['campaign_ids'];\n\n\t// Set Posts By Campaign array\n\t$posts_by_campaign = array();\n\n\tif ( count( $campaign_ids ) > 0 ) {\n\t\tforeach ( $campaign_ids as $id ) {\n\n\t\t\t// Get Campaign Details\n\t\t\t$campaign_details = lf_email_util_get_campaign_details( $id );\n\n\t\t\t// Get Posts by Campaign Id\n\t\t\t$posts = lf_email_util_get_posts_by_campaign( $id );\n\t\t\t\n\t\t\t// Get Subscribers\n\t\t\t$subscribers = lf_email_util_get_subscribers_by_campaign( $id );\n\n\t\t\t// Format Results\n\t\t\t$posts_results = array();\n\t\t\tforeach ( $posts as $v ) {\n\t\t\t\t// $details = array(\n\t\t\t\t// \t'campaign_id' => $campaign_details['id'],\n\t\t\t\t// \t'campaign_name' => $campaign_details['name'],\n\t\t\t\t// \t'title' => esc_sql( $v->post_title ),\n\t\t\t\t// \t'html' => esc_sql( $v->post_content ),\n\t\t\t\t// \t'text_only' => esc_sql( $v->post_excerpt ),\n\t\t\t\t// \t'subscribers' => $subscribers\n\t\t\t\t// );\n\t\t\t\t$details = array(\n\t\t\t\t\t'subject' => esc_sql( $v->post_title ),\n\t\t\t\t\t'subscribers' => $subscribers,\n\t\t\t\t\t'body' => array(\n\t\t\t\t\t\t'html' => esc_sql( $v->post_content ),\n\t\t\t\t\t\t'text' => esc_sql( $v->post_excerpt )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t$posts_results[] = $details;\n\t\t\t}\n\n\t\t\t// Set Posts By Campaign\n\t\t\t$posts_by_campaign[] = array(\n\t\t\t\t'id' => $id,\n\t\t\t\t'posts' => $posts_results\n\t\t\t);\n\t\t}\n\t} // end if\n\t\n\t// Return Data\n\techo json_encode( $posts_by_campaign );\n\tdie();\n}", "function pua_get_collections($collection_ids = null)\n{\n //get popuparchive options\n $puawp_options = get_option('popuparchive_settings');\n if ($puawp_options) {\n $puawp_client_id = $puawp_options['puawp_client_id'];\n $puawp_client_secret = $puawp_options['puawp_client_secret'];\n $puawp_access_token = $puawp_options['puawp_access_token'];\n $puawp_redir_uri = $puawp_options['puawp_redir_uri_base'].$puawp_options['puawp_redir_uri_query'];\n }\n $data = array();\n\n /* Check to see if the token is alredy set, if not return empty */\n /* @todo 2 */\n if (!$puawp_access_token) {\n $data = array(\"client authorization token is not set\");\n\n return $data;\n }\n $popuparchive = puawp_set_access_token($puawp_options);\n\n try {\n /* @todo 1 */\n //$collections = $popuparchive->getPublicCollections(); //get all public collections\n $collections = $popuparchive->get('https://www.popuparchive.com/api/collections'); //get a user's collections\n } catch (Popuparchive_Services_Invalid_Http_Response_Code_Exception $e) {\n /* @todo: add check what kind of error and display message */\n $error_code = $e->getHttpCode();\n\n return $data; //for now if there is a problem return empty array\n }\n /* decode the collections JSON into an array and return */\n $data = json_decode($collections, true);\n\n return $data;\n}", "private function callApi(){\n $endpoint = sprintf( self::$ENDPOINT, $this->category );\n\n // call URL and get contents\n $content = file_get_contents($endpoint);\n\n // Check if Backend API has failed to return a successul response\n if($content===FALSE){\n throw new Exception(\"Backend service failed to return a response. Possibly throttling our request.\");\n }\n\n // Parse JSON response\n $response = json_decode($content, true);\n\n // Return just the quote\n $quote = $response['contents']['quotes'][0];\n $quote['requested_category'] = $this->category;\n if(!$quote['id']){\n $quote['id'] = substr( md5($str), 0, 32); // just a unique id if missing\n }\n\n return $quote;\n }", "public function process()\n {\n \t$client = $this->client->getClient();\n\n \ttry {\n $response = $client->get($this->buildUrl());\n return new ResponseJson((string)$response->getBody(), true);\n } catch (RequestException $e) {\n return new ResponseJson((string)$e->getResponse()->getBody(), false);\n }\n }" ]
[ "0.521953", "0.519992", "0.51621616", "0.51501936", "0.50620633", "0.5038092", "0.4996416", "0.49428913", "0.49110538", "0.4882252", "0.48740214", "0.48275018", "0.48111647", "0.48100293", "0.47898126", "0.47725114", "0.47566193", "0.47478926", "0.47361758", "0.4721691", "0.4698896", "0.46824962", "0.46663755", "0.46604544", "0.4659932", "0.4657924", "0.4655201", "0.46541873", "0.46486375", "0.4646891", "0.4641309", "0.46351206", "0.46349233", "0.46231082", "0.46096933", "0.45961776", "0.45815772", "0.45807868", "0.45690653", "0.4564847", "0.4563563", "0.4559421", "0.45577443", "0.4535792", "0.45338565", "0.45336172", "0.4529435", "0.45235878", "0.45148003", "0.45023626", "0.44981658", "0.4489388", "0.44871166", "0.44770673", "0.4472356", "0.44706243", "0.44679347", "0.44666028", "0.4465216", "0.44639954", "0.44583923", "0.44424188", "0.44419718", "0.4441653", "0.44268295", "0.44243288", "0.44181812", "0.44161007", "0.44158572", "0.4411471", "0.44045353", "0.4403156", "0.43979904", "0.43973053", "0.43951035", "0.43847454", "0.43821698", "0.4381445", "0.43742603", "0.4366675", "0.43527707", "0.43518546", "0.43454257", "0.43421805", "0.43420005", "0.43314347", "0.4318664", "0.43165395", "0.4316356", "0.43153232", "0.43105608", "0.43098974", "0.43089938", "0.43072018", "0.43060327", "0.4304041", "0.4303679", "0.43031567", "0.429892", "0.42963326" ]
0.60292745
0
Handle AdcreativesApi adcreativesUpdate function
public function update(array $params = []) { return $this->handleMiddleware('update', $params, function(MiddlewareRequest $request) { $params = $request->getApiMethodArguments(); $data = $params; $response = $this->apiInstance->adcreativesUpdate($data); return $this->handleResponse($response); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update($bannerclient);", "public function updateTempAd() {\n\t\ttry {\n\n\t\t\t$field_name = Request::input('name');\n\t\t\t$field_val = Request::input('value');\n\t\t\t$field_id = Request::input('pk');\n\t\t\t$child_content_date_id = Request::input('child_content_date_id');\n\t\t\t$check_client_details = Request::input('check_client_details');\n\t\t\t$check_talkbreak_suggestion = Request::input('check_talkbreak_suggestion');\n\n\t\t\t$contentObj = ConnectContent::find($field_id);\n\n\t\t\tif ($field_name == 'start_date' || $field_name == 'end_date') {\n\t\t\t\t$field_val = parseDateToMySqlFormat($field_val);\n\t\t\t\tif ($field_name == 'start_date') {\n\t\t\t\t\t$date_id = $contentObj->addContentStartDate($child_content_date_id, $field_val);\n\t\t\t\t} else if ($field_name == 'end_date') {\n\t\t\t\t\t$date_id = $contentObj->addContentEndDate($child_content_date_id, $field_val);\n\t\t\t\t}\n\t\t\t\tif ($child_content_date_id != $date_id) {\n\t\t\t\t\t$parent_id = Request::input('parent_content_id');\n\t\t\t\t\tConnectContentBelongs::setChildContentDate($parent_id, $field_id, $date_id);\n\t\t\t\t}\n\n\t\t\t\t$contentObj->updateContentToTagsLink();\n\n\t\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('pk' => $field_id, 'date_id' => $date_id)));\n\t\t\t}\n\n\t\t\tif ($field_name == 'ad_key') {\n\t\t\t\t$field_val = cleanupAdKey($field_val);\n\n\t\t\t\t$existingAdWithKey = ConnectContent::findAdContentOfKey(\\Auth::User()->station->id, $field_val);\n\t\t\t\tif ($existingAdWithKey && $existingAdWithKey->id != $field_id) {\n\t\t\t\t\treturn response()->json(array('code' => 100, 'msg' => 'Duplicate Key Number', 'data' => array('existing_id' => $existingAdWithKey->id, 'pk' => $field_id, 'date_id' => $child_content_date_id)));\n\t\t\t\t}\n\n\t\t\t\t$overwrite_existing = Request::input('overwrite_existing');\n\n\t\t\t\tif (empty($overwrite_existing) || $overwrite_existing == '0') { // should create new ad item\n\n\t\t\t\t\t$clonedContent = $contentObj->copyContent();\n\t\t\t\t\t$clonedContent->ad_key = $field_val;\n\t\t\t\t\t$clonedContent->save();\n\n\t\t\t\t\t$clonedContent->updateContentToTagsLink();\n\n\t\t\t\t\t$clonedContent->searchAudioFileAndLink();\n\n\t\t\t\t\t$clonedContentDate = null;\n\n\t\t\t\t\tif ($child_content_date_id) {\n\t\t\t\t\t\t$originalContentDate = $contentObj->getContentDate($child_content_date_id);\n\t\t\t\t\t\tif ($originalContentDate) {\n\t\t\t\t\t\t\t$clonedContentDate = $clonedContent->getContentDateByDateRange($originalContentDate->start_date, $originalContentDate->end_date);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$clonedContentArray = $clonedContent->toArray();\n\n\t\t\t\t\tif ($clonedContentDate) {\n\t\t\t\t\t\t$start_date = strtotime($clonedContentDate->start_date);\n\t\t\t\t\t\t$clonedContentArray['start_date'] = $start_date === FALSE ? '' : date(\"d-m-Y\", $start_date);\n\n\t\t\t\t\t\t$end_date = strtotime($clonedContentDate->end_date);\n\t\t\t\t\t\t$clonedContentArray['end_date'] = $end_date === FALSE ? '' : date(\"d-m-Y\", $end_date);\n\n\t\t\t\t\t\t$clonedContentArray['child_content_date_id'] = $clonedContentDate->id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$clonedContentArray['start_date'] = '';\n\t\t\t\t\t\t$clonedContentArray['end_date'] = '';\n\t\t\t\t\t\t$clonedContentArray['child_content_date_id'] = '0';\n\t\t\t\t\t}\n\n\t\t\t\t\treturn response()->json(array('code' => 200, 'msg' => 'Success with Clone', 'data' => array('newObj' => $clonedContentArray, 'pk' => $field_id, 'date_id' => $child_content_date_id )));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($field_name == 'content_rec_type' && $field_val == 'live') {\n\t\t\t\t$contentObj->audio_enabled = 1;\n\t\t\t}\n\n\t\t\tif($field_name == 'map_address1') {\n\t\t\t\t$map_address = $field_val;\n\t\t\t\tif(!empty($map_address)) {\n\t\t\t\t\t$geoInfo = getGEOFromAddress($map_address);\n\t\t\t\t}\n\t\t\t\tif (!empty($geoInfo)) {\n\t\t\t\t\t$contentObj->map_address1_lat = $geoInfo['lat'];\n\t\t\t\t\t$contentObj->map_address1_lng = $geoInfo['lng'];\n\t\t\t\t} else {\n\t\t\t\t\t$contentObj->map_address1_lat = '';\n\t\t\t\t\t$contentObj->map_address1_lng = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// autocomplete for client name\n\t\t\tif ($field_name == 'who' && $check_client_details) {\n\t\t\t\t$client = ConnectContentClient::GetConnectContentByTradingName($field_val, $contentObj->station_id);\n\t\t\t\tif ($client) { // client information is found, we copy them\n\t\t\t\t\t$contentObj->copyContentOfClient($client);\n\t\t\t\t\t$contentObj->updateWhoAndWhatForTagsAndEvents();\n\t\t\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('pk' => $field_id, 'date_id' => $child_content_date_id, 'require_reload' => 1)));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t\t// autocomplete for talk break\n\t\t\tif (($field_name == 'what' || $field_name == 'who') && $check_talkbreak_suggestion) {\n\t\t\t\t$autoSuggestId = Request::input(\"autoSuggestContentId\");\n\t\t\t\t\n\t\t\t\tif ($field_name == 'what') {\n\t\t\t\t\t$suggestedObjByText = ConnectContent::GetTalkBreakByWhat(\\Auth::User()->station->id, $field_val);\n\t\t\t\t} else if ($field_name == 'who') {\n\t\t\t\t\t$suggestedObjByText = ConnectContent::GetTalkBreakByWho(\\Auth::User()->station->id, $field_val);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$suggestedObjById = ConnectContent::find($autoSuggestId);\n\t\t\t\t\n\t\t\t\t$suggestedObj = null;\n\t\t\t\t\n\t\t\t\tif ($suggestedObjByText) {\n\t\t\t\t\t$suggestedObj = $suggestedObjByText;\n\t\t\t\t\tif ($suggestedObjById && ((strcasecmp($suggestedObjById->what, $field_val) == 0 && $field_name == 'what') || (strcasecmp($suggestedObjById->who, $field_val) == 0 && $field_name == 'who'))) {\n\t\t\t\t\t\t$suggestedObj = $suggestedObjById;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tagId = Request::input('tagId');\n\t\t\t\t$tagForContent = Tag::find($tagId);\n\t\t\t\t\n\t\t\t\t// found autocomplete suggestion?\n\t\t\t\tif ($tagForContent) {\n\t\t\t\t\t$newContentObj = null;\n\t\t\t\t\tif ($suggestedObj) {\n\t\t\t\t\t\t$newContentObj = $suggestedObj->copyContent();\n\t\t\t\t\t} else if (!$contentObj->isContentTalkBreak()) {\n\t\t\t\t\t\t$newContentObj = $contentObj->createTalkBreakFromContent();\n\t\t\t\t\t\tif ($field_name == 'what') {\n\t\t\t\t\t\t\t$newContentObj->what = $field_val;\n\t\t\t\t\t\t} else if ($field_name == 'who') {\n\t\t\t\t\t\t\t$newContentObj->who = $field_val;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$newContentObj->save();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($newContentObj) {\n\t\t\t\t\t\t$tagForContent->connect_content_id = $newContentObj->id;\n\t\t\t\t\t\t$tagForContent->save();\n\t\t\t\t\t\t$newContentObj->updateWhoAndWhatForTagsAndEvents();\n\t\t\t\t\t\t$newContentObj->sendCompetitonResultGenerationRequest(); // send competition generation request\n\t\t\t\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('pk' => $field_id, 'require_reload' => 1)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// autocomplete for talk break - vote\n\t\t\tif ($field_name == 'vote_question' && $check_talkbreak_suggestion) {\n\t\t\t\t$autoSuggestId = Request::input(\"autoSuggestContentId\");\n\t\t\n\t\t\t\t$suggestedObjByText = ConnectContent::GetTalkBreakByVoteQuestion(\\Auth::User()->station->id, $field_val);\n\t\t\t\n\t\t\t\t$suggestedObjById = ConnectContent::find($autoSuggestId);\n\t\t\t\n\t\t\t\t$suggestedObj = null;\n\t\t\t\n\t\t\t\tif ($suggestedObjByText) {\n\t\t\t\t\t$suggestedObj = $suggestedObjByText;\n\t\t\t\t\tif ($suggestedObjById && strcasecmp($suggestedObjById->vote_question, $field_val) == 0) {\n\t\t\t\t\t\t$suggestedObj = $suggestedObjById;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\t$tagId = Request::input('tagId');\n\t\t\t\t$tagForContent = Tag::find($tagId);\n\t\t\t\n\t\t\t\t// found autocomplete suggestion?\n\t\t\t\tif ($tagForContent) {\n\t\t\t\t\t$newContentObj = null;\n\t\t\t\t\tif ($suggestedObj) {\n\t\t\t\t\t\t$newContentObj = $suggestedObj->copyContent();\n\t\t\t\t\t} else if (!$contentObj->isContentTalkBreak()) {\n\t\t\t\t\t\t$newContentObj = $contentObj->createTalkBreakFromContent();\n\t\t\t\t\t\t$newContentObj->vote_question = $field_val;\n\t\t\t\t\t\t$newContentObj->save();\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tif ($newContentObj) {\n\t\t\t\t\t\tif ($tagForContent->setTagWithVote($newContentObj)) {\n\t\t\t\t\t\t\t$newContentObj->sendEventUpdateNotificationForContent();\n\t\t\t\t\t\t\t$newContentObj->sendVoteResultGenerationRequest(); // send vote generation request\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('pk' => $field_id, 'require_reload' => 1)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\n\t\t\t$contentObj->$field_name = $field_val;\n\n\t\t\t//Updating actions\n\t\t\tif($field_name == 'action_params') {\n\t\t\t\t$action_types = array();\n\n\t\t\t\t$actions = \\App\\ConnectContentAction::orderBy('id', 'desc')->get();\n\n\t\t\t\tforeach($actions as $action) {\n\t\t\t\t\t$action_types[$action['id']] = $action['action_type'] ;\n\t\t\t\t}\n\t\t\t\tif($field_val) {\n\t\t\t\t\tif ($contentObj->action_id == 0) {\n\t\t\t\t\t\t$contentObj->$field_name = '{\"website\":\"' . $field_val . '\"}';\n\t\t\t\t\t} else if ($action_types[$contentObj->action_id] == 'website' || $action_types[$contentObj->action_id] == 'get' || $action_types[$contentObj->action_id] == 'call') {\n\t\t\t\t\t\t$contentObj->$field_name = '{\"website\":\"' . $field_val . '\"}';\n\t\t\t\t\t} else if ($action_types[$contentObj->action_id] == 'phone' || $action_types[$contentObj->action_id] == 'sms') {\n\t\t\t\t\t\t$contentObj->$field_name = '{\"phone\":\"' . $field_val . '\"}';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$contentObj->$field_name = '';\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$contentObj->save();\n\t\t\t\n\t\t\t// for vote\n\t\t\tif ($field_name == 'vote_question' || $field_name == 'vote_option_1' || $field_name == 'vote_option_2') {\n\t\t\t\t$contentObj->sendEventUpdateNotificationForContent();\n\t\t\t}\n\t\t\t\n\t\t\tif ($field_name == 'vote_duration_minutes') {\n\t\t\t\t$tagId = Request::input('tagId');\n\t\t\t\t$tagForContent = Tag::find($tagId);\n\t\t\t\tif ($tagForContent) {\n\t\t\t\t\t$tagForContent->updateVoteDurationForTag($contentObj);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t\tif ($field_name == 'ad_key') {\n\t\t\t\t$contentObj->updateContentToTagsLink();\n\t\t\t\t$contentObj->searchAudioFileAndLink();\n\t\t\t}\n\n\t\t\tif ($field_name == 'who' || $field_name == 'what') {\n\t\t\t\t$contentObj->updateWhoAndWhatForTagsAndEvents();\n\t\t\t}\n\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('pk' => $field_id, 'date_id' => $child_content_date_id, 'content' => $contentObj)));\n\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\t}", "function acf_updates()\n{\n}", "public function updateAsync(array $params = [])\n {\n return $this->handleMiddleware('update', $params, function(MiddlewareRequest $request) {\n $params = $request->getApiMethodArguments();\n $data = $params;\n $response = $this->apiInstance->adcreativesUpdateAsync($data);\n return $response;\n });\n }", "public function update($banner);", "public function update()\n {\n try{\n $ad = new AdService();\n $res=$ad->update();\n if($res[0]){\n return redirect('/ad/edit/'.$res[1]->id)->with('message', '修改成功!');\n }else{\n return redirect('/ad/edit/'.$res[1]->id)->with(['message'=>'没有什么需要修改!','level'=>'info']);\n }\n }catch(\\Exception $e){\n dd($e);\n }\n }", "public function onUpdate(Campaign $campaign, array $payload): void\n {\n //\n }", "public function updateCampaign($params)\r\n {\r\n }", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "public function AdvertisementReadStatusUpdate() {\n $user = $this->auth();\n if (empty($user)) {\n Utils::response(['status' => false, 'message' => 'Forbidden access.'], 403);\n }\n $input = $this->getInput();\n if (($this->input->method() != 'post') || empty($input)) {\n Utils::response(['status' => false, 'message' => 'Bad request.'], 400);\n }\n $validate = [\n ['field' => 'push_ad_id', 'label' => 'Pushed Advertisement ID', 'rules' => 'required'],\n ];\n $errors = $this->ConsumerModel->validate($input, $validate);\n if (is_array($errors)) {\n Utils::response(['status' => false, 'message' => 'Validation errors.', 'errors' => $errors]);\n }\t\n\t\t$push_ad_id = $this->getInput('push_ad_id');\n\t\t$push_ad_idi = $push_ad_id['push_ad_id'];\n\t\t\n $this->db->set('media_play_date', date(\"Y-m-d H:i:s\")); \n $this->db->where('id', $push_ad_idi);\n if ($this->db->update('push_advertisements')) {\n Utils::response(['status' => true, 'message' => 'Record updated.', 'data' => $input]);\n } else {\n Utils::response(['status' => false, 'message' => 'System failed to update.'], 200);\n }\n }", "public function update(Request $request, Ad $ad)\n {\n //\n }", "public function update(Request $request, Ad $ad)\n {\n //\n }", "protected function _update()\n\t{\n\t}", "protected function update() {}", "function acf_update_values($values = array(), $post_id = 0)\n{\n}", "function updateAffiliateBannerFrontEnd($oAffiliate)\n\t\t{\n\t\t\t$query= \"update tbl_affiliate set banner ='\".$oAffiliate->organisation_banner.\"' \n\t\t\t where affiliate_id = $oAffiliate->member_id\";\n\t\t\t\n\t\t\t$rs = $this->Execute($query);\n\t\t\treturn $rs;\n\t\t}", "public function onUpdate();", "public function onUpdate();", "public function onUpdate();", "public static function update(){\n }", "protected function _postUpdate()\n\t{\n\t}", "public function testUpdateServiceData()\n {\n\n }", "public function update(){\n $service_category = new OsServiceCategoryModel($this->params['service_category']['id']);\n $service_category->set_data($this->params['service_category']);\n if($service_category->save()){\n $response_html = __('Service Category Updated. ID: ', 'latepoint') . $service_category->id;\n $status = LATEPOINT_STATUS_SUCCESS;\n }else{\n $response_html = $service_category->get_error_messages();\n $status = LATEPOINT_STATUS_ERROR;\n }\n if($this->get_return_format() == 'json'){\n $this->send_json(array('status' => $status, 'message' => $response_html));\n }\n }", "function adrotate_licensed_update() {\n\tadd_filter('site_transient_update_plugins', 'adrotate_update_check');\n\tadd_filter('plugins_api', 'adrotate_get_plugin_information', 20, 3);\n}", "public static function update(){\r\n }", "public function update(Request $request, cardface_classofcreature_atag $cardface_classofcreature_atag){\n // enter your stuff here if you want...\n\treturn(parent::update($request,$cardface_classofcreature_atag));\n }", "public function update(Request $request, Advert $advert)\n {\n $this->authorize('update_adverts', 'App\\Advert');\n $this->validate($request, array(\n 'active' => 'nullable',\n 'link_title' => 'required|max:50',\n 'url' => '',\n 'banner' => 'required|image',\n 'banner_alt' => 'required|max:50',\n 'user_id' => 'integer|Auth::user()->id',\n 'advertable_type' => '',\n 'advertable_id' => '',\n\n ));\n $advert = Advert::find($advert->id);\n\n $advert->active = $request->active;\n $advert->link_title = $request->link_title;\n $advert->url = $request->url;\n $advert->banner = $request->banner;\n $advert->banner_alt = $request->banner_alt;\n $advert->user_id = Auth::user()->id;\n $advert->advertable_type = $request->advertable_type;\n $advert->advertable_id = $request->advertable_id;\n\n\n if ($request->hasFile('banner')) {\n //add new photo\n $image = $request->file('banner');\n $filename = time() . '.' . $image->getClientOriginalExtension();\n $location = public_path(\"images/adverts/\" . $filename);\n $oldfile = public_path(\"images/adverts/\" . $advert->banner);\n // dd($oldfile);\n if(File::exists($oldfile))\n {\n File::delete($oldfile);\n }\n Image::make($image)->resize(800, 400)->save($location);\n $advert->banner = $filename;\n }\n $advert->save();\n\n $notification = array(\n 'message' => 'Advertisement updated successfully',\n 'alert-type' => 'info'\n );\n return redirect(route('adverts.show', $advert->id))->with($notification);\n }", "public function update()\n {\n # code...\n }", "static function process_updates($args=array()){\n\n if (empty($_SESSION['bList_vm_reimbursementRates_rates_updated'])) return;\n \n // recalculate travel/subsistence reimbursement estimates\n foreach(array_keys($_SESSION['bList_vm_reimbursementRates_rates_updated']) as $parent_ID){\n b_debug::xxx(\"parent $parent_ID\");\n locateAndInclude('bForm_vm_Expenses');\n bForm_vm_Expenses::_updateEstimates($parent_ID); \n \n \n //\n // Integrate the change of reimbursement policy into Event and/or Ogranization\n //\n if ($parent_ID == myOrg_ID){\n\t$e = Null;\n\t$reimbursementRates = bList::getListInstance(myOrg_ID,'bList_vm_reimbursementRates');\n\t$visit_types = VM_reimbursable_visits();\n }else{\n\t$e = loader::getInstance_new('bForm_vm_Event',$parent_ID,'fatal');\n\t$reimbursementRates = $e->reimbursementRates();\n\t$visit_types = array(VISIT_TYPE_PROGRAM);\n }\n \n // look for updates\n foreach($visit_types as $type){\n\t$was_p = $now_p = array();\n\t$now = $was = VM_visit_policies($type,$e);\n\tforeach($reimbursementRates->get_policies($type) as $policy=>$is_ON){\n\t if ($is_ON && !in_array($policy,$was)) $now[] = $policy;\n\t if(!$is_ON && in_array($policy,$was)) $now = array_diff($now,array($policy));\n\t}\n\t\n\tforeach($was as $p) $was_p[] = x('li',VM::$v_policies[$p]['d']);\n\tb_debug::xxx(strip_tags(join(', ',$was_p)));\n\t\n\t// Are there any changes?\n\tif ($was !== $now){\n\t \n\t // Save the updated policies in the database\n\t sort($now); // kill association\n\t VM_visit_policies($type,$now,$e);\n\t \n\t // Print a message\n\t foreach($now as $p) $now_p[] = x('li',VM::$v_policies[$p]['d']);\n\t \n\t if ($add = array_diff($now_p,$was_p)) $changes[] = \"Added:\".x('ul', join(\"\\n\",$add));\n\t if ($rem = array_diff($was_p,$now_p)) $changes[] = \"Removed:\".x('ul',join(\"\\n\",$rem));\n\t MSG::INFO($changes,VM::$description[$type]['d'].' visits policy is changed for '.$reimbursementRates->title);\n\t}\n }\n }\n unset($_SESSION['bList_vm_reimbursementRates_rates_updated']);\n }", "public function update(Request $request, ApertureLuoghiInteresse $apertureLuoghiInteresse)\n {\n //\n }", "public function update();", "public function update();", "public function update();", "public function update();", "public function update(Request $request, reciclaeducate $reciclaeducate)\n {\n //\n }", "public abstract function update();", "abstract protected function update ();", "function update_kardex_academico($kardexacad_id,$params)\n {\n $this->db->where('kardexacad_id',$kardexacad_id);\n return $this->db->update('kardex_academico',$params);\n }", "public function updateAffiliateKeys( $update )\n {\n $changed = false; foreach( $update as $service => $key ){ if( $key != $this->affiliateKeys[$service] ){ $changed = true; } $this->affiliateKeys[$service] = $key; }\n\n if( $changed == true )\n {\n return $this->APICall( array('updateAffiliateKeys' => json_encode( $this->affiliateKeys )), \"Could not update the affiliate keys for \" . $this->description() );\n }\n }", "public function update() {\r\n }", "public function update()\r\n {\r\n //\r\n }", "public function update(Request $request, $id)\n {\n $url = str_replace(' ', '-', $request->title);\n while (Advertisement::where('url', $url)->where('id', '!=', $id)->count()) {\n $url .= '-';\n }\n $publish_at_array = \\Morilog\\Jalali\\jDateTime::toGregorian($request->year, $request->month, $request->day);\n $publish_at = strtotime($publish_at_array[0] . '-' . $publish_at_array[1] . '-' . $publish_at_array[2]);\n Advertisement::where('id', $id)->update(['type' => $request->type, 'name' => $request->name, 'phone' => $request->phone, 'tell' => $request->tell, 'email' => $request->email, 'address' => $request->address, 'title' => $request->title, 'url' => $url, 'description' => $request->description, 'category_id' => intval($request->category_id), 'state' => $request->state, 'city' => '', 'publish_at' => $publish_at, 'expire_at' => 0, 'updated_at' => strtotime(date('Y-m-d H:i:s')), 'created_at' => strtotime(date('Y-m-d H:i:s')), 'type_row' => 1]);\n foreach ($request->files as $file)\n foreach ($file as $key => $value) {\n $image = null;\n if (isset($value)) {\n $image = $id . time() . md5(pathinfo($value->getClientOriginalName(), PATHINFO_FILENAME)) . '.' . $value->getClientOriginalExtension();\n \\Storage::disk('upload')->makeDirectory('/advertisement/' . $id . '/');\n $exists = \\Storage::disk('upload')->has('/advertisement/' . $id . '/' . $image);\n if ($exists == null)\n \\Storage::disk('upload')->put('/advertisement/' . $id . '/' . $image, \\File::get($value->getRealPath()));\n AdvertisementGallery::create(['advertisement_id' => $id, 'image' => $image, 'created_at' => strtotime(date('Y-m-d H:i:s'))]);\n }\n }\n return redirect('dashboard/advertisement');\n }", "public function doUpdate() {\n\t\ttry {\n\t\t\tcall_user_func_array( $this->doUpdateFunction, $this->arguments );\n\t\t} catch ( Exception $ex ) {\n\t\t\t$this->exceptionHandler->handleException( $ex, 'data-update-failed',\n\t\t\t\t'A data update callback triggered an exception' );\n\t\t}\n\t}", "public function updating()\n {\n # code...\n }", "function UpdateAdGroupRemarketingListAssociations($proxy, $adGroupRemarketingListAssociations)\n{\n $request = new UpdateAdGroupRemarketingListAssociationsRequest();\n $request->AdGroupRemarketingListAssociations = $adGroupRemarketingListAssociations;\n \n return $proxy->GetService()->UpdateAdGroupRemarketingListAssociations($request);\n}", "public function update()\n {\n //\n }", "public function update()\n {\n //\n }", "function updateLeadDetails($jsonDecodedArray,$tablename,$defaultVal,$con){\n\t$st_id = mysql_real_escape_string($jsonDecodedArray[\"st_id\"]);\n\t$st_serviceCategory = mysql_real_escape_string($jsonDecodedArray[\"st_serviceCategory\"]);\n\t$st_requirement = mysql_real_escape_string($jsonDecodedArray[\"st_requirement\"]);\n\t$st_remarks = mysql_real_escape_string($jsonDecodedArray[\"st_remarks\"]);\n\t$st_nextAction = mysql_real_escape_string($jsonDecodedArray[\"st_nextAction\"]);\n\t$st_nextActionDate = mysql_real_escape_string($jsonDecodedArray[\"st_nextActionDate\"]);\n\t$st_leadValue = mysql_real_escape_string($jsonDecodedArray[\"st_leadValue\"]);\n\t$st_leadStatus = mysql_real_escape_string($jsonDecodedArray[\"st_leadStatus\"]);\n\t$st_salesExecutive = mysql_real_escape_string($jsonDecodedArray[\"st_salesExecutive\"]);\n\t$st_exClosureDate = mysql_real_escape_string($jsonDecodedArray[\"st_exClosureDate\"]);\n\n\t$query = \"UPDATE $tablename SET st_serviceCategory='$st_serviceCategory', st_nextActionDate='$st_nextActionDate', st_requirement='$st_requirement', st_leadStatus='$st_leadStatus', st_exClosureDate='$st_exClosureDate', st_leadValue='$st_leadValue', st_remarks='$st_remarks', st_nextAction='$st_nextAction', st_salesExecutive='$st_salesExecutive' WHERE st_id = '$st_id'\";\n\t//echo $query;\n\n\t$result = mysql_query($query);\n\n\tif($result > 0){\n\t\t$response['status'] = 'success';\n\t\t$response['message'] = 'Updation Successful';\n\t}\n\n\techo json_encode($response);\n}", "abstract public function update();", "abstract public function update();", "public function update() {\r\n\r\n\t}", "protected function afterUpdating()\n {\n }", "public function testUpdatePayrun()\n {\n }", "public function updateAdvertiser (Request $request) {\n $fields = $request->only(['advertiser_name']);\n\n if ($request->hasFile('image')) {\n $custom_data['image'] = $this->storageService->saveFile ($request->image, self::ADVERTISER_IMAGE_DIRECTORY);\n $advertiser = $this->repository->find( (int) $request->route()->parameter('id'));\n //save image data\n $this->repository->find( (int) $request->route()->parameter('id'))->custom()->updateOrCreate([], $custom_data);\n }\n return $this->repository->update((int) $request->route()->parameter('id'), $fields);\n }", "public function update(Request $request, Banner $banner)\n {\n //\n }", "public function update(Request $request, Banner $banner)\n {\n //\n }", "function after_update() {}", "public function testUpdateChallengeActivity()\n {\n }", "public function update($update_array){\n $date = new DateTime(\"now\",new DateTimeZone(DATETIMEZONE));\n $update_array['last_updated'] = $date->format('c');\n $this->db->update('use_case', $update_array, array('usecase_id' => $update_array['usecase_id']));\n return $this->db->affected_rows();\n }", "abstract function update();", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "function apsa_ajax_update_campaign_status() {\n if (!current_user_can('manage_options')) {\n die();\n }\n\n $success = 1;\n\n $campaign_id = $_POST['campaign_id'];\n $campaign_action = $_POST['campaign_action'];\n $campaign_type = $_POST['campaign_type'];\n\n if ($campaign_action == \"delete\") {\n $action = apsa_delete_campaign($campaign_id);\n } else {\n $action = apsa_update_campaign($campaign_id, '', $campaign_type, $campaign_action);\n }\n\n if ($action === FALSE) {\n $success = 0;\n }\n\n $response = array('success' => $success);\n echo json_encode($response);\n\n wp_die();\n}", "public function update($data){\n\t\tif(empty($data['ad_id'])){\n\t\t\tthrow new \\Exception('ad_id is required.');\n\t\t}\n\t\tif(empty($data['adgroup_id'])){\n\t\t\tthrow new \\Exception('adgroup_id is required.');\n\t\t}\n\t\tif(empty($data['ad_status'])){\n\t\t\tthrow new \\Exception('adgroup_id is required.');\n\t\t}\n\t\t$operations = array();\n\t\t$textAd = new \\TextAd();\n\t\t$textAd->id = $data['ad_id'];\n\t\t\n\t\t// update TextAd status.\n\t\t$adGroupAd = new \\AdGroupAd();\n\t\t$adGroupAd->adGroupId = $data['adgroup_id'];\n\t\t$adGroupAd->ad = $textAd;\n\t\t$adGroupAd->status = $this->mappingStatus($data['ad_status']);\n\n\t\t// Create operation.\n\t\t$operation = new \\AdGroupAdOperation();\n\t\t$operation->operand = $adGroupAd;\n\t\t$operation->operator = 'SET';\n\t\t$operations = array($operation);\n\n\t\t// Make the mutate request.\n\t\t$result = $this->adGroupAdService->mutate($operations);\n\t\t$adGroupAd = $result->value[0];\n\t\treturn TRUE;\n\t}", "function setDescription1 ($newDescription1) {\n // setting the description1 is not provided by the api so emulating this\n // by deleting and then re-creating the ad\n $soapClients = &APIlityClients::getClients();\n $someSoapClient = $soapClients->getAdClient();\n // then recreate it with the new description1 set\n $soapParameters = \"<addAds>\n <ads>\n <adGroupId>\".$this->getBelongsToAdGroupId().\"</adGroupId>\n <headline>\".utf8_decode($this->getHeadline()).\"</headline>\n <description1>\".$newDescription1.\"</description1>\n <description2>\".utf8_decode($this->getDescription2()).\"</description2>\n <displayUrl>\".$this->getDisplayUrl().\"</displayUrl>\n <destinationUrl>\".$this->getDestinationUrl().\"</destinationUrl>\n <status>\".$this->getStatus().\"</status>\n <adType>TextAd</adType>\n </ads>\n </addAds>\";\n // add the ad to the google servers\n $someAd = $someSoapClient->call(\"addAds\", $soapParameters);\n $soapClients->updateSoapRelatedData(extractSoapHeaderInfo($someSoapClient->getHeaders()));\n if ($someSoapClient->fault) {\n pushFault($someSoapClient, $_SERVER['PHP_SELF'].\":setDescription1()\", $soapParameters);\n return false;\n }\n // first delete the current ad\n $soapParameters = \"<updateAds>\n <ads>\n <adGroupId>\".$this->getBelongsToAdGroupId().\"</adGroupId>\n <id>\".$this->getId().\"</id>\n <status>Disabled</status>\n <adType>TextAd</adType>\n </ads>\n </updateAds>\";\n // delete the ad on the google servers\n $someSoapClient->call(\"updateAds\", $soapParameters);\n $soapClients->updateSoapRelatedData(extractSoapHeaderInfo($someSoapClient->getHeaders()));\n if ($someSoapClient->fault) {\n pushFault($someSoapClient, $_SERVER['PHP_SELF'].\":setDescription1()\", $soapParameters);\n return false;\n }\n // update local object\n $this->description1 = $someAd['addAdsReturn']['description1'];\n // changing the description1 of a ad will change its id so update local object\n $this->id = $someAd['addAdsReturn']['id'];\n return true;\n }", "public function update($request, $args) {\n $result = [];\n\n $id = $args['id'];\n\n $formData = $request->getParsedBody();\n\n $titulo = null;\n $desarrollador = null;\n $descripcion = null;\n $consola = null;\n $fechaLanzamiento = null;\n $calificacion = null;\n $imagenURL = null;\n\n LoggingService::logVariable($formData, __FILE__, __LINE__);\n\n // Verify the entry of titulo\n if (array_key_exists(\"titulo\", $formData)) {\n $titulo = $formData[\"titulo\"];\n }\n\n // Verify the entry of desarrollador\n if (array_key_exists(\"desarrollador\", $formData)) {\n $desarrollador = $formData[\"desarrollador\"];\n }\n\n // Verify the entry of descripcion\n if (array_key_exists(\"descripcion\", $formData)) {\n $descripcion = $formData[\"descripcion\"];\n }\n\n // Verify the entry of consola\n if (array_key_exists(\"consola\", $formData)) {\n $consola = $formData[\"consola\"];\n }\n\n // Verify the entry of fechaLanzamiento\n if (array_key_exists(\"fechaLanzamiento\", $formData)) {\n $fechaLanzamiento = $formData[\"fechaLanzamiento\"];\n }\n\n // Verify the entry of calificacion\n if (array_key_exists(\"calificacion\", $formData)) {\n $calificacion = $formData[\"calificacion\"];\n }\n\n // Verify the entry of imagenURL\n if (array_key_exists(\"imagenURL\", $formData)) {\n $imagenURL = $formData[\"imagenURL\"];\n }\n\n if (isset($id, $titulo, $desarrollador, $descripcion, $consola, $fechaLanzamiento, $calificacion, $imagenURL)) {\n $updateResult = $this->videoGameService->update($id, $titulo, $desarrollador, $descripcion, $consola, $fechaLanzamiento, $calificacion, $imagenURL);\n\n if (array_key_exists(\"error\", $updateResult)) {\n $result[\"error\"] = $updateResult[\"error\"];\n }\n\n $result[\"message\"] = $updateResult[\"message\"];\n } else {\n $result[\"error\"] = true;\n $result[\"message\"] = \"No pueden existir datos vacíos.\";\n }\n\n return $result;\n }", "public function Do_update_Example1(){\n\n\t}", "public function update(Request $request, Advert $advert)\n {\n //\n }", "public function update(Request $request, leads $leads)\n {\n //\n }", "public function update($request_data){\n $c_id = $request_data['c_id'];\n\n //getting data from $request_data\n $c_name = $request_data['c_name'];\n $c_cont_no = $request_data['c_cont_no'];\n $c_food_pref = $request_data['c_food_pref'];\n\n $dbs = new DatabaseControls();\n $qry = \"update \".$this->table_name.\" set c_name = '\".$c_name.\"',c_cont_no = '\".$c_cont_no.\"',c_food_preference = '\".$c_food_pref.\"' where c_id = \".$c_id;\n $result = $dbs->run_update_qry($qry); \n \n \n return json_encode($result);\n }", "function api_app_modify_function() {\n\n}", "public function update()\n {\n\n }", "public function update()\n {\n\n }", "public function after_update() {}", "public function update($reign_id, $attributes);", "protected function performUpdate() {}", "function afterUpdate($post_array, $primary_key='0'){\n // $identificador=$primary_key;\n // while(strlen($identificador)<4) $identificador=\"0\".$identificador;\n // $id=$post_array['id_grupo'];\n // $texto_grupo=$this->db->query(\"SELECT texto_grupo FROM c_grupos WHERE id='$id'\")->row()->texto_grupo;\n // $descripcion=$identificador.'-'.$post_array['nombre_actividad'];\n // if($texto_grupo) $descripcion.='-'.$texto_grupo;\n // $this->db->query(\"UPDATE c_actividades_infantiles SET descripcion='$descripcion' WHERE id='$primary_key'\");\n }", "public function update()\n\t{\n\n\t}", "public function updateLeadStage() {\n\n /////////////////////////////////////////////////////////////////////\n // CHECK REQUIRED DATA //////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////\n\n if (is_null($this->__apiPrivateToken)) {\n throw new \\Exception(\"API Private Token must be setted!\");\n }\n\n if (is_null($this->__leadEmail)) {\n throw new \\Exception(\"Lead email must be setted!\");\n }\n\n if (!isset($this->__leadData['lifecycle_stage'])) {\n throw new \\Exception(\"Lead data 'lifecycle_stage' must be setted!\");\n }\n\n /////////////////////////////////////////////////////////////////////\n // PREPARE DATA COLLECTION //////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////\n\n $this->__translateLeadData();\n\n $lead = array();\n\n if (isset($this->__leadData['lifecycle_stage'])) {\n $lead['lifecycle_stage'] = $this->__leadData['lifecycle_stage'];\n }\n\n if (isset($this->__leadData['opportunity'])) {\n $lead['opportunity'] = $this->__leadData['opportunity'];\n }\n\n $leadData = array();\n $leadData['auth_token'] = $this->__apiPrivateToken;\n $leadData['lead'] = $lead;\n\n $this->__leadData = $leadData;\n\n /////////////////////////////////////////////////////////////////////\n // PERFORM REQUEST TO API ///////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////\n\n return $this->__request('PUT','leads');\n }", "#[CustomOpenApi\\Operation(id: 'leadUpdate', tags: [Tags::Lead, Tags::V1])]\n #[OpenApi\\Parameters(factory: DefaultHeaderParameters::class)]\n #[CustomOpenApi\\RequestBody(request: UpdateLeadRequest::class)]\n #[CustomOpenApi\\Response(resource: LeadWithLatestActivityResource::class)]\n #[CustomOpenApi\\ErrorResponse(exception: UnauthorisedTenantAccessException::class)]\n public function update(Lead $lead, UpdateLeadRequest $request): LeadWithLatestActivityResource\n {\n $lead->checkTenantAccess()->update($request->validated());\n return $this->show($lead->refresh()->loadMissing(self::load_relation));\n }", "public function testUpdateReplenishmentCustomFields()\n {\n }", "function ajaxAdsReview()\n{\n header('Content-type: application/json');\n\n $retour = new \\stdClass();\n $retour->error = false;\n $retour->message = 'ok';\n\n $fields = $_POST['fields'];\n $fields = json_decode(stripslashes($fields));\n\n $refClient = $fields->choisir_client_leboncoin; // vaut false si prospect ou nouveau ou ref_eleve (si !prospect )\n\n $phone = $fields->phone;\n\n if (! $phone) {\n $phone = 'pas-de-num';\n }\n\n $lbcProcessMg = new \\spamtonprof\\stp_api\\LbcProcessManager();\n $lbcAcctMg = new \\spamtonprof\\stp_api\\LbcAccountManager();\n\n $ads = $lbcProcessMg->generateAds($refClient, 50, $phone);\n $lbcAccts = $lbcAcctMg->getAll(array(\n 'ref_client' => $refClient\n ));\n\n $emails = [];\n foreach ($lbcAccts as $lbcAcct) {\n $emails[] = $lbcAcct->getMail();\n }\n\n // récupération des prénoms du client\n \n $clientMg = new \\spamtonprof\\stp_api\\LbcClientManager();\n $client = $clientMg->get(array('ref_client' => $refClient));\n \n $prenomMg = new \\spamtonprof\\stp_api\\PrenomLbcManager();\n $prenoms = $prenomMg -> getAll(array('ref_cat_prenom' => $client->getRef_cat_prenom()));\n \n \n \n // récupération des réponses du client\n $texteMg = new \\spamtonprof\\stp_api\\LbcTexteManager();\n $reponses = $texteMg -> getAll(array(\"ref_type_texte\" => $client->getRef_reponse_lbc()));\n \n \n $retour->phone = $phone;\n $retour->refClient = $refClient;\n $retour->ads = $ads;\n $retour->emails = $emails;\n $retour->prenoms = $prenoms;\n $retour->reponses = $reponses;\n \n \n \n echo (json_encode($retour));\n\n die();\n}", "public function update () {\n\n }", "public function update()\n\t{\n\t\t$clientArray = array();\n\t\t$getData = array();\n\t\t$funcName = array();\n\t\t$clientArray = func_get_arg(0);\n\t\tfor($data=0;$data<count($clientArray);$data++)\n\t\t{\n\t\t\t$funcName[$data] = $clientArray[$data][0]->getName();\n\t\t\t$getData[$data] = $clientArray[$data][0]->$funcName[$data]();\n\t\t\t$keyName[$data] = $clientArray[$data][0]->getkey();\n\t\t}\n\t\t$clientId = $clientArray[0][0]->getClientId();\n\t\t// data pass to the model object for update\n\t\t$clientModel = new ClientModel();\n\t\t$status = $clientModel->updateData($getData,$keyName,$clientId);\n\t\treturn $status;\n\t}", "function updateAffiliateBanner($oAffiliate)\n\t\t{\n\t\t\t$query= \"update tbl_affiliate set banner ='\".$oAffiliate->organisation_banner.\"' \n\t\t\t where affiliate_id = $oAffiliate->affiliate_id\";\n\t\t\t\n\t\t\t$rs = $this->Execute($query);\n\t\t\treturn $rs;\n\t\t}", "function acf_register_plugin_update($plugin)\n{\n}", "function updateDetails_ads($contact_no,$ad_categories,$comp_name)\n\t\t{\n\t\t\tif(isset($ad_categories) && !empty($ad_categories))\n\t\t\t{\n\t\t\t\t//set the no. of category using $i\n\t\t\t\t$i = 1;\n\t\t\t\t//total number of elements in the category array\n\t\t\t\t$count_category = count($ad_categories);\n\t\t\t\t//define $ad_keyword as null\n\t\t\t\t$ad_keyword = \"\";\n\t\t\t\t\n\t\t\t\tforeach($ad_categories as $ad_category)\n\t\t\t\t{\n\t\t\t\t\t$ad_keyword =$ad_keyword.','.$ad_category;\n\t\t\t\t\tif($i == $count_category)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t$ad_keyword = htmlentities($ad_keyword, ENT_QUOTES, \"utf-8\");\n\t\t\t\t$result = $this->manage_content->updateValue_email_company('company_info','company_keywords',$ad_keyword,$comp_name);\n\t\t\t\t//print result\n\t\t\t\tif($result != 0)\n\t\t\t\treturn \"Update successful.\";\n\t\t\t\t\n\t\t\t}\n\t\t\tif(isset($contact_no) && $contact_no != \"\")\n\t\t\t{\n\t\t\t\t$result = $this->manage_content->updateValue_email_company('company_info','company_tel',$contact_no,$comp_name);\n\t\t\t\t//print result\n\t\t\t\tif($result != 0)\n\t\t\t\treturn \"Update successful.\";\n\t\t\t}\n\t\t\tif($result == 0)\n\t\t\t{\n\t\t\t\treturn \"Update unsuccessful\";\n\t\t\t}\n\t\t\t\n\t\t}", "public function update(Request $request, $id)\n {\n\n if($request->preroll_type == 'channel_bg'){\n\n $this->validate($request, array(\n 'preroll_name' => 'required',\n 'preroll_type' => 'required',\n 'preroll_goto_link' => 'required',\n ));\n\n $advertising = Advertising::find($id);\n $advertising->preroll_name = $request->preroll_name;\n $advertising->preroll_type = $request->preroll_type;\n $advertising->preroll_goto_link = $request->preroll_goto_link;\n\n if($request->thumb_img != null){\n $img_val_array = ['jpg', 'jpeg', 'JPG', 'JPEG', 'png', 'gif'];\n if(in_array($request->thumb_img->getClientOriginalExtension(), $img_val_array)){\n $file = uniqid().'.'.$request->thumb_img->getClientOriginalExtension();\n $request->thumb_img->move(public_path('ad_up/images'), $file);\n $image = public_path('ad_up/images/').$file;\n $s3 = Storage::disk('s3frenvid');\n $s3->put('/ads/images/'.$file, file_get_contents($image), 'public');\n unlink($image);\n if($advertising->preroll_thumbimg){\n $del_path = '/ads/images/'.$advertising->preroll_thumbimg;\n if(Storage::disk('s3frenvid')->exists($del_path)) {\n Storage::disk('s3frenvid')->delete($del_path);\n }\n }\n $advertising->preroll_thumbimg = $file;\n }\n }\n\n $advertising->save();\n Session::flash('success', 'Your change was successfully added!');\n\n //redirect\n\n return redirect()->route('advertising.index');\n\n }\n else{\n\n $this->validate($request, array(\n 'preroll_name' => 'required',\n 'preroll_type' => 'required',\n 'preroll_goto_link' => 'required',\n 'preroll_skip_timer' => 'required'\n ));\n\n $advertising = Advertising::find($id);\n $advertising->preroll_name = $request->preroll_name;\n $advertising->preroll_type = $request->preroll_type;\n $advertising->preroll_goto_link = $request->preroll_goto_link;\n $advertising->preroll_skip_timer = $request->preroll_skip_timer;\n\n\n if($request->preroll_mp4 != null){\n if($request->preroll_mp4->getClientOriginalExtension() == 'mp4'){\n $file = uniqid().'v.'.$request->preroll_mp4->getClientOriginalExtension();\n $request->preroll_mp4->move(public_path('ad_up/videos'), $file);\n $video = public_path('ad_up/videos/').$file;\n $s3 = Storage::disk('s3frenvid');\n $s3->put('/ads/videos/'.$file, file_get_contents($video), 'public');\n unlink($video);\n if($advertising->preroll_mp4){\n $del_path = '/ads/videos/'.$advertising->preroll_mp4;\n if(Storage::disk('s3frenvid')->exists($del_path)) {\n Storage::disk('s3frenvid')->delete($del_path);\n }\n }\n $advertising->preroll_mp4 = $file;\n }\n }\n\n\n if($request->thumb_img != null){\n $img_val_array = ['jpg', 'jpeg', 'JPG', 'JPEG', 'png', 'gif'];\n if(in_array($request->thumb_img->getClientOriginalExtension(), $img_val_array)){\n $file = uniqid().'.'.$request->thumb_img->getClientOriginalExtension();\n $request->thumb_img->move(public_path('ad_up/images'), $file);\n $image = public_path('ad_up/images/').$file;\n $s3 = Storage::disk('s3frenvid');\n $s3->put('/ads/images/'.$file, file_get_contents($image), 'public');\n unlink($image);\n if($advertising->preroll_thumbimg){\n $del_path = '/ads/images/'.$advertising->preroll_thumbimg;\n if(Storage::disk('s3frenvid')->exists($del_path)) {\n Storage::disk('s3frenvid')->delete($del_path);\n }\n }\n $advertising->preroll_thumbimg = $file;\n }\n }\n\n $advertising->save();\n Session::flash('success', 'Your change was successfully added!');\n\n //redirect\n\n return redirect()->route('advertising.index');\n }\n\n\n }", "public function update() {\n \n }" ]
[ "0.5910219", "0.59080756", "0.5905238", "0.5786378", "0.5711499", "0.56781733", "0.56271017", "0.55532646", "0.5463843", "0.5463843", "0.5426003", "0.5388615", "0.5388615", "0.53837216", "0.5344205", "0.5333398", "0.5281563", "0.5271078", "0.5271078", "0.5271078", "0.52469796", "0.52305245", "0.5215715", "0.52152306", "0.5200715", "0.5200594", "0.51984584", "0.51923025", "0.5178428", "0.51778793", "0.5167653", "0.5150893", "0.5150893", "0.5150893", "0.5150893", "0.51436424", "0.5135702", "0.51355696", "0.5134819", "0.51323414", "0.5127043", "0.5114249", "0.5112864", "0.5102376", "0.50886744", "0.50824195", "0.50800735", "0.50800735", "0.50766456", "0.5073405", "0.5073405", "0.5070929", "0.5069453", "0.50609094", "0.5055895", "0.50554085", "0.50554085", "0.50501007", "0.5049516", "0.5034556", "0.5034264", "0.50290704", "0.50290704", "0.50290704", "0.50290704", "0.50290704", "0.50290704", "0.50290704", "0.50290704", "0.50290704", "0.50290704", "0.50290704", "0.50290704", "0.5028076", "0.50239336", "0.5022016", "0.5019966", "0.50166065", "0.5011124", "0.5010153", "0.50045395", "0.5002026", "0.49980122", "0.49980122", "0.49949753", "0.49906373", "0.498642", "0.49839064", "0.4982111", "0.49792507", "0.49787548", "0.4977661", "0.49763122", "0.49683917", "0.49672776", "0.4963597", "0.49615893", "0.4960921", "0.49561307", "0.49503186" ]
0.6294538
0
Handle AdcreativesApi adcreativesUpdateAsync function
public function updateAsync(array $params = []) { return $this->handleMiddleware('update', $params, function(MiddlewareRequest $request) { $params = $request->getApiMethodArguments(); $data = $params; $response = $this->apiInstance->adcreativesUpdateAsync($data); return $response; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(array $params = [])\n {\n return $this->handleMiddleware('update', $params, function(MiddlewareRequest $request) {\n $params = $request->getApiMethodArguments();\n $data = $params;\n $response = $this->apiInstance->adcreativesUpdate($data);\n return $this->handleResponse($response);\n });\n }", "public function updateTempAd() {\n\t\ttry {\n\n\t\t\t$field_name = Request::input('name');\n\t\t\t$field_val = Request::input('value');\n\t\t\t$field_id = Request::input('pk');\n\t\t\t$child_content_date_id = Request::input('child_content_date_id');\n\t\t\t$check_client_details = Request::input('check_client_details');\n\t\t\t$check_talkbreak_suggestion = Request::input('check_talkbreak_suggestion');\n\n\t\t\t$contentObj = ConnectContent::find($field_id);\n\n\t\t\tif ($field_name == 'start_date' || $field_name == 'end_date') {\n\t\t\t\t$field_val = parseDateToMySqlFormat($field_val);\n\t\t\t\tif ($field_name == 'start_date') {\n\t\t\t\t\t$date_id = $contentObj->addContentStartDate($child_content_date_id, $field_val);\n\t\t\t\t} else if ($field_name == 'end_date') {\n\t\t\t\t\t$date_id = $contentObj->addContentEndDate($child_content_date_id, $field_val);\n\t\t\t\t}\n\t\t\t\tif ($child_content_date_id != $date_id) {\n\t\t\t\t\t$parent_id = Request::input('parent_content_id');\n\t\t\t\t\tConnectContentBelongs::setChildContentDate($parent_id, $field_id, $date_id);\n\t\t\t\t}\n\n\t\t\t\t$contentObj->updateContentToTagsLink();\n\n\t\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('pk' => $field_id, 'date_id' => $date_id)));\n\t\t\t}\n\n\t\t\tif ($field_name == 'ad_key') {\n\t\t\t\t$field_val = cleanupAdKey($field_val);\n\n\t\t\t\t$existingAdWithKey = ConnectContent::findAdContentOfKey(\\Auth::User()->station->id, $field_val);\n\t\t\t\tif ($existingAdWithKey && $existingAdWithKey->id != $field_id) {\n\t\t\t\t\treturn response()->json(array('code' => 100, 'msg' => 'Duplicate Key Number', 'data' => array('existing_id' => $existingAdWithKey->id, 'pk' => $field_id, 'date_id' => $child_content_date_id)));\n\t\t\t\t}\n\n\t\t\t\t$overwrite_existing = Request::input('overwrite_existing');\n\n\t\t\t\tif (empty($overwrite_existing) || $overwrite_existing == '0') { // should create new ad item\n\n\t\t\t\t\t$clonedContent = $contentObj->copyContent();\n\t\t\t\t\t$clonedContent->ad_key = $field_val;\n\t\t\t\t\t$clonedContent->save();\n\n\t\t\t\t\t$clonedContent->updateContentToTagsLink();\n\n\t\t\t\t\t$clonedContent->searchAudioFileAndLink();\n\n\t\t\t\t\t$clonedContentDate = null;\n\n\t\t\t\t\tif ($child_content_date_id) {\n\t\t\t\t\t\t$originalContentDate = $contentObj->getContentDate($child_content_date_id);\n\t\t\t\t\t\tif ($originalContentDate) {\n\t\t\t\t\t\t\t$clonedContentDate = $clonedContent->getContentDateByDateRange($originalContentDate->start_date, $originalContentDate->end_date);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$clonedContentArray = $clonedContent->toArray();\n\n\t\t\t\t\tif ($clonedContentDate) {\n\t\t\t\t\t\t$start_date = strtotime($clonedContentDate->start_date);\n\t\t\t\t\t\t$clonedContentArray['start_date'] = $start_date === FALSE ? '' : date(\"d-m-Y\", $start_date);\n\n\t\t\t\t\t\t$end_date = strtotime($clonedContentDate->end_date);\n\t\t\t\t\t\t$clonedContentArray['end_date'] = $end_date === FALSE ? '' : date(\"d-m-Y\", $end_date);\n\n\t\t\t\t\t\t$clonedContentArray['child_content_date_id'] = $clonedContentDate->id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$clonedContentArray['start_date'] = '';\n\t\t\t\t\t\t$clonedContentArray['end_date'] = '';\n\t\t\t\t\t\t$clonedContentArray['child_content_date_id'] = '0';\n\t\t\t\t\t}\n\n\t\t\t\t\treturn response()->json(array('code' => 200, 'msg' => 'Success with Clone', 'data' => array('newObj' => $clonedContentArray, 'pk' => $field_id, 'date_id' => $child_content_date_id )));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($field_name == 'content_rec_type' && $field_val == 'live') {\n\t\t\t\t$contentObj->audio_enabled = 1;\n\t\t\t}\n\n\t\t\tif($field_name == 'map_address1') {\n\t\t\t\t$map_address = $field_val;\n\t\t\t\tif(!empty($map_address)) {\n\t\t\t\t\t$geoInfo = getGEOFromAddress($map_address);\n\t\t\t\t}\n\t\t\t\tif (!empty($geoInfo)) {\n\t\t\t\t\t$contentObj->map_address1_lat = $geoInfo['lat'];\n\t\t\t\t\t$contentObj->map_address1_lng = $geoInfo['lng'];\n\t\t\t\t} else {\n\t\t\t\t\t$contentObj->map_address1_lat = '';\n\t\t\t\t\t$contentObj->map_address1_lng = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// autocomplete for client name\n\t\t\tif ($field_name == 'who' && $check_client_details) {\n\t\t\t\t$client = ConnectContentClient::GetConnectContentByTradingName($field_val, $contentObj->station_id);\n\t\t\t\tif ($client) { // client information is found, we copy them\n\t\t\t\t\t$contentObj->copyContentOfClient($client);\n\t\t\t\t\t$contentObj->updateWhoAndWhatForTagsAndEvents();\n\t\t\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('pk' => $field_id, 'date_id' => $child_content_date_id, 'require_reload' => 1)));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t\t// autocomplete for talk break\n\t\t\tif (($field_name == 'what' || $field_name == 'who') && $check_talkbreak_suggestion) {\n\t\t\t\t$autoSuggestId = Request::input(\"autoSuggestContentId\");\n\t\t\t\t\n\t\t\t\tif ($field_name == 'what') {\n\t\t\t\t\t$suggestedObjByText = ConnectContent::GetTalkBreakByWhat(\\Auth::User()->station->id, $field_val);\n\t\t\t\t} else if ($field_name == 'who') {\n\t\t\t\t\t$suggestedObjByText = ConnectContent::GetTalkBreakByWho(\\Auth::User()->station->id, $field_val);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$suggestedObjById = ConnectContent::find($autoSuggestId);\n\t\t\t\t\n\t\t\t\t$suggestedObj = null;\n\t\t\t\t\n\t\t\t\tif ($suggestedObjByText) {\n\t\t\t\t\t$suggestedObj = $suggestedObjByText;\n\t\t\t\t\tif ($suggestedObjById && ((strcasecmp($suggestedObjById->what, $field_val) == 0 && $field_name == 'what') || (strcasecmp($suggestedObjById->who, $field_val) == 0 && $field_name == 'who'))) {\n\t\t\t\t\t\t$suggestedObj = $suggestedObjById;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tagId = Request::input('tagId');\n\t\t\t\t$tagForContent = Tag::find($tagId);\n\t\t\t\t\n\t\t\t\t// found autocomplete suggestion?\n\t\t\t\tif ($tagForContent) {\n\t\t\t\t\t$newContentObj = null;\n\t\t\t\t\tif ($suggestedObj) {\n\t\t\t\t\t\t$newContentObj = $suggestedObj->copyContent();\n\t\t\t\t\t} else if (!$contentObj->isContentTalkBreak()) {\n\t\t\t\t\t\t$newContentObj = $contentObj->createTalkBreakFromContent();\n\t\t\t\t\t\tif ($field_name == 'what') {\n\t\t\t\t\t\t\t$newContentObj->what = $field_val;\n\t\t\t\t\t\t} else if ($field_name == 'who') {\n\t\t\t\t\t\t\t$newContentObj->who = $field_val;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$newContentObj->save();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($newContentObj) {\n\t\t\t\t\t\t$tagForContent->connect_content_id = $newContentObj->id;\n\t\t\t\t\t\t$tagForContent->save();\n\t\t\t\t\t\t$newContentObj->updateWhoAndWhatForTagsAndEvents();\n\t\t\t\t\t\t$newContentObj->sendCompetitonResultGenerationRequest(); // send competition generation request\n\t\t\t\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('pk' => $field_id, 'require_reload' => 1)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// autocomplete for talk break - vote\n\t\t\tif ($field_name == 'vote_question' && $check_talkbreak_suggestion) {\n\t\t\t\t$autoSuggestId = Request::input(\"autoSuggestContentId\");\n\t\t\n\t\t\t\t$suggestedObjByText = ConnectContent::GetTalkBreakByVoteQuestion(\\Auth::User()->station->id, $field_val);\n\t\t\t\n\t\t\t\t$suggestedObjById = ConnectContent::find($autoSuggestId);\n\t\t\t\n\t\t\t\t$suggestedObj = null;\n\t\t\t\n\t\t\t\tif ($suggestedObjByText) {\n\t\t\t\t\t$suggestedObj = $suggestedObjByText;\n\t\t\t\t\tif ($suggestedObjById && strcasecmp($suggestedObjById->vote_question, $field_val) == 0) {\n\t\t\t\t\t\t$suggestedObj = $suggestedObjById;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\t$tagId = Request::input('tagId');\n\t\t\t\t$tagForContent = Tag::find($tagId);\n\t\t\t\n\t\t\t\t// found autocomplete suggestion?\n\t\t\t\tif ($tagForContent) {\n\t\t\t\t\t$newContentObj = null;\n\t\t\t\t\tif ($suggestedObj) {\n\t\t\t\t\t\t$newContentObj = $suggestedObj->copyContent();\n\t\t\t\t\t} else if (!$contentObj->isContentTalkBreak()) {\n\t\t\t\t\t\t$newContentObj = $contentObj->createTalkBreakFromContent();\n\t\t\t\t\t\t$newContentObj->vote_question = $field_val;\n\t\t\t\t\t\t$newContentObj->save();\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tif ($newContentObj) {\n\t\t\t\t\t\tif ($tagForContent->setTagWithVote($newContentObj)) {\n\t\t\t\t\t\t\t$newContentObj->sendEventUpdateNotificationForContent();\n\t\t\t\t\t\t\t$newContentObj->sendVoteResultGenerationRequest(); // send vote generation request\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('pk' => $field_id, 'require_reload' => 1)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\n\t\t\t$contentObj->$field_name = $field_val;\n\n\t\t\t//Updating actions\n\t\t\tif($field_name == 'action_params') {\n\t\t\t\t$action_types = array();\n\n\t\t\t\t$actions = \\App\\ConnectContentAction::orderBy('id', 'desc')->get();\n\n\t\t\t\tforeach($actions as $action) {\n\t\t\t\t\t$action_types[$action['id']] = $action['action_type'] ;\n\t\t\t\t}\n\t\t\t\tif($field_val) {\n\t\t\t\t\tif ($contentObj->action_id == 0) {\n\t\t\t\t\t\t$contentObj->$field_name = '{\"website\":\"' . $field_val . '\"}';\n\t\t\t\t\t} else if ($action_types[$contentObj->action_id] == 'website' || $action_types[$contentObj->action_id] == 'get' || $action_types[$contentObj->action_id] == 'call') {\n\t\t\t\t\t\t$contentObj->$field_name = '{\"website\":\"' . $field_val . '\"}';\n\t\t\t\t\t} else if ($action_types[$contentObj->action_id] == 'phone' || $action_types[$contentObj->action_id] == 'sms') {\n\t\t\t\t\t\t$contentObj->$field_name = '{\"phone\":\"' . $field_val . '\"}';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$contentObj->$field_name = '';\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$contentObj->save();\n\t\t\t\n\t\t\t// for vote\n\t\t\tif ($field_name == 'vote_question' || $field_name == 'vote_option_1' || $field_name == 'vote_option_2') {\n\t\t\t\t$contentObj->sendEventUpdateNotificationForContent();\n\t\t\t}\n\t\t\t\n\t\t\tif ($field_name == 'vote_duration_minutes') {\n\t\t\t\t$tagId = Request::input('tagId');\n\t\t\t\t$tagForContent = Tag::find($tagId);\n\t\t\t\tif ($tagForContent) {\n\t\t\t\t\t$tagForContent->updateVoteDurationForTag($contentObj);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t\tif ($field_name == 'ad_key') {\n\t\t\t\t$contentObj->updateContentToTagsLink();\n\t\t\t\t$contentObj->searchAudioFileAndLink();\n\t\t\t}\n\n\t\t\tif ($field_name == 'who' || $field_name == 'what') {\n\t\t\t\t$contentObj->updateWhoAndWhatForTagsAndEvents();\n\t\t\t}\n\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('pk' => $field_id, 'date_id' => $child_content_date_id, 'content' => $contentObj)));\n\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\t}", "public function update($bannerclient);", "public function update()\n {\n try{\n $ad = new AdService();\n $res=$ad->update();\n if($res[0]){\n return redirect('/ad/edit/'.$res[1]->id)->with('message', '修改成功!');\n }else{\n return redirect('/ad/edit/'.$res[1]->id)->with(['message'=>'没有什么需要修改!','level'=>'info']);\n }\n }catch(\\Exception $e){\n dd($e);\n }\n }", "public function onUpdate(Campaign $campaign, array $payload): void\n {\n //\n }", "public function update($banner);", "function acf_updates()\n{\n}", "public function update(Request $request, $id)\n {\n $url = str_replace(' ', '-', $request->title);\n while (Advertisement::where('url', $url)->where('id', '!=', $id)->count()) {\n $url .= '-';\n }\n $publish_at_array = \\Morilog\\Jalali\\jDateTime::toGregorian($request->year, $request->month, $request->day);\n $publish_at = strtotime($publish_at_array[0] . '-' . $publish_at_array[1] . '-' . $publish_at_array[2]);\n Advertisement::where('id', $id)->update(['type' => $request->type, 'name' => $request->name, 'phone' => $request->phone, 'tell' => $request->tell, 'email' => $request->email, 'address' => $request->address, 'title' => $request->title, 'url' => $url, 'description' => $request->description, 'category_id' => intval($request->category_id), 'state' => $request->state, 'city' => '', 'publish_at' => $publish_at, 'expire_at' => 0, 'updated_at' => strtotime(date('Y-m-d H:i:s')), 'created_at' => strtotime(date('Y-m-d H:i:s')), 'type_row' => 1]);\n foreach ($request->files as $file)\n foreach ($file as $key => $value) {\n $image = null;\n if (isset($value)) {\n $image = $id . time() . md5(pathinfo($value->getClientOriginalName(), PATHINFO_FILENAME)) . '.' . $value->getClientOriginalExtension();\n \\Storage::disk('upload')->makeDirectory('/advertisement/' . $id . '/');\n $exists = \\Storage::disk('upload')->has('/advertisement/' . $id . '/' . $image);\n if ($exists == null)\n \\Storage::disk('upload')->put('/advertisement/' . $id . '/' . $image, \\File::get($value->getRealPath()));\n AdvertisementGallery::create(['advertisement_id' => $id, 'image' => $image, 'created_at' => strtotime(date('Y-m-d H:i:s'))]);\n }\n }\n return redirect('dashboard/advertisement');\n }", "public function doUpdate() {\n\t\ttry {\n\t\t\tcall_user_func_array( $this->doUpdateFunction, $this->arguments );\n\t\t} catch ( Exception $ex ) {\n\t\t\t$this->exceptionHandler->handleException( $ex, 'data-update-failed',\n\t\t\t\t'A data update callback triggered an exception' );\n\t\t}\n\t}", "public function update(Request $request, Ad $ad)\n {\n //\n }", "public function update(Request $request, Ad $ad)\n {\n //\n }", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "public function update(Request $request, Advert $advert)\n {\n $this->authorize('update_adverts', 'App\\Advert');\n $this->validate($request, array(\n 'active' => 'nullable',\n 'link_title' => 'required|max:50',\n 'url' => '',\n 'banner' => 'required|image',\n 'banner_alt' => 'required|max:50',\n 'user_id' => 'integer|Auth::user()->id',\n 'advertable_type' => '',\n 'advertable_id' => '',\n\n ));\n $advert = Advert::find($advert->id);\n\n $advert->active = $request->active;\n $advert->link_title = $request->link_title;\n $advert->url = $request->url;\n $advert->banner = $request->banner;\n $advert->banner_alt = $request->banner_alt;\n $advert->user_id = Auth::user()->id;\n $advert->advertable_type = $request->advertable_type;\n $advert->advertable_id = $request->advertable_id;\n\n\n if ($request->hasFile('banner')) {\n //add new photo\n $image = $request->file('banner');\n $filename = time() . '.' . $image->getClientOriginalExtension();\n $location = public_path(\"images/adverts/\" . $filename);\n $oldfile = public_path(\"images/adverts/\" . $advert->banner);\n // dd($oldfile);\n if(File::exists($oldfile))\n {\n File::delete($oldfile);\n }\n Image::make($image)->resize(800, 400)->save($location);\n $advert->banner = $filename;\n }\n $advert->save();\n\n $notification = array(\n 'message' => 'Advertisement updated successfully',\n 'alert-type' => 'info'\n );\n return redirect(route('adverts.show', $advert->id))->with($notification);\n }", "public function updateCampaign($params)\r\n {\r\n }", "public function update()\n {\n # code...\n }", "protected function update() {}", "public function updateAdvertiser (Request $request) {\n $fields = $request->only(['advertiser_name']);\n\n if ($request->hasFile('image')) {\n $custom_data['image'] = $this->storageService->saveFile ($request->image, self::ADVERTISER_IMAGE_DIRECTORY);\n $advertiser = $this->repository->find( (int) $request->route()->parameter('id'));\n //save image data\n $this->repository->find( (int) $request->route()->parameter('id'))->custom()->updateOrCreate([], $custom_data);\n }\n return $this->repository->update((int) $request->route()->parameter('id'), $fields);\n }", "public function postUpdateCallback()\n {\n $this->performPostUpdateCallback();\n }", "public function postUpdateCallback()\n {\n $this->performPostUpdateCallback();\n }", "public function update(Request $request, $id)\n {\n\n if($request->preroll_type == 'channel_bg'){\n\n $this->validate($request, array(\n 'preroll_name' => 'required',\n 'preroll_type' => 'required',\n 'preroll_goto_link' => 'required',\n ));\n\n $advertising = Advertising::find($id);\n $advertising->preroll_name = $request->preroll_name;\n $advertising->preroll_type = $request->preroll_type;\n $advertising->preroll_goto_link = $request->preroll_goto_link;\n\n if($request->thumb_img != null){\n $img_val_array = ['jpg', 'jpeg', 'JPG', 'JPEG', 'png', 'gif'];\n if(in_array($request->thumb_img->getClientOriginalExtension(), $img_val_array)){\n $file = uniqid().'.'.$request->thumb_img->getClientOriginalExtension();\n $request->thumb_img->move(public_path('ad_up/images'), $file);\n $image = public_path('ad_up/images/').$file;\n $s3 = Storage::disk('s3frenvid');\n $s3->put('/ads/images/'.$file, file_get_contents($image), 'public');\n unlink($image);\n if($advertising->preroll_thumbimg){\n $del_path = '/ads/images/'.$advertising->preroll_thumbimg;\n if(Storage::disk('s3frenvid')->exists($del_path)) {\n Storage::disk('s3frenvid')->delete($del_path);\n }\n }\n $advertising->preroll_thumbimg = $file;\n }\n }\n\n $advertising->save();\n Session::flash('success', 'Your change was successfully added!');\n\n //redirect\n\n return redirect()->route('advertising.index');\n\n }\n else{\n\n $this->validate($request, array(\n 'preroll_name' => 'required',\n 'preroll_type' => 'required',\n 'preroll_goto_link' => 'required',\n 'preroll_skip_timer' => 'required'\n ));\n\n $advertising = Advertising::find($id);\n $advertising->preroll_name = $request->preroll_name;\n $advertising->preroll_type = $request->preroll_type;\n $advertising->preroll_goto_link = $request->preroll_goto_link;\n $advertising->preroll_skip_timer = $request->preroll_skip_timer;\n\n\n if($request->preroll_mp4 != null){\n if($request->preroll_mp4->getClientOriginalExtension() == 'mp4'){\n $file = uniqid().'v.'.$request->preroll_mp4->getClientOriginalExtension();\n $request->preroll_mp4->move(public_path('ad_up/videos'), $file);\n $video = public_path('ad_up/videos/').$file;\n $s3 = Storage::disk('s3frenvid');\n $s3->put('/ads/videos/'.$file, file_get_contents($video), 'public');\n unlink($video);\n if($advertising->preroll_mp4){\n $del_path = '/ads/videos/'.$advertising->preroll_mp4;\n if(Storage::disk('s3frenvid')->exists($del_path)) {\n Storage::disk('s3frenvid')->delete($del_path);\n }\n }\n $advertising->preroll_mp4 = $file;\n }\n }\n\n\n if($request->thumb_img != null){\n $img_val_array = ['jpg', 'jpeg', 'JPG', 'JPEG', 'png', 'gif'];\n if(in_array($request->thumb_img->getClientOriginalExtension(), $img_val_array)){\n $file = uniqid().'.'.$request->thumb_img->getClientOriginalExtension();\n $request->thumb_img->move(public_path('ad_up/images'), $file);\n $image = public_path('ad_up/images/').$file;\n $s3 = Storage::disk('s3frenvid');\n $s3->put('/ads/images/'.$file, file_get_contents($image), 'public');\n unlink($image);\n if($advertising->preroll_thumbimg){\n $del_path = '/ads/images/'.$advertising->preroll_thumbimg;\n if(Storage::disk('s3frenvid')->exists($del_path)) {\n Storage::disk('s3frenvid')->delete($del_path);\n }\n }\n $advertising->preroll_thumbimg = $file;\n }\n }\n\n $advertising->save();\n Session::flash('success', 'Your change was successfully added!');\n\n //redirect\n\n return redirect()->route('advertising.index');\n }\n\n\n }", "public function AdvertisementReadStatusUpdate() {\n $user = $this->auth();\n if (empty($user)) {\n Utils::response(['status' => false, 'message' => 'Forbidden access.'], 403);\n }\n $input = $this->getInput();\n if (($this->input->method() != 'post') || empty($input)) {\n Utils::response(['status' => false, 'message' => 'Bad request.'], 400);\n }\n $validate = [\n ['field' => 'push_ad_id', 'label' => 'Pushed Advertisement ID', 'rules' => 'required'],\n ];\n $errors = $this->ConsumerModel->validate($input, $validate);\n if (is_array($errors)) {\n Utils::response(['status' => false, 'message' => 'Validation errors.', 'errors' => $errors]);\n }\t\n\t\t$push_ad_id = $this->getInput('push_ad_id');\n\t\t$push_ad_idi = $push_ad_id['push_ad_id'];\n\t\t\n $this->db->set('media_play_date', date(\"Y-m-d H:i:s\")); \n $this->db->where('id', $push_ad_idi);\n if ($this->db->update('push_advertisements')) {\n Utils::response(['status' => true, 'message' => 'Record updated.', 'data' => $input]);\n } else {\n Utils::response(['status' => false, 'message' => 'System failed to update.'], 200);\n }\n }", "public function update(Request $request, cardface_classofcreature_atag $cardface_classofcreature_atag){\n // enter your stuff here if you want...\n\treturn(parent::update($request,$cardface_classofcreature_atag));\n }", "function acf_update_values($values = array(), $post_id = 0)\n{\n}", "public function update(Request $request, Banner $banner)\n {\n //\n }", "public function update(Request $request, Banner $banner)\n {\n //\n }", "public function update($request, $args) {\n $result = [];\n\n $id = $args['id'];\n\n $formData = $request->getParsedBody();\n\n $titulo = null;\n $desarrollador = null;\n $descripcion = null;\n $consola = null;\n $fechaLanzamiento = null;\n $calificacion = null;\n $imagenURL = null;\n\n LoggingService::logVariable($formData, __FILE__, __LINE__);\n\n // Verify the entry of titulo\n if (array_key_exists(\"titulo\", $formData)) {\n $titulo = $formData[\"titulo\"];\n }\n\n // Verify the entry of desarrollador\n if (array_key_exists(\"desarrollador\", $formData)) {\n $desarrollador = $formData[\"desarrollador\"];\n }\n\n // Verify the entry of descripcion\n if (array_key_exists(\"descripcion\", $formData)) {\n $descripcion = $formData[\"descripcion\"];\n }\n\n // Verify the entry of consola\n if (array_key_exists(\"consola\", $formData)) {\n $consola = $formData[\"consola\"];\n }\n\n // Verify the entry of fechaLanzamiento\n if (array_key_exists(\"fechaLanzamiento\", $formData)) {\n $fechaLanzamiento = $formData[\"fechaLanzamiento\"];\n }\n\n // Verify the entry of calificacion\n if (array_key_exists(\"calificacion\", $formData)) {\n $calificacion = $formData[\"calificacion\"];\n }\n\n // Verify the entry of imagenURL\n if (array_key_exists(\"imagenURL\", $formData)) {\n $imagenURL = $formData[\"imagenURL\"];\n }\n\n if (isset($id, $titulo, $desarrollador, $descripcion, $consola, $fechaLanzamiento, $calificacion, $imagenURL)) {\n $updateResult = $this->videoGameService->update($id, $titulo, $desarrollador, $descripcion, $consola, $fechaLanzamiento, $calificacion, $imagenURL);\n\n if (array_key_exists(\"error\", $updateResult)) {\n $result[\"error\"] = $updateResult[\"error\"];\n }\n\n $result[\"message\"] = $updateResult[\"message\"];\n } else {\n $result[\"error\"] = true;\n $result[\"message\"] = \"No pueden existir datos vacíos.\";\n }\n\n return $result;\n }", "#[CustomOpenApi\\Operation(id: 'leadUpdate', tags: [Tags::Lead, Tags::V1])]\n #[OpenApi\\Parameters(factory: DefaultHeaderParameters::class)]\n #[CustomOpenApi\\RequestBody(request: UpdateLeadRequest::class)]\n #[CustomOpenApi\\Response(resource: LeadWithLatestActivityResource::class)]\n #[CustomOpenApi\\ErrorResponse(exception: UnauthorisedTenantAccessException::class)]\n public function update(Lead $lead, UpdateLeadRequest $request): LeadWithLatestActivityResource\n {\n $lead->checkTenantAccess()->update($request->validated());\n return $this->show($lead->refresh()->loadMissing(self::load_relation));\n }", "public function update(Request $request, Advertisement $advert)\n {\n $this->validate($request, [\n 'click_url',\n 'end_date'\n ]);\n\n $advert->update($request->all());\n\n flash()->success('Ad successfully edited.');\n\n return redirect()->back();\n }", "protected function performUpdate() {}", "public function update($data){\n\t\tif(empty($data['ad_id'])){\n\t\t\tthrow new \\Exception('ad_id is required.');\n\t\t}\n\t\tif(empty($data['adgroup_id'])){\n\t\t\tthrow new \\Exception('adgroup_id is required.');\n\t\t}\n\t\tif(empty($data['ad_status'])){\n\t\t\tthrow new \\Exception('adgroup_id is required.');\n\t\t}\n\t\t$operations = array();\n\t\t$textAd = new \\TextAd();\n\t\t$textAd->id = $data['ad_id'];\n\t\t\n\t\t// update TextAd status.\n\t\t$adGroupAd = new \\AdGroupAd();\n\t\t$adGroupAd->adGroupId = $data['adgroup_id'];\n\t\t$adGroupAd->ad = $textAd;\n\t\t$adGroupAd->status = $this->mappingStatus($data['ad_status']);\n\n\t\t// Create operation.\n\t\t$operation = new \\AdGroupAdOperation();\n\t\t$operation->operand = $adGroupAd;\n\t\t$operation->operator = 'SET';\n\t\t$operations = array($operation);\n\n\t\t// Make the mutate request.\n\t\t$result = $this->adGroupAdService->mutate($operations);\n\t\t$adGroupAd = $result->value[0];\n\t\treturn TRUE;\n\t}", "public function update(Request $request, Advert $advert)\n {\n //\n }", "public function update(){\n $service_category = new OsServiceCategoryModel($this->params['service_category']['id']);\n $service_category->set_data($this->params['service_category']);\n if($service_category->save()){\n $response_html = __('Service Category Updated. ID: ', 'latepoint') . $service_category->id;\n $status = LATEPOINT_STATUS_SUCCESS;\n }else{\n $response_html = $service_category->get_error_messages();\n $status = LATEPOINT_STATUS_ERROR;\n }\n if($this->get_return_format() == 'json'){\n $this->send_json(array('status' => $status, 'message' => $response_html));\n }\n }", "function UpdateAdGroupRemarketingListAssociations($proxy, $adGroupRemarketingListAssociations)\n{\n $request = new UpdateAdGroupRemarketingListAssociationsRequest();\n $request->AdGroupRemarketingListAssociations = $adGroupRemarketingListAssociations;\n \n return $proxy->GetService()->UpdateAdGroupRemarketingListAssociations($request);\n}", "function apsa_ajax_update_campaign_status() {\n if (!current_user_can('manage_options')) {\n die();\n }\n\n $success = 1;\n\n $campaign_id = $_POST['campaign_id'];\n $campaign_action = $_POST['campaign_action'];\n $campaign_type = $_POST['campaign_type'];\n\n if ($campaign_action == \"delete\") {\n $action = apsa_delete_campaign($campaign_id);\n } else {\n $action = apsa_update_campaign($campaign_id, '', $campaign_type, $campaign_action);\n }\n\n if ($action === FALSE) {\n $success = 0;\n }\n\n $response = array('success' => $success);\n echo json_encode($response);\n\n wp_die();\n}", "public function updateImageFeaturesAsync($request) \n {\n $returnType = '';\n $isBinary = true;\n $hasReturnType = false;\n $request = $this->getHttpRequest($request, 'PUT');\n $options = $this->createHttpClientOptions();\n\n return $this->client\n ->sendAsync($request, $options)\n ->then(\n function ($response) use ($request, $hasReturnType, $returnType, $isBinary) {\n return $this->processResponse($request, $response, $hasReturnType, $returnType, $isBinary);\n },\n function ($exception) use ($request) {\n $this->processException($exception);\n }\n );\n }", "public function update(Request $request, Advertisement $advertisement)\n {\n $data = $this->validate($request, [\n 'homepage_header_image' => 'mimes:jpg,jpeg,png',\n 'homepage_header_url' => 'required',\n 'homepage_sidebar_image' => 'mimes:jpg,jpeg,png',\n 'homepage_sidebar_url' => 'required',\n 'homepage_bottom_image' => 'mimes:jpg,jpeg,png',\n 'homepage_bottom_url' => 'required',\n\n 'singlepage_header_image' => 'mimes:jpg,jpeg,png',\n 'singlepage_header_url' => 'required',\n 'singlepage_sidebar_image' => 'mimes:jpg,jpeg,png',\n 'singlepage_sidebar_url' => 'required',\n 'singlepage_bottom_image' => 'mimes:jpg,jpeg,png',\n 'singlepage_bottom_url' => 'required',\n ]);\n\n $homepage_header_image = '';\n if ($request->hasFile('homepage_header_image')) {\n Storage::disk('uploads')->delete($advertisement->homepage_header_image);\n $homepage_header_image = $request->file('homepage_header_image')->store('advertisement_images', 'uploads');\n } else {\n $homepage_header_image = $advertisement->homepage_header_image;\n }\n\n $homepage_sidebar_image = '';\n if ($request->hasFile('homepage_sidebar_image')) {\n Storage::disk('uploads')->delete($advertisement->homepage_sidebar_image);\n $homepage_sidebar_image = $request->file('homepage_sidebar_image')->store('advertisement_images', 'uploads');\n } else {\n $homepage_sidebar_image = $advertisement->homepage_sidebar_image;\n }\n\n $homepage_bottom_image = '';\n if ($request->hasFile('homepage_bottom_image')) {\n Storage::disk('uploads')->delete($advertisement->homepage_bottom_image);\n $homepage_bottom_image = $request->file('homepage_bottom_image')->store('advertisement_images', 'uploads');\n } else {\n $homepage_bottom_image = $advertisement->homepage_bottom_image;\n }\n\n $singlepage_header_image = '';\n if ($request->hasFile('singlepage_header_image')) {\n Storage::disk('uploads')->delete($advertisement->singlepage_header_image);\n $singlepage_header_image = $request->file('singlepage_header_image')->store('advertisement_images', 'uploads');\n } else {\n $singlepage_header_image = $advertisement->singlepage_header_image;\n }\n\n $singlepage_sidebar_image = '';\n if ($request->hasFile('singlepage_sidebar_image')) {\n Storage::disk('uploads')->delete($advertisement->singlepage_sidebar_image);\n $singlepage_sidebar_image = $request->file('singlepage_sidebar_image')->store('advertisement_images', 'uploads');\n } else {\n $singlepage_sidebar_image = $advertisement->singlepage_sidebar_image;\n }\n\n $singlepage_bottom_image = '';\n if ($request->hasFile('singlepage_bottom_image')) {\n Storage::disk('uploads')->delete($advertisement->singlepage_bottom_image);\n $singlepage_bottom_image = $request->file('singlepage_bottom_image')->store('advertisement_images', 'uploads');\n } else {\n $singlepage_bottom_image = $advertisement->singlepage_bottom_image;\n }\n\n $advertisement->update([\n 'homepage_header_image' => $homepage_header_image,\n 'homepage_header_url' => $data['homepage_header_url'],\n 'homepage_sidebar_image' => $homepage_sidebar_image,\n 'homepage_sidebar_url' => $data['homepage_sidebar_url'],\n 'homepage_bottom_image' => $homepage_bottom_image,\n 'homepage_bottom_url' => $data['homepage_bottom_url'],\n\n 'singlepage_header_image' => $singlepage_header_image,\n 'singlepage_header_url' => $data['singlepage_header_url'],\n 'singlepage_sidebar_image' => $singlepage_sidebar_image,\n 'singlepage_sidebar_url' => $data['singlepage_sidebar_url'],\n 'singlepage_bottom_image' => $singlepage_bottom_image,\n 'singlepage_bottom_url' => $data['singlepage_bottom_url'],\n ]);\n\n return redirect()->route('advertisements.index')->with('success', 'Advertisement Information updated successfully.');\n }", "public function updating()\n {\n # code...\n }", "public function update(Request $request, ApertureLuoghiInteresse $apertureLuoghiInteresse)\n {\n //\n }", "public function addAsync(array $params = [])\n {\n return $this->handleMiddleware('add', $params, function(MiddlewareRequest $request) {\n $params = $request->getApiMethodArguments();\n $data = $params;\n $response = $this->apiInstance->adcreativesAddAsync($data);\n return $response;\n });\n }", "public function update(AbateRequest $request, $abate)\n {\n \n $abates = Abate::find($abate);\n\n $abates->update($request->all());\n \n session()->flash('flash_message','Abate successfully updated.'); //<--FLASH MESSAGE\n\n if (Request::wantsJson()){\n return $abates;\n }else{\n return redirect('abates');\n }\n }", "public static function update(){\n }", "public function updateLeadStage() {\n\n /////////////////////////////////////////////////////////////////////\n // CHECK REQUIRED DATA //////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////\n\n if (is_null($this->__apiPrivateToken)) {\n throw new \\Exception(\"API Private Token must be setted!\");\n }\n\n if (is_null($this->__leadEmail)) {\n throw new \\Exception(\"Lead email must be setted!\");\n }\n\n if (!isset($this->__leadData['lifecycle_stage'])) {\n throw new \\Exception(\"Lead data 'lifecycle_stage' must be setted!\");\n }\n\n /////////////////////////////////////////////////////////////////////\n // PREPARE DATA COLLECTION //////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////\n\n $this->__translateLeadData();\n\n $lead = array();\n\n if (isset($this->__leadData['lifecycle_stage'])) {\n $lead['lifecycle_stage'] = $this->__leadData['lifecycle_stage'];\n }\n\n if (isset($this->__leadData['opportunity'])) {\n $lead['opportunity'] = $this->__leadData['opportunity'];\n }\n\n $leadData = array();\n $leadData['auth_token'] = $this->__apiPrivateToken;\n $leadData['lead'] = $lead;\n\n $this->__leadData = $leadData;\n\n /////////////////////////////////////////////////////////////////////\n // PERFORM REQUEST TO API ///////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////\n\n return $this->__request('PUT','leads');\n }", "private function _update_shortcodes(&$content, $response)\n\t\t{\nSyncDebug::log(__METHOD__.'():' . __LINE__);\n\t\t\t$sc = new SyncEDDShortcodes();\n\t\t\t$modified = 0;\n\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' data=' . var_export($content, TRUE));\n\t\t\tif (FALSE !== ($matches = $sc->search($content))) {\n//SyncDebug::log(__METHOD__.'():' . __LINE__ . ' found shortcode content: ' . $content);\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' matches: ' . var_export($matches, TRUE));\n\n\t\t\t\t$source_site_key = SyncApiController::get_instance()->source_site_key;\n\t\t\t\t$sync_model = new SyncModel();\t\t\t\t\t\t// needed for ID lookups\n\t\t\t\t$idx = 0;\n\t\t\t\tforeach ($matches[2] as $match) {\n\t\t\t\t\t// get the attributes found within the shortcode\n\t\t\t\t\t$shortcode = $matches[0][$idx];\t\t\t\t\t// contains the full shortcode\n\t\t\t\t\t$res = $sc->extract_attributes($shortcode);\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' res=' . var_export($res, TRUE));\n\n\t\t\t\t\tswitch (strtolower($match)) {\n\t\t\t\t\tcase 'purchase_link':\n\t\t\t\t\t\tif (isset($res['attributes']['id'])) {\n\t\t\t\t\t\t\t$download_id = abs($res['attributes']['id']);\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' download id=' . $download_id);\n\t\t\t\t\t\t\t$sync_data = $sync_model->get_sync_data($download_id, $source_site_key, 'post');\n\t\t\t\t\t\t\tif (NULL === $sync_data) {\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' data not found; returning');\n\t\t\t\t\t\t\t\t$response->error_code(SyncEDDApiRequest::ERROR_SHORTCODE_REF_ID, $download_id);\n\t\t\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t\t\t}\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' generating replacement shortcode for ' . $shortcode);\n\n\t\t\t\t\t\t\t// replace the ID value in the shortcode with the Target's Content ID\n\t\t\t\t\t\t\t$new_shortcode = $sc->replacement_shortcode($shortcode, 'id', $res['attributes']['id'], strval($sync_data->target_content_id));\n\t\t\t\t\t\t\tif ($new_shortcode !== $shortcode) {\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' replacing ' . $shortcode . ' with ' . $new_shortcode);\n\t\t\t\t\t\t\t\t$content = str_replace($shortcode, $new_shortcode, $content);\n\t\t\t\t\t\t\t\t++$modified;\n\t\t\t\t\t\t\t}\nelse SyncDebug::log(__METHOD__.'():' . __LINE__ . ' shortcodes match: ' . $new_shortcode);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'downloads':\n\t\t\t\t\tcase 'edd_downloads':\n\t\t\t\t\t\t$new_ids = array();\n\t\t\t\t\t\tif (isset($res['attributes']['ids'])) {\n\t\t\t\t\t\t\t$ids_value = $res['attributes']['ids'];\n\t\t\t\t\t\t\t$ids = explode(',', $ids_value);\n\t\t\t\t\t\t\t// look up each ID value and get it's replacement value\n\t\t\t\t\t\t\tforeach ($ids as $download_id) {\n\t\t\t\t\t\t\t\t$download_id = abs($download_id);\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' download id=' . $download_id);\n\t\t\t\t\t\t\t\t$sync_data = $sync_model->get_sync_data($download_id, $source_site_key, 'post');\n\t\t\t\t\t\t\t\tif (NULL === $sync_data) {\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' data not found; returning');\n\t\t\t\t\t\t\t\t\t$response->error_code(SyncEDDApiRequest::ERROR_SHORTCODE_REF_ID, $download_id);\n\t\t\t\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$new_ids[] = $sync_data->target_content_id;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// replace the IDS value in the shortcode with the list of Target Content IDs\n\t\t\t\t\t\t\t$new_shortcode = $sc->replacement_shortcode($shortcode, 'ids', $res['attributes']['ids'], implode(',', $new_ids));\n\t\t\t\t\t\t\tif ($new_shortcode !== $shortcode) {\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' replacing ' . $shortcode . ' with ' . $new_shortcode);\n\t\t\t\t\t\t\t\t$content = str_replace($shortcode, $new_shortcode, $content);\n\t\t\t\t\t\t\t\t++$modified;\n\t\t\t\t\t\t\t}\nelse SyncDebug::log(__METHOD__.'():' . __LINE__ . ' shortcodes match: ' . $new_shortcode);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'edd_price':\n\t\t\t\t\t\tif (isset($res['attributes']['id'])) {\n\t\t\t\t\t\t\t$download_id = abs($res['attributes']['id']);\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' download id=' . $download_id);\n\t\t\t\t\t\t\t$sync_data = $sync_model->get_sync_data($download_id, $source_site_key, 'post');\n\t\t\t\t\t\t\tif (NULL === $sync_data) {\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' data not found; returning');\n\t\t\t\t\t\t\t\t$response->error_code(SyncEDDApiRequest::ERROR_SHORTCODE_REF_ID, $download_id);\n\t\t\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t\t\t}\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' generating replacement shortcode for ' . $shortcode);\n\n\t\t\t\t\t\t\t// replace the ID value in the shortcode with the Target's Content ID\n\t\t\t\t\t\t\t$new_shortcode = $sc->replacement_shortcode($shortcode, 'id', $res['attributes']['id'], strval($sync_data->target_content_id));\n\t\t\t\t\t\t\tif ($new_shortcode !== $shortcode) {\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' replacing ' . $shortcode . ' with ' . $new_shortcode);\n\t\t\t\t\t\t\t\t$content = str_replace($shortcode, $new_shortcode, $content);\n\t\t\t\t\t\t\t\t++$modified;\n\t\t\t\t\t\t\t}\nelse SyncDebug::log(__METHOD__.'():' . __LINE__ . ' shortcodes match: ' . $new_shortcode);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' found shortcode \"' . $match . '\" but no handler for it');\n\t\t\t\t\t} // switch\n\t\t\t\t\t++$idx;\t\t\t\t\t// increment index\n\t\t\t\t} // foreach (matches)\n\t\t\t} // FALSE !== sc->matches - checks to see if any shortcodes exist within the content\n\n\t\t\t// remove the temporary markers that prevent modifying already updated attributes\n\t\t\t$content = str_replace(SyncEDDShortcodes::MARKER, '', $content);\n\n\t\t\treturn $modified;\t\t\t\t// number of modified shortcodes\n\t\t}", "public function update(Request $request, Pedim_consent_for_rapid_covid19_testings $consent_for_covid19)\n {\n\n $is_sign_responsible_party_updated = \"nullable\";\n\n if(request('sign_responsible_party_updated') == \"yes\")\n { \n $is_sign_responsible_party_updated = \"required\"; \n }\n\n //\n $valiedation_from_array = [ \n 'patient_name' => 'required', \n 'patient_email' => 'required',\n 'telephone' => 'required',\n 'sign_responsible_party' => $is_sign_responsible_party_updated, \n 'date' => 'required'\n\n ];\n\n \n $this->validate($request, $valiedation_from_array);\n\n //dd($is_witness_signature_update);\n $sign_responsible_party = $request->sign_responsible_party_src;\n if(request('sign_responsible_party_updated') == \"yes\")\n {\n \n $patient_signature = app('App\\Http\\Controllers\\SignaturePadController')->update_signature($request->sign_responsible_party,$sign_responsible_party);\n \n }\n \n //dd($sign_responsible_party);\n $consent_for_covid19->patient_name = request('patient_name');\n $consent_for_covid19->is_patient_minor = request('is_patient_minor');\n $consent_for_covid19->parent_guardian = request('parent_guardian');\n $consent_for_covid19->patient_email = request('patient_email');\n $consent_for_covid19->telephone = request('telephone');\n $consent_for_covid19->sign_responsible_party = $sign_responsible_party;\n $consent_for_covid19->date = request('date');\n $consent_for_covid19->client_forms_id = request('client_forms_id'); \n $consent_for_covid19->status = 'active'; \n $update_status = $consent_for_covid19->save();\n\n if($update_status)\n { \n if(Auth::guard('clients')->check())\n {\n session()->flash(\"success\",\"Successfully Updated\"); \n return redirect()->route('client.PedimConsentForRapidCovid19Testing.submissions',$consent_for_covid19->client_forms_id);\n }\n else\n {\n session()->flash(\"success\",\"Successfully Updated\"); \n return redirect()->route('PedimConsentForRapidCovid19Testing.submissions',$consent_for_covid19->client_forms_id);\n }\n\n }\n else\n {\n session()->flash(\"warning\",\"Some thing went wrong, please Update again\"); \n return redirect()->back();\n\n }\n }", "public function testUpdateChallengeActivity()\n {\n }", "function updateAffiliateBannerFrontEnd($oAffiliate)\n\t\t{\n\t\t\t$query= \"update tbl_affiliate set banner ='\".$oAffiliate->organisation_banner.\"' \n\t\t\t where affiliate_id = $oAffiliate->member_id\";\n\t\t\t\n\t\t\t$rs = $this->Execute($query);\n\t\t\treturn $rs;\n\t\t}", "public function update(Request $request, Advertisement $advertisement)\n {\n $request->validate([\n 'url' => 'required|unique:advertisements'\n ]);\n if ($request->image == \"\"){\n $imgUrl = $advertisement->image;\n }else{\n $imgUrl = $this->imageuploader($request->image);\n }\n\n $advertisement->update([\n 'image'=> $imgUrl,\n 'url' => $request->url\n ]);\n return redirect(route('advertisement.index'))->with('msg','اطلاعات با موفقیت ویرایش شد');\n\n }", "public function update(Request $request, $id)\n {\n $payload = $request->post();\n $payload['created_by'] = auth()->user()->id;\n $premium_client = PremiumClints::findOrFail($id);\n\n if (!empty($premium_client)) {\n $premium_client->update($payload);\n $this->handlePremimumImage($premium_client);\n\n flash('Slider updated successfully')->success();\n return redirect()->route('premium-clients.edit', ['premium_client' => $premium_client->id]);\n } else {\n abort(500, 'Something went wrong');\n }\n }", "public function update(Request $request, $id)\n {\n $ad = Ad::find($id);\n $user = Auth::user();\n $user_id = $user->id;\n\n if (! $user->is_admin()){\n if ($ad->user_id != $user_id){\n return view('admin.error.error_404');\n }\n }\n $mark_ad_urgent = $request->mark_ad_urgent ? $request->mark_ad_urgent : '0';\n\n $rules = [\n 'category' => 'required',\n 'ad_title' => 'required',\n 'ad_description' => 'required',\n 'type' => 'required',\n 'condition' => 'required',\n 'country' => 'required',\n 'seller_name' => 'required',\n 'seller_email' => 'required',\n 'seller_phone' => 'required',\n 'address' => 'required',\n ];\n\n $this->validate($request, $rules);\n\n $title = $request->ad_title;\n //$slug = unique_slug($title);\n \n $sub_category = Category::find($request->category);\n $is_negotialble = $request->negotiable ? $request->negotiable : '0';\n $brand_id = $request->brand ? $request->brand : 0;\n $video_url = $request->video_url ? $request->video_url : '';\n\n $data = [\n 'title' => $request->ad_title,\n 'description' => $request->ad_description,\n 'category_id' => $sub_category->category_id,\n 'sub_category_id' => $request->category,\n 'brand_id' => $brand_id,\n 'type' => $request->type,\n 'ad_condition' => $request->condition,\n 'price' => $request->price,\n 'is_negotiable' => $is_negotialble,\n\n 'seller_name' => $request->seller_name,\n 'seller_email' => $request->seller_email,\n 'seller_phone' => $request->seller_phone,\n 'country_id' => $request->country,\n 'state_id' => $request->state,\n 'city_id' => $request->city,\n 'address' => $request->address,\n 'video_url' => $video_url,\n 'price_plan' => $request->price_plan,\n 'mark_ad_urgent' => $mark_ad_urgent,\n\n ];\n \n $updated_ad = $ad->update($data);\n\n /**\n * iF add created\n */\n if ($updated_ad){\n //Attach all unused media with this ad\n Media::whereUserId($user_id)->whereAdId(0)->whereRef('ad')->update(['ad_id'=>$ad->id]);\n }\n\n return redirect()->back()->with('success', trans('app.ad_updated'));\n }", "public function update() {\r\n }", "protected function _update()\n\t{\n\t}", "public function update(Request $request, reciclaeducate $reciclaeducate)\n {\n //\n }", "public function update()\n {\n //\n }", "public function update()\n {\n //\n }", "public function asyncUpdateStatus() {\n\t\t\n\t\t$applyId = Input::get('apply_id');\n $statusValue = Input::get('status_value');\n\t\t\n\t\t$apply = ApplyModel::find($applyId);\n\t\n\t\t$apply->status = $statusValue;\n\t\t$apply->save();\n\t\t\n\t\treturn Response::json(['result' => 'success', 'msg' => 'Status has been updated successfully.']);\n\t\t\n\t}", "protected function performPostUpdateCallback()\n {\n // echo 'updated a record ...';\n return true;\n }", "public function update(Request $request, leads $leads)\n {\n //\n }", "public function update(Request $request)\n {\n $id = $request->get('id');\n if($request->hasFile('photo')){\n $photo = $request->file('photo');\n $photo_name = uniqid().'_'.$photo->getClientOriginalName();\n $photo->move(public_path('upload/ads/'),$photo_name);\n $ads = Ads::find($id);\n $image_path=public_path().'/upload/ads/'.$ads->photo;\n if(file_exists($image_path)){\n unlink($image_path);\n }\n Ads::findOrFail($id)->update([\n 'photo'=>$photo_name,\n 'link'=>$request->get('link'),\n 's_date'=>$request->get('s_date'),\n 'e_date'=>$request->get('e_date'),\n ]);\n Ads_webpage::where('ads_id',$id)->delete();\n foreach ($request->get('webpage_id') as $webpage) {\n Ads_webpage::create([\n 'ads_id'=>$id,\n 'webpage_id'=>$webpage\n ]);\n }\n }else {\n Ads::findOrFail($id)->update([\n 'link'=>$request->get('link'),\n 's_date'=>$request->get('s_date'),\n 'e_date'=>$request->get('e_date'),\n ]);\n Ads_webpage::where('ads_id',$id)->delete();\n foreach ($request->get('webpage_id') as $webpage) {\n Ads_webpage::create([\n 'ads_id'=>$id,\n 'webpage_id'=>$webpage\n ]);\n }\n }\n }", "public function update(Request $request)\n {\n $id = $request->get('id');\n if($request->hasFile('photo')){\n $photo = $request->file('photo');\n $photo_name = uniqid().'_'.$photo->getClientOriginalName();\n $photo->move(public_path('upload/ads/'),$photo_name);\n $ads = Ads::find($id);\n $image_path=public_path().'/upload/ads/'.$ads->photo;\n if(file_exists($image_path)){\n unlink($image_path);\n }\n Ads::findOrFail($id)->update([\n 'photo'=>$photo_name,\n 'link'=>$request->get('link'),\n 's_date'=>$request->get('s_date'),\n 'e_date'=>$request->get('e_date'),\n ]);\n Ads_webpage::where('ads_id',$id)->delete();\n foreach ($request->get('webpage_id') as $webpage) {\n Ads_webpage::create([\n 'ads_id'=>$id,\n 'webpage_id'=>$webpage\n ]);\n }\n }else {\n Ads::findOrFail($id)->update([\n 'link'=>$request->get('link'),\n 's_date'=>$request->get('s_date'),\n 'e_date'=>$request->get('e_date'),\n ]);\n Ads_webpage::where('ads_id',$id)->delete();\n foreach ($request->get('webpage_id') as $webpage) {\n Ads_webpage::create([\n 'ads_id'=>$id,\n 'webpage_id'=>$webpage\n ]);\n }\n }\n }", "public function update() {\n \n }", "public function update(Request $request){\n $campaign = Campaign::find($request->input('campaign_id'));\n if ($request->input('campaign_type')=='donation'){\n $percentage = $campaign->percentage;\n }else{\n $wishlist_item = CampaignItem::where('campaigns_id', $request->input('campaign_id'))\n ->first();\n $percentage = $wishlist_item->fulfillment_percentage;\n }\n\n if ($percentage > 0){\n return response()->json([\n \"message\" => \"error\"\n ], 400);\n }else{\n $campaign->update([\n 'title' => $request->input('title'),\n 'description' => $request->input('description'),\n 'deadline' => $request->input('deadline'),\n 'banner_path' => $request->input('banner_path'),\n 'shortlink' => $request->input('shortlink'),\n 'campaign_type' => $request->input('campaign_type'),\n 'target_amount' => $request->input('target_amount'),\n 'status' => $request->input('status')\n ]);\n }\n\n return response()->json([\n $campaign\n ]);\n }", "public function testUpdateServiceData()\n {\n\n }", "public function update(Request $request, $id)\n {\n $ads = Ads::find($id);\n\n $request->validate([\n 'titre' => 'required|string|max:255',\n 'description' => 'required|string',\n 'image[]' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n 'price' => 'required|string|max:255'\n ]);\n\n \n $ads->update([\n 'titre' => $request->titre,\n 'description' => $request->description,\n 'price' => $request->price\n ]);\n\n if ($request->hasFile('image')) {\n AdImage::where('ad_id', $ads->ad_id)->delete();\n $images = $request->file('image');\n foreach ($images as $image) {\n $imageName = time() . '.' . $image->extension();\n $image->move(public_path('images'), $imageName);\n\n AdImage::create([\n 'ad_id' => $ads->ad_id,\n 'image_path' => $imageName\n ]);\n }\n }\n\n return redirect()->route('ads')->with('sucess', 'Advertisement created succesfully');\n }", "public abstract function update();", "public function update($update_array){\n $date = new DateTime(\"now\",new DateTimeZone(DATETIMEZONE));\n $update_array['last_updated'] = $date->format('c');\n $this->db->update('use_case', $update_array, array('usecase_id' => $update_array['usecase_id']));\n return $this->db->affected_rows();\n }", "public function _get_update_callback()\n {\n }", "public function update(Request $request, $id)\r\n {\r\n $request->preciounidad=str_replace(',', '.', $request->preciounidad);\r\n \r\n $request->validate([\r\n 'zona' => 'required',\r\n 'unidades' => 'required|numeric',\r\n 'preciounidad' => 'required',\r\n ]);\r\n\r\n if(!is_numeric($request->preciounidad))\r\n $request->validate(['preciounidad' => 'required|numeric']);\r\n \r\n $presupExtra = CampaignPresupuestoExtra::find($id);\r\n $presupExtra->unidades = $request->unidades;\r\n $presupExtra->preciounidad = $request->preciounidad;\r\n $presupExtra->total = $request->total;\r\n $presupExtra->observaciones = $request->observaciones;\r\n $presupExtra->save();\r\n \r\n $totalExtras = CampaignPresupuestoExtra::where('presupuesto_id',$request->presupuesto_id)\r\n ->sum('total');\r\n\r\n $totalMateriales=CampaignPresupuestoDetalle::where('presupuesto_id',$request->presupuesto_id)\r\n ->sum('total');\r\n \r\n \r\n $campPresu=CampaignPresupuesto::where('id',$request->presupuesto_id)\r\n ->first();\r\n\r\n\r\n $campPresu->total=$totalExtras+$totalMateriales;\r\n $campPresu->save();\r\n\r\n\r\n // $notification = array(\r\n // 'message' => 'Línea actualizada satisfactoriamente!',\r\n // 'alert-type' => 'success'\r\n // );\r\n \r\n // return redirect()->back()->with($notification);\r\n\r\n return response()->json([\r\n \"mensaje\" => $request->all(),\r\n \"totExtra\"=>$totalExtras,\r\n \"tot\"=>$totalExtras+$totalMateriales,\r\n 'notification'=> '¡Línea actualizada satisfactoriamente!',\r\n ]);\r\n\r\n }", "public function update()\r\n {\r\n //\r\n }", "function update_kardex_academico($kardexacad_id,$params)\n {\n $this->db->where('kardexacad_id',$kardexacad_id);\n return $this->db->update('kardex_academico',$params);\n }", "public function updateAC($ac_id, $ac_brand, $ac_series, $ac_location, $ac_note, $user_id, $ac_lastservice, $ac_nextservice, $ac_status, $ac_picture) {\n\t\t//\n\t\t$stmt = $this->conn->prepare('SET @ac_id = ?, @ac_brand = ?, @ac_series = ?, @ac_location = ?, @ac_note = ?, @user_id = ?, @ac_lastservice = ?, @ac_nextservice = ?, @ac_status = ?, @ac_picture = ?');\n\t\t$stmt->bind_param('issssissss', $ac_id, $ac_brand, $ac_series, $ac_location, $ac_note, $user_id, $ac_lastservice, $ac_nextservice, $ac_status, $ac_picture);\n\t\t$stmt->execute();\n\n\t\t$result = $this->conn->query('CALL proc_edit_ac(@ac_id, @ac_brand, @ac_series, @ac_location, @ac_note, @user_id, @ac_lastservice, @ac_nextservice, @ac_status, @ac_picture)');\n\t\tif($result) {\n\t\t\t// AC successfully inserted\n\t\t\treturn SUCCESS;\n\t\t} else {\n\t\t\t// Failed to insert AC\n\t\t\treturn FAILED;\n\t\t}\n\t\treturn $response;\n\t}", "public function update(Ad $ad, AdRequest $request)\n\t{\n $ad->update($request->all());\n\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $filename = time() . '.' . $image->getClientOriginalExtension();\n $path = public_path('/media/visitors_adds/' . $filename);\n Image::make($image->getRealPath())->resize(300, null, function ($constraint) {\n $constraint->aspectRatio();\n $constraint->upsize();\n })->trim('top-left', null, 40)->save($path);\n $image = '/media/visitors_adds/' . $filename;\n $input['image'] = $image;\n\n $ad['image']=$image;\n $ad->save();\n }\n\n\n\n\n\n $this->syncTagads($ad, $request->input('tagad_list'));\n \\Session::flash('message','Ваше объявление изменено!');\n return redirect ('ads');\n\t}", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update(Request $request, Campaign $campaign)\n {\n //\n }", "public function update($request_data){\n $c_id = $request_data['c_id'];\n\n //getting data from $request_data\n $c_name = $request_data['c_name'];\n $c_cont_no = $request_data['c_cont_no'];\n $c_food_pref = $request_data['c_food_pref'];\n\n $dbs = new DatabaseControls();\n $qry = \"update \".$this->table_name.\" set c_name = '\".$c_name.\"',c_cont_no = '\".$c_cont_no.\"',c_food_preference = '\".$c_food_pref.\"' where c_id = \".$c_id;\n $result = $dbs->run_update_qry($qry); \n \n \n return json_encode($result);\n }", "public function updateData (Request $request){\n\n $arr = explode(\"-\",$request->input('signby'));\n $membid = (int)$arr[0];\n $type = (int)$arr[1];\n\n if ($type == 0 ){\n $signbyid = $membid;\n $signbytype = $this->settings('COMPANY_MEMBERS','key')->id;\n }\n else{\n $signbyid = $membid;\n $signbytype = $this->settings('COMPANY_MEMBER_FIRMS','key')->id;\n }\n\n CompanyChangeRequestItem::where('id', $request->reqid)->update(['signed_by' => $signbyid,'signed_by_table_type' => $signbytype]);\n\n $newadds = $request->input('addArr');\n \n \n foreach($newadds as $newadd){\n if(!empty($newadd)){\n \n OtherAddress::where('id', $newadd['id'])\n ->update(['records_kept_from' => $newadd['date']]);\n\n $otheraddress = OtherAddress::where('id', $newadd['id'])->first();\n\n if($newadd['type'] == 1){\n $country = 'Sri Lanka';\n }\n else{\n $country = $newadd['country'];\n }\n\n Address::where('id', $otheraddress->address_id)\n ->update(['address1' => $newadd['localAddress1'],\n 'address2' => $newadd['localAddress2'],\n 'province' => $newadd['province'],\n 'district' => $newadd['district'],\n 'city' => $newadd['city'],\n 'gn_division' => $newadd['gnDivision'],\n 'postcode' => $newadd['postcode'],\n 'country' => $country]);\n\n \n\n \n \n }\n \n }\n\n $update_compnay_updated_at = array(\n 'updated_at' => date('Y-m-d H:i:s', time())\n );\n Company::where('id', $request->id)\n ->update($update_compnay_updated_at);\n\n $penalty_value = $this->penaltyCal($request->id);\n\n\n \n\n\n return response()->json([\n 'message' => 'Sucess!!!',\n 'status' =>true,\n 'penalty_value' => $penalty_value,\n ], 200);\n\n\n\n}", "public function update(Request $request, Banner $banner)\n {\n $updated_file = $this->upload( $request, 'image');\n \n $banner->update([\n 'name' => $request->name ?: $banner->name,\n 'image' => $updated_file ?: $banner->image,\n 'url' => $request->url ?: $banner->url,\n 'duration' => $request->duration ?: $banner->duration,\n 'iframe' => $request->has('iframe') ? $request->iframe : $banner->iframe,\n 'enabled' => $request->has('enabled') ? $request->enabled : $banner->enabled\n ]);\n \n if( $request->expectsJson() ){\n return response()->json( ['data'=>$banner] );\n }\n $request->session()->flash('message', 'Banner Ad Updated Successfully!');\n return redirect()->route('admin.banners.index');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'image' => 'required',\n 'ads_url' => ''\n ]);\n\n if ($validator->fails()) {\n return back()->withErrors($validator)->withInput();\n }\n\n $advertisement = Advertisement::findOrFail($id);\n $advertisement->update( $request->all() );\n\n\n if($advertisement){\n $path = 'uploads/advertisement/image_resize';\n $resized_image = resizeImage($path, $advertisement->image);\n $advertisement->image_resize = $resized_image;\n $advertisement->save();\n }\n\n \\Session::flash('success', 'Advertisement Update Successfully');\n return redirect('/advertisement');\n }", "public function update()\n {\n\n }", "public function update()\n {\n\n }", "public function update(Request $request, Avaliacao $avaliacao)\n {\n //\n }", "public function update(AdvertiserPutRequest $request, Redirector $redirector) {\n $this->service->updateAdvertiser ($request);\n return $redirector->to('/admin/advertisers/'.$request->route()->parameter('id'))->with('message', 'Advertiser successfully updated');\n }", "protected function afterUpdating()\n {\n }", "public function update () {\n\n }", "public static function update(){\r\n }", "public function update()\n {\n \n }", "public function update()\n {\n \n }", "public function updateMultiple_data()\n {\n \n }", "protected function _postUpdate()\n\t{\n\t}" ]
[ "0.5917742", "0.5658925", "0.5595941", "0.55297655", "0.543105", "0.54243857", "0.53371656", "0.5321273", "0.522914", "0.51891714", "0.51891714", "0.516665", "0.516665", "0.5112772", "0.5105476", "0.5096989", "0.5077336", "0.5059539", "0.50487566", "0.50487566", "0.50448465", "0.50287324", "0.50230527", "0.4990473", "0.49763185", "0.49763185", "0.49726146", "0.4967019", "0.49554914", "0.49443176", "0.49405715", "0.49308005", "0.49249125", "0.4921181", "0.49200392", "0.4914994", "0.49018073", "0.4891444", "0.48879603", "0.48805633", "0.4871447", "0.48676962", "0.48656815", "0.48559552", "0.48554492", "0.48513234", "0.4849206", "0.484623", "0.48398957", "0.4839816", "0.48354268", "0.4834584", "0.48296696", "0.48233643", "0.48233643", "0.4812272", "0.47926933", "0.47883126", "0.47872493", "0.47872493", "0.47753432", "0.47750312", "0.477449", "0.4773437", "0.4768369", "0.4768158", "0.47666082", "0.47641477", "0.4763027", "0.47619778", "0.4761845", "0.47612455", "0.4759653", "0.4759653", "0.4759653", "0.4759653", "0.4759653", "0.4759653", "0.4759653", "0.4759653", "0.4759653", "0.4759653", "0.4759653", "0.4759653", "0.4755424", "0.47509524", "0.47496584", "0.47483736", "0.47444132", "0.47364753", "0.47364753", "0.47349012", "0.47280923", "0.47206032", "0.47148332", "0.47091174", "0.47090605", "0.47090605", "0.4708732", "0.47051033" ]
0.68615216
0
Function: create_task Description: Create a new task Return: Boolean result of the insert statement
function create_task() { try { $sql = $GLOBALS["db"]->prepare('SELECT MAX(sort_weight) as next FROM tasks WHERE category_id=:category_id AND bucket_id=:bucket_id'); $sql->bindParam(':category_id', $_POST["category_id"]); $sql->bindParam(':bucket_id', $_POST["bucket_id"]); $sql->execute(); $row = $sql->fetch(); $weight = $row["next"] + 10; $sql = $GLOBALS["db"]->prepare('INSERT INTO tasks (user_id, category_id, bucket_id, task_name, task_details, sort_weight, created_date) VALUES (:user_id, :category_id, :bucket_id, :task_name, :task_details, :sort_weight, NOW())'); $sql->bindParam(':user_id', $_SESSION["user"]["user_id"]); $sql->bindParam(':category_id', $_POST["category_id"]); $sql->bindParam(':bucket_id', $_POST["bucket_id"]); $sql->bindParam(':task_name', $_POST["task_name"]); $sql->bindParam(':task_details', $_POST["task_details"]); $sql->bindParam(':sort_weight', $weight); $sql->execute(); return true; } catch (\PDOException $e) { $_SESSION["msg"]["danger"][] = "ERROR: PDO Exception on Insert"; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function CreateTask()\n {\n\n $data = $this->GetParamsFromRequestBody('create');\n\n if (!isset($data['status'])) {\n $data['status'] = \"open\";\n }\n\n $data['createdby'] = $this->loggedUser->getId();\n\n $this->insertArrayIntoDatabase('todo_task', $data);\n $id = mysql_insert_id();\n\n $this->response = array(\n \"status\" => 0,\n \"id\" => $id\n );\n $this->responseStatus = 201;\n }", "function createTask($taskName, $task_status, $task_time, $list_id) {\n if (isset($taskName)) {\n $dbconn = DBconnection();\n \n // prepares the statement to create the tasks\n $query = $dbconn->prepare(\"INSERT INTO Tasks (task_name, list_id, task_time, task_status) VALUES (:task_name, :list_id, :task_time, :task_status)\");\n $query->bindParam(':task_name', $taskName);\n $query->bindParam(':list_id', $list_id);\n $query->bindParam(':task_time', $task_time);\n $query->bindParam(':task_status', $task_status);\n $query->execute();\n }\n return $query;\n\n}", "public function createTask()\n\t{\n\t\tif ( $this->taskValidate() ) {\n\t\t\tTask::create([\n\t\t\t\t\t'name' => htmlspecialchars($_POST['inputTaskName']),\n\t\t\t\t\t'email' => htmlspecialchars($_POST['inputTaskMail']),\n\t\t\t\t\t'text' => htmlspecialchars($_POST['inputTaskText'])\n\t\t\t\t]);\n\t\t}\n\t\t// to index\n\t\t\theader('Location: /');\n\t}", "public function createTask()\n {\n return factory($this->model)->create();\n }", "public static function addTask(string $name_task, string $task, array $params) {\n// exit;\n \n $taskMeta = explode('::', $task);\n \n $taskClassExist = class_exists($taskMeta[0]);\n $taskMethodExist = method_exists($taskMeta[0], $taskMeta[1]);\n \n if (!$taskClassExist || !$taskMethodExist) {\n return false;\n }\n// $created = new DbExp('NOW');\n// echo \"<pre>\";var_dump($created); echo \"</pre>\";\n// exit;\n\n return Db::insert('tasks_queue', [\n 'name_task' => $name_task,\n 'task' => $task,\n 'params' => json_encode($params),\n 'created' => Db::expr('NOW()'), \n ]);\n \n// echo \"<pre>\";var_dump($taskClassExist, $taskMethodExist); echo \"</pre>\"; \n \n }", "public function actionCreateTask() {\n // Check settings, show errors if there are any\n try {\n craft()->goLive_settings->verifySettings();\n }\n catch (Exception $e) {\n header('HTTP/1.1 ' . 500);\n\n $errorMessage = $e->getMessage();\n $this->returnErrorJson($errorMessage);\n }\n catch (HttpException $e) {\n header('HTTP/1.1 ' . $e->statusCode);\n\n $errorMessage = $e->getMessage();\n $this->returnErrorJson($errorMessage);\n }\n\n // Settings look good, create and run the task.\n // Also, set a random-ish backup file name to be referenced within the task steps\n $deployTask = craft()->tasks->createTask(\n 'GoLive_Deploy',\n 'GoLive_Deploy',\n array(\n 'backupFileName' => uniqid('goLive_') . '.sql'\n )\n );\n\n // Tries to end the HTTP session, and definitely starts running the pending tasks.\n // Our task may or may not be first in that queue.\n craft()->tasks->closeAndRun();\n }", "public function testCreateTask()\n {\n }", "public function insertTask() {\n\t\t$conn=parent::connect();\n\t\t$sql = \"INSERT INTO \" . TBL_TASK . \" (\n\t\t\ttask_name,\n\t\t\ttask_hourly_rate,\n\t\t\ttask_bill_by_default,\n\t\t\ttask_common\n\t\t\t) VALUES (\n\t\t\t:task_name,\n\t\t\t:task_hourly_rate,\n\t\t\t:task_bill_by_default,\n\t\t\t:task_common\n\t\t\t)\";\n\t\ttry {\n\t\t\t$st = $conn->prepare($sql);\n\t\t\t$st->bindValue(\":task_name\", $this->data[\"task_name\"], PDO::PARAM_STR);\n\t\t\t$st->bindValue(\":task_hourly_rate\", $this->data[\"task_hourly_rate\"], PDO::PARAM_STR);\n\t\t\t$st->bindValue(\":task_bill_by_default\", $this->data[\"task_bill_by_default\"], PDO::PARAM_INT);\n\t\t\t$st->bindValue(\":task_common\", $this->data[\"task_common\"], PDO::PARAM_INT);\n\t\t\t$st->execute();\n\t\t\tparent::disconnect($conn);\n\t\t} catch (PDOException $e) {\n\t\t\tparent::disconnect($conn);\n\t\t\tdie(\"Query failed on insert, sql is $sql \" . $e->getMessage());\n\t\t}\t\n\t}", "final static public function Createtask(){\n\t\t$wr = static::validationB();\n\t\t$record = new static::$modelNM();\t//instantiate new object\n\t\t$record->id = $_SESSION[\"UserID\"];\n\t\t$record->owneremail = $_POST[\"owneremail\"];\n\t\t$record->ownerid = $_POST[\"ownerid\"];\n\t\t$record->createddate = $_POST[\"createddate\"];\n\t\t$record->duedate = $_POST[\"duedate\"];\n\t\t$record->message = $_POST[\"message\"];\n\t\t$record->isdone = $_POST[\"isdone\"];\n\t\t\n\t\tif($wr != \"\") {\n\t\t\techo $wr;\n\t\t\treturn NULL;\n\t\t} else {\n\t\t\t//$_SESSION[\"Temprecord\"] = NULL;\n\t\t}\n\t\t\n\t\n\t\t$record->GoFunction(\"Insert\");\t//Run Insert() in modol class and echo success or not\n\t\treturn 1;\t//return display html table code from ShowData\t\t\n\t}", "function addTask()\n {\n $query = \"INSERT INTO \" . $this->table_name . \"\n SET `for`=:for, `from`=:from, date=:date, time=:time, until_date=:until_date, text=:text, created_at=:created_at, until_time=:until_time, importance=:importance, status=:status\";\n\n // prepare query\n $stmt = $this->conn->prepare($query);\n\n // sanitize\n $this->for = htmlspecialchars(strip_tags($this->for));\n $this->from = htmlspecialchars(strip_tags($this->from));\n $this->date = htmlspecialchars(strip_tags($this->date));\n $this->time = htmlspecialchars(strip_tags($this->time));\n $this->until_date = htmlspecialchars(strip_tags($this->until_date));\n $this->text = htmlspecialchars(strip_tags($this->text));\n $this->until_time = htmlspecialchars(strip_tags($this->until_time));\n $this->importance = htmlspecialchars(strip_tags($this->importance));\n $this->status = htmlspecialchars(strip_tags($this->status));\n $this->created_at = htmlspecialchars(strip_tags($this->created_at));\n\n // bind values\n $stmt->bindParam(\":for\", $this->for);\n $stmt->bindParam(\":from\", $this->from);\n $stmt->bindParam(\":date\", $this->date);\n $stmt->bindParam(\":time\", $this->time);\n $stmt->bindParam(\":until_date\", $this->until_date);\n $stmt->bindParam(\":text\", $this->text);\n $stmt->bindParam(\":until_time\", $this->until_time);\n $stmt->bindParam(\":importance\", $this->importance);\n $stmt->bindParam(\":status\", $this->status);\n $stmt->bindParam(\":created_at\", $this->created_at);\n\n // execute query\n if ($stmt->execute()) {\n return true;\n }\n return false;\n }", "public function task_create( $client_id, $client_name, $name, $description, $user_id, $user_name, $deadline, $comment ){\n \n if( $stmt = $this->connection->prepare(\"INSERT INTO tasks VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\") ){\n \n $id = uniqid('T');\n $status = \"0\";\n $pinned = \"0\";\n \n $stmt->bind_param( \"sssssssssii\", $id, $name, $client_id, $client_name, $user_id, $user_name, $deadline, $description, $comment, $status, $pinned );\n if( $stmt->execute() ){\n $stmt->close();\n return TRUE;\n }\n \n $stmt->close();\n }\n \n return FALSE;\n }", "private function createTask() {\n $query = $this->createQuery();\n\n\t\techo $query;\n\n $task = $this->database->prepare($query);\n $task->execute($this->queryProperty->getWhereArgs());\n return $task;\n }", "public function test_create_task()\n {\n \n $response = $this->post('/task', [\n 'name' => 'Task name', \n 'priority' => 'urgent', \n 'schedule_date_date' => '2020-12-12',\n 'schedule_date_time' => '12:22',\n 'project_id' => 1,\n ]);\n $response->assertStatus(302);\n }", "public function create(): void {\n\t\t$rawdata = array(\n\t\t\t'datetime' => $this->request->request->get('datetime', null),\n\t\t\t'priority' => $this->request->request->getInt('priority', 1),\n\t\t\t'description' => $this->request->request->get('description'),\n\t\t);\n\n\t\t$rawdata['datetime'] ??= new DateTime();\n\n\t\tif ($rawdata['description'] !== '') {\n\t\t\tpreg_match('/^(.+?) ?(?:\\\\[(\\\\d+)\\\\]|)$/', strip_tags($rawdata['description'] ?? ''), $matches);\n\t\t\t$rawdata['description'] = $matches[1];\n\t\t}\n\n\t\t$data = array(\n\t\t\t'name' => $rawdata['description'],\n\t\t\t'donereward' => $matches[2] ?? 0,\n\t\t\t'priority' => $rawdata['priority'],\n\t\t\t'duedate' => $rawdata['datetime'],\n\t\t\t'user' => $this->user\n\t\t);\n\n\t\t$task = $this->di_repo->new(TaskModel::class, $data);\n\n\t\tif (($validResult = $task->valid()) === true) {\n\t\t\tif (!$task->save()) {\n\t\t\t\tthrow new RuntimeException('Could not save new task valid?:'.var_export($task->valid(), true));\n\t\t\t}\n\n\t\t\t$this->view->set('errors', false);\n\t\t} else {\n\t\t\t$this->view->set('errors', $validResult->getAll());\n\t\t}\n\n\t\t$this->respondTo('json');\n\t}", "public function create() : bool\n {\n if( ! User::isLoggedIn()) {\n header(\"Location: /user/login\");\n }\n\n $model = new Task();\n $attributes = $this->request->body();\n $user_id = User::getLoggedInUserId();\n $attributes['user_id'] = $user_id;\n\n if($this->request->isPost() && $model->setAttributes($attributes)->validate() && $model->create() ) {\n\n header(\"Location: /task/index\");\n exit;\n }\n\n return $this->render('create', $model);\n }", "function insert_task($task)\r\n{\r\n\tglobal $db;\r\n\r\n\t$allowedfields = array('type','name','comments','priority','time','date','tid');\r\n\r\n\tforeach($task as $tk => $t)\r\n\t{\r\n\t\tif(!in_array($tk,$allowedfields))\r\n\t\t{\r\n\t\t\tunset($task[$tk]);\r\n\t\t}\r\n\t}\r\n\r\n\t// Validate type\r\n\t$task['type'] = (int)$task['type'];\r\n\tif($task['type'] != 1 && $task['type'] != 2)\r\n\t{\r\n\t\t// Default to a task\r\n\t\t$task['type'] = 1;\r\n\t}\r\n\r\n\t// Validate name\r\n\t$task['name'] = trim($task['name']);\r\n\tif(empty($task['name']))\r\n\t{\r\n\t\treturn array(\"error\" => true, \"message\" => \"The name cannot be blank.\");\r\n\t} else {\r\n\t\t// Clean it out\r\n\t\t$task['name'] = htmlspecialchars_uni($db->escape_string($task['name']));\r\n\t}\r\n\r\n\t// Comments aren't required, we'll just clean it\r\n\t$task['comments'] = htmlspecialchars_uni($db->escape_string($task['comments']));\r\n\r\n\t// Priority\r\n\t$task['priority'] = (int)$task['priority'];\r\n\tif($task['priority'] != 1 && $task['priority'] != 2 && $task['priority'] != 3)\r\n\t{\r\n\t\t// Default to a medium\r\n\t\t$task['type'] = 2;\r\n\t}\r\n\r\n\t// Time\r\n\t$time = explode(':',$task['time']);\r\n\t$hour = (int)$time[0];\r\n\t$minute = (int)$time[1];\r\n\r\n\tif($hour > 23 || $hour < 0 || $minute > 59 || $minute < 0)\r\n\t{\r\n\t\treturn array(\"error\" => true, \"message\" => \"Invalid time!\");\r\n\t} else {\r\n\t\t$task['time'] = \"{$hour}:{$minute}\";\r\n\t}\r\n\r\n\t// Date\r\n\t$date = explode('-',$task['date']);\r\n\t$year = (int)$date[0];\r\n\t$month = (int)$date[1];\r\n\t$day = (int)$date[2];\r\n\r\n\tif(checkdate($month,$day,$year))\r\n\t{\r\n\t\t$task['date'] = \"{$year}-{$month}-{$day}\";\r\n\t} else {\r\n\r\n\t}\r\n\r\n\t// Are we in the past?\r\n\t$dv = \"{$month}/{$day}/{$year}\";\r\n\t$time = strtotime(\"{$dv} {$task['time']}\");\r\n\tif ($time < time())\r\n\t{\r\n\t\treturn array(\"error\" => true, \"message\" => \"You can't schedule something in the past!\");\t\r\n\t}\r\n\r\n\t// Edit or add?\r\n\tif(isset($task['tid']))\r\n\t{\r\n\t\t$task['tid'] = (int)$task['tid'];\r\n\t\t// Edit it is!\r\n\t\t// Check to make sure the task exists\r\n\r\n\t\t$texists = $db->simple_select('tasks','*',\"tid='{$task['tid']}'\");\r\n\t\tif($db->num_rows($texists) == 0)\r\n\t\t{\r\n\t\t\treturn array(\"error\" => true, \"message\" => \"Invalid task.\");\t\t\t\r\n\t\t}\r\n\r\n\t\t$db->update_query('tasks',$task,\"tid='{$task['tid']}'\");\r\n\r\n\t} else {\r\n\t\t// Add this new baby!\r\n\t\t$db->insert_query('tasks',$task);\r\n\t\treturn true;\r\n\t}\r\n}", "public function create_task()\n {\n $title = $this->input->post('title');\n $start_date = $this->input->post('start_date');\n $due_date = $this->input->post('due_date');\n $description = $this->input->post('description');\n $user_id = $this->session->userdata('USER_ID');\n \n // get inputs - task category\n // $task_cat_name = $this->input->post('name');\n $task_cat_name = \"Medical Aid\";\n $task_cat_description =$this->input->post('description');\n \n \n // get inputs - task status\n //$task_status_name = $this->input->post('name');\n $task_status_name = \"Open\";\n $task_status_description =$this->input->post('description');\n \n \n \n $this->db->trans_start();\n \n // new task\n $this->new_task_data($title,$start_date,$due_date,$description, $user_id);\n // new task category\n $this->create_task_category($task_cat_name, $task_cat_description);\n // new task status\n $this->create_task_status($task_status_name, $task_status_description);\n \n // get all tasks\n $this->fetch_all_tasks();\n \n // update task details\n //$this->update_task($id);\n \n // delete task\n // $this->delete_task();\n \n // Complete transaction\n $this->db->trans_complete();\n \n return $this->db->trans_status();\n }", "function CreateTask() {\n\tif (!empty($_GET['email']) && !empty($_GET['password'])) {\n\t\t// check if valid email and pw\n\t\tif (Authenticate($_GET['email'], $_GET['password'])) {\n\t\t\t// check if valid fields are present for task creation\n\t\t\tif (!empty($_GET['name']) && !empty($_GET['type']) && !empty($_GET['priority'])) {\n\t\t\t\t// store keys \n\t\t\t\t$_POST['name'] = $name= $_GET['name'];\n\t\t\t\t$_POST['type'] = $type = $_GET['type'];\n\t\t\t\t$_POST['priority'] = $priority = $_GET['priority'];\n\n\t\t\t\t// priority will be between 1 and 10\n\t\t\t\tif ($priority > 10) $_POST['priority'] = 10;\n\t\t\t\tif ($priority < 1) $_POST['priority'] = 1;\n\n\t\t\t\t//validate name\n\t\t\t\tif (strlen($name) > 100 || strlen($name) < 5) {\n\t\t\t\t\techo json_encode(\"Task name to short/long, n > 5 < 100\");\n\t\t\t\t\treturn;\n\t\t\t\t} \n\n\t\t\t\t// validate type\n\t\t\t\t$type= strtolower($type);\n\t\t\t\tif ($type != 'home' && $type != 'work') {\n\t\t\t\t\techo json_encode(\"Task type should be home or work\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// get the id of the user creating the task\n\t\t\t\t$conn = GetConnection();\n\t\t\t\t$stmt = \"SELECT ID FROM users WHERE email='$_GET[email]'\";\n\t\t\t\t$data = $conn->query($stmt) or die('Query failed: ' . mysqli_error($conn));\n\t\t\t\t$row = mysqli_fetch_row($data);\n\t\t\t\t//set id to the id of the owner\n\t\t\t\t$_POST['id'] = $row[0];\n\t\t\t\t// tasks always start as todo\n\t\t\t\t$_POST['status']= 'todo';\n\n\t\t\t\t// Creat the insert statement to add task entry\n\t\t\t\t$stmt=\"INSERT INTO task (ownerID,priority,type,status,name) VALUES \".\n\t\t\t\t\t\"('$_POST[id]','$_POST[priority]','$_POST[type]', '$_POST[status]', '$_POST[name]')\";\n\n\t\t\t\t$conn->query($stmt) or die('Query failed: ' . mysqli_error($conn));\n\t\t\t\techo json_encode('Task created');\n\t\t\t\t//close the connection to the database\n\t\t\t\tmysqli_close($conn);\n\t\t\t}else echo json_encode('No name/type/priority param(s) provided, use ?name=x&type=x&priority=x in url');\n\t\t}\n\t} else echo json_encode('No email/password param(s) provided, use ?email=x&password=x in url');\t\n\n}", "function add_task($userid,$taskcode,$taskname,$taskdetail,$status,$createdOn)\r\n{\r\n\t$sql = \"INSERT INTO tasklist(UserId,TaskCode,TaskName,TaskDetail,TaskNote,Status) VALUES('\".$userid.\"','\".$taskcode.\"','\".$taskname.\"','\".$taskdetail.\"','','0')\";\r\n\t$row=mysql_query($sql);\r\n\tif($row)\r\n\t{\r\n\t\techo \"Task Created Successfully.\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\techo \"Error\";\r\n\t}\r\n\t\t\r\n}", "public function create(array $task)\n {\n $attributes = array_intersect_key($task, array_flip(self::$keysToPersist));\n \n list($code, $createdTask) = $this->httpClient->post(\"/tasks\", $attributes);\n return $createdTask; \n }", "function add_task($user, $session_uid, $task_info) {\r\n global $conn;\r\n $out = array(false, false, array(\r\n 'verified' => false\r\n ));\r\n //verify access to the db verify params are in correct format\r\n if (is_string($user) && is_string($session_uid) && is_array($task_info) && isset($conn, $task_info['name'])) {\r\n //make params safe\r\n $user = make_safe($user);\r\n $session_uid = make_safe($session_uid);\r\n\r\n //pass data to db\r\n //prepare query\r\n\r\n //make task_info safe and prepare field str and value str\r\n $field_str = \"(\";\r\n $value_str = \"(\";\r\n\r\n foreach ($task_info as $key => $value) {\r\n $v = str_replace(\"'\", \"''\", make_safe((string) $value));\r\n $task_info[$key] = $v;\r\n if ($key != 'parent_id') {\r\n\t$field_str = $field_str.\"$key, \";\r\n }\r\n if ($key != 'completed' && $key != 'parent_id') {\r\n $value_str = $value_str.\"'$v', \";\r\n } else {\r\n\tif (!($key == 'parent_id' && !preg_match(\"/^\\d+$/\", $v))) {\r\n\t $value_str = $value_str.\"$v, \";\r\n\t $field_str = $field_str.\"$key, \";\r\n\t}\r\n\r\n }\r\n }\r\n\r\n $l = strlen($field_str) - 2;\r\n $field_str = substr($field_str, 0, $l);\r\n $field_str = $field_str.\")\";\r\n\r\n $l = strlen($value_str) - 2;\r\n $value_str = substr($value_str, 0, $l);\r\n $value_str = $value_str.\")\";\r\n\r\n\r\n //verify user via verify_access\r\n if (verify_access($user, $session_uid)) {\r\n $out[2]['verified'] = true;\r\n //assemble queries\r\n $newtaskq = \"INSERT INTO tasks $field_str VALUES $value_str;\";\r\n $tname = $task_info['name'];\r\n $vertaskq = \"SELECT * FROM tasks WHERE name='$tname';\";\r\n //insert new task\r\n $out[2]['newtaskq'] = $newtaskq;\r\n if ($conn->query($newtaskq)) {\r\n\t$out[2]['newtaskquery'] = true;\r\n //get record of new task\r\n $vertaskrec = $conn->query($vertaskq)->fetch_assoc();\r\n //modify user_tasks to give access to new task using id from record of new task\r\n if (isset($vertaskrec['id'])) {\r\n give_access($user, $session_uid, $vertaskrec['id'], \"administrator\");\r\n $out[0] = true;\r\n $out[1] = $task_info;\r\n }\r\n\r\n }\r\n }\r\n }\r\n return $out;\r\n}", "public function createTask(){\n //date_default_timezone_set('Europe/Paris');\n $bdd = $this->connectDB();\n\t\t//faire les contrôles de saisie en JS\n $team=htmlspecialchars($_POST['create-task-team']);\n $flow=htmlspecialchars($_POST['create-task-flow']);\n $title=htmlspecialchars($_POST['create-task-title']);\n $priority=htmlspecialchars($_POST['create-task-priority']);\n $description=htmlspecialchars($_POST['create-task-description']);\n if (isset($_POST['create-task-assignee'])){\n $assignee=htmlspecialchars($_POST['create-task-assignee']);\n }else{\n $assignee='';\n }\n\n //get task status\n $req=$bdd->prepare('SELECT status.id AS status_id FROM status, flow WHERE flow.id=status.id_flow AND status.position=0 AND flow.id= ?');\n $req->execute(array($flow));\n\n if ($req->rowCount()){\n $row = $req->fetch();\n $status=$row['status_id'];\n }\n\n $creator=$_SESSION['id'];\n $last_modifier=$_SESSION['id'];\n $creation_date=date(\"Y-m-d H:i:s\");\n $last_modif_date=date(\"Y-m-d H:i:s\");\n $target_date=$_POST['create-task-target'];\n\n\n //insert record in table task\n\t\t$inserttask=$bdd->prepare('INSERT INTO task(title,description,creator,creation_date,assignee,last_modifier,last_modification_date,target_delivery_date,team,flow,status,priority) VALUES(?,?,?,?,?,?,?,?,?,?,?,?)');\n\t\t$inserttask->execute(array($title,$description,$creator,$creation_date,$assignee,$last_modifier,$last_modif_date,$target_date,$team,$flow,$status,$priority));\n\n //update history\n $history_manager=new historyManager();\n $history_manager->addEvent($team,'task_creation',$bdd->lastInsertId());\n\n $bdd=null;\n }", "public function store()\n\t{\n\t\t$rules = array(\n\t\t\t'title' => 'required',\n\t\t\t'description' => 'required',\n\t\t\t'status' => 'required|in:Open,In Progress,Fixed,Verified'\n\t\t);\n\n\t\t$validator = Validator::make(Input::all(), $rules);\n\t\tif ($validator->fails())\n\t\t\treturn $this->error($validator->messages(), self::BAD_REQUEST);\n\n\t\t$task = $this->task->create(\n\t\t\tarray(\n\t\t\t\t'title' => Input::get('title'),\n\t\t\t\t'description' => Input::get('description'),\n\t\t\t\t'status' => Input::get('status')\n\t\t\t)\n\t\t);\n\t\treturn $this->response($task, self::CREATED);\n\n\t}", "public function create()\n {\n $this->getUser()->hasPermission(['insert'], 'auto_tasks');\n\n return view('autotasks.create');\n }", "public function newTask(){\n if (!$this->validate()) {\n return null;\n }\n \n if( $activity = $this->saveTask() ){\n if($this->type == 'technique'){\n if(!$this->saveDevs()){ \n return null;\n }\n } \n return $activity; \n }\n return null; \n }", "public function testTask()\n\t{\n \n //Need also define the ssh keys and password in config.php\n \n //Insert first a task\n \n /*$arr_task=['name_task' => 'live', 'descripton_task' => 'Script for check if server is alive', 'arguments' => [], 'status' => 0, 'url_return' => '', 'server' => SERVER_REMOTE];\n \n $new_task=$m->task->insert($arr_task);\n \n $id=$m->task->insert_id();\n \n $this->assertNotFalse($new_task);\n \n $arr_task['IdTask']=$id;*/\n \n //Select task from db\n \n //Execute task\n \n $task=new Task(SERVER_REMOTE);\n \n $task->files=[['vendor/phangoapp/leviathan/tests/script/alive.sh', 0755]];\n \n $task->commands_to_execute=[['/bin/bash', 'vendor/phangoapp/leviathan/tests/script/alive.sh', ''], ['sudo', 'vendor/phangoapp/leviathan/tests/script/alive.sh', '']];\n \n $task->delete_files=['vendor/phangoapp/leviathan/tests/script/alive.sh'];\n \n $task->delete_directories=['vendor/phangoapp/leviathan/tests'];\n \n $task->name_task='Live';\n \n $task->description_task='Check if server is alive';\n \n $task->codename_task='live';\n \n $result=$task->exec();\n \n echo $task->txt_error;\n \n $this->assertTrue($result);\n \n \n \n }", "public static function taskCreate($user_name, $user_email, $title, $image, $tasktext){\n $db = Db::getConnection();\n \n $sql = 'INSERT INTO task (user_name, user_email, title, image, tasktext)'\n . 'VALUES (:user_name, :user_email, :title, :image, :tasktext)';\n\n $result = $db->prepare($sql);\n $result->bindParam(':user_name', $user_name, PDO::PARAM_STR);\n $result->bindParam(':user_email', $user_email, PDO::PARAM_STR);\n $result->bindParam(':title', $title, PDO::PARAM_STR);\n $result->bindParam(':image', $image, PDO::PARAM_STR);\n $result->bindParam(':tasktext', $tasktext, PDO::PARAM_STR);\n \n return $result->execute();\n }", "protected function Create() {\n // Assignment: Generate unique id for the new task\n $this->TaskId = $this->getUniqueId();\n $this->TaskName = 'New Task';\n $this->TaskDescription = 'New Description';\n }", "function newTask($StartTime, $EndTime, $StartPointX, $StartPointY, $TerminalPointX, $TerminalPointY, $LastPointX, $LastPointY, $LastUpdateTime, $UserID){\n $conn = connectDB();\n $newTaskSQL = \"INSERT INTO Task(StartTime, EndTime,StartPointX, StartPointY, TerminalPointX, TerminalPointY, LastPointX, LastPointY, LastUpdateTime, UserID) VALUES('\".$StartTime.\"','\".$EndTime.\"','\".$StartPointX.\"','\".$StartPointY.\"','\".$TerminalPointX.\"','\".$TerminalPointY.\"','\".$LastPointX.\"','\".$LastPointY.\"','\".$LastUpdateTime.\"','\".$UserID.\"');\";\n $conn->query($newTaskSQL);\n $conn->close();\n echo $newTaskSQL;\n}", "public function add_task($data){ // Add Task \n\t\n\t \n\t if($data):\n\t \n\t \t\t $this->db->insert('task_details', $data);\t\n\t \n\t endif;\n\t\n\t\n\t}", "public function add_task($data)\n {\n $datafields = array\n ('start' => array('req' => false, 'def' => 'NULL')\n ,'end' => array('req' => false, 'def' => 'NULL')\n ,'gid' => array('req' => true)\n ,'title' => array('req' => false, 'def' => '')\n ,'location' => array('req' => false, 'def' => '')\n ,'description' => array('req' => false, 'def' => '')\n ,'importance' => array('req' => false, 'def' => '1')\n ,'completion' => array('req' => false, 'def' => '0')\n ,'type' => array('req' => false, 'def' => '0')\n ,'status' => array('req' => false, 'def' => '0')\n ,'uuid' => array('req' => false, 'def' => basics::uuid())\n );\n foreach ($datafields as $k => $v) {\n if (!isset($data[$k])) {\n if ($v['req'] === true) {\n return false;\n }\n $data[$k] = $v['def'];\n } else {\n $data[$k] = $this->esc($data[$k]);\n }\n }\n // Am I the owner?\n if ($this->getGroupOwner($data['gid']) != $this->uid) {\n // If not, I should have write permissions through a share\n $perms = $GLOBALS['DB']->getUserSharedFolderPermissions($this->uid, 'calendar', $data['gid']);\n if (empty($perms) || empty($perms['write'])) {\n // No, I haven't\n return false;\n }\n }\n $query = 'INSERT '.$this->Tbl['cal_task'].' SET `uid`='.$this->uid.',`gid`='.$data['gid']\n .',`starts`='.($data['start'] == 'NULL' ? 'NULL' : '\"'.$data['start'].'\"')\n .',`ends`='.($data['end'] == 'NULL' ? 'NULL' : '\"'.$data['end'].'\"')\n .',`title`=\"'.$data['title'].'\",`location`=\"'.$data['location'].'\"'\n .',`description`=\"'.$data['description'].'\",`uuid`=\"'.$data['uuid'].'\"'\n .',`importance`='.doubleval($data['importance']).',`completion`='.doubleval($data['completion'])\n .',`type`='.doubleval($data['type']).',`status`='.doubleval($data['status']);\n if (!$this->query($query)) {\n return false;\n }\n $newId = $this->insertid();\n // Make sure, the end of an event is NOT before its beginning\n $this->query('UPDATE '.$this->Tbl['cal_task'].' SET `ends`=`starts` WHERE `ends`<`starts` AND id='.$newId);\n\n if (isset($data['reminders']) && !empty($data['reminders'])) {\n $query = 'INSERT INTO '.$this->Tbl['cal_reminder'].' (`eid`,`ref`,`uid`,`mode`,`time`,`text`,`smsto`,`mailto`) VALUES ';\n $k = 0;\n foreach ($data['reminders'] as $v) {\n if ($k) {\n $query .= ',';\n }\n if ($v['mode'] == '-') {\n continue;\n }\n $query .= '('.doubleval($newId).',\"tsk\",'.$this->uid.',\"'.$this->esc($v['mode']).'\",'.doubleval($v['time'])\n .',\"'.$this->esc($v['text']).'\",\"'.$this->esc($v['smsto']).'\",\"'.$this->esc($v['mailto']).'\")';\n $k++;\n }\n if ($k > 0) {\n $this->query($query);\n }\n }\n return $newId;\n }", "function procNewTask() {\n global $session, $form;\n //Attempt\n $retval = $session->newtask($_POST['task_title'], $_POST['task_desc'], $_POST['task_priority'], $_POST['task_assign'], $_POST['project']);\n\n if ($retval == 0) {\n $_SESSION['task_success' . $_POST['project']] = true;\n header(\"Location: \" . $session->referrer);\n } else if ($retval == 1) {\n $_SESSION['value_array'] = $_POST;\n $_SESSION['error_array'] = $form->getErrorArray();\n header(\"Location: \" . $session->referrer);\n } else if ($retval == 2) {\n $_SESSION['task_success' . $_POST['project']] = false;\n header(\"Location: \" . $session->referrer);\n }\n }", "public function createTasks()\n {\n if (count($this->tasks) == 0)\n throw new \\Drupal\\ClassLearning\\Exception('No tasks defined for TaskFactory');\n\n foreach($this->tasks as $name => $task) :\n if (isset($task['count']))\n $count = $task['count'];\n else\n $count = 1;\n\n // Some need multiple tasks. Ex: grading a soln\n // This can be expanded to as many as needed\n for ($i = 0; $i < $count; $i++) :\n $t = new WorkflowTask;\n $t->workflow_id = $this->workflow->workflow_id;\n\n // We're not assigning users at this stage\n $n = null;\n if(isset($task['behavior']))\n \t$n = $task['behavior'];\n\t\telse\n\t\t\t$n = $name;\n\t\t\n\t\t$t->type = $n;\n $t->status = 'not triggered';\n $t->start = NULL;\n\n $t->settings = $this->tasks[$n];\n $t->data = [];\n\t\t\n\t\tif(isset($task['criteria'])){\n\t\t\t$t->setData('grades',$task['criteria']);\n\t\t}\n\t\t\n $t->save();\n endfor;\n endforeach;\n\t\n }", "public function store()\n\t{\n\t\t$Task = new Task();\n\t\t$Task->user_id = Auth::user()->id;\t\n\t\t$Task->project_id = Request::get('project_id');\n\t\t$Task->category_id = Request::get('category_id');\n\t\t$Task->parent_id = Request::get('parent_id');\n\t\t$Task->title = Request::get('title');\n\t\t$Task->description = Request::get('description');\n\t\t$Task->end_at = new DateTime;\n\n\n\t\t$Task->save();\n\t\ttry {\n\t\t\tUser::find(Request::get('user_id'))->getTasks()->save($Task);\n\t\t\tProject::find(Request::get('project_id'))->getTasks()->save($Task);\n\t\t} catch (exception $e) {\n\t\t\treturn Response::json(['error' => true , 'message' => 'Couldnt create task'] , 201 );\n\t\t}\n\t\t\n\n\t\treturn Response::json(['error' => false , 'message' => 'Task Created'] , 201 );\n\t}", "public function createTask(TaskInterface $task) {\n\n return $this->request('tasks', 'POST', [], json_encode($task->getProperties()));\n }", "function writeTask($entry){\r\n // check if write worked\r\n $add = $this->exec(\"INSERT INTO `Task` (`task`) VALUES ('\".$entry.\"')\");\r\n if($add){ \r\n // Return the id it generated\r\n return $this->querySingle('select last_insert_rowid()');\r\n }\r\n return null; // Did not work\r\n }", "public function inserttasks ($task_id ,$description , $date , $duration_mins , $daytime , $course_id ){\n $sqlQuery = \" INSERT INTO tasks (task_id , description , date, duration_mins ,daytime , course_id ) \";\n $sqlQuery .= \" VALUES (’ $task_id ’, ’$description' , '$date' , '$duration_mins' , '$daytime' , '$course_id')\";\n $result = $this -> getDbManager () -> executeInsertQuery ( $sqlQuery );\n return $result ;\n }", "public function createNewTask($request) \n\t{\n\t\ttry {\n\t\t\t$data = [\n\t\t\t\t'user_id'\t\t=> $request->user_id,\n\t\t\t\t'title'\t\t\t=> $request->title,\n\t\t\t\t'body'\t\t\t=> $request->body,\n\t\t\t\t'type'\t\t\t=> $request->type,\n\t\t\t\t'deadline'\t\t=> $request->deadline,\n\t\t\t\t'isactive'\t\t=> $request->isactive,\n\t\t\t\t'settings'\t\t=> $request->settings\n\t\t\t];\n\t\t\t$task = Task::create($data);\n\t\t\t$this->setTask($task);\n\t\t} catch (\\Exception $e) {\n\t\t\tthrow new \\App\\Exceptions\\ModelException($e->getMessage());\n\t\t}\n\t}", "public function create(TaskInterface $task): void;", "private function add_task()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator(); \t \n \t$task = $serviceManager->get('PM/Model/Tasks');\n \t$result = $task->getTaskById($this->pk);\n \tif($result)\n \t{\n \t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['company_id']));\n \t\t$project_url = $this->view->url('projects/view', array('project_id' => $result['project_id']));\n \t\t$task_url = $this->view->url('tasks/view', array('task_id' => $result['id']));\n \t\t\n \t\t$this->add_breadcrumb($company_url, $result['company_name']);\n \t\t$this->add_breadcrumb($project_url, $result['project_name']);\n \t\t$this->add_breadcrumb($task_url, $result['name'], TRUE);\n \t}\n }", "public function addTask($task){\n $this->tasks()->create($task);\n\n \n \n }", "private function CreateCustomTask() {\n\t\t$lRecipientsData = $this->m_taskModel->GetCustomTaskRecipientsData($this->m_customRecipients, $this->m_customReplaceSql);\n\t\t$lCnt = 0;\n\t\tforeach ($lRecipientsData as $key => $value) {\n\t\t\t$lTempl = $this->ReplaceEmailTaskTemplate($this->m_customTemplate, $value[0]);\n\t\t\t$lSubj = $this->ReplaceEmailTaskTemplate($this->m_customSubject, $value[0]);\n\t\t\t\n\t\t\t\n\t\t\t$lUsersArr[] = (int)$value[0]['id'];\n\t\t\t$lUserTemplArr[] = '\\'' . q($lTempl) . '\\'';\n\t\t\t$lUserSubjArr[] = '\\'' . q($lSubj) . '\\'';\n\t\t\t$lUsersRoleArr[] = 0;\n\t\t\t\n\t\t\t$lCnt++;\n\t\t}\n\t\t$lUsersArrString = 'ARRAY[' . implode(\",\", $lUsersArr) . ']';\n\t\t$lUsersRoleArrString = 'ARRAY[' . implode(\",\", $lUsersRoleArr) . ']';\n\t\t$lUserTemplArrString = 'ARRAY[' . implode(\",\", $lUserTemplArr) . ']';\n\t\t$lUserSubjArrString = 'ARRAY[' . implode(\",\", $lUserSubjArr) . ']';\n\t\t\n\t\t$lTaskData = $this->m_taskModel->CreateTask(\n\t\t\t(int)$this->m_eventId, \n\t\t\t(int)SEND_EMAIL_TASK_DEFINITION_ID, \n\t\t\t$lUsersArrString, \n\t\t\t$lUserTemplArrString, \n\t\t\t$lUsersRoleArrString, \n\t\t\t'false', \n\t\t\t$lUserSubjArrString,\n\t\t\t''\n\t\t);\n\t}", "public function run()\n {\n Task::create([\n 'name' => 'Task 1',\n 'user_id' => '2',\n 'project_id' => '2',\n 'description' => 'you have to bla bla bla',\n 'status' => 'toDo'\n ]);\n\n Task::create([\n 'name' => 'Task 2',\n 'user_id' => '2',\n 'project_id' => '2',\n 'description' => 'you have to bla bla bla',\n 'status' => 'toDo'\n ]);\n }", "protected function saveTask() {}", "public function createWork($file, $idtask, $student, $comp_date ){\n $db = Yii::$app->db->createCommand();\n $db->insert('individual_works', [\n 'File' => $file,\n 'FK_Task' => $idtask,\n 'FK_Student' => $student,\n 'Status' => 'new',\n 'Completion_date' => $comp_date,\n ])->execute();\n return true;\n }", "public function create(TaskRequest $request)\n\t\t{\n\t $data = $request->only([\"task\", \"priority\"]);\n\t // create article with data and store in DB\n\t $task = Task::create($data);\n\t // return the article along with a 201 status code\n\t return response($task, 201);\n\n\t\t}", "protected function action_add() {\n\n // Where in task list to add the task?\n $project_index = 0;\n $task = $this->request->value;\n\n if ($this->state->event == 'project') {\n $project_index = $this->state->value;\n } else {\n list($task, $project_index) = $this->_split_task_and_project($task);\n }\n $task_added = $this->_taskpaper->add($task, $project_index);\n\n return ($task_added ? self::UPDATED : false);\n }", "public function testNewTask()\n {\n $userId = User::first()->value('id');\n\n $response = $this->json('POST', '/api/v1.0.0/users/'.$userId.'/tasks', [\n 'description' => 'A new task from PHPUnit',\n ]);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n 'description' => 'A new task from PHPUnit',\n ]);\n }", "public function addTask($task) {\n \t$this->tasks()->create($task);\n }", "public function testCreateTask()\n {\n $this->logInUserObject();\n $crawler = $this->client->request('GET', '/tasks/create');\n $form = $crawler->selectButton('Ajouter')->form();\n $form['task[title]'] = 'Titre test';\n $form['task[content]'] = 'Contenu de test pour la création d\\'une tâche';\n $this->task = $this->client->submit($form);\n\n $crawler = $this->client->followRedirect();\n $response = $this->client->getResponse();\n $statusCode = $response->getStatusCode();\n\n $this->assertEquals(200, $statusCode);\n $this->assertContains('Superbe! La tâche a été bien été ajoutée.', $crawler->filter('div.alert.alert-success')->text());\n }", "public function createTask ($summary, $description, $project, $assignee, $type, $priority, $status, $component, $version) {\r\n\t\t$db = new DB();\r\n\t\t$db->connect();\r\n\t\t\r\n\t\t$summary = $db->esc($summary);\r\n\t\t$description = $db->esc($description);\r\n\t\t$project = $db->esc($project);\r\n\t\t$assignee = $db->esc($assignee);\r\n\t\t$type = $db->esc($type);\r\n\t\t$priority = $db->esc($priority);\r\n\t\t$status = $db->esc($status);\r\n\t\t$component = $db->esc($component);\r\n\t\t$version = $db->esc($version);\r\n\t\t\r\n\t\tif ($assignee == 0) {\r\n\t\t\t$assignee = \"null\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$assignee = \"'\".$assignee.\"'\";\r\n\t\t}\r\n\t\t\r\n\t\tif ($component == 0) {\r\n\t\t\t$component = \"null\";\r\n\t\t}\r\n\t\t\r\n\t\tif ($version == 0) {\r\n\t\t\t$version = \"null\";\r\n\t\t}\r\n\t\t\r\n\t\t$sql = \"INSERT INTO `task` (`summary`, `description`, `status_id`, `project_id`, `creator_id`, \r\n\t\t\t\t `assignee_id`, `createDate`, `tasktype_id`, `priority`, `active`, `component_id`, `version_id`) \r\n\t\t\t\tVALUES ('$summary', '$description', '$status', '$project', '\".$_SESSION['nobug'.RANDOMKEY.'userId'].\"',\r\n\t\t\t\t$assignee, '\".$db->toDate(time()).\"', '$type', '$priority', '1', $component, $version);\";\r\n\t\t$db->query($sql);\t\r\n\t}", "public function create(){\n $this->form_validation->set_rules('tname', 'Task Name', 'required|is_unique[task.TaskName]|min_length[10]');\n $this->form_validation->set_rules('tdescription', 'Description', 'required|min_length[50]');\n $this->form_validation->set_rules('tproject', 'Project', 'required|integer');\n $this->form_validation->set_rules('tassigne', 'Assigned To', 'required|integer');\n $this->form_validation->set_rules('tapproxduration', 'Approx Duration', 'required|integer');\n $this->form_validation->set_rules('tpriority', 'Priority', 'required|alpha');\n $this->form_validation->set_rules('tstatus', 'Status', 'required|max_length[1]');\n \n if ($this->form_validation->run() == FALSE){\n $this->session->set_flashdata('error', validation_errors());\n redirect('/create');\n }else{\n $new_task = array('ProjectId' => $this->input->post('tproject'),'TaskName' => $this->input->post('tname'), 'TaskDescription' => $this->input->post('tdescription'), 'Assigned' => $this->input->post('tassigne'), 'ApproxDuration' => $this->input->post('tapproxduration'), 'Priority' => $this->input->post('tpriority'), 'Status' => $this->input->post('tstatus'),'CreatedTS'=>date('Y-m-d H:i:s'),'UpdatedTS'=>date('Y-m-d H:i:s'));\n try{\n $this->task_model->insertData('task',$new_task);\n $taskid = $this->db->insert_id();\n if(!empty($_FILES['treffile'])){\n $this->do_upload($taskid);\n }\n $this->session->set_flashdata('error', 'Task added successfully');\n redirect('/');\n } catch (Exception $ex) {\n $this->session->set_flashdata('error', 'Something went wrong. Please try again after some time');\n redirect('/create');\n }\n \n }\n \n }", "private function create() {\n global $connection;\n $sql = 'insert into ' . static::$tableName . ' set ' . self::buildNameParametersSQL();\n $stmt = $connection->prepare($sql);\n $this->prepareValues($stmt);\n return $stmt->execute();\n }", "public function create()\n {\n $cases = Casee::all();\n $users = User::all();\n $stages = Stage::all();\n\n return $this->view_('task.update',[\n 'object'=> new Task(),\n 'cases'=> $cases,\n 'users'=> $users,\n 'stages'=> $stages,\n ]);\n }", "public function createTask($description){\n $this->tasks()->create(['description'=>$description]);\n }", "function create($sql) {\n\t\t\t$result = $this->checkup(\"create\", $sql);\n\t\t\tif ($result == false) {\n\t\t\t\treturn $this->error(\"creation fails.\");\n\t\t\t}\n\t\t\tif (!$this->one_query($sql)) {\n\t\t\t\t$this->error(\"could not create anything [ \".$sql.\" ]\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "function make_task($string=''){\n\t\n\tif($string === ''){\n\t\t$string = 'Make Task';\n\t\t}\n\t$task_name = strtolower(trim(mysql_prep($_GET['job_title'])));\n\t$parent = '';\n\t$parent_type = 'jobs';\n\t$content = mysql_prep($_SESSION['current_url']);\n\t$path = $_SESSION['current_url'];\n\t$author = $_SESSION['username'];\n\t$editor = '';\n\t$created = date('c');\n\t$last_update ='';\n\t$status = 'started';\n\t$reward = $_SESSION['job_reward'];\n\t\n\techo '<form action='.$_SESSION['current_url'].' method=\"post\">\n\t<button type=\"submit\" name=\"make_project\" value=\"yes\">'.$string.'</button>\n\t</form>';\n\t\n\tif($_POST['make_task'] ==='yes') {\n\t\t\t$query = mysqli_query($GLOBALS[\"___mysqli_ston\"], \"INSERT INTO `project_manager_task`(`id`, `task_name`, `parent`, `parent_type`, `content`, `author`, `project_manager`, `path`, `editor`, `created`, `last_updated`, `assigned_to`, `status`, `priority`, `reward`) \n\t\t\tVALUES ('','{$task_name}', '{$parent}', '{$parent_type}' '{$content}', '{$author}', '{$author}', '{$path}', '{$editor}','{$created}','{$last_updated}','{$author}','{$status}','{$priority}','{$reward}')\") \n\t\t\tor die (\"Error inserting task \". ((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_error($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));\n\t\t\tif($query){ \n\t\t\t\tactivity_record(\n\t\t\t\t\t$actor=$author,\n\t\t\t\t\t$action=' created the task ',\n\t\t\t\t\t$subject_name = $project_name,\n\t\t\t\t\t$actor_path = BASE_PATH.'user/?user='.$author,\n\t\t\t\t\t$subject_path= ADDONS_PATH.'project_manager/?action=show&task_name='.$project_name,\n\t\t\t\t\t$date = $created,\n\t\t\t\t\t$parent='jobs'\n\t\t\t\t\t);\n\t\t\t\t\n\t\t\t\tstatus_message(\"success\", \"Task saved successfully!\"); \n\t\t\t}\n\t\t}\n\t\n\t}", "function _add_task( $data=array() )\n\t{\n\t\t$taskfunc = $this->ipsclass->load_class( ROOT_PATH.'sources/lib/func_taskmanager.php', 'func_taskmanager' );\n\t\t\n\t\t$task = array();\n\t\t\n\t\t$task['task_title'] = $data['task_title']['VALUE'];\n\t\t$task['task_file'] = $data['task_file']['VALUE'];\n\t\t$task['task_week_day'] = $data['task_week_day']['VALUE'];\n\t\t$task['task_month_day'] = $data['task_month_day']['VALUE'];\n\t\t$task['task_hour'] = $data['task_hour']['VALUE'];\n\t\t$task['task_minute'] = $data['task_minute']['VALUE'];\n\t\t$task['task_cronkey'] = md5( microtime() );\n\t\t$task['task_log'] = $data['task_log']['VALUE'];\n\t\t$task['task_description'] = $data['task_description']['VALUE'];\n\t\t$task['task_enabled'] = $data['task_enabled']['VALUE'];\n\t\t$task['task_key'] = $data['task_key']['VALUE'];\n\t\t$task['task_safemode'] = $data['task_safemode']['VALUE'];\n\t\t$task['task_next_run'] = $taskfunc->generate_next_run( $task );\n\t\t\n\t\t$this->ipsclass->DB->do_insert( 'task_manager', $task );\n\t\t\n\t\t$taskfunc->save_next_run_stamp();\n\t}", "public function store(TaskCreateRequest $request)\n {\n DB::beginTransaction();\n try {\n Task::create($request->all());\n DB::commit();\n } catch (\\Exception $ex) {\n DB::rollBack();\n return redirect()->back()->with('error', 'Sorry ! Error occurred during the transaction.');\n }\n\n return redirect()->route('home')->with(\"success\", \"Task created successfully !\");\n }", "public function test_create_task_all_fields_correct()\n {\n\n $credential = [\n 'body' => 'testing task'\n ];\n\n $token = User::factory()->create()->createToken('my-app-token')->plainTextToken;\n\n $response = $this->json('POST', '/api/tasks', $credential, ['Accept' => 'application/json', 'Authorization' => 'Bearer '.$token]);\n\n $response\n ->assertStatus(201)\n ->assertJsonStructure(['message'])\n ->assertJsonPath('message', \"Task created successfully.\");\n }", "private function CreateTask($pTaskDefinitions) {\n\t\t$lTaskData = array();\n\t\t// trigger_error('CreateTask() INNER DEBUG POINT', E_USER_NOTICE);\n\t\tforeach ($pTaskDefinitions as $key => $value) {\n\t\t\t// trigger_error('RECIPIENTS: ' . $value['recipients'], E_USER_NOTICE);\n\t\t\t// trigger_error('document_id: ' . $value['document_id'], E_USER_NOTICE);\n\t\t\t//trigger_error('document_journal_id: ' . $value['document_journal_id'], E_USER_NOTICE);\n\t\t\t$lRecipientsData = $this->GetTaskRecipientsData($value['recipients'], $value['document_id'], $value['document_journal_id']);\n\t\t\t$lUsersArr = array();\n\t\t\t$lUsersRoleArr = array();\n\t\t\t$lUserTemplArr = array();\n\t\t\t$lUserSubjArr = array();\n\t\t\t$lTemplate = $value['content_template'];\n\t\t\t$lSubject = $value['subject'];\n\t\t\t\n\t\t\tforeach ($lRecipientsData as $key1 => $value1) {\n\t\t\t\t$lDataValuesToReplace = $this->m_taskModel->GetTemplateValuesForReplace(\n\t\t\t\t\t(int)$value1['uid'], \n\t\t\t\t\t(int)$value['document_id'], \n\t\t\t\t\t$value['event_type_id'], \n\t\t\t\t\t$this->m_eventDataArr['ueventtoid'], \n\t\t\t\t\t$this->m_eventDataArr['role_id'],\n\t\t\t\t\t((int)$this->m_JournalId ? (int)$this->m_JournalId : $value['document_journal_id'])\n\t\t\t\t);\n\t\t\t\t$lDataValuesToReplace['user_role'] = (int)$value1['role_id'];\n\t\t\t\t\n\t\t\t\t$lTempl = $this->ReplaceEmailTaskTemplate($lTemplate, $lDataValuesToReplace);\n\t\t\t\t$lSubj = $this->ReplaceEmailTaskTemplate($lSubject, $lDataValuesToReplace);\n\t\t\t\t\n\t\t\t\t$lUsersArr[] = (int)$value1['uid'];\n\t\t\t\t$lUsersRoleArr[] = (int)$value1['role_id'];\n\t\t\t\t$lUserTemplArr[] = '\\'' . q($lTempl) . '\\'';\n\t\t\t\t//$lUserSubjArr[] = '\\'' . q($lSubj . ' ' . ($this->m_uPass ? 'JournalID:' . (int)$this->m_JournalId : $value['document_id'])) . '\\'';\n\t\t\t\t$lUserSubjArr[] = '\\'' . q($lSubj) . '\\'';\n\t\t\t}\n\t\t\t\n\t\t\t/**\n\t\t\t * Building users array and template array for postgresql\n\t\t\t */\n\t\t\t$lUsersArrString = 'ARRAY[' . implode(\",\", $lUsersArr) . ']';\n\t\t\t$lUsersRoleArrString = 'ARRAY[' . implode(\",\", $lUsersRoleArr) . ']';\n\t\t\t$lUserTemplArrString = 'ARRAY[' . implode(\",\", $lUserTemplArr) . ']';\n\t\t\t$lUserSubjArrString = 'ARRAY[' . implode(\",\", $lUserSubjArr) . ']';\n\t\t\t\n\t\t\t// trigger_error('$lUsersArrString: ' . $lUsersArrString, E_USER_NOTICE);\n\t\t\t// trigger_error('$lUsersRoleArrString: ' . $lUsersRoleArrString, E_USER_NOTICE);\n\t\t\t// trigger_error('$lUserTemplArrString: ' . $lUserTemplArrString, E_USER_NOTICE);\n\t\t\t\n\t\t\t$lTaskData = $this->m_taskModel->CreateTask(\n\t\t\t\t(int)$this->m_eventId, \n\t\t\t\t(int)$value['id'], \n\t\t\t\t$lUsersArrString, \n\t\t\t\t$lUserTemplArrString, \n\t\t\t\t$lUsersRoleArrString, \n\t\t\t\t$value['is_automated'], \n\t\t\t\t$lUserSubjArrString,\n\t\t\t\t$value['cc']\n\t\t\t);\n\t\t}\n\t}", "function saveToDb($task)\n{\n $conn = newDbConnection();\n $task = htmlspecialchars($task);\n if (!$conn->query(\"INSERT INTO tasks(task) VALUES('\".$task.\"')\")) {\n echo(\"Creating task failed\");\n }\n $conn->close();\n}", "public function store()\n\t{\n\t\t$validator = Validator::make(Input::all(), Task::$rules);\n\t\tif ($validator->passes()) {\n\t\t\t$task = new Task;\n\t\t\t$task->name = Input::get('name');\n\t\t\t$task->description = Input::get('description');\n\t\t\t$task->user_id = Auth::user()->id;\n\t\t\t$task->save();\n\n\t\t\tif ($task) {\n\t\t \treturn Redirect::to('tasks')->with('message', 'Task added.');\n\t\t }\n\t\t // fallback\t\n\t\t return Redirect::to('tasks')->with('message', 'Task added.');\n\t\t} else {\n\t\t // validation has failed, display error messages\n\t\t return Redirect::to('tasks')\n\t\t \t->with('message', 'The following errors occurred')\n\t\t \t->withErrors($validator)\n\t\t \t->withInput();\n\t\t}\n\t}", "public function register()\n\t{\n\t\t//validate that all fields are filled and proper\n\t\t$errors = $this->validate();\n\t\tif ($errors != NULL)\n\t\t\treturn $errors;\n\t\t\n\t\t//insert task into database\n\t\t$dbhandle = db_connect();\n\t\t$stmt = $dbhandle->stmt_init();\n\t\t\n\t\t$stmt->prepare(\"INSERT INTO Tasks\n\t\t(\n\t\t\tTitle,\n\t\t\tDescription, \n\t\t\tLocation,\n\t\t\tCategory,\n\t\t\tTags,\n\t\t\tEndDateTime,\n\t\t\tLister,\n\t\t\tNumImages,\n\t\t\tInformation,\n\t\t\tInitialBid,\n\t\t\tActive\n\t\t) \n\t\tVALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 1)\");\n\t\t$stmt->bind_param(\"sssisiiisi\", $this->title, $this->description, $this->location, $this->category, $this->tags, $this->enddatetime, $this->userid, $this->numimg, $this->content, $this->price);\n\t\t$stmt->execute();\n\t\t$stmt->store_result();\n\t\t\n\t\t$this->taskid = $dbhandle->insert_id;\n\t\t\n\t\t//close connection and return 0\n\t\t$stmt->close();\n\t\t$dbhandle->close();\n\t\treturn NULL;\n\t}", "public function create_task(Request $request)\n {\n Task::create($request->all()); // create a task\n return response()->json([\n 'message' => 'task created successfully'\n ],201);\n }", "function createTasks($conn, $taskID, $projektID, $task) {\n $sql= \"INSERT INTO projecttask (ProjectTaskID, ProjectID, TaskDescription) VALUES (?, ?, ?);\";\n $stmt = mysqli_stmt_init($conn);\nif(!mysqli_stmt_prepare($stmt, $sql)) {\n echo \"SQL Statement failed\";\n header(\"location: ../projectsAndTasksNew.php?error=stmtfailed\");\n exit();\n}\nelse {\n mysqli_stmt_bind_param($stmt, \"sss\", $taskID, $projektID, $task);\n mysqli_stmt_execute($stmt);\n mysqli_stmt_close($stmt);\n //header(\"location: ../projectsAndTasksNew.php?error=none\");\n}\n}", "function addTask($name, $taskName, $estimatedTime)\r\n{\r\n global $mysqli;\r\n $query = mysqli_query($mysqli, \"SELECT * FROM users WHERE name = '$name'\");\r\n $rowId = mysqli_fetch_assoc($query);\r\n if (is_null($rowId)){\r\n echo \"no se encuentra usuario\";\r\n } else {\r\n $id = $rowId['user_id'];\r\n $addTasks = mysqli_query($mysqli, \"INSERT INTO tasks (user_id, name, estimated_time, status)\"\r\n . \"VALUES ($id, '$taskName', $estimatedTime, 1)\");\r\n if (!$addTasks){\r\n echo mysqli_error($addTasks);\r\n };\r\n };\r\n}", "public function create(User $user, Task $task)\n {\n return $user->hasRole('admin');\n }", "function createTask( $queue ) {\n\t\t$query = \"SELECT cd.`ticket_id` FROM `\".BIT_DB_PREFIX.\"task_ticket` cd\n\t\t\t\t\t\t WHERE ti.`ticket_ref` BETWEEN TODAY AND TOMORROW AND cd.`room` = $queue + 80\n\t\t\t\t\t\t AND cd.`office` = 1\n\t\t\t\t \t\t ORDER BY cd.`ticket_ref`\";\n\t\t$next = $this->mDb->getOne( $query );\n// Add switch of user state to serving!\n\t\tif ( $next ) return true;\n\t\telse return false;\n\t}", "public function store(AddTaskRequest $request)\n {\n $input = $request->validated();\n $input['created_at'] = Carbon::now();\n $input['created_by'] = auth()->user()->id;\n\n try {\n $task = Task::create($input);\n } catch (\\Throwable $th) {\n throw new ItemNotCreatedException('Task');\n }\n\n $task = Task::find($task->id);\n\n $task->project;\n $task->responsible;\n $task->task_status;\n $task->deadline;\n\n return $this->sendResponse(new TaskResource($task), 'Task created successfully.'); \n }", "public function saveTask(){\n \n if( !empty($this->taskId) ){\n $task = Tache::findOne(['id_tache'=>$this->taskId]);\n }else{\n $task = new Tache();\n }\n $task->nom = $this->title;\n $task->description = $this->description;\n $task->date_debut = (!empty($this->dateStart)) \n ? Yii::$app->formatter->asDate($this->dateStart, 'yyyy-MM-dd') \n : Yii::$app->formatter->asDate($this->dateStart2, 'yyyy-MM-dd');\n $task->date_fin = (!empty($this->dateEnd)) \n ? Yii::$app->formatter->asDate($this->dateEnd, 'yyyy-MM-dd')\n : Yii::$app->formatter->asDate($this->dateEnd2, 'yyyy-MM-dd');\n $task->prestataire = $this->provider;\n $task->type = $this->type;\n if( !empty($this->activityId) ){\n $task->id_activite = $this->activityId;\n }\n $today = strtotime(Yii::$app->formatter->asDate('now', 'yyyy-MM-dd'));\n $start = strtotime(Yii::$app->formatter->asDate( $task->date_debut , 'yyyy-MM-dd'));\n if($today < $start ){\n $task->statut = 'en_attente';\n }else{\n $task->statut = 'en_cours';\n }\n if($task->save()){\n return true;\n }else{\n return false;\n } \n }", "function create(){\n\t // insert query\n\t $query = \"INSERT INTO \" . $this->table_name . \" SET \";\n\t // prepare the query\n\t $stmt = $this->conn->prepare($query);\n\t if($stmt->execute()){\n\t return true;\n\t }else{\n\t $this->showError($stmt);\n\t return false;\n\t }\n\t}", "public function testCreateAndFindTask()\n\t{\n\t\t$user = factory(User::class)->create();\n\t\tPassport::actingAs($user);\n\t\t$category = factory(Category::class)->create(['user_id' => $user->id]);\n\t\t$array_task = array(\n\t\t\t'category_id' => $category->id,\n\t\t\t\"description\" => \"Needs to study more\"\n\t\t);\n\n\t\t$task = factory(Task::class)->create($array_task);\n\n\t\t$response = $this->get('api/categories/' . $category->id . '/tasks/' . $task->id);\n\n\t\t$response->assertStatus(200);\n\t\t$this->assertDatabaseHas('tasks', $array_task);\n\t}", "public function create(User $user)\n {\n return $user->hasPermissionTo(Actions::CREATE, Task::class);\n }", "public function addTask($task){\n\n $this->tasks()->create($task);\n\n }", "public function testSaveTask()\r\n {\t\t\r\n $task = new SyncTask(); \r\n $task->subject = \"UnitTest TaskName\"; \r\n $task->startdate = strtotime(\"11/17/2011\");\r\n $task->duedate = strtotime(\"11/18/2011\");\r\n $obj = $this->backend->saveTask(\"\", $task);\r\n\t\t$tid = $obj->id;\r\n\r\n // Make sure we have a new task id\r\n $this->assertTrue(is_numeric($tid) && $tid > 0);\r\n\r\n // Make sure backend had fully populated task\r\n $obj = new CAntObject($this->dbh, \"task\", $tid, $this->user);\r\n $this->assertEquals($obj->getValue(\"name\"), $task->subject);\r\n $this->assertEquals(strtotime($obj->getValue(\"start_date\")), $task->startdate);\r\n $this->assertEquals(strtotime($obj->getValue(\"deadline\")), $task->duedate);\r\n\r\n // Cleanup\r\n $obj->removeHard();\r\n\t}", "public function run()\n {\n Task::create([\n 'title' => 'Editar arquivos de teste',\n 'description' => 'Alterar erros no arquvio de teste',\n 'status' => ('A fazer'),\n 'user_id' => 2,\n ]);\n }", "public function addNewTask(string $name) : Task\n {\n // Try to init Task object from given name\n // Trigger exceptions when Task's name is empty or already existed\n try {\n $task = $this->taskFactory->createFromName($name);\n } catch (TaskNameIsEmptyException | TaskNameIsAlreadyExistedException $e) {\n throw $e;\n }\n\n // Persist Task object into repository\n try {\n $this->taskRepository->save($task);\n } catch (TaskCannotBeSavedException $e) {\n throw $e;\n }\n\n // Return Task object\n return $task;\n }", "public function create(User $user)\n {\n if ($user->can('create_tasks')) {\n return true;\n }\n }", "public function addTask(&$task)\r\n\t{\r\n\t\t$sql = sprintf('\r\n\t\t\tINSERT\r\n\t\t\tINTO\r\n\t\t\t\ttask (title)\r\n\t\t\tVALUES\r\n\t\t\t\t(\"%s\")\r\n\t\t', mysql_escape_string($task->title));\r\n\r\n\t\tmysqli_query($this->db, $sql);\r\n\t\t\r\n\t\t$task->id = mysqli_insert_id($this->db);\r\n\t}", "function insert_task (Request $request) {\n $validator = Validator::make($request->all(), [\n 'name' => 'required|max:255',\n ]);\n\n if ($validator->fails()) {\n return redirect('/')\n ->withInput()\n ->withErrors($validator);\n }\n\n $task = new Task;\n $task->name = $request->name;\n $task->save();\n\n return redirect('/tasks');\n }", "public function create(): bool;", "public function addTaskToDb($taskArray){\n \n if(is_array($taskArray)) {\n $this->taskName = $taskArray['taskName'];\n $this->taskDescription = $taskArray['taskDesc'];\n $this->taskCategoryId = (int)$taskArray['taskCategoryId'];\n $this->taskPriorityId = (int)$taskArray['taskPriorityId'];\n $this->taskStatusId = (int)$taskArray['taskStatusId'];\n \n $this->query = \"INSERT INTO tasks\";\n $this->query .= \" (task_name, task_description, task_category_id, task_priority_id, task_status_id)\";\n $this->query .= \" VALUES (:name,:desc,:catid,:priorityid,:statusid);\";\n $this->db->query($this->query);\n \n $this->db->bind(':name', $this->taskName);\n $this->db->bind(':desc', $this->taskDescription);\n $this->db->bind(':catid', $this->taskCategoryId);\n $this->db->bind(':priorityid', $this->taskPriorityId);\n $this->db->bind(':statusid', $this->taskStatusId);\n \n $this->db->execute();\n \n } else {\n die('An unexpected error has occured.');\n }\n \n }", "public function createMessage($task, $author, $subject, $prof, $work){\n\t\t $db = Yii::$app->db->createCommand();\n $db->insert('messages', [\n 'new_task' => $task,\n 'author' => $author,\n 'subject' => $subject,\n 'FK_Prof' => $prof,\n 'id_work' => $work,\n ])->execute();\n return true;\n\t}", "public function show_create_form_task()\n {\n $user = factory(User::class)->create();\n $user->assignRole('task-manager');\n $this->actingAs($user);\n View::share('user', $user);\n\n factory(User::class, 5)->create();\n\n $response = $this->get('/tasks_php/create');\n $response->assertSuccessful();\n $response->assertViewIs('tasks.create_task');\n\n $users = User::all();\n $response->assertViewHas('users', $users);\n\n $response->assertSeeText('Create Task:');\n }", "public function store()\n\t{\n $input = Input::only('name','duration','start','finish','summaries_id','user_id');\n\n $this->taskForm->validate($input);\n\n Tasks::create($input);\n\n return Redirect::to('/tasks')->with('flash_message','Task Successfully Saved');\n\n\t}", "public function create():bool\n {\n $attribute_pairs = [];\n\n /*\n * Setup the query using prepared states with static:$params being\n * the columns and the array keys being the prepared named placeholders.\n */\n $sql = 'INSERT INTO ' . static::$table . '(' . implode(\", \", array_keys(static::$params)) . ', play_date)';\n $sql .= ' VALUES ( :' . implode(', :', array_keys(static::$params)) . ', NOW() )'; // Notice the 2 NOW() calls for dates:\n\n /*\n * Prepare the Database Table:\n */\n $stmt = Database::pdo()->prepare($sql);\n\n /*\n * Grab the corresponding values in order to\n * insert them into the table when the script\n * is executed.\n */\n foreach (static::$params as $key => $value)\n {\n if($key === 'id') { continue; } // Don't include the id:\n $attribute_pairs[] = $value; // Assign it to an array:\n }\n\n return $stmt->execute($attribute_pairs); // Execute and send boolean true:\n\n }", "public function create()\n {\n //\n return view('tasks.write');\n }", "function create(){\n // insert query\n $query = \"INSERT INTO \" . $this->table_name . \"\n SET\n date = :date, \n poster = :poster\";\n\n // prepare the query\n $stmt = $this->conn->prepare($query);\n\n $stmt->bindParam(':date', $this->date);\n $stmt->bindParam(':poster', $this->poster);\n\n\n // execute the query, also check if query was successful\n if($stmt->execute()){\n return true;\n }\n\n return false;\n }", "public function createTask($config, $exec_time = null) {\n if(is_string($exec_time)) {\n $interval = $exec_time;\n $exec_time = new \\DateTime('now');\n $exec_time->add(new \\DateInterval($interval));\n } else {\n $exec_time = new \\DateTime('now');\n } \n \n return Task::addTask($config, $exec_time);\n }", "public function store()\n\t{\n $task = new Task();\n $task->description = Request::get('description');\n $task->owner = Auth::user()->id;\n $task->performer = intval(Request::get('performer')) ? intval(Request::get('performer')): null;\n $task->state = Request::get('state');\n $task->save();\n\n return Response::json(array(\n 'errors' => false,\n 'data' => $task),\n 200\n );\n }", "public function run()\n\t{\n\t\tDB::table('tasks')->insert([\n\t\t\t[\n\t\t\t\t'group_id' => 1,\n\t\t\t\t'user_id' => 1,\n\t\t\t\t'server_id' => 1,\n\t\t\t\t'task_title' => 'PHP脚本文件',\n\t\t\t\t'task_type' => 'script',\n\t\t\t\t'task_lang' => 'php',\n\t\t\t\t'commend_type' => 'file',\n\t\t\t\t'task_command' => storage_path('scripts/php_say_hello.php'),\n\t\t\t\t'task_desc' => '运行PHP脚本文件测试',\n\t\t\t\t'task_run_time' => '*/5 * * * *',\n\t\t\t\t'task_status' => 1,\n\t\t\t\t'created_at' => date('Y-m-d h:i:s'),\n\t\t\t\t'updated_at' => date('Y-m-d h:i:s'),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'group_id' => 1,\n\t\t\t\t'user_id' => 1,\n\t\t\t\t'server_id' => 1,\n\t\t\t\t'task_title' => 'Python脚本文件',\n\t\t\t\t'task_type' => 'script',\n\t\t\t\t'task_lang' => 'python',\n\t\t\t\t'commend_type' => 'file',\n\t\t\t\t'task_command' => storage_path('scripts/python_say_hello.py'),\n\t\t\t\t'task_desc' => '运行python脚本文件测试',\n\t\t\t\t'task_run_time' => '*/5 * * * *',\n\t\t\t\t'task_status' => 0,\n\t\t\t\t'created_at' => date('Y-m-d h:i:s'),\n\t\t\t\t'updated_at' => date('Y-m-d h:i:s'),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'group_id' => 1,\n\t\t\t\t'user_id' => 1,\n\t\t\t\t'server_id' => 1,\n\t\t\t\t'task_title' => 'Shell脚本文件',\n\t\t\t\t'task_type' => 'script',\n\t\t\t\t'task_lang' => 'bash',\n\t\t\t\t'commend_type' => 'file',\n\t\t\t\t'task_command' => storage_path('scripts/shell_say_hello.sh'),\n\t\t\t\t'task_desc' => '运行shell脚本文件测试',\n\t\t\t\t'task_run_time' => '*/5 * * * *',\n\t\t\t\t'task_status' => 1,\n\t\t\t\t'created_at' => date('Y-m-d h:i:s'),\n\t\t\t\t'updated_at' => date('Y-m-d h:i:s'),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'group_id' => 1,\n\t\t\t\t'user_id' => 1,\n\t\t\t\t'server_id' => 1,\n\t\t\t\t'task_title' => 'PHP脚本文件发邮件,不带附件',\n\t\t\t\t'task_type' => 'email',\n\t\t\t\t'task_lang' => 'php',\n\t\t\t\t'commend_type' => 'file',\n\t\t\t\t'task_command' => storage_path('scripts/email_pure_text.php'),\n\t\t\t\t'task_desc' => '运行PHP脚本文件,产生的内容发送邮件',\n\t\t\t\t'task_run_time' => '*/5 * * * *',\n\t\t\t\t'task_status' => 1,\n\t\t\t\t'created_at' => date('Y-m-d h:i:s'),\n\t\t\t\t'updated_at' => date('Y-m-d h:i:s'),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'group_id' => 1,\n\t\t\t\t'user_id' => 1,\n\t\t\t\t'server_id' => 1,\n\t\t\t\t'task_title' => 'PHP脚本文件发邮件,带有附件',\n\t\t\t\t'task_type' => 'email',\n\t\t\t\t'task_lang' => 'php',\n\t\t\t\t'commend_type' => 'file',\n\t\t\t\t'task_command' => storage_path('scripts/email_with_attach.php'),\n\t\t\t\t'task_desc' => 'PHP脚本文件发邮件测试,邮件内容带有附件',\n\t\t\t\t'task_run_time' => '*/5 * * * *',\n\t\t\t\t'task_status' => 1,\n\t\t\t\t'created_at' => date('Y-m-d h:i:s'),\n\t\t\t\t'updated_at' => date('Y-m-d h:i:s'),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'group_id' => 1,\n\t\t\t\t'user_id' => 1,\n\t\t\t\t'server_id' => 1,\n\t\t\t\t'task_title' => 'PHP直接命令',\n\t\t\t\t'task_type' => 'script',\n\t\t\t\t'task_lang' => 'php',\n\t\t\t\t'commend_type' => 'command',\n\t\t\t\t'task_command' => 'echo \"hello\"',\n\t\t\t\t'task_desc' => '直接输入PHP命令测试',\n\t\t\t\t'task_run_time' => '*/5 * * * *',\n\t\t\t\t'task_status' => 1,\n\t\t\t\t'created_at' => date('Y-m-d h:i:s'),\n\t\t\t\t'updated_at' => date('Y-m-d h:i:s'),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'group_id' => 1,\n\t\t\t\t'user_id' => 1,\n\t\t\t\t'server_id' => 1,\n\t\t\t\t'task_title' => 'Python直接命令',\n\t\t\t\t'task_type' => 'script',\n\t\t\t\t'task_lang' => 'python',\n\t\t\t\t'commend_type' => 'command',\n\t\t\t\t'task_command' => 'print(\"hello\")',\n\t\t\t\t'task_desc' => '直接输入python命令测试',\n\t\t\t\t'task_run_time' => '*/5 * * * *',\n\t\t\t\t'task_status' => 1,\n\t\t\t\t'created_at' => date('Y-m-d h:i:s'),\n\t\t\t\t'updated_at' => date('Y-m-d h:i:s'),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'group_id' => 1,\n\t\t\t\t'user_id' => 1,\n\t\t\t\t'server_id' => 1,\n\t\t\t\t'task_title' => 'Shell直接命令',\n\t\t\t\t'task_type' => 'script',\n\t\t\t\t'task_lang' => 'bash',\n\t\t\t\t'commend_type' => 'command',\n\t\t\t\t'task_command' => 'echo hello',\n\t\t\t\t'task_desc' => '直接输入shell命令测试',\n\t\t\t\t'task_run_time' => '*/5 * * * *',\n\t\t\t\t'task_status' => 1,\n\t\t\t\t'created_at' => date('Y-m-d h:i:s'),\n\t\t\t\t'updated_at' => date('Y-m-d h:i:s'),\n\t\t\t],\n\t\t]);\n\t}", "public function add()\n {\n $originalInput = Request::input();\n $request = Request::create('/users/add', 'POST', array('email'=>Input::get('email'),'name'=>Input::get('name')));\n Request::replace($request->input());\n $userId = Route::dispatch($request)->getContent();\n Request::replace($originalInput);\n\n Task::create(array('user_id'=>$userId,'title'=>Input::get('title'),'description'=>Input::get('description'),'priority'=>Input::get('priority'),'flag'=>'n','duedate'=>Input::get('duedate')));\n\n echo true;\n }", "public function actionCreate()\n {\n $model = new CompleteTask();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "function seedTasks($nbTasks){\n echo \"ADD RECORDS IN TABLE tasks : \";\n\n //on crée une première moitié des tâches n'ayant pas été affecté et terminée\n\n for ($i=0;$i<$nbTasks/2;$i++){\n $faker = Faker\\Factory::create('fr_FR');\n $title = $faker->sentence(3);\n $description = $faker->text(11);\n $creationDate = $faker->date();\n $scheduledDate = null;\n $doneDate = null;\n $workDuration = null;\n $departmentId = $faker->numberBetween(1,500);\n $locationId = $faker->numberBetween(1,20);\n $userId = $faker->numberBetween(2,1000);\n $assignUserId = null;\n $task = [\n 'title' => $title,\n 'description' => $description,\n 'creationDate' => $creationDate,\n 'scheduledDate' => $scheduledDate,\n 'doneDate' => $doneDate,\n 'workDuration' => $workDuration,\n 'department_id' => $departmentId,\n 'location_id' => $locationId,\n 'user_id' => $userId,\n 'assign_user_id' => $assignUserId\n ];\n\n // Make sure it dosen't aleadry exists\n if (Tasks::count('title=\"'.$task['title'].'\"')==0)\n {\n Tasks::create($task);\n echo '-' ;\n }\n else{\n $i--;\n }\n }\n\n // Puis enfin une deuxième moitié ayant un responsable qui a terminée la tâche\n\n for ($i=0;$i<$nbTasks/2;$i++){\n $faker = Faker\\Factory::create('fr_FR');\n $title = $faker->sentence(3);\n $description = $faker->text(11);\n $creationDate = $faker->date();\n $scheduledDate = dateUpper($creationDate);\n $doneDate = dateUpper($creationDate);\n $workDuration = $faker->time();\n $departmentId = $faker->numberBetween(1,500);\n $locationId = $faker->numberBetween(1,20);\n $userId = $faker->numberBetween(2,1000);\n $assignUserId = $faker->numberBetween(2,1000);\n $task = [\n 'title' => $title,\n 'description' => $description,\n 'creationDate' => $creationDate,\n 'scheduledDate' => $scheduledDate,\n 'doneDate' => $doneDate,\n 'workDuration' => $workDuration,\n 'department_id' => $departmentId,\n 'location_id' => $locationId,\n 'user_id' => $userId,\n 'assign_user_id' => $assignUserId\n ];\n\n // Make sure it dosen't aleadry exists\n if (Tasks::count('title=\"'.$task['title'].'\"')==0)\n {\n Tasks::create($task);\n Connection::insert('tasks',$task,null);\n echo '-' ;\n }\n else{\n $i--;\n }\n }\n\n echo \"\\n\";\n\n }", "public function testTask()\n {\n $task = new Task();\n $user = new User();\n\n $this->assertNull($task->getId());\n $task->setTitle('test');\n $this->assertSame('test', $task->getTitle());\n $task->setContent('testcontent');\n $this->assertSame('testcontent', $task->getContent());\n $task->toggle(true);\n $this->assertTrue( $task->isDone());\n $task->setUser($user);\n $this->assertInstanceOf(User::class, $task->getUser());\n $task->setCreatedAt(new \\DateTime());\n $this->assertNotEmpty($task->getCreatedAt());\n }", "public function run()\n {\n Task::insert([\n [\n 'user_id'=>1,\n 'task'=>'Woke up at 6am',\n ],\n [\n 'user_id'=>1,\n 'task'=>'Take Breakfast at 7am',\n ],\n [\n 'user_id'=>1,\n 'task'=>'Meet With Mr.Client at 10am',\n ]\n ]);\n }", "public function CreateTaskAction(Request $request)\n {\n $taskrouterclient = $this->get('commcloud_twilio_wrapper.twilio_taskrouter');\n \t$attributes = $request->request->get('customeAttributes');\n \t$attributes = json_encode($attributes);\n \ttry{\n \t $taskrouterclient->workspace->tasks->create($attributes, $this->getParameter('workflowSid'));\n \t return new Response(200);\n \t}catch(\\Exception $e){\n \t //return new Response(200);\n \t $this->get('logger')->error($e->getMessage());\n \t}\n \t\n \t\n }", "public function actionCreate($destination)\n {\n\n $task = new Task();\n $session = Yii::$app->session;\n $mail = false;\n\n if(isset(Yii::$app->request->post()['Task']['mail'][0]) && Yii::$app->request->post()['Task']['mail'][0] == 1 ){\n $mail = true;\n\n }\n\n if($destination =='1'){\n $task->destination = Task::PARTICULAR;\n } elseif ($destination == '2'){\n $task->destination = Task::ALL;\n }\n\n $programs = Program::find()->asArray()->all();\n $programsData = ArrayHelper::map($programs,'id', 'title');\n\n $students = User::getUsersByRole('student');\n $studentsName = Students::getStudentsNames();\n\n if(isset(Yii::$app->request->post()['Task']['user'])){\n\n $studentId = Yii::$app->request->post()['Task']['user'];\n }\n\n\n\n if ($task->load(Yii::$app->request->post()) && $task->save()) {\n\n /* echo \"<pre>\";\n var_dump($task);\n echo \"</pre>\";\n exit;*/\n\n if($destination == Task::ALL) {\n foreach ($students as $student){\n if($student->program_id == $task->program_id){\n $task->link('users', $student, ['status' => Task::NEW_TASK]);\n\n }\n\n }\n if ($mail){\n if($task->sendMailForAll()){\n $session->setFlash('success', \"Success! The task $task->title was created and send on email.\");\n }\n } else {\n $session->setFlash('success', \" Success! The task $task->title was created.\");\n }\n\n return $this->redirect(['all']);\n\n } elseif ($destination == Task::PARTICULAR){\n\n $student = User::findOne($studentId);\n $task->link('users', $student, ['status' => Task::NEW_TASK]);\n\n if ($mail){\n if($task->sendMail()){\n $session->setFlash('success', \"Success! The task $task->title was created and send on email.\");\n }\n } else {\n $session->setFlash('success', \" Success! The task $task->title was created.\");\n }\n\n return $this->redirect(['particular']);\n }\n\n\n\n } else {\n return $this->render('create', [\n 'task' => $task,\n 'programsData' => $programsData,\n 'students' => $studentsName,\n 'destination' => $destination\n ]);\n }\n }", "public function createTask()\n\t{\n\t\tif (!User::isGuest() && !User::get('tmp_user'))\n\t\t{\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url('index.php?option=' . $this->_option . '&task=myaccount'),\n\t\t\t\tLang::txt('COM_MEMBERS_REGISTER_ERROR_NONGUEST_SESSION_CREATION'),\n\t\t\t\t'warning'\n\t\t\t);\n\t\t}\n\n\t\tif (!isset($this->_taskMap[$this->_task]))\n\t\t{\n\t\t\t$this->_task = 'create';\n\t\t\tRequest::setVar('task', 'create');\n\t\t}\n\n\t\t// If user registration is not allowed, show 403 not authorized.\n\t\t$usersConfig = Component::params('com_members');\n\t\tif ($usersConfig->get('allowUserRegistration') == '0')\n\t\t{\n\t\t\treturn App::abort(404, Lang::txt('JGLOBAL_RESOURCE_NOT_FOUND'));\n\t\t}\n\n\t\t$hzal = null;\n\t\tif (User::get('auth_link_id'))\n\t\t{\n\t\t\t$hzal = \\Hubzero\\Auth\\Link::find_by_id(User::get('auth_link_id'));\n\t\t}\n\n\t\t// Instantiate a new registration object\n\t\t$xregistration = new \\Components\\Members\\Models\\Registration();\n\n\t\tif (Request::getMethod() == 'POST')\n\t\t{\n\t\t\t// Check for request forgeries\n\t\t\tRequest::checkToken();\n\n\t\t\t// Load POSTed data\n\t\t\t$xregistration->loadPost();\n\n\t\t\t// Perform field validation\n\t\t\t$result = $xregistration->check('create');\n\n\t\t\t// Incoming profile edits\n\t\t\t$profile = Request::getArray('profile', array(), 'post');\n\n\t\t\t// Compile profile data\n\t\t\tforeach ($profile as $key => $data)\n\t\t\t{\n\t\t\t\tif (isset($profile[$key]) && is_array($profile[$key]))\n\t\t\t\t{\n\t\t\t\t\t$profile[$key] = array_filter($profile[$key]);\n\t\t\t\t}\n\t\t\t\tif (isset($profile[$key . '_other']) && trim($profile[$key . '_other']))\n\t\t\t\t{\n\t\t\t\t\tif (is_array($profile[$key]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$profile[$key][] = $profile[$key . '_other'];\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$profile[$key] = $profile[$key . '_other'];\n\t\t\t\t\t}\n\n\t\t\t\t\tunset($profile[$key . '_other']);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Validate profile data\n\t\t\t$fields = \\Components\\Members\\Models\\Profile\\Field::all()\n\t\t\t\t->including(['options', function ($option){\n\t\t\t\t\t$option\n\t\t\t\t\t\t->select('*');\n\t\t\t\t}])\n\t\t\t\t->where('action_create', '!=', \\Components\\Members\\Models\\Profile\\Field::STATE_HIDDEN)\n\t\t\t\t->ordered()\n\t\t\t\t->rows();\n\n\t\t\t// Validate profile fields\n\t\t\tif ($fields->count())\n\t\t\t{\n\t\t\t\t$form = new \\Hubzero\\Form\\Form('profile', array('control' => 'profile'));\n\t\t\t\t$form->load(\\Components\\Members\\Models\\Profile\\Field::toXml($fields, 'create', $profile));\n\t\t\t\t$form->bind(new \\Hubzero\\Config\\Registry($profile));\n\n\t\t\t\tif (!$form->validate($profile))\n\t\t\t\t{\n\t\t\t\t\t$result = false;\n\n\t\t\t\t\tforeach ($form->getErrors() as $key => $error)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($error instanceof \\Hubzero\\Form\\Exception\\MissingData)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$xregistration->_missing[$key] = $error;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$xregistration->_invalid[$key] = $error;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Passed validation?\n\t\t\tif ($result)\n\t\t\t{\n\t\t\t\t// Get required system objects\n\t\t\t\t$user = clone(User::getInstance());\n\n\t\t\t\t// Initialize new usertype setting\n\t\t\t\t$newUsertype = $usersConfig->get('new_usertype');\n\t\t\t\tif (!$newUsertype)\n\t\t\t\t{\n\t\t\t\t\t$db = App::get('db');\n\t\t\t\t\t$query = $db->getQuery()\n\t\t\t\t\t\t->select('id')\n\t\t\t\t\t\t->from('#__usergroups')\n\t\t\t\t\t\t->whereEquals('title', 'Registered');\n\t\t\t\t\t$db->setQuery($query->toString());\n\t\t\t\t\t$newUsertype = $db->loadResult();\n\t\t\t\t}\n\n\t\t\t\t$user->set('username', $xregistration->get('login', ''));\n\t\t\t\t$user->set('name', $xregistration->get('name', ''));\n\t\t\t\t$user->set('givenName', $xregistration->get('givenName', ''));\n\t\t\t\t$user->set('middleName', $xregistration->get('middleName', ''));\n\t\t\t\t$user->set('surname', $xregistration->get('surname', ''));\n\t\t\t\t$user->set('email', $xregistration->get('email', ''));\n\t\t\t\t$user->set('usageAgreement', (int)$xregistration->get('usageAgreement', 0));\n\t\t\t\t$user->set('sendEmail', -1);\n\t\t\t\tif ($xregistration->get('sendEmail') >= 0)\n\t\t\t\t{\n\t\t\t\t\t$user->set('sendEmail', (int)$xregistration->get('sendEmail'));\n\t\t\t\t}\n\n\t\t\t\t// Set home directory\n\t\t\t\t$hubHomeDir = rtrim($this->config->get('homedir'), '/');\n\t\t\t\tif (!$hubHomeDir)\n\t\t\t\t{\n\t\t\t\t\t// try to deduce a viable home directory based on sitename or live_site\n\t\t\t\t\t$sitename = strtolower(Config::get('sitename'));\n\t\t\t\t\t$sitename = preg_replace('/^http[s]{0,1}:\\/\\//', '', $sitename, 1);\n\t\t\t\t\t$sitename = trim($sitename, '/ ');\n\t\t\t\t\t$sitename_e = explode('.', $sitename, 2);\n\t\t\t\t\tif (isset($sitename_e[1]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$sitename = $sitename_e[0];\n\t\t\t\t\t}\n\t\t\t\t\tif (!preg_match(\"/^[a-zA-Z]+[\\-_0-9a-zA-Z\\.]+$/i\", $sitename))\n\t\t\t\t\t{\n\t\t\t\t\t\t$sitename = '';\n\t\t\t\t\t}\n\t\t\t\t\tif (empty($sitename))\n\t\t\t\t\t{\n\t\t\t\t\t\t$sitename = strtolower(Request::base());\n\t\t\t\t\t\t$sitename = preg_replace('/^http[s]{0,1}:\\/\\//', '', $sitename, 1);\n\t\t\t\t\t\t$sitename = trim($sitename, '/ ');\n\t\t\t\t\t\t$sitename_e = explode('.', $sitename, 2);\n\t\t\t\t\t\tif (isset($sitename_e[1]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sitename = $sitename_e[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!preg_match(\"/^[a-zA-Z]+[\\-_0-9a-zA-Z\\.]+$/i\", $sitename))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sitename = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$hubHomeDir = DS . 'home';\n\n\t\t\t\t\tif (!empty($sitename))\n\t\t\t\t\t{\n\t\t\t\t\t\t$hubHomeDir .= DS . $sitename;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$user->set('homeDirectory', $hubHomeDir . DS . $user->get('username'));\n\t\t\t\t$user->set('loginShell', '/bin/bash');\n\t\t\t\t$user->set('ftpShell', '/usr/lib/sftp-server');\n\n\t\t\t\t// Set some initial user values\n\t\t\t\t$user->set('id', 0);\n\t\t\t\t$user->set('accessgroups', array($newUsertype));\n\t\t\t\t$user->set('registerDate', Date::toSql());\n\n\t\t\t\t// Check user activation setting\n\t\t\t\t// 0 = automatically confirmed\n\t\t\t\t// 1 = require email confirmation (the norm)\n\t\t\t\t// 2 = require admin confirmation\n\t\t\t\t$useractivation = $usersConfig->get('useractivation', 1);\n\n\t\t\t\t// If requiring admin approval, set user to block\n\t\t\t\tif ($useractivation == 2)\n\t\t\t\t{\n\t\t\t\t\t$user->set('approved', 0);\n\t\t\t\t}\n\n\t\t\t\t$user->set('access', 5);\n\t\t\t\t$user->set('activation', -rand(1, pow(2, 31)-1));\n\n\t\t\t\tif (is_object($hzal))\n\t\t\t\t{\n\t\t\t\t\tif ($user->get('email') == $hzal->email)\n\t\t\t\t\t{\n\t\t\t\t\t\t$user->set('activation', 3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ($useractivation == 0)\n\t\t\t\t{\n\t\t\t\t\t$user->set('activation', 1);\n\t\t\t\t\t$user->set('access', (int)$this->config->get('privacy', 1));\n\t\t\t\t}\n\n\t\t\t\t$user->set('password', \\Hubzero\\User\\Password::getPasshash($xregistration->get('password')));\n\n\t\t\t\t// Do we have a return URL?\n\t\t\t\t$regReturn = Request::getString('return', '');\n\n\t\t\t\tif ($regReturn)\n\t\t\t\t{\n\t\t\t\t\t$user->setParam('return', $regReturn);\n\t\t\t\t}\n\n\t\t\t\t// If we managed to create a user\n\t\t\t\tif ($user->save())\n\t\t\t\t{\n\t\t\t\t\t$access = array();\n\t\t\t\t\tforeach ($fields as $field)\n\t\t\t\t\t{\n\t\t\t\t\t\t$access[$field->get('name')] = $field->get('access');\n\t\t\t\t\t}\n\n\t\t\t\t\t$profile = $xregistration->_registration['_profile'];\n\n\t\t\t\t\t// Save profile data\n\t\t\t\t\t$member = Member::oneOrNew($user->get('id'));\n\t\t\t\t\t$orcidID = Session::get('orcid');\n\t\t\t\t\tif ($orcidID != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t$profile['orcid'] = $orcidID;\n\t\t\t\t\t}\n\t\t\t\t\tif (!$member->saveProfile($profile, $access))\n\t\t\t\t\t{\n\t\t\t\t\t\t\\Notify::error($member->getError());\n\t\t\t\t\t\t// Don't stop the registration process!\n\t\t\t\t\t\t// At this point, the account was successfully created.\n\t\t\t\t\t\t// The profile info, however, may have issues. But, it's not crucial.\n\t\t\t\t\t\t//$result = false;\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\\Notify::error($user->getError());\n\t\t\t\t\t$result = false;\n\t\t\t\t}\n\n\t\t\t\t// If everything is OK so far...\n\t\t\t\tif ($result)\n\t\t\t\t{\n\t\t\t\t\t$result = \\Hubzero\\User\\Password::changePassword($user->get('id'), $xregistration->get('password'));\n\n\t\t\t\t\t// Set password back here in case anything else down the line is looking for it\n\t\t\t\t\t$user->set('password', $xregistration->get('password'));\n\n\t\t\t\t\t// Did we successfully create/update an account?\n\t\t\t\t\tif (!$result)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn App::abort(500, Lang::txt('COM_MEMBERS_REGISTER_ERROR_CREATING_ACCOUNT'));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Send confirmation email\n\t\t\t\t\tif ($user->get('activation') < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t\\Components\\Members\\Helpers\\Utility::sendConfirmEmail($user, $xregistration);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Instantiate a new view\n\t\t\t\t\t$this->view\n\t\t\t\t\t\t->set('title', Lang::txt('COM_MEMBERS_REGISTER_CREATE_ACCOUNT'))\n\t\t\t\t\t\t->set('sitename', Config::get('sitename'))\n\t\t\t\t\t\t->set('xprofile', $user)\n\t\t\t\t\t\t->setErrors($this->getErrors())\n\t\t\t\t\t\t->setLayout('create')\n\t\t\t\t\t\t->display();\n\n\t\t\t\t\tif (is_object($hzal))\n\t\t\t\t\t{\n\t\t\t\t\t\t$hzal->set('user_id', $user->get('id'));\n\n\t\t\t\t\t\tif ($hzal->user_id > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$hzal->update();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tUser::set('auth_link_id', null);\n\t\t\t\t\tUser::set('tmp_user', null);\n\t\t\t\t\tUser::set('username', $xregistration->get('login'));\n\t\t\t\t\tUser::set('email', $xregistration->get('email'));\n\t\t\t\t\tUser::set('id', $user->get('id'));\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (Request::method() == 'GET')\n\t\t{\n\t\t\tif (User::get('tmp_user'))\n\t\t\t{\n\t\t\t\t$xregistration->loadAccount(User::getInstance());\n\n\t\t\t\t$username = $xregistration->get('login');\n\t\t\t\t$email = $xregistration->get('email');\n\t\t\t\tif (is_object($hzal))\n\t\t\t\t{\n\t\t\t\t\t$xregistration->set('login', $hzal->username);\n\t\t\t\t\t$xregistration->set('email', $hzal->email);\n\t\t\t\t\t$xregistration->set('confirmEmail', $hzal->email);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Set the pathway\n\t\t$this->_buildPathway();\n\n\t\t// Set the page title\n\t\t$this->_buildTitle();\n\n\t\treturn $this->_show_registration_form($xregistration, 'create');\n\t}" ]
[ "0.75463647", "0.7130442", "0.7112339", "0.70271516", "0.69677436", "0.6896468", "0.68656194", "0.68434995", "0.6809599", "0.67832875", "0.6771265", "0.6716941", "0.6711129", "0.6672405", "0.6654821", "0.6574902", "0.653698", "0.65368587", "0.6482588", "0.6431147", "0.64183396", "0.63895476", "0.63818926", "0.63484216", "0.63127583", "0.6292288", "0.6269406", "0.6257166", "0.622039", "0.62133354", "0.6210091", "0.6206878", "0.6201108", "0.61895037", "0.61633307", "0.6155092", "0.6116719", "0.61161745", "0.61022747", "0.60763276", "0.60629296", "0.604667", "0.604658", "0.603517", "0.6035069", "0.60208803", "0.6004993", "0.6001135", "0.5992353", "0.5985735", "0.59819096", "0.5969134", "0.5949202", "0.59370315", "0.59308267", "0.5920635", "0.59146935", "0.59017855", "0.5887048", "0.58770233", "0.5874533", "0.58722055", "0.58631384", "0.58557796", "0.58545125", "0.58489645", "0.58447564", "0.58413446", "0.5840582", "0.58303857", "0.5828547", "0.5827565", "0.5825546", "0.5814708", "0.58143526", "0.57898957", "0.57891834", "0.578757", "0.57866096", "0.5776049", "0.5769641", "0.57603174", "0.57583565", "0.5757749", "0.5753168", "0.57517207", "0.57479304", "0.5744559", "0.57441294", "0.5739331", "0.57357293", "0.5729594", "0.5724057", "0.57209074", "0.57164764", "0.56991714", "0.56955075", "0.5694456", "0.569302", "0.56896454" ]
0.57380277
90
Function: update_task Description: Update an existing task Return: Boolean result of the update statement
function update_task() { try { $sql = $GLOBALS["db"]->prepare('UPDATE tasks SET category_id = :category_id, bucket_id = :bucket_id, task_name = :task_name, task_details = :task_details WHERE task_id = :task_id AND user_id = :user_id'); $sql->bindParam(':user_id', $_SESSION["user"]["user_id"]); $sql->bindParam(':task_id', $_POST["task_id"]); $sql->bindParam(':category_id', $_POST["category_id"]); $sql->bindParam(':bucket_id', $_POST["bucket_id"]); $sql->bindParam(':task_name', $_POST["task_name"]); $sql->bindParam(':task_details', $_POST["task_details"]); $sql->execute(); if ($sql->rowCount() > 0) { return true; } else { return false; } } catch (\PDOException $e) { $_SESSION["msg"]["danger"][] = "ERROR: PDO Exception on Update"; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateTask()\n {\n }", "public function testUpdate()\n {\n $this->actingAs(User::factory()->make());\n $task = new Task();\n $task->title = 'refined_task';\n $task->completed = false;\n $task->save();\n\n $response = $this->put('/tasks/' . $task->id);\n\n $updated = Task::where('title', '=', 'refined_task')->first();\n\n $response->assertStatus(200);\n $this->assertEquals(true, $updated->completed);\n }", "public function updateTask(){\n $input_data = $this->_cleanInputs($_POST);\n if(sizeof($input_data)){\n $this->response = verifyCSRFToken();\n if($this->response->status === false){\n return $this->sendResponse($this->response);\n }\n //{\"tasks_name\":\"\",\"tasks_description\":\"\",\"roles\":[\"1\",\"12\",\"2\",\"18\",\"3\"]}\n $this->response = $this->validateTask($input_data,\"update\");\n if($this->response->status === false){\n return $this->sendResponse($this->response);\n }\n \n $task = new Tasks();\n $task = $task->find($input_data['tasks_id']);\n $task->tasks_name = $input_data['tasks_name'];\n $task->tasks_description = $input_data['tasks_description'];\n $user_info = $_SESSION['user_info'];\n $task->user_id = $user_info['user_id'];\n $task::$conn->beginTransaction();\n $this->response = $task->save();\n if($this->response->status === true){\n //Map roles with the tasks\n $roles = isset($input_data['roles']) && is_array($input_data['roles'])?$input_data['roles']:array();\n $this->response = $task->mapTaskWithRoles($task::$conn,$task->tasks_id, $roles);\n if($this->response->status === false){\n $task::$conn->rollback();\n $this->response->msg = \"Failed to update.\";\n }\n else{\n $task::$conn->commit();\n $this->response->msg = \"Successfully updated.\";\n }\n }\n \n }\n else{\n $this->response->set([\n \"status\"=>false,\n \"msg\"=>\"No input parameter.\",\n \"status_code\"=>403\n ]);\n }\n return $this->sendResponse($this->response);\n }", "public function update(User $user, Tasks $task)\n {\n if($user->id == $task->user_id){\n return true;\n }\n else{\n return false;\n }\n }", "public function update(User $user, Task $task): bool\n {\n // Any authenticated user can modify a task\n return true;\n }", "function updateTask() {\n\t\t$rating = $this -> getTaskRating();\n\t\tif (!is_null($this -> data)) {\n\t\t\tif (!empty($this -> data)) {\n\t\t\t\t//if user has not missed any events and not added any events rate his task with 1\n\t\t\t\tif ($this -> missed == 0) {\n\t\t\t\t\tif (empty($this -> rating)) {\n\t\t\t\t\t\t$rating = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$sql = \"UPDATE Task SET rating =\" . $rating . \", isRated=1, missed=\" . $this -> missed . \" WHERE TaskId=\" . $this -> data[0]['TaskId'];\n\t\t\t\t$stmt = $this -> DB -> prepare($sql);\n\t\t\t\tif ($stmt -> execute()) {\n\t\t\t\t\t$this -> updateUser();\n\t\t\t\t} else {\n\t\t\t\t\tinclude_once \"Email.php\";\n\t\t\t\t\tnew Email('failed', 'update task with id=' . $this -> data[0]['TaskId'] . ' error' . $stmt -> errorInfo(), $this -> id);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tinclude_once \"Email.php\";\n\t\t\t\tnew Email('failed', 'update task, data is empty error', $this -> id);\n\t\t\t}\n\t\t} else {\n\t\t\tinclude_once \"Email.php\";\n\t\t\tnew Email('failed', 'update task, data is empty', $this -> id);\n\t\t}\n\t}", "public function updateTask(UpdateTaskRequest $request)\n {\n DB::beginTransaction();\n try {\n $repeat = $this->checkTask($request->task)->repeat;\n $user = Auth::user();\n $task = $this->addTask($request, $user, 'update');\n $task->save();\n\n if ($request->has('existingFiles')) {\n $requestCollectionObj = $this->getRequestCollectionObject($request->existingFiles);\n $this->deleteFiles($requestCollectionObj, $task, $request->org_slug);\n }\n\n if ($request->file) {\n $requestCollectionObj = $this->getRequestCollectionObject($request->file('file'));\n $taskFileArray = $this->taskFileUpload($requestCollectionObj, $task, $request->org_slug);\n TaskFile::insert($taskFileArray);\n }\n\n if ($request->checklist) {\n $requestCollectionObj = $this->getRequestCollectionObject($request->checklist);\n $this->updateCheckList($requestCollectionObj, $task, $user);\n }\n\n if ($request->participants) {\n $requestCollectionObj = $this->getRequestCollectionObject(array_unique($request->participants));\n $this->updateParticipants($requestCollectionObj, $task);\n }\n\n if ($request->to_all_participants) {\n DB::table(TaskParticipants::table)->where(TaskParticipants::task_id, $task->id)->delete();\n }\n\n/* if ($request->has('subtask')) {\n $requestCollectionObj = $this->getRequestCollectionObject($request->subtask);\n $this->addSubTask($requestCollectionObj, $task, $user);\n }*/\n\n if ($request->repeatable) {\n $requestCollectionObj = $this->getRequestCollectionObject($request->repeatable);\n\n if ($repeat)\n $this->updateRepeatable($requestCollectionObj, $task, $user);\n else\n $this->repeatable($requestCollectionObj, $task, $user);\n\n } else if ($repeat == true && $request->repeatable == false) {\n TaskRepeat::where(TaskRepeat::task_id, $task->id)\n ->where(TaskRepeat::user_id, $user->id)->delete();\n }\n\n $this->setDataForActivityStream($task, \"taskUpdated\");\n DB::commit();\n } catch (ModelNotFoundException $e) {\n DB::rollBack();\n $error = $e->getMessage();\n if ($e->getModel() === Task::class)\n $error = \"Invalid Task\";\n\n $this->content['error'] = $error;\n $this->content['code'] = 422;\n return $this->content;\n } catch (\\Exception $e) {\n DB::rollBack();\n $this->content['error'] = $e->getMessage();\n $this->content['code'] = 422;\n return $this->content;\n }\n\n $this->content['data'] = \"Task updated successfully\";\n $this->content['code'] = 200;\n return $this->content;\n\n }", "public function testUpdatedTask()\n {\n $userId = User::first()->value('id');\n $taskId = Task::orderBy('id', 'desc')->first()->id;\n\n $response = $this->json('PUT', '/api/v1.0.0/users/'.$userId.'/tasks/'.$taskId, [\n 'description' => 'An updated task from PHPUnit',\n 'completed' => true,\n ]);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n 'description' => 'An updated task from PHPUnit',\n 'completed' => true,\n ]);\n }", "public function update(TaskRequest $request, Task $task)\n {\n $this->authorize('update', $task);\n if ($request->done) {\n $task->update([\n 'done' => ($task->done == 0) ? 1 : 0,\n ]);\n return $task;\n }\n }", "public function editTask()\n\t{\n\t\t$jwt = Auth::isValidToken($_COOKIE['SSID']);\n \n if (!$jwt) {\n View::jsonResponse(['status' => 401, 'message' => 'Access denied for you!']);\n }\n\n $update = [ 'task' => $_POST['etask'], 'id' => $_POST['taskid']];\n $update = Validator::cleanData($update);\n\n if (Validator::isEmpty($update)) {\n View::jsonResponse(['status' => 401, 'message' => 'There are empty fields!']);\n }\n\n (new Task())->update($update)->execute();\n\n View::jsonResponse(['status' => 200, 'message' => 'Task edited successful!']); \n \n\t}", "public function update(UpdateTaskRequest $request, Task $task)\n {\n $inputs = $request->all();\n $inputs['completed_at'] = $request->completed ? now() : null;\n unset($inputs['completed']);\n\n $task->update($inputs);\n\n return response('Task Updated Successfully');\n }", "public function update(Request $request, Task $task)\n {\n if (!$task->is_finished && $request->input('is_finished')) {\n Mail::to('[email protected]')->send(new TaskDone($task->project->user, $task));\n }\n $task->update($request->all());\n return $this->ParsedReturn($task, 'Task unchanged!');\n\n }", "public function update(Request $request, Task $task)\n {\n $task->update([\n 'completed' => true\n ]);\n \n return back();\n }", "public function update() {\n\n //GETS TASK, DEPENDING ON TASK ID (ID)\n $data=Tasks::find(request('task_id'));\n\n //GETS REQUEST AND REPLACES TASK TITLE & DESCRIPTION\n $data->task=request('task');\n $data->description=request('description');\n\n //SAVES DB\n $data->save();\n\n //REDIRECTS TO TASK VIEW WITH NOTEPADID AS PARAMETER\n return redirect (\"/task/$data->NotepadID\");\n }", "public function update(Request $request, Task $task)\n {\n\n // Start applying requested changes before potential execution.\n if ($request->request_details)\n {\n $task->request_details = json_encode($request->request_details, JSON_FORCE_OBJECT);\n }\n if ($request->status === 'ready')\n {\n // User is requesting to execute the current task.\n $function_name = 'task_' . $task->taskType->name;\n $result = $this->$function_name($task);\n $task->status = $result['status'];\n $task->response_details = $result['response_details'];\n }\n\n // Update the model.\n $task->save();\n\n // Return the updated task as a collection.\n\treturn response()->json(['status' => 'success', 'message' => 'Resource Updated', 'payload' => [$task]], 200);\n }", "public function updateTask(TaskInterface $task) {\n\n return $this->request('tasks/' . $task->getId(), 'PUT', [], json_encode($task->getProperties()));\n }", "public function updateTask($id)\n\t{\n\t\tif ( \\App\\is_admin() ) {\n\t\t\t$task = Task::whereId( (int)$id )->first();\n\t\t\tif ( !$task ) {\n\t\t\t\theader('Location: /?err=tasl-undefined');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ( $this->taskValidate() ) {\n\t\t\t\t$task->update([\n\t\t\t\t\t\t'name' => htmlspecialchars($_POST['inputTaskName']),\n\t\t\t\t\t\t'email' => htmlspecialchars($_POST['inputTaskMail']),\n\t\t\t\t\t\t'text' => htmlspecialchars($_POST['inputTaskText'])\n\t\t\t\t\t]);\n\t\t\t\t// to index\n\t\t\t\theader('Location: /');\n\t\t\t}\n\t\t} else {\n\t\t\theader('Location: /?err=auth');\n\t\t}\n\t}", "public function update(Request $request, Task $task)\n {\n $task_id = $task->id;\n\n if (auth()->user()->isManager(auth()->user()->id)) {\n if ($request->finish_editing == 'Yes') {\n $put = Task::find($task_id);\n $put->override_status = 'Yes';\n $put->save();\n return redirect()->back()->with('message', 'semd to approver successfully')->with('status', 1);\n } else {\n /**\n * if manager edited any data during requisition after approver data\n * action delete this approver approved status from tasksstatus table\n */\n if($task->manager_override_chunck == null){\n TaskHelper::ManagerOverrideData($task_id);\n }\n }\n }\n\n //End\n\n $getResource = TaskSite::select('resource_id')->where('task_id', $task->id)->get();\n if (isset($getResource)) {\n $checkResource = TaskHelper::arrayExist($getResource, 'resource_id', $request->site_head);\n if ($checkResource == true) {\n return redirect()->back()->with('message', 'This person already assign as resource.please at first remove from resource')->with('status', 0);\n }\n }\n\n if($request->anonymousproof_details){\n if (auth()->user()->isManager(auth()->user()->id)) {\n /*\n && $request->anonymous_proof_details\n Task::where('id', $task->id)\n ->update(['anonymous_proof_details' => $request->anonymous_proof_details]);\n */\n\n\n $atts = Task::find($task->id);\n $atts->anonymous_proof_details = $request->anonymous_proof_details;\n $atts->save();\n\n }\n return redirect()->back()->with('message', 'Saved successfully')->with('status', 1);\n }\n\n if (auth()->user()->isManager(auth()->user()->id) && $request->task_assigned_to_head == 'Yes') {\n\n $atts = Task::find($task->id);\n $atts->task_assigned_to_head = $request->task_assigned_to_head;\n $atts->save();\n\n TaskHelper::statusUpdate([\n 'code' => TaskHelper::getStatusKey('task_assigned_to_head'),\n 'task_id' => $request->task_id,\n 'action_performed_by' => auth()->user()->id,\n 'performed_for' => null,\n 'requisition_id' => null,\n 'message' => TaskHelper::getStatusMessage('task_assigned_to_head')\n ]);\n return redirect()->back()->with('message', 'Saved successfully')->with('status', 1);\n }\n\n if (auth()->user()->isApprover(auth()->user()->id)) {\n TaskHelper::statusUpdateOrInsert([\n 'code' => TaskHelper::getStatusKey('task_approver_edited'),\n 'task_id' => $request->task->id,\n 'action_performed_by' => auth()->user()->id,\n 'performed_for' => null,\n 'requisition_id' => null,\n 'message' => TaskHelper::getStatusMessage('task_approver_edited')\n ]);\n }\n\n\n // store\n $attributes = [\n 'task_type' => $request->task_type,\n 'project_id' => $request->project_id,\n 'task_code' => $request->task_code ?? null,\n 'task_name' => $request->task_name,\n 'site_head' => $request->site_head,\n 'task_details' => $request->task_details,\n 'task_assigned_to_head' => $request->task_assigned_to_head,\n ];\n //return redirect()->back()->with('message', 'Edited Successfully')->with('status', 1);\n //dd($attributes);\n try {\n $task = $this->task->update($task->id, $attributes);\n\n return back()\n ->with('message', 'Successfully saved')\n ->with('status', 1)\n ->with('task', $task);\n } catch (\\Exception $e) {\n return view('task::edit', $task->id)->with(['status' => 0, 'message' => 'Error']);\n }\n }", "public function updateTask($task_id) {\n\t\t$conn=parent::connect();\n\t\t$sql = \"UPDATE \" . TBL_TASK . \" SET\n\t\t\t\ttask_name = :task_name,\n\t\t\t\ttask_hourly_rate = :task_hourly_rate,\n\t\t\t\ttask_bill_by_default = :task_bill_by_default,\n\t\t\t\ttask_common = :task_common,\n\t\t\t\ttask_archived = :task_archived\n\t\t\t\tWHERE task_id = :task_id\";\n\t\t\ttry {\n\t\t\t\t$st = $conn->prepare($sql);\n\t\t\t\t$st->bindValue(\":task_name\", $this->data[\"task_name\"], PDO::PARAM_STR);\n\t\t\t\t$st->bindValue(\":task_hourly_rate\", $this->data[\"task_hourly_rate\"], PDO::PARAM_STR);\n\t\t\t\t$st->bindValue(\":task_bill_by_default\", $this->data[\"task_bill_by_default\"], PDO::PARAM_STR);\n\t\t\t\t$st->bindValue(\":task_common\", $this->data[\"task_common\"], PDO::PARAM_STR);\n\t\t\t\t$st->bindValue(\":task_archived\", $this->data[\"task_archived\"], PDO::PARAM_STR);\n\t\t\t\t$st->bindValue(\":task_id\", $task_id, PDO::PARAM_INT);\n\t\t\t\t$st->execute();\t\n\t\t\t\tparent::disconnect($conn);\n\t\t\t} catch (PDOException $e) {\n\t\t\t\tparent::disconnect($conn);\n\t\t\t\tdie(\"Query failed on update of task: \" . $e->getMessage() . \" sql is \" . $sql);\n\t\t\t}\n\t}", "public function update()\n {\n if(!isset($_SESSION['login']) || $_SESSION['login'] != 'admin123') {\n return redirect('page-not-found');\n }\n $status = (isset($_POST['status'])) ? 1 : 0;\n $this->task->updateTask($_POST['id'], $_POST['text'], $status);\n\n return redirect('');\n }", "public function update(Request $request, Task $task)\n {\n $userId = $request->user()->id;\n $data = $this->validate($request, UserTask::updateRules());\n $userTask = UserTask::query()\n ->where([\n ['user_id', '=', $userId ],\n ['task_id', '=', $task->id ]\n ])->first();\n\n if ( !$userTask ) {\n $model = new UserTask();\n $model->user_id = $userId;\n $model->task_id = $task->id;\n $model->isCompleted = $data['isCompleted'];\n $model->save();\n\n } else {\n $userTask->update( $data );\n }\n\n return response()->json(null, Response::HTTP_OK);\n }", "public function update(TaskUpdateRequest $request, Task $task)\n {\n DB::beginTransaction();\n try {\n $task->update($request->all());\n DB::commit();\n } catch (\\Exception $ex) {\n DB::rollBack();\n return redirect()->back()->with('error', 'Sorry ! Error occurred during the transaction.');\n }\n\n return redirect()->route('home')->with(\"success\", \"Task updated successfully !\");\n }", "function modify_task($user, $session_uid, $update_fields_array) {\r\n global $conn, $task_attributes;\r\n $out = array(false, false, array());\r\n $user = make_safe($user);\r\n $session_uid = make_safe($session_uid);\r\n $task_id = isset($update_fields_array['id']) ? $update_fields_array['id'] : false;\r\n //verify access && make sure we got and id and at least one other attr\r\n if (verify_access($user, $session_uid) && $task_id != false && count($update_fields_array) > 1) {\r\n //create the query\r\n $query = \"UPDATE tasks SET \";\r\n $where_string = \" WHERE id=$task_id\";\r\n //add a field for each one defined in $update_fields_array\r\n foreach($update_fields_array as $field => $update_value) {\r\n $safe_update_value = make_safe($update_value);\r\n switch ($field) {\r\n case \"id\":\r\n break;\r\n case \"parent_id\":\r\n case \"completed\":\r\n\t if (!($field=='parent_id' && !preg_match(\"/^\\d+$/\", $safe_update_value))) {}\r\n $query = $query.\"$field=$safe_update_value, \";\r\n break;\r\n default:\r\n\t $safe_update_value = str_replace(\"'\", \"''\", $safe_update_value);\r\n $query = $query.\"$field='$safe_update_value', \";\r\n break;\r\n }\r\n }\r\n //remove the extra comma and space\r\n $l = strlen($query) - 2;\r\n $query = substr($query, 0, $l);\r\n //append where clause to query\r\n $query = $query.$where_string;\r\n //send query\r\n $out[2]['query'] = $query;\r\n if ($conn->query($query)) {\r\n //verify results\r\n if ($db_record = $conn->query(\"SELECT * FROM tasks WHERE id=$task_id\")->fetch_assoc()) {\r\n //if modified successfully, set $out to true\r\n $change_out = true;\r\n foreach($db_record as $field => $value) {\r\n //if any of the returned reults don't match the inputted values, dont change $Out\r\n if (isset($update_fields_array[$field])) {\r\n if ($value !== $update_fields_array[$field]) {\r\n $change_out = false;\r\n }\r\n }\r\n }\r\n $out[0] = $change_out ? true : $out[0];\r\n\t $out[1] = $change_out ? $db_record : $out[1];\r\n //close the select query\r\n }\r\n }\r\n }\r\n //return array\r\n return $out;\r\n}", "public function testUpdateTaskInstanceVariable()\n {\n }", "public function update(TaskUpdateRequest $request, Task $task)\n {\n return (new CrudService())->update($request->all(), $task) ? \n view('web.pages.tasks')\n ->with('update_task',true)\n ->with('tasks',Task::with('project')->get())\n : Redirect::back()->withErrors(['msg'=>'An error ocurs while updating']);\n }", "public function update(User $user, Task $task)\n {\n return $user->hasPermissionTo(Actions::EDIT, $task);\n }", "public function update(User $user, Task $task)\n {\n return $user->hasRole('admin')\n || ($user->hasRole('worker') && $task->job->worker_id == $user->id);\n }", "public function update(TaskUpdateRequest $request, Task $task)\n {\n if ($task->update($request->all())) {\n return response()->json([\n 'success' => true,\n 'message' => \"Task has been updated with success\"\n ], 200);\n }\n }", "public function updated($task)\n {\n $task->notifyMembers('Updated');\n }", "public function update(Request $request, $id)\n {\n if(Module::hasAccess(\"Tasks\", \"edit\")) {\n\n $rules = Module::validateRules(\"Tasks\", $request, true);\n\n $validator = Validator::make($request->all(), $rules);\n\n if ($validator->fails()) {\n return redirect()->back()->withErrors($validator)->withInput();;\n }\n\n $params = [\n 'title' => $request->title,\n 'run_time' => $request->run_time,\n \"product_id\" => $request->product_id\n ];\n\n if ($request->work_id == 'exchange') {\n $params['time_point'] = $request->time_point;\n $params['code'] = $request->code;\n $params['prize_number'] = $request->prize_number ?? 1;\n $params['is_wait_sjk'] = $request->is_wait_sjk ?? 0;\n } else if ($request->work_id == 'order') {\n $params['time_point'] = $request->time_point;\n $params['money'] = $request->money ?? 1000;\n $params['voucher_id'] = $request->voucher_id ?? 0;\n $params['is_kdb_pay'] = $request->is_kdb_pay ?? 0;\n $params['is_wait_sjk'] = $request->is_wait_sjk ?? 0;\n $params['order_number'] = $request->order_number ?? 1;\n } else if ($request->work_id == 'transfer') {\n $params['money'] = $request->money ?? 1000;\n } else if ($request->work_id == 'abcGift' || $request->work_id == 'icbcGift') {\n $params['code'] = $request->code;\n $params['time_point'] = $request->time_point;\n $params['is_kdb_pay'] = $request->is_kdb_pay ?? 0;\n }\n\n if (isset($request->status)) {\n $params['status'] = $request->status;\n }\n\n Task::where('id', $id)->update($params);\n\n// Module::updateRow(\"Tasks\", $request, $id);\n\n return redirect()->route(config('laraadmin.adminRoute') . '.tasks.index');\n\n } else {\n return redirect(config('laraadmin.adminRoute').\"/\");\n }\n }", "public function update(Request $request, Task $task)\n {\n $request->validate([\n 'Description'=>'required|max:255|min:5',\n 'Due_Date'=>'required|after_or_equal:today',\n 'ServicePersonID'=>'required'\n ]);\n \n $data = task::find($request->input('TaskID'));\n $data->TaskID = $request->input('TaskID');\n $data->ServicePersonID = $request->input('ServicePersonID');\n $data->Due_Date = $request->input('Due_Date');\n $data->Status = $request->input('Status');\n $data->Description = $request->input('Description');\n \n $data->save();\n\n return redirect('View-Task')->with('success','Task Updated Successfully');\n }", "public function actionUpdate($task_id)\n {\n /* $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n \n }*/\n $_wsTaskModel = $this->findWorksystemTask($task_id);\n return $this->renderAjax('update', [\n 'model' => $_wsTaskModel,\n 'infos' => $this->getWorksystemContentinfos($task_id),\n ]);\n }", "public function update(Request $request, Task $task)\n {\n //\n }", "public function update(Request $request, Task $task)\n {\n //\n }", "public function update(User $user, Task $task)\n {\n if ($user->isAdmin()) {\n return true;\n } else if ($user->isChair($task->conference) || $user->isCaptain($task->conference)) {\n return true;\n } else {\n return false;\n }\n }", "public function update(Request $request, Task $task)\n {\n if ($request['name']) {\n $task->name = $request['name'];\n $task->update();\n\n return redirect()->route('tasks.index')->with('message', 'Task edit');\n }\n\n if (!$request['status']) {\n $task->statusCompleted();\n $task->update();\n return back()->with('message', 'Status complete');\n }\n\n\n }", "public function update(Request $request, Task $task)\n {\n //Admin allow only \n abort_if(Gate::denies('user_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n\n $validated = $request->validate([\n 'name' => 'required|max:100|unique:tasks,name,' . $task->id,\n 'start_date' => 'required|date|after_or_equal:today',\n 'end_date' => 'required|date|after_or_equal:start_date',\n ]);\n\n //Create new task\n $task = Task::create($validated);\n \n //Save related users to task\n $assigned_user = User::find($request->assigned_user);\n $task->assigned_user()->associate($assigned_user);\n\n // $task->save();\n\n return redirect()->route('tasks.index');\n }", "public function update(StoreTaskRequest $request, Task $task)\n {\n $task->category_id = $request->categoryId;\n $task->name = $request->name;\n $task->is_complete = $request->isComplete;\n $task->save();\n\n $redirect = Redirect::route('task.index');\n return $redirect->with('success', 'Task updated successfully.');\n }", "public function testUpdateTask()\n {\n $this->addTestFixtures();\n $this->logInAsUser();\n $id = $this->task->getId();\n\n $crawler = $this->client->request('GET', '/tasks/'.$id.'/edit');\n\n $form = $crawler->selectButton('Modifier')->form();\n $form['task[title]'] = 'Titre';\n $form['task[content]'] = 'Contenu de test pour la création d\\'une tâche';\n $this->client->submit($form);\n\n $crawler = $this->client->followRedirect();\n $response = $this->client->getResponse();\n $statusCode = $response->getStatusCode();\n\n $this->assertEquals(200, $statusCode);\n $this->assertContains('Superbe! La tâche a bien été modifiée.', $crawler->filter('div.alert.alert-success')->text());\n }", "public function update(Project $project, Task $task) {\n $this->authorize('update', $project);\n\n $attributes = $this->validateTask();\n $attributes['completed'] = request()->has('completed');\n $task->update($attributes);\n\n return redirect()->action('ProjectsController@show', [$project]);\n }", "public function update(Request $request, Task $task)\n {\n if ($task->user_id !== Auth::user()->id) {\n return \"You are not authorized\";\n } else {\n $validated = $request->validate([\n 'title' => 'required|max:255',\n 'detail' => 'required|max:255',\n ]);\n\n $task->title = $request->title;\n $task->detail = $request->detail;\n $task->save();\n\n return redirect(route('projects.show', $task->project_id))->with('status', 'Your new task has been updated succesfully!');\n }\n\n }", "function update_project_task($name, $description, $status, $taskId, $projectId){\n\n global $connection;\n global $errors;\n global $data;\n\n //Get user\n $user = $_SESSION['$user'];\n\n //Query for updating project task\n $query = \"UPDATE task_table \n SET name = '$name', description = '$description', status = '$status', \n updated_by = '$user', date_start = null, date_end = null\n WHERE id = '$taskId'\";\n\n //Check if there is any errors\n if(!$result = mysqli_query($connection, $query)){\n $errors['sql'] = mysqli_error($connection);\n }\n else{\n $data['status'] = preg_replace(\"/_/i\", \" \", $status);\n update_project($projectId);\n }\n}", "public function update(Request $request, Task $task)\n {\n\n $this->authorize('update', $task);\n\n // Validation\n $this->validate($request, [\n 'title' => 'required|max:255',\n 'description' => 'required',\n 'priority' => 'required|max:5',\n ]);\n\n // Update\n $task->update([\n 'title' => $request->title,\n 'description' => $request->description,\n 'priority' => $request->priority,\n 'completed' => $request->completed,\n ]);\n\n return redirect ('/tasks');\n }", "public function update(Request $request, Task $task)\n {\n $this->validate($request, [\n 'name' => 'max:128',\n 'status' => 'boolean',\n 'order' => 'numeric',\n ], [\n 'name.*' => 'Name is invalid!',\n 'status.*' => 'Status is invalid!',\n 'order.*' => 'Status is invalid!',\n ]);\n\n return response()->json([\n 'success' => (int) $task->update($request->all()),\n ]);\n }", "public function update(TaskRequest $request, Task $task)\n {\n Gate::authorize('update', $task);\n\n $task->update($request->validated());\n\n if ($request->input('as_subtask', false)) {\n if ($task->isSubtask()) {\n return Redirect::route('tasks.show', $task->parent_id);\n }\n\n return Redirect::route('tasks.index');\n }\n\n return Redirect::route('tasks.show', $task->id);\n }", "public function updated(Task $task)\n {\n broadcast(new Updated($task))->toOthers();\n }", "public function updateTask(Task $task, Request $request)\n {\n $this->checkIfLoggedIn();\n\n $this->checkIfTaskBelongsToUSer($task);\n\n $task->updateTask(\n $request->input('title'),\n $request->input('body')\n );\n\n return redirect('/tasks');\n }", "public function update(Request $request, Task $task)\n {\n $task->done = !$task->done;\n $task->save();\n\n return redirect('/');\n }", "public function postUpdate() {\n\t\t$inputs = Input::all();\n\t\t$completes = Input::get('complete');\n\t\tforeach ($inputs as $key => $value) {\n\t\t\tif (Str::startsWith($key, 'assign_id')) {\n\t\t\t\ttry {\n\t\t\t\t\t$assignment = Assignment::findOrFail($value);\n\t\t\t\t\tforeach ($completes as $complete) {\n\t\t\t\t\t\tif ($value == $complete) {\n\t\t\t\t\t\t\t$assignment->complete = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$assignment->complete = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t# Try to save the assignment\n\t\t\t\t\t$assignment->save();\n\t\t\t\t}\n\t\t\t\t# Fail\n\t\t\t\tcatch (Exception $e) {\n\t\t\t\t\treturn Redirect::to('/home')->with('flash_message', 'Update failed; please try again.'.$e);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\treturn Redirect::to('/home')->withInput()->with('flash_message', 'Tasks updated.');\n\t}", "public function update($taskid){\n $this->form_validation->set_rules('tname', 'Task Name', 'required|min_length[10]');\n $this->form_validation->set_rules('tdescription', 'Description', 'required|min_length[50]');\n $this->form_validation->set_rules('tproject', 'Project', 'required|integer');\n $this->form_validation->set_rules('tassigne', 'Assigned To', 'required|integer');\n $this->form_validation->set_rules('tapproxduration', 'Approx Duration', 'required|integer');\n $this->form_validation->set_rules('tpriority', 'Priority', 'required|alpha');\n $this->form_validation->set_rules('tstatus', 'Status', 'required|max_length[1]');\n \n if ($this->form_validation->run() == FALSE){\n $this->session->set_flashdata('error', validation_errors());\n redirect('/edit/'.$taskid);\n }else{\n $condition = array('TaskName' => $this->input->post('tname'), 'TaskId !=' => $taskid);\n $exist = $this->task_model->selectData('task',$condition,'TaskId');\n if(!empty($exist)){\n $this->session->set_flashdata('error', 'TaskName has been already taken');\n redirect('/edit/'.$taskid);\n }\n \n $new_task = array('ProjectId' => $this->input->post('tproject'),'TaskName' => $this->input->post('tname'), 'TaskDescription' => $this->input->post('tdescription'), 'Assigned' => $this->input->post('tassigne'), 'ApproxDuration' => $this->input->post('tapproxduration'), 'Priority' => $this->input->post('tpriority'), 'Status' => $this->input->post('tstatus'),'UpdatedTS'=>date('Y-m-d H:i:s'));\n try{\n $this->task_model->updateData('task',$new_task,array('TaskId' => $taskid));\n if(!empty($_FILES['treffile'])){\n $this->do_upload($taskid);\n }\n $this->session->set_flashdata('error', 'Task updated successfully');\n redirect('/edit/'.$taskid);\n } catch (Exception $ex) {\n $this->session->set_flashdata('error', 'Something went wrong. Please try again after some time');\n redirect('/edit/'.$taskid);\n }\n \n }\n \n }", "public function update(Request $request, Task $task)\n {\n try\n\t\t{\n $data = $request->all()['param'];\n $today = date('Y-m-d');\n\n $t = Task::find($data['id']);\n if(array_key_exists('status', $data))\n {\n $t->status = $data['status'];\n }\n if(array_key_exists('description', $data))\n {\n $t->description = $data['description'];\n }\n\n $t->finished = $today;\n $t->update();\n return response()->json(['data' => $t,\n 'message' => 'Tarefa concluída com sucesso.'], 201);\n\t\t}\n\t\tcatch (\\Exception $e)\n\t\t{\n if(config('app.debug'))\n {\n \t\t\treturn response()->json($e->getMessage(), 400);\n \t\t}\n\t\t\treturn response()->json('Houve um erro ao atualizar a tarefa.', 400);\n\t\t}\n }", "public function test_edit_task()\n {\n Task::create([\n 'name' => 'Task name', \n 'priority' => 'urgent', \n 'schedule_date' => '2020-12-12 12:22:00',\n 'project_id' => 1\n ]);\n $response = $this->post('/task/update', [\n 'task_id' => 1,\n 'name' => 'Updated task name', \n 'priority' => 'normal', \n 'schedule_date_date' => '2020-12-12',\n 'schedule_date_time' => '10:08',\n 'project_id' => '1',\n ]);\n $response->assertStatus(302);\n }", "public function toggle(){\n \n $taskId = $this->request->data('id');\n\n $task = $this->Task->find('first', array(\n 'contain' => array(),\n 'conditions' => array(\n 'Task.id' => $taskId\n )\n ));\n\n if(empty($task))\n throw new NotFoundException('This task does not exist');\n\n $this->Task->id = $taskId;\n $result = $this->Task->save(array(\n 'Task' => array(\n 'completed' => ($task['Task']['completed'] ? '0' : '1')\n )\n ));\n\n if(!$result)\n throw new InternalErrorException('Failed to update task');\n\n $task = $this->Task->read(null, $taskId); \n\n $this->set(array(\n 'isCompleted' => $task['Task']['completed'],\n 'completedOn' => date('M j, g:i a', strtotime($task['Task']['updated'])),\n '_serialize' => array(\n 'isCompleted',\n 'completedOn'\n )\n ));\n }", "public function projectTaskStatusUpdate(){\r\n\t\t//fetch activity feed list\r\n\t\t$post = $this->input->post(null, true);\r\n\t\t$parent_id = $post['pid'];\r\n\t\t$task_id = $post['tid'];\r\n\t\t$status_id = $post['stat'];\r\n\t\t$completed_time = gmdate('Y-m-d H:i:s');\r\n\r\n\t\t//$task = new Task();\r\n\t\t$data = array('status_id' => $status_id, 'completed_date'=>$completed_time);\r\n\t\t$this->db->where(\"parent_id\", $parent_id);\r\n\t\t$this->db->where(\"task_id\", $task_id);\r\n\t\t$this->db->update(\"sc_tasks\", $data);\r\n\r\n\t}", "public function update(Request $request, Task $task)\n {\n Task::where('id', $task->id)->update($request->all());\n return response()->json(['status' => 'done'], 200);\n }", "public function updateTask($id, $data = [])\r\n\t{\r\n\t\tif(!is_int($id) && $id <= 0) { return false; }\t\r\n\r\n\t\t$query = sprintf('UPDATE tasks SET name = \"%s\", fromtime = \"%s\", totime = \"%s\" \r\n\t\t\tWHERE taskid = \"%s\"', $data['name'], $data['fromtime'], $data['totime'], $id);\r\n\t\t$this->db->query($query);\r\n\r\n\t\t// Get latest id\r\n\t\t$id = $this->db->insert_id();\r\n\r\n\t\tif(is_int($id) && $id > 0) {\r\n\t\t\treturn $id;\r\n\t\t} \r\n\r\n\t\treturn false;\r\n\t}", "public function update_task($data)\n {\n if (!isset($data['id']) || !$data['id']) {\n return false;\n }\n\n //\n // Permissions\n //\n if (!empty($data['gid'])) {\n $targetGroupId = $data['gid'];\n } else {\n $oldEvent = $this->get_task($data['id']);\n $targetGroupId = $oldEvent['gid'];\n }\n // Am I the owner?\n if ($this->getGroupOwner($targetGroupId) != $this->uid) {\n // If not, I should have write permissions through a share\n $perms = $GLOBALS['DB']->getUserSharedFolderPermissions($this->uid, 'calendar', $targetGroupId);\n if (empty($perms) || empty($perms['write'])) {\n // No, I haven't\n return false;\n }\n }\n //\n //\n\n $query = 'UPDATE '.$this->Tbl['cal_task'].' SET lastmod=NOW()';\n foreach (array('start' => 'starts', 'end' => 'ends', 'title' => 'title', 'location' => 'location'\n ,'description' => 'description', 'importance' => 'importance', 'gid' => 'gid'\n ,'completion' => 'completion', 'type' => 'type', 'status' => 'status'\n ) as $k => $v) {\n if (!isset($data[$k])) {\n continue;\n }\n $query .= ',`'.$v.'`='.(('NULL' == $data[$k] || is_null($data[$k])) ? 'NULL' : '\"'.$this->esc($data[$k]).'\"');\n }\n $this->query($query.' WHERE uid='.$this->uid.' AND id='.$data['id']);\n // Reminders set\n $this->query('DELETE FROM '.$this->Tbl['cal_reminder'].' WHERE `uid`='.$this->uid.' AND `ref`=\"tsk\" AND `eid`='.$data['id']);\n if (isset($data['reminders']) && !empty($data['reminders'])) {\n $query = 'INSERT INTO '.$this->Tbl['cal_reminder'].' (`eid`,`ref`,`uid`,`mode`,`time`,`text`,`smsto`,`mailto`) VALUES ';\n $k = 0;\n foreach ($data['reminders'] as $v) {\n if ($k) {\n $query .= ',';\n }\n if ($v['mode'] == '-') {\n continue;\n }\n $query .= '('.doubleval($data['id']).',\"tsk\",'.$this->uid.',\"'.$this->esc($v['mode']).'\"'\n .','.doubleval($v['time']).',\"'.$this->esc($v['text']).'\"'\n .',\"'.$this->esc($v['smsto']).'\",\"'.$this->esc($v['mailto']).'\")';\n $k++;\n }\n if ($k > 0) {\n $this->query($query);\n }\n }\n return true;\n }", "public function update($tblTask){\n\t\t$sql = 'UPDATE tbl_task SET org_id = ?, task_code = ?, description = ?, rate_per_hour = ?, gl_posting = ?, active = ?, date_created = ?, date_modified = ? WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t\n\t\t$sqlQuery->setNumber($tblTask->orgId);\n\t\t$sqlQuery->set($tblTask->taskCode);\n\t\t$sqlQuery->set($tblTask->description);\n\t\t$sqlQuery->set($tblTask->ratePerHour);\n\t\t$sqlQuery->setNumber($tblTask->glPosting);\n\t\t$sqlQuery->set($tblTask->active);\n\t\t$sqlQuery->set($tblTask->dateCreated);\n\t\t$sqlQuery->set($tblTask->dateModified);\n\n\t\t$sqlQuery->setNumber($tblTask->id);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function update(TaskRequest $request, Task $task)\n\t\t{\n\t $data = $request->only([\"task\", \"priority\"]);\n\t // create article with data and store in DB\n\t $task->fill($data)->save();\n\t // return the article along with a 201 status code\n\t return response($task, 201);\n\n\t\t}", "function updateTask() {\r\n\t\t$conn = connection();\r\n\t\t$id = $_POST['Id'];\r\n\t\t$Task_Name = $_POST['Task_Name'];\r\n\t\t$List_Id = $_POST['List_Id'];\r\n\t\t$Description = $_POST['Description'];\r\n\t\t$Time = $_POST['Time'];\r\n\t\t$Status = $_POST['Status'];\r\n\t\t$sql = \"UPDATE task SET Description='$Description', Time='$Time', Status='$Status' WHERE Id = \" . $id;\r\n\t\t$query = $conn->prepare($sql);\r\n\t\t$query->execute();\r\n\t\theader(\"Location: indexTask.php?List_Id=$List_Id&Task_Name=$Task_Name\");\r\n\t}", "public function updateTask(&$task)\r\n\t{\r\n\t\t$sql = sprintf('\r\n\t\t\tUPDATE\r\n\t\t\t\ttask\r\n\t\t\tSET\r\n\t\t\t\ttitle = \"%s\"\r\n\t\t\tWHERE\r\n\t\t\t\tid = %d\r\n\t\t', mysql_escape_string($task->title), $task->id);\t\t\r\n\r\n\t\tmysqli_query($this->db, $sql);\r\n\t}", "public function update(Task $task, StoreTaskRequest $request)\n {\n $request->validated();\n\n $task->update($request->all());\n return redirect()->route('dashboard.tasks');\n }", "public function update(Request $request, Task $task)\n {\n $validatedData = $request->validate([\n 'body' => 'required|min:2',\n 'status' => Rule::in(0, 1, 2),\n ]);\n\n $task->body = array_key_exists('body', $validatedData) ?\n $validatedData['body'] : $task->body;\n $task->status = array_key_exists('status', $validatedData) ?\n $validatedData['status'] : $task->status;\n\n $task->save();\n\n return response()->json($task->toJson(), 200);\n }", "public function update(Request $request, Task $task)\n {\n //Validate\n $request->validate([\n 'title' => 'required|min:3',\n 'description' => 'required',\n ]);\n $task = Task::find($request->id);\n $task->title = $request->title;\n $task->description = $request->description;\n $task->category_id = $request->category_id;\n $task->is_compleated = $request->is_compleated;\n\n $task->save();\n Session::flash('alert-success', 'Se ha Actualizado la tarea con éxito!');\n return redirect()->route('task_index_path');\n }", "public function update(Request $request, Task $task)\n {\n $validator = Validator::make($request->all(),\n [\n 'task_title' => ['required', 'max:64'],\n 'task_comment' => ['required', 'max:512'],\n 'start_date' => ['required'],\n 'finish_date' => ['required'],\n ],\n [\n 'task_title.max' => 'Title text too long. Try with less than 64 characters',\n 'task_comment.max' => 'Comment text too long. Try with less than 512 characters',\n ]\n );\n\n if ($validator->fails()) {\n $request->flash();\n return redirect()->back()->withErrors($validator);\n }\n\n $task->title = $request->task_title;\n $task->comment = $request->task_comment;\n $task->start_time = $request->start_date;\n $task->finish_time = $request->finish_date;\n $task->user_id = $request->user()->id;\n $task->save();\n return redirect()->route('task.index')->with('success', 'Task updated successfully.');\n }", "public function update(Request $request, Task $task)\n {\n //echo 'hello'; \n $this->authorize('update', $task);\n \n $this->validate($request, [\n 'name' => 'required|max:255',\n ]);\n \n $request->user()->tasks()->update([\n 'name' => $request->name,\n ]);\n \n $landing = 'edit/'.$task->id;\n return redirect($landing);\n \n //echo '<pre>'; print_r($request);\n die;\n //return redirect('update/'.$id)->withMessage($message);\n }", "public function update(UpdateTaskRequest $request, $id)\n {\n $task = Task::find($id);\n \n if (!$task) {\n throw new ItemNotFoundException($id);\n }\n\n $task->updated_at = Carbon::now();\n $task->updated_by = auth()->user()->id;\n\n $input = $request->validated();\n \n try {\n $updated = $task->fill($input)->save();\n } catch (\\Throwable $th) {\n throw new ItemNotUpdatedException('Task');\n }\n\n if (!$updated)\n throw new ItemNotUpdatedException('Task');\n \n return $this->sendResponse(new TaskResource($task), 'task updated successfully.'); \n }", "public function update($id)\n\t{\n\t\t$task = $this->task->find($id);\n\t\tif (!$task)\n\t\t\treturn $this->error('resource not found', self::NOT_FOUND);\n\n\t\tif (Input::has('title'))\n\t\t\t$task->title = Input::get('title');\n\t\tif (Input::has('description'))\n\t\t\t$task->description = Input::get('description');\n\t\tif (Input::has('status')){\n\t\t\t$rules = array(\n\t\t\t\t'status' => 'in:Open,In Progress,Fixed,Verified',\n\t\t\t);\n\t\t\t$validator = Validator::make(Input::all(), $rules);\n\t\t\tif ($validator->fails())\n\t\t\t\treturn $this->error($validator->messages(), self::BAD_REQUEST);\n\t\t\t$task->status = Input::get('status');\n\t\t}\n\t\t$task->save();\n\t\treturn $this->response($task, self::OK);\n\n\t}", "public function update($project_id, $task_id)\n\t{\n\t\t$result = array( 'status' => true );\n\t\t$rules = array(\n\t\t\t'name' => 'required',\n\t\t\t'short_description' => 'required',\n\t\t\t'description' => 'required'\n\t\t);\n\n\t\t// Parse serialized (jQuery) data\n\t\tparse_str(Input::get('data'), $input);\n\n\t\t$v = Validator::make($input, $rules);\n\n\t\t// Validate data\n\t\tif ($v->fails())\n\t\t{\n\t\t\t$result['status'] = false;\n\t\t\t$result['messages'] = json_decode($v->messages()->toJson());\n\n\t\t\treturn json_encode($result, true);\n\t\t}\n\n\t\t// Create new task and get the id\n\t\tTask::updateTask($task_id, $input);\n\n\t\treturn json_encode($result, true);\n\t}", "public function completeTask(){\n $query = \"UPDATE \" . $this->table_name . \" \n SET \n stato = 3\n WHERE id_ordine = :id_ordine\";\n \n $stmt = $this->conn->prepare($query);\n\n $this->id_ordine=htmlspecialchars(strip_tags($this->id_ordine));\n\n $stmt->bindParam(\":id_ordine\", $this->id_ordine);\n\n if($stmt->execute()){\n return true;\n }\n \n return false;\n }", "function update_task_angular($mysqli, $id, $name, $description, $jobtype_id, $start_time, \n\t\t\t\t\t\t\t $weekday_id, $apikey, $payload, $url, $format_id, $zip, $zip_destination, \n\t\t\t\t\t\t\t $copy, $copy_destination,$publishfiletowebserver,$webfolder,$webfilename, \n\t\t\t\t\t\t\t $ftp, $ftp_server, $ftp_user, $ftp_password, $interval_id, \n\t\t\t\t\t\t\t $folder, $filename, $notification, $notificationemails,$enabled) {\n\t$sql = \"UPDATE tasks\n\t\t\tset name = '$name',\n\t\t\tdescription = '$description',\n\t\t\tjobtype_id = $jobtype_id,\";\n\t\t\tif($start_time == \"\") {\n\t\t\t\t$sql .= \"start_time = null,\";\n\t\t\t} else {\n\t\t\t\t$sql .= \"start_time = '$start_time',\";\n\t\t\t}\n\t\t\t$sql .= \"weekday_id = $weekday_id,\n\t\t\tapikey = '$apikey',\n\t\t\tpayload = '$payload',\n\t\t\turl = '$url',\n\t\t\tformat_id = $format_id,\n\t\t\tzip = $zip,\n\t\t\tzip_destination = '$zip_destination',\n\t\t\tpublishfiletowebserver = $publishfiletowebserver,\n\t\t\twebfolder = '$webfolder',\n\t\t\twebfilename = '$webfilename',\n\t\t\tcopy = $copy,\n\t\t\tcopy_destination = '$copy_destination',\n\t\t\tftp = $ftp,\n\t\t\tftp_server = '$ftp_server',\n\t\t\tftp_user = '$ftp_user',\n\t\t\tftp_password = '$ftp_password',\n\t\t\tinterval_id = $interval_id,\n\t\t\tfolder = '$folder',\n\t\t\tfilename = '$filename',\n\t\t\tnotification = $notification,\n\t\t\tnotificationemails = '$notificationemails',\n\t\t\tenabled = $enabled\n\t\t\tWHERE id = $id\";\n\t$result = mysqli_query($mysqli,$sql);\n\tmysqli_close($mysqli);\n\t//echo $sql;\n\treturn $result;\n}", "public function update($id)\n\t{\n $task = Task::find($id);\n $task->description = Request::get('description');\n $task->performer = intval(Request::get('performer')) ? intval(Request::get('performer')): null;\n $task->state = Request::get('state');\n $task->save();\n\n return Response::json(array(\n 'errors' => false,\n 'data' => $task),\n 200\n );\n\t}", "public function update(Request $request, Task $task)\n {\n $validateData = $request-> validate([\n 'title' => 'required',\n 'category_id'=> 'required',\n 'due_date'=> 'required|date|date_format:Y-m-d|after or equal:'.date('Y-m-d')\n ]);\n\n $category = Category::findOrFail($request->category_id);\n\n if($category->user_id != auth()->id()){\n return response()->json(['message'=>'You Don\\'n own this category!'], '401');\n }\n\n if($task->user_id != auth()->id()){\n return response()->json(['message'=>'You Don\\'n own this task!'], '401');\n }\n\n if($task->update($request->all())){\n return response()->json(['message'=>'Task successfully Updated!']);\n }\n\n\n return response()->json(['message'=>'Please Try later!'], 500);\n }", "public function getTask(){\n $query = \"UPDATE \" . $this->table_name . \" \n SET \n stato = 2,\n id_fornitore = :id_fornitore\n WHERE id_ordine = :id_ordine\";\n \n\n $stmt = $this->conn->prepare($query);\n $this->id_ordine=htmlspecialchars(strip_tags($this->id_ordine));\n $this->id_fornitore=htmlspecialchars(strip_tags($this->id_fornitore));\n $stmt->bindParam(\":id_ordine\", $this->id_ordine);\n $stmt->bindParam(\":id_fornitore\", $this->id_fornitore);\n\n if($stmt->execute()){\n return true;\n }\n \n return false;\n }", "public function actionUpdate($id)\n {\n $task = $this->findModel($id);\n $destination = $task->destination;\n\n $session = Yii::$app->session;\n $mail = false;\n\n if(isset(Yii::$app->request->post()['Task']['mail'][0]) && Yii::$app->request->post()['Task']['mail'][0] == 1 ){\n $mail = true;\n\n }\n\n $programs = Program::find()->asArray()->all();\n $programsData = ArrayHelper::map($programs,'id', 'title');\n $students = User::getUsersByRole('student');\n $studentsName = Students::getStudentsNames();\n\n if(isset(Yii::$app->request->post()['Task']['user'])){\n\n $studentId = Yii::$app->request->post()['Task']['user'];\n }\n\n if ($task->load(Yii::$app->request->post()) && $task->save()) {\n\n if($destination == Task::PARTICULAR){\n\n $task->unlink('users', $task->users[0], true);\n $student = User::findOne($studentId);\n $task->link('users', $student);\n\n if ($mail){\n if($task->sendMail()){\n $session->setFlash('success', \"Success! The task $task->title was updated and send on email.\");\n }\n } else {\n $session->setFlash('success', \" Success! The task $task->title was updated.\");\n }\n\n return $this->redirect(['particular']);\n\n\n\n } elseif ($destination == Task::ALL){\n\n $task->unlinkAll('users', true);\n foreach ($students as $student){\n if($student->program_id == $task->program_id){\n $task->link('users', $student);\n }\n\n }\n if ($mail){\n if($task->sendMailForAll()){\n $session->setFlash('success', \"Success! The task $task->title was updated and send on email.\");\n }\n } else {\n $session->setFlash('success', \" Success! The task $task->title was updated.\");\n }\n\n return $this->redirect(['all']);\n\n\n }\n\n\n\n } else {\n return $this->render('update', [\n 'task' => $task,\n 'programsData' => $programsData,\n 'students' => $studentsName,\n 'destination' => $destination\n ]);\n }\n }", "protected function updateTask($task)\n {\n $errors = $this->taskManager->validate($task);\n if (!empty($errors)) {\n throw new InvalidArgumentException(implode(\"\\n\", $errors));\n }\n\n return $task;\n }", "public function update(Request $request, Task $task)\n {\n // Set POST method in Postman with PUT param method like => https://laravel-api.local/api/tasks/13?_method=PUT\n // So that we can get all the properties from 'form-data'\n\n // return response()->json([\n // 'status' => true,\n // 'requeted' => $request->all(),\n // ]);\n\n $validator = Validator::make(\n $request->all(),\n [\n 'title' => 'required|string',\n 'description' => 'required|string',\n 'status' => 'in:active,pending,done',\n 'image' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n 'files.*' => 'mimes:doc,docx,pdf,txt|max:2048',\n ],\n [\n 'status.required' => 'The status field is required and should be -> active | pending | done',\n 'status.in' => 'The selected status is invalid. It should only be -> active | pending | done',\n ]\n );\n\n if ($validator->fails()) {\n return response()->json([\n 'status' => false,\n 'errors' => $validator->errors()\n ], 400);\n }\n\n // Check if user if authorized to change this record\n if ($task->user_id != $this->user->id) {\n return response()->json([\n 'status' => false,\n 'message' => 'Failure! You are not authorized to make changes.'\n ]);\n }\n\n // Get old value to be removed\n $taskold = collect($task);\n $oldImage = $taskold->get('image_url');\n $oldFiles = json_decode($taskold->get('files_url'));\n\n // Update task\n $task->title = $request->title;\n $task->description = $request->description;\n $task->status = $request->status;\n\n $pathImage = 'uploads' . DIRECTORY_SEPARATOR . 'us' . $this->user->id . DIRECTORY_SEPARATOR . 'images';\n $imageUrl = '';\n if ($request->hasFile('image')) {\n // Remove old images\n if ($oldImage) {\n $imageToDelete = $pathImage . DIRECTORY_SEPARATOR . basename($oldImage);\n if (File::exists(public_path($imageToDelete))) {\n File::delete($imageToDelete);\n }\n }\n\n // store image into images folder\n // $file = $request->file('image')->store($pathImage);\n $uploadedImage = $request->file('image');\n $imageName = Str::random(30) . '.' . $uploadedImage->getClientOriginalExtension();\n $uploadedImage->move(public_path($pathImage), $imageName);\n $imageUrl = url($pathImage . DIRECTORY_SEPARATOR . $imageName);\n $task->image_url = $imageUrl;\n }\n\n $pathFiles = 'uploads' . DIRECTORY_SEPARATOR . 'us' . $this->user->id . DIRECTORY_SEPARATOR . 'documents';\n $fileUrls = collect([]);\n if ($request->hasFile('files')) {\n // Remove old Files\n if (!empty($oldFiles)) {\n $filepath = array();\n foreach ($oldFiles as $file) {\n $filesToDelete = $pathFiles . DIRECTORY_SEPARATOR . basename($file);\n if (File::exists($filesToDelete)) {\n // File::delete($filesToDelete);\n array_push($filepath, $filesToDelete);\n }\n }\n File::delete($filepath);\n }\n\n // Insert new files\n $files = $request->file('files');\n foreach ($files as $key => $file) {\n $fileKey = 'File_' . ($key + 1);\n $fileName = Str::random(30) . '.' . $file->getClientOriginalExtension();\n $file->move(public_path($pathFiles), $fileName);\n $fileUrl = url($pathFiles . DIRECTORY_SEPARATOR . $fileName);\n $fileUrls->put($fileKey, $fileUrl);\n }\n $task->files_url = json_encode($fileUrls);\n }\n\n if ($this->user->tasks()->save($task)) {\n if ($fileUrls->isNotEmpty()) {\n $task->files_url = $fileUrls;\n }\n\n return response()->json([\n 'status' => true,\n 'task' => $task\n ]);\n } else {\n return response()->json([\n 'status' => false,\n 'message' => 'Failure! Task could not be saved.'\n ]);\n }\n }", "public function Update(int $taskId, string $taskText, int $taskDone)\n\t{\n\t\t$taskData = $this->GetTask(intval($taskId));\n\n\t\t// save data\n\t\treturn boolval($this->db->Query('\n\t\t\tUPDATE \n\t\t\t task \n\t\t\tSET \n\t\t\t text = \"' . htmlspecialchars($taskText) . '\",\n\t\t\t\tstatus = ' . (boolval($taskDone) ? 'UNIX_TIMESTAMP()' : '0') . ',\n\t\t\t\tedit = ' . ($taskData['text'] != $taskText ? 'UNIX_TIMESTAMP()' : 'edit') . ' \n\t\t\tWHERE \n\t\t\t\tid = ' . intval($taskId)\n\t\t));\n\t}", "public function executeUpdate(): bool\n {\n $this->updateDaysallowedField();\n return true;\n }", "function taskUpdateValidity($id, $valid, $db)\n{\n\n\ttry {\n\t\t$request = $db->prepare(\"UPDATE task SET valid=:valid WHERE id=:id\");\n\n\t\t$values = array(\n\t\t\t\"id\" => $id,\n\t\t\t\"valid\" => $valid,\n\t\t);\n\t\tif ($request->execute($values)) {\n\t\t\treturn true;\n\t\t}\n\n\t} catch (PDOException $e) {\n\t\treturn false;\n\t}\n}", "public function update(TaskFormRequest $request, Task $task)\n {\n $validated_data= $request->validated();\n\n $task->update($validated_data);\n\n return redirect()->route('subject.tasks.list', [ 'subject' => $task->subject]);\n\n }", "public function update($id)\n\t{\n\t $task = Task::find($id);\n\t $task->user_id = Auth::user()->id;\n\n\t if (!$task->update(Input::all())) {\n\t return Redirect::back()\n \t->with('message', 'Something wrong happened while saving your model')\n ->withInput();\n\t }\n\n\t return Redirect::route('tasks.index')\n ->with('message', 'Task updated.');\n\t}", "public function update(Request $request, Task $task)\n {\n $task->update($request->all());\n\n\t\t\t\tevent(new TaskToggled($task));\n\n\t\t\t\treturn $task;\n }", "public function update(Request $request,Task $task)\n {\n //\n //dd($request->all());\n $task->update(['nametask' => $request->nametask]);\n return redirect()->back()->with('message', 'отредактировано');\n }", "public function update(User $user, Task $task)\n {\n if ($user->can('edit_own_tasks')) {\n return $user->id == $task->owner_id ||$user->id == $task->assignee_id;\n }\n }", "public function update(Request $request, Task $task)\n {\n $user = $request->user();\n $userTask = $user->tasks->find($task->id);\n\n if ($userTask) {\n $userTask->content = $request->content;\n $userTask->completed = $request->completed;\n $userTask->save();\n }\n }", "public function update(UpdateRequest $request, Task $task)\n {\n $task->update($request->validated());\n\n flash(__('task.updated'), 'success');\n\n return redirect()->route('jobs.show', $task->job_id);\n }", "public function edit(Task $task)\n {\n\n }", "public function updateTask($taskid, $summary, $project, $assignee, $type, $priority, $status, $description, $component, $versionId) {\r\n\t\t$db = new DB();\r\n\t\t$db->connect();\r\n\t\t\r\n\t\t$taskid = $db->esc($taskid);\r\n\t\t$summary = $db->esc($summary);\r\n\t\t$description = $db->esc($description);\r\n\t\t$project = $db->esc($project);\r\n\t\t$assignee = $db->esc($assignee);\r\n\t\t$type = $db->esc($type);\r\n\t\t$priority = $db->esc($priority);\r\n\t\t$status = $db->esc($status);\r\n\t\t$component = $db->esc($component);\r\n\t\t$versionId = $db->esc($versionId);\r\n\t\t\r\n\t\tif ($assignee == 0) {\r\n\t\t\t$assignee = \"null\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$assignee = \"'\".$assignee.\"'\";\r\n\t\t}\r\n\t\tif ($component == 0) {\r\n\t\t\t$component = \"null\";\r\n\t\t}\r\n\t\tif ($versionId == 0) {\r\n\t\t\t$versionId = \"null\";\r\n\t\t}\r\n\t\t\r\n\t\t$sql = \"UPDATE `task` \r\n\t\t\t\tSET `summary`='$summary', `description`='$description', `status_id`='$status', \r\n\t\t\t\t`project_id`='$project', `assignee_id`=$assignee, `tasktype_id`='$type', \r\n\t\t\t\t`priority`='$priority', `component_id`=$component, `version_id`=$versionId\r\n\t\t\t\tWHERE `id`='$taskid';\r\n\t\t\";\r\n\t\t$db->query($sql);\r\n\t}", "public function update(Request $request, Task $task)\n {\n $task->state = $request['done'] ? 'done' : 'pending';\n $task->description = $request['description'] ?? $task->description;\n\n try {\n $task->validate();\n $task->save();\n } catch (ValidationException $e) {\n return new JsonResponse([ 'error' => $e->errors() ], 400);\n } catch (PDOException $e) {\n return new JsonResponse([ 'error' => ['error conecting to database'] ], 500);\n }\n\n return new JsonResponse([\n 'data' => new TaskResource($task),\n 'error' => false,\n ]);\n }", "public function applyTask()\n\t{\n\t\t$this->saveTask(false);\n\t}", "public function update(Request $request, Task $task)\n {\n $task->title=$request->title;\n $task->project_id= $request->project_id;\n $task->save();\n\n return redirect()->route('tasks.index');\n }", "public function edit(Task $task)\r\n {\r\n //\r\n }", "public function update(TaskRequest $request, $id)\r\n {\r\n $task = Task::findOrFail($id);\r\n\r\n $task->update($request->all());\r\n\r\n return $this->sendResponse($task, 'Task has been updated');\r\n }", "public function update(Task $task, Request $request)\n {\n $this->task->update($task, $request->all());\n\n flash()->success(trans('core::core.messages.resource updated', ['name' => trans('projectmanager::tasks.title.tasks')]));\n\n return redirect()->route('admin.projectmanager.task.index');\n }", "public function updateTaskStatus($taskId, $status)\n {\n $task = Tomtask::find()->where(['id' => $taskId])->one();\n $task->completed = $status;\n $task->save();\n }", "function update_project_task_timestamp($name, $description, $status, $taskId, $projectId, $timestampStart, $timestampEnd){\n\n global $connection;\n global $errors;\n global $data;\n\n //Get user\n $user = $_SESSION['$user'];\n\n //Query for updating project task\n $query = \"UPDATE task_table \n SET name = '$name', description = '$description', status = '$status', \n updated_by = '$user', date_start = '$timestampStart', date_end = '$timestampEnd'\n WHERE id = '$taskId'\";\n\n //Check if there is any errors\n if(!$result = mysqli_query($connection, $query)){\n $errors['sql'] = mysqli_error($connection);\n }\n else{\n $data['status'] = preg_replace(\"/_/i\", \" \", $status);\n update_project($projectId);\n }\n}", "public function update(Request $request) {\n // mark the task as complete and save it\n $task = Task::find($request->taskId);\n $task->is_complete = true;\n $task->save();\n\n // flash a success message to the session\n session()->flash('status', 'Task Completed!');\n\n // redirect to tasks index\n return redirect('/home');\n }", "public function updateTaskStatus($request)\n {\n try {\n $requestStatus = $request->status;\n $user = Auth::user();\n $statusArray = $this->getStatusArray();\n\n $task = Task::select(Task::table.'.id',\n Task::table.'.'.Task::org_id,\n Task::table.'.'.Task::task_status_id,\n Task::table.'.'.Task::creator_user_id,\n Task::table.'.'.Task::responsible_person_id,\n Task::table.'.'.Task::approver_user_id,\n Task::table.'.'.Task::approve_task_completed\n )\n ->whereIn(Task::table.'.'.Task::slug, $request->tasks)->firstOrFail();\n\n DB::beginTransaction();\n\n if ($request->action == 'single') {\n $taskStatus = $this->getTaskStatus($requestStatus);\n $task->{Task::task_status_id} = $taskStatus->id;\n\n //echo $task->{Task::creator_user_id} . '.' . $task->{Task::responsible_person_id}. '.' .$task->{Task::approver_user_id}. '.' .$user->id;die;\n if (($task->{Task::creator_user_id} == $user->id) && ($task->{Task::responsible_person_id} == $user->id) && ($task->{Task::approver_user_id} == $user->id)) {\n if ($requestStatus == 'complete') {\n $task->{Task::task_status_id} = $statusArray[TaskStatus::completed_approved];\n $task->{Task::task_completed_user_id} = $user->id;\n } else if ($requestStatus == 'accepted') {\n $task->{Task::task_status_id} = $statusArray[TaskStatus::completed_approved];\n } else if ($requestStatus == 'returnTask') {\n $task->{Task::task_status_id} = $statusArray[TaskStatus::active];\n }\n } else if (($task->{Task::responsible_person_id} == $user->id) && ($task->{Task::approver_user_id} == $user->id)) {\n if ($requestStatus == 'complete') {\n $task->{Task::task_status_id} = $statusArray[TaskStatus::completed_approved];\n $task->{Task::task_completed_user_id} = $user->id;\n } else if ($requestStatus == 'accepted') {\n $task->{Task::task_status_id} = $statusArray[TaskStatus::completed_approved];\n } else if ($requestStatus == 'returnTask') {\n $task->{Task::task_status_id} = $statusArray[TaskStatus::active];\n }\n } else if (($task->{Task::creator_user_id} == $user->id) && ($task->{Task::responsible_person_id} == $user->id)) {\n if ($requestStatus == 'complete' && $task->{Task::approve_task_completed}) {\n $task->{Task::task_status_id} = $statusArray[TaskStatus::completed_approved];\n $task->{Task::task_completed_user_id} = $user->id;\n } else if ($requestStatus == 'accepted') {\n throw new \\Exception(\"You have no permission to aprrove\", Response::HTTP_UNPROCESSABLE_ENTITY);\n } else if ($requestStatus == 'returnTask') {\n throw new \\Exception(\"You have no permission to reject\", Response::HTTP_UNPROCESSABLE_ENTITY);\n }\n }else if (($task->{Task::creator_user_id} == $user->id) && ($task->{Task::approver_user_id} == $user->id)) {\n if ($requestStatus == 'complete') {\n $task->{Task::task_status_id} = $statusArray[TaskStatus::completed_approved];\n $task->{Task::task_completed_user_id} = $user->id;\n } else if ($requestStatus == 'accepted') {\n $task->{Task::task_status_id} = $statusArray[TaskStatus::completed_approved];\n } else if ($requestStatus == 'returnTask') {\n $task->{Task::task_status_id} = $statusArray[TaskStatus::active];\n }\n } else if ($task->{Task::approver_user_id} == $user->id) {\n\n if ($requestStatus == 'start') {\n throw new \\Exception(\"You have no permission to start\", Response::HTTP_UNPROCESSABLE_ENTITY);\n }\n\n if ($requestStatus == 'complete') {\n $task->{Task::task_status_id} = $statusArray[TaskStatus::completed_approved];\n } else if ($requestStatus == 'accepted') {\n $task->{Task::task_status_id} = $statusArray[TaskStatus::completed_approved];\n } else if ($requestStatus == 'returnTask') {\n $task->{Task::task_status_id} = $statusArray[TaskStatus::active];\n }\n } else if ($task->{Task::responsible_person_id} == $user->id) {\n if ($requestStatus == 'complete' && $task->{Task::approve_task_completed}) {\n $task->{Task::task_status_id} = $statusArray[TaskStatus::completed_approved];\n $task->{Task::task_completed_user_id} = $user->id;\n } else if ($requestStatus == 'complete') {\n $task->{Task::task_status_id} = $statusArray[TaskStatus::completed_waiting_approval];\n $task->{Task::task_completed_user_id} = $user->id;\n } else if ($requestStatus == 'accepted') {\n $task->{Task::task_status_id} = $statusArray[TaskStatus::completed_approved];\n } else if ($requestStatus == 'returnTask') {\n $task->{Task::task_status_id} = $statusArray[TaskStatus::active];\n }\n } else if ($task->{Task::creator_user_id} == $user->id) {\n throw new \\Exception(\"Creator cant update a status\", Response::HTTP_UNPROCESSABLE_ENTITY);\n }\n }\n\n $task->save();\n\n $activityStreamNoteVar = \"\";\n\n if ($requestStatus == 'start')\n $activityStreamNoteVar = 'taskStarted';\n else if ($requestStatus == 'pause')\n $activityStreamNoteVar = 'taskStarted';\n else if ($requestStatus == 'complete')\n $activityStreamNoteVar = 'taskCompleted';\n else if ($requestStatus == 'accepted')\n $activityStreamNoteVar = 'taskAccepted';\n else if ($requestStatus == 'returnTask')\n $activityStreamNoteVar = 'taskRejected';\n\n $this->addTaskStatusLog($task, $user);\n $this->setDataForActivityStream($task, $activityStreamNoteVar);\n\n DB::commit();\n } catch (\\Exception $e) {\n DB::rollBack();\n $this->content['error'] = $e->getMessage();\n $this->content['code'] = Response::HTTP_UNPROCESSABLE_ENTITY;\n $this->content['status'] = ResponseStatus::ERROR;\n return $this->content;\n }\n\n $this->content['data'] = array(\n 'taskStatus' => $requestStatus,\n 'taskStatusId' => $task->{Task::task_status_id},\n 'userStatusButtons' => $this->getUserButtons($task, $user, $statusArray)\n );\n $this->content['code'] = 200;\n $this->content['status'] = ResponseStatus::OK;\n return $this->content;\n\n }", "function updateCompletedTaskComments() {\n try {\n $project_objects_table = TABLE_PREFIX . 'project_objects';\n $comments_table = TABLE_PREFIX . 'comments';\n $content_backup_table = TABLE_PREFIX . 'content_backup';\n\n DB::beginWork('Updating completed task comments @ ' . __CLASS__);\n\n $rows = DB::execute(\"SELECT $comments_table.id, $comments_table.body FROM $comments_table, $project_objects_table WHERE $project_objects_table.type = $comments_table.parent_type AND $project_objects_table.id = $comments_table.parent_id AND $project_objects_table.type = 'Task' AND $project_objects_table.completed_on IS NOT NULL\");\n if($rows) {\n foreach($rows as $row) {\n DB::execute(\"INSERT INTO $content_backup_table (parent_type, parent_id, body) VALUES ('TaskComment', ?, ?)\", $row['id'], $row['body']);\n DB::execute(\"UPDATE $comments_table SET body = ? WHERE id = '$row[id]'\", $this->updateHtmlContent($row['body']));\n } // foreach\n } // if\n\n DB::commit('Completed task comments updated @ ' . __CLASS__);\n } catch(Exception $e) {\n DB::rollback('Failed to update completed task comments @ ' . __CLASS__);\n return $e->getMessage();\n } // try\n\n return true;\n }" ]
[ "0.76275605", "0.747192", "0.7262245", "0.7070709", "0.70371747", "0.7030552", "0.6930336", "0.68910486", "0.6848782", "0.6845376", "0.6811839", "0.6771868", "0.6765229", "0.67493653", "0.673347", "0.6712802", "0.67086625", "0.6706393", "0.67040825", "0.6689585", "0.6678563", "0.6658574", "0.6638069", "0.6627594", "0.6623455", "0.66082156", "0.6604867", "0.66015553", "0.6593803", "0.6587897", "0.6586093", "0.6567998", "0.6556745", "0.6556745", "0.6539081", "0.65292877", "0.65240765", "0.65188813", "0.65096587", "0.6455534", "0.6427422", "0.64199865", "0.6416631", "0.6415576", "0.6394983", "0.6388321", "0.6373666", "0.6353449", "0.6346003", "0.6343706", "0.6328346", "0.6317443", "0.63129455", "0.6305777", "0.62937194", "0.627508", "0.6270819", "0.62683725", "0.6266435", "0.6257367", "0.62515604", "0.6225955", "0.6206569", "0.6203486", "0.62022156", "0.61962295", "0.6186814", "0.61806965", "0.61726356", "0.6156213", "0.61516374", "0.61481136", "0.61308277", "0.613073", "0.61092067", "0.60880613", "0.6082753", "0.60703206", "0.6067942", "0.60483164", "0.6045329", "0.6037488", "0.60344553", "0.60252506", "0.59968776", "0.5994248", "0.5982744", "0.59492826", "0.5946498", "0.5933906", "0.59293735", "0.5918904", "0.590707", "0.59030753", "0.5890946", "0.5889804", "0.5889591", "0.5882702", "0.588233", "0.58804387" ]
0.7002489
6
Function: load_task Description: Load details of a task Return: Boolean result of the insert statement
function load_task($task_id) { try { $sql = $GLOBALS["db"]->prepare('SELECT * FROM tasks WHERE task_id=:task_id AND user_id=:user_id'); $sql->bindParam(':task_id', $task_id); $sql->bindParam(':user_id', $_SESSION["user"]["user_id"]); $sql->execute(); return $sql->fetch(); } catch (\PDOException $e) { $_SESSION["msg"]["danger"][] = "ERROR: PDO Exception on load task"; } return array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insertTask() {\n\t\t$conn=parent::connect();\n\t\t$sql = \"INSERT INTO \" . TBL_TASK . \" (\n\t\t\ttask_name,\n\t\t\ttask_hourly_rate,\n\t\t\ttask_bill_by_default,\n\t\t\ttask_common\n\t\t\t) VALUES (\n\t\t\t:task_name,\n\t\t\t:task_hourly_rate,\n\t\t\t:task_bill_by_default,\n\t\t\t:task_common\n\t\t\t)\";\n\t\ttry {\n\t\t\t$st = $conn->prepare($sql);\n\t\t\t$st->bindValue(\":task_name\", $this->data[\"task_name\"], PDO::PARAM_STR);\n\t\t\t$st->bindValue(\":task_hourly_rate\", $this->data[\"task_hourly_rate\"], PDO::PARAM_STR);\n\t\t\t$st->bindValue(\":task_bill_by_default\", $this->data[\"task_bill_by_default\"], PDO::PARAM_INT);\n\t\t\t$st->bindValue(\":task_common\", $this->data[\"task_common\"], PDO::PARAM_INT);\n\t\t\t$st->execute();\n\t\t\tparent::disconnect($conn);\n\t\t} catch (PDOException $e) {\n\t\t\tparent::disconnect($conn);\n\t\t\tdie(\"Query failed on insert, sql is $sql \" . $e->getMessage());\n\t\t}\t\n\t}", "public static function addTask(string $name_task, string $task, array $params) {\n// exit;\n \n $taskMeta = explode('::', $task);\n \n $taskClassExist = class_exists($taskMeta[0]);\n $taskMethodExist = method_exists($taskMeta[0], $taskMeta[1]);\n \n if (!$taskClassExist || !$taskMethodExist) {\n return false;\n }\n// $created = new DbExp('NOW');\n// echo \"<pre>\";var_dump($created); echo \"</pre>\";\n// exit;\n\n return Db::insert('tasks_queue', [\n 'name_task' => $name_task,\n 'task' => $task,\n 'params' => json_encode($params),\n 'created' => Db::expr('NOW()'), \n ]);\n \n// echo \"<pre>\";var_dump($taskClassExist, $taskMethodExist); echo \"</pre>\"; \n \n }", "function getTask() ;", "function insert_task($task)\r\n{\r\n\tglobal $db;\r\n\r\n\t$allowedfields = array('type','name','comments','priority','time','date','tid');\r\n\r\n\tforeach($task as $tk => $t)\r\n\t{\r\n\t\tif(!in_array($tk,$allowedfields))\r\n\t\t{\r\n\t\t\tunset($task[$tk]);\r\n\t\t}\r\n\t}\r\n\r\n\t// Validate type\r\n\t$task['type'] = (int)$task['type'];\r\n\tif($task['type'] != 1 && $task['type'] != 2)\r\n\t{\r\n\t\t// Default to a task\r\n\t\t$task['type'] = 1;\r\n\t}\r\n\r\n\t// Validate name\r\n\t$task['name'] = trim($task['name']);\r\n\tif(empty($task['name']))\r\n\t{\r\n\t\treturn array(\"error\" => true, \"message\" => \"The name cannot be blank.\");\r\n\t} else {\r\n\t\t// Clean it out\r\n\t\t$task['name'] = htmlspecialchars_uni($db->escape_string($task['name']));\r\n\t}\r\n\r\n\t// Comments aren't required, we'll just clean it\r\n\t$task['comments'] = htmlspecialchars_uni($db->escape_string($task['comments']));\r\n\r\n\t// Priority\r\n\t$task['priority'] = (int)$task['priority'];\r\n\tif($task['priority'] != 1 && $task['priority'] != 2 && $task['priority'] != 3)\r\n\t{\r\n\t\t// Default to a medium\r\n\t\t$task['type'] = 2;\r\n\t}\r\n\r\n\t// Time\r\n\t$time = explode(':',$task['time']);\r\n\t$hour = (int)$time[0];\r\n\t$minute = (int)$time[1];\r\n\r\n\tif($hour > 23 || $hour < 0 || $minute > 59 || $minute < 0)\r\n\t{\r\n\t\treturn array(\"error\" => true, \"message\" => \"Invalid time!\");\r\n\t} else {\r\n\t\t$task['time'] = \"{$hour}:{$minute}\";\r\n\t}\r\n\r\n\t// Date\r\n\t$date = explode('-',$task['date']);\r\n\t$year = (int)$date[0];\r\n\t$month = (int)$date[1];\r\n\t$day = (int)$date[2];\r\n\r\n\tif(checkdate($month,$day,$year))\r\n\t{\r\n\t\t$task['date'] = \"{$year}-{$month}-{$day}\";\r\n\t} else {\r\n\r\n\t}\r\n\r\n\t// Are we in the past?\r\n\t$dv = \"{$month}/{$day}/{$year}\";\r\n\t$time = strtotime(\"{$dv} {$task['time']}\");\r\n\tif ($time < time())\r\n\t{\r\n\t\treturn array(\"error\" => true, \"message\" => \"You can't schedule something in the past!\");\t\r\n\t}\r\n\r\n\t// Edit or add?\r\n\tif(isset($task['tid']))\r\n\t{\r\n\t\t$task['tid'] = (int)$task['tid'];\r\n\t\t// Edit it is!\r\n\t\t// Check to make sure the task exists\r\n\r\n\t\t$texists = $db->simple_select('tasks','*',\"tid='{$task['tid']}'\");\r\n\t\tif($db->num_rows($texists) == 0)\r\n\t\t{\r\n\t\t\treturn array(\"error\" => true, \"message\" => \"Invalid task.\");\t\t\t\r\n\t\t}\r\n\r\n\t\t$db->update_query('tasks',$task,\"tid='{$task['tid']}'\");\r\n\r\n\t} else {\r\n\t\t// Add this new baby!\r\n\t\t$db->insert_query('tasks',$task);\r\n\t\treturn true;\r\n\t}\r\n}", "function addTask()\n {\n $query = \"INSERT INTO \" . $this->table_name . \"\n SET `for`=:for, `from`=:from, date=:date, time=:time, until_date=:until_date, text=:text, created_at=:created_at, until_time=:until_time, importance=:importance, status=:status\";\n\n // prepare query\n $stmt = $this->conn->prepare($query);\n\n // sanitize\n $this->for = htmlspecialchars(strip_tags($this->for));\n $this->from = htmlspecialchars(strip_tags($this->from));\n $this->date = htmlspecialchars(strip_tags($this->date));\n $this->time = htmlspecialchars(strip_tags($this->time));\n $this->until_date = htmlspecialchars(strip_tags($this->until_date));\n $this->text = htmlspecialchars(strip_tags($this->text));\n $this->until_time = htmlspecialchars(strip_tags($this->until_time));\n $this->importance = htmlspecialchars(strip_tags($this->importance));\n $this->status = htmlspecialchars(strip_tags($this->status));\n $this->created_at = htmlspecialchars(strip_tags($this->created_at));\n\n // bind values\n $stmt->bindParam(\":for\", $this->for);\n $stmt->bindParam(\":from\", $this->from);\n $stmt->bindParam(\":date\", $this->date);\n $stmt->bindParam(\":time\", $this->time);\n $stmt->bindParam(\":until_date\", $this->until_date);\n $stmt->bindParam(\":text\", $this->text);\n $stmt->bindParam(\":until_time\", $this->until_time);\n $stmt->bindParam(\":importance\", $this->importance);\n $stmt->bindParam(\":status\", $this->status);\n $stmt->bindParam(\":created_at\", $this->created_at);\n\n // execute query\n if ($stmt->execute()) {\n return true;\n }\n return false;\n }", "public function testTask()\n\t{\n \n //Need also define the ssh keys and password in config.php\n \n //Insert first a task\n \n /*$arr_task=['name_task' => 'live', 'descripton_task' => 'Script for check if server is alive', 'arguments' => [], 'status' => 0, 'url_return' => '', 'server' => SERVER_REMOTE];\n \n $new_task=$m->task->insert($arr_task);\n \n $id=$m->task->insert_id();\n \n $this->assertNotFalse($new_task);\n \n $arr_task['IdTask']=$id;*/\n \n //Select task from db\n \n //Execute task\n \n $task=new Task(SERVER_REMOTE);\n \n $task->files=[['vendor/phangoapp/leviathan/tests/script/alive.sh', 0755]];\n \n $task->commands_to_execute=[['/bin/bash', 'vendor/phangoapp/leviathan/tests/script/alive.sh', ''], ['sudo', 'vendor/phangoapp/leviathan/tests/script/alive.sh', '']];\n \n $task->delete_files=['vendor/phangoapp/leviathan/tests/script/alive.sh'];\n \n $task->delete_directories=['vendor/phangoapp/leviathan/tests'];\n \n $task->name_task='Live';\n \n $task->description_task='Check if server is alive';\n \n $task->codename_task='live';\n \n $result=$task->exec();\n \n echo $task->txt_error;\n \n $this->assertTrue($result);\n \n \n \n }", "private function add_task()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator(); \t \n \t$task = $serviceManager->get('PM/Model/Tasks');\n \t$result = $task->getTaskById($this->pk);\n \tif($result)\n \t{\n \t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['company_id']));\n \t\t$project_url = $this->view->url('projects/view', array('project_id' => $result['project_id']));\n \t\t$task_url = $this->view->url('tasks/view', array('task_id' => $result['id']));\n \t\t\n \t\t$this->add_breadcrumb($company_url, $result['company_name']);\n \t\t$this->add_breadcrumb($project_url, $result['project_name']);\n \t\t$this->add_breadcrumb($task_url, $result['name'], TRUE);\n \t}\n }", "function add_task($user, $session_uid, $task_info) {\r\n global $conn;\r\n $out = array(false, false, array(\r\n 'verified' => false\r\n ));\r\n //verify access to the db verify params are in correct format\r\n if (is_string($user) && is_string($session_uid) && is_array($task_info) && isset($conn, $task_info['name'])) {\r\n //make params safe\r\n $user = make_safe($user);\r\n $session_uid = make_safe($session_uid);\r\n\r\n //pass data to db\r\n //prepare query\r\n\r\n //make task_info safe and prepare field str and value str\r\n $field_str = \"(\";\r\n $value_str = \"(\";\r\n\r\n foreach ($task_info as $key => $value) {\r\n $v = str_replace(\"'\", \"''\", make_safe((string) $value));\r\n $task_info[$key] = $v;\r\n if ($key != 'parent_id') {\r\n\t$field_str = $field_str.\"$key, \";\r\n }\r\n if ($key != 'completed' && $key != 'parent_id') {\r\n $value_str = $value_str.\"'$v', \";\r\n } else {\r\n\tif (!($key == 'parent_id' && !preg_match(\"/^\\d+$/\", $v))) {\r\n\t $value_str = $value_str.\"$v, \";\r\n\t $field_str = $field_str.\"$key, \";\r\n\t}\r\n\r\n }\r\n }\r\n\r\n $l = strlen($field_str) - 2;\r\n $field_str = substr($field_str, 0, $l);\r\n $field_str = $field_str.\")\";\r\n\r\n $l = strlen($value_str) - 2;\r\n $value_str = substr($value_str, 0, $l);\r\n $value_str = $value_str.\")\";\r\n\r\n\r\n //verify user via verify_access\r\n if (verify_access($user, $session_uid)) {\r\n $out[2]['verified'] = true;\r\n //assemble queries\r\n $newtaskq = \"INSERT INTO tasks $field_str VALUES $value_str;\";\r\n $tname = $task_info['name'];\r\n $vertaskq = \"SELECT * FROM tasks WHERE name='$tname';\";\r\n //insert new task\r\n $out[2]['newtaskq'] = $newtaskq;\r\n if ($conn->query($newtaskq)) {\r\n\t$out[2]['newtaskquery'] = true;\r\n //get record of new task\r\n $vertaskrec = $conn->query($vertaskq)->fetch_assoc();\r\n //modify user_tasks to give access to new task using id from record of new task\r\n if (isset($vertaskrec['id'])) {\r\n give_access($user, $session_uid, $vertaskrec['id'], \"administrator\");\r\n $out[0] = true;\r\n $out[1] = $task_info;\r\n }\r\n\r\n }\r\n }\r\n }\r\n return $out;\r\n}", "public function load($id){\n\t\t$sql = 'SELECT * FROM tbl_task WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "public function getTask();", "public function getTask();", "function createTask($taskName, $task_status, $task_time, $list_id) {\n if (isset($taskName)) {\n $dbconn = DBconnection();\n \n // prepares the statement to create the tasks\n $query = $dbconn->prepare(\"INSERT INTO Tasks (task_name, list_id, task_time, task_status) VALUES (:task_name, :list_id, :task_time, :task_status)\");\n $query->bindParam(':task_name', $taskName);\n $query->bindParam(':list_id', $list_id);\n $query->bindParam(':task_time', $task_time);\n $query->bindParam(':task_status', $task_status);\n $query->execute();\n }\n return $query;\n\n}", "public function add_task($data){ // Add Task \n\t\n\t \n\t if($data):\n\t \n\t \t\t $this->db->insert('task_details', $data);\t\n\t \n\t endif;\n\t\n\t\n\t}", "public function getTask() {}", "public function getTask() {}", "public function getTask() {}", "public function newTask(){\n if (!$this->validate()) {\n return null;\n }\n \n if( $activity = $this->saveTask() ){\n if($this->type == 'technique'){\n if(!$this->saveDevs()){ \n return null;\n }\n } \n return $activity; \n }\n return null; \n }", "public function instantiate($task);", "function getTask(){\r\n\t\t\tglobal $task;\r\n\t\t\t$id = $_POST[\"taskid\"];\r\n\t\t\t$conn = databaseConnection();\r\n\t\t\t$stmt = $conn->prepare(\"SELECT * FROM tasks WHERE taskid=:taskid\");\r\n\t\t\t$stmt->bindParam(':taskid', $id);\r\n\t\t\t$stmt->execute();\r\n\t\t\t$task = $stmt->fetch();\r\n\t\t\t$conn = null;\r\n\t\t\treturn $task;\r\n\t\t}", "private function createTask() {\n $query = $this->createQuery();\n\n\t\techo $query;\n\n $task = $this->database->prepare($query);\n $task->execute($this->queryProperty->getWhereArgs());\n return $task;\n }", "function execute(Task $task);", "public function testCreateTask()\n {\n }", "public function gettaskBytask_id ($task_id){\n $sqlQuery = \" SELECT * \";\n $sqlQuery .= \" FROM tasks \";\n $sqlQuery .= \" WHERE task_id=’ $task_id ’ \";\n $result = $this -> getDbManager () -> executeSelectQuery ( $sqlQuery );\n return ( $result );\n }", "function task($taskId)\n{\n if (isset($taskId)) {\n $dbconn = DBconnection();\n\n $query = $dbconn->prepare(\"SELECT * FROM `Tasks` WHERE task_id=:task_id\");\n $query->bindParam(':task_id', $taskId);\n $query->execute();\n $result = $query->fetch();\n }\n return $result;\n}", "public function add_task($data)\n {\n $datafields = array\n ('start' => array('req' => false, 'def' => 'NULL')\n ,'end' => array('req' => false, 'def' => 'NULL')\n ,'gid' => array('req' => true)\n ,'title' => array('req' => false, 'def' => '')\n ,'location' => array('req' => false, 'def' => '')\n ,'description' => array('req' => false, 'def' => '')\n ,'importance' => array('req' => false, 'def' => '1')\n ,'completion' => array('req' => false, 'def' => '0')\n ,'type' => array('req' => false, 'def' => '0')\n ,'status' => array('req' => false, 'def' => '0')\n ,'uuid' => array('req' => false, 'def' => basics::uuid())\n );\n foreach ($datafields as $k => $v) {\n if (!isset($data[$k])) {\n if ($v['req'] === true) {\n return false;\n }\n $data[$k] = $v['def'];\n } else {\n $data[$k] = $this->esc($data[$k]);\n }\n }\n // Am I the owner?\n if ($this->getGroupOwner($data['gid']) != $this->uid) {\n // If not, I should have write permissions through a share\n $perms = $GLOBALS['DB']->getUserSharedFolderPermissions($this->uid, 'calendar', $data['gid']);\n if (empty($perms) || empty($perms['write'])) {\n // No, I haven't\n return false;\n }\n }\n $query = 'INSERT '.$this->Tbl['cal_task'].' SET `uid`='.$this->uid.',`gid`='.$data['gid']\n .',`starts`='.($data['start'] == 'NULL' ? 'NULL' : '\"'.$data['start'].'\"')\n .',`ends`='.($data['end'] == 'NULL' ? 'NULL' : '\"'.$data['end'].'\"')\n .',`title`=\"'.$data['title'].'\",`location`=\"'.$data['location'].'\"'\n .',`description`=\"'.$data['description'].'\",`uuid`=\"'.$data['uuid'].'\"'\n .',`importance`='.doubleval($data['importance']).',`completion`='.doubleval($data['completion'])\n .',`type`='.doubleval($data['type']).',`status`='.doubleval($data['status']);\n if (!$this->query($query)) {\n return false;\n }\n $newId = $this->insertid();\n // Make sure, the end of an event is NOT before its beginning\n $this->query('UPDATE '.$this->Tbl['cal_task'].' SET `ends`=`starts` WHERE `ends`<`starts` AND id='.$newId);\n\n if (isset($data['reminders']) && !empty($data['reminders'])) {\n $query = 'INSERT INTO '.$this->Tbl['cal_reminder'].' (`eid`,`ref`,`uid`,`mode`,`time`,`text`,`smsto`,`mailto`) VALUES ';\n $k = 0;\n foreach ($data['reminders'] as $v) {\n if ($k) {\n $query .= ',';\n }\n if ($v['mode'] == '-') {\n continue;\n }\n $query .= '('.doubleval($newId).',\"tsk\",'.$this->uid.',\"'.$this->esc($v['mode']).'\",'.doubleval($v['time'])\n .',\"'.$this->esc($v['text']).'\",\"'.$this->esc($v['smsto']).'\",\"'.$this->esc($v['mailto']).'\")';\n $k++;\n }\n if ($k > 0) {\n $this->query($query);\n }\n }\n return $newId;\n }", "abstract protected function checkIfInstanceOf($task);", "public function hasTaskId(){\n return $this->_has(2);\n }", "final static public function Createtask(){\n\t\t$wr = static::validationB();\n\t\t$record = new static::$modelNM();\t//instantiate new object\n\t\t$record->id = $_SESSION[\"UserID\"];\n\t\t$record->owneremail = $_POST[\"owneremail\"];\n\t\t$record->ownerid = $_POST[\"ownerid\"];\n\t\t$record->createddate = $_POST[\"createddate\"];\n\t\t$record->duedate = $_POST[\"duedate\"];\n\t\t$record->message = $_POST[\"message\"];\n\t\t$record->isdone = $_POST[\"isdone\"];\n\t\t\n\t\tif($wr != \"\") {\n\t\t\techo $wr;\n\t\t\treturn NULL;\n\t\t} else {\n\t\t\t//$_SESSION[\"Temprecord\"] = NULL;\n\t\t}\n\t\t\n\t\n\t\t$record->GoFunction(\"Insert\");\t//Run Insert() in modol class and echo success or not\n\t\treturn 1;\t//return display html table code from ShowData\t\t\n\t}", "public function testAntBackendGetTask()\r\n\t{\r\n $task = new SyncTask(); \r\n $task->subject = \"UnitTest TaskName\"; \r\n $task->startdate = strtotime(\"11/17/2011\");\r\n $task->duedate = strtotime(\"11/18/2011\");\r\n $obj = $this->backend->saveTask(\"\", $task);\r\n\t\t$tid = $obj->id;\r\n\r\n // Query Tasks\r\n $syncTask = $this->backend->getTask($tid);\r\n $this->assertEquals($syncTask->subject, $task->subject);\r\n $this->assertEquals($syncTask->startdate, $task->startdate);\r\n $this->assertEquals($syncTask->duedate, $task->duedate);\r\n \r\n // Cleanup\r\n $obj->removeHard();\r\n\t}", "public function run()\n {\n Task::insert([\n [\n 'user_id'=>1,\n 'task'=>'Woke up at 6am',\n ],\n [\n 'user_id'=>1,\n 'task'=>'Take Breakfast at 7am',\n ],\n [\n 'user_id'=>1,\n 'task'=>'Meet With Mr.Client at 10am',\n ]\n ]);\n }", "public function inserttasks ($task_id ,$description , $date , $duration_mins , $daytime , $course_id ){\n $sqlQuery = \" INSERT INTO tasks (task_id , description , date, duration_mins ,daytime , course_id ) \";\n $sqlQuery .= \" VALUES (’ $task_id ’, ’$description' , '$date' , '$duration_mins' , '$daytime' , '$course_id')\";\n $result = $this -> getDbManager () -> executeInsertQuery ( $sqlQuery );\n return $result ;\n }", "function addTask($name, $taskName, $estimatedTime)\r\n{\r\n global $mysqli;\r\n $query = mysqli_query($mysqli, \"SELECT * FROM users WHERE name = '$name'\");\r\n $rowId = mysqli_fetch_assoc($query);\r\n if (is_null($rowId)){\r\n echo \"no se encuentra usuario\";\r\n } else {\r\n $id = $rowId['user_id'];\r\n $addTasks = mysqli_query($mysqli, \"INSERT INTO tasks (user_id, name, estimated_time, status)\"\r\n . \"VALUES ($id, '$taskName', $estimatedTime, 1)\");\r\n if (!$addTasks){\r\n echo mysqli_error($addTasks);\r\n };\r\n };\r\n}", "protected function saveTask() {}", "public function readTask(){\n $query = \"SELECT ordine.id_ordine, ordine.id_fornitore, fornitore.nome as fornitore, ordine.articolo, articolo.taglia, ordine.stato \n FROM \" . $this->table_name . \" LEFT JOIN fornitore ON ordine.id_fornitore = fornitore.id_fornitore \n INNER JOIN articolo ON ordine.id_ordine = articolo.id_ordine \n WHERE stato = 1\";\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n return $stmt;\n }", "public function getTask() {\r\n $query = \"SELECT DISTINCT taskID, content, deadline, status, IF(assignee IS NULL, NULL, user.username)\r\n FROM task, user\r\n WHERE projectID = :projectID\r\n AND (assignee IS NULL OR user.userID = assignee)\r\n ORDER BY deadline;\";\r\n $stmt = $this->conn->prepare($query);\r\n $stmt->bindParam(':projectID', $this->projectID);\r\n\r\n if($stmt->execute()) {\r\n return $stmt;\r\n }\r\n else {\r\n return false;\r\n }\r\n }", "function _add_task( $data=array() )\n\t{\n\t\t$taskfunc = $this->ipsclass->load_class( ROOT_PATH.'sources/lib/func_taskmanager.php', 'func_taskmanager' );\n\t\t\n\t\t$task = array();\n\t\t\n\t\t$task['task_title'] = $data['task_title']['VALUE'];\n\t\t$task['task_file'] = $data['task_file']['VALUE'];\n\t\t$task['task_week_day'] = $data['task_week_day']['VALUE'];\n\t\t$task['task_month_day'] = $data['task_month_day']['VALUE'];\n\t\t$task['task_hour'] = $data['task_hour']['VALUE'];\n\t\t$task['task_minute'] = $data['task_minute']['VALUE'];\n\t\t$task['task_cronkey'] = md5( microtime() );\n\t\t$task['task_log'] = $data['task_log']['VALUE'];\n\t\t$task['task_description'] = $data['task_description']['VALUE'];\n\t\t$task['task_enabled'] = $data['task_enabled']['VALUE'];\n\t\t$task['task_key'] = $data['task_key']['VALUE'];\n\t\t$task['task_safemode'] = $data['task_safemode']['VALUE'];\n\t\t$task['task_next_run'] = $taskfunc->generate_next_run( $task );\n\t\t\n\t\t$this->ipsclass->DB->do_insert( 'task_manager', $task );\n\t\t\n\t\t$taskfunc->save_next_run_stamp();\n\t}", "function THR_SelectTask()\r\n\r\n{\r\n\tif( !isset($_GET['task']))\r\n\r\n\t{\r\n\r\n\t\techo \"0;Richiesta invalida\";\r\n\r\n\t\treturn false;\r\n\r\n\t}\r\n\r\n\t$task = cleanString($_GET['task']); // Get this from Ext\r\n\r\n\r\n\tswitch($task) \r\n\r\n\t{\r\n\r\n\t\tcase \"LISTING\": // Give the entire list\r\n\r\n\t\t\tTHR_GetList();\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"UPDATE\":\r\n\r\n \tTHR_Update();\r\n\r\n \tbreak;\r\n\r\n \t\tcase \"CREATE\":\r\n\r\n \tTHR_Create();\r\n\r\n \tbreak;\r\n\r\n \t\tcase \"DELETE\":\r\n\r\n \tTHR_Delete();\r\n\r\n \tbreak;\r\n\r\n\t\tdefault:\r\n\r\n\t\t\tif( function_exists('THR_CustomSelectTask') )\r\n\r\n\t\t\t\tTHR_CustomSelectTask($task);\r\n\r\n\t\t\tbreak;\r\n\r\n\t}\r\n\r\n\treturn true;\r\n\r\n}", "function writeTask($entry){\r\n // check if write worked\r\n $add = $this->exec(\"INSERT INTO `Task` (`task`) VALUES ('\".$entry.\"')\");\r\n if($add){ \r\n // Return the id it generated\r\n return $this->querySingle('select last_insert_rowid()');\r\n }\r\n return null; // Did not work\r\n }", "public function addTask(&$task)\r\n\t{\r\n\t\t$sql = sprintf('\r\n\t\t\tINSERT\r\n\t\t\tINTO\r\n\t\t\t\ttask (title)\r\n\t\t\tVALUES\r\n\t\t\t\t(\"%s\")\r\n\t\t', mysql_escape_string($task->title));\r\n\r\n\t\tmysqli_query($this->db, $sql);\r\n\t\t\r\n\t\t$task->id = mysqli_insert_id($this->db);\r\n\t}", "public function testTaskAvailableInDatabase(): void\n {\n $task = $this->entityManager\n ->getRepository(Task::class)\n ->findOneBy(['title' => 'Test Task'])\n ;\n self::assertSame('Test Task', $task->getTitle());\n }", "public function saveTask(){\n \n if( !empty($this->taskId) ){\n $task = Tache::findOne(['id_tache'=>$this->taskId]);\n }else{\n $task = new Tache();\n }\n $task->nom = $this->title;\n $task->description = $this->description;\n $task->date_debut = (!empty($this->dateStart)) \n ? Yii::$app->formatter->asDate($this->dateStart, 'yyyy-MM-dd') \n : Yii::$app->formatter->asDate($this->dateStart2, 'yyyy-MM-dd');\n $task->date_fin = (!empty($this->dateEnd)) \n ? Yii::$app->formatter->asDate($this->dateEnd, 'yyyy-MM-dd')\n : Yii::$app->formatter->asDate($this->dateEnd2, 'yyyy-MM-dd');\n $task->prestataire = $this->provider;\n $task->type = $this->type;\n if( !empty($this->activityId) ){\n $task->id_activite = $this->activityId;\n }\n $today = strtotime(Yii::$app->formatter->asDate('now', 'yyyy-MM-dd'));\n $start = strtotime(Yii::$app->formatter->asDate( $task->date_debut , 'yyyy-MM-dd'));\n if($today < $start ){\n $task->statut = 'en_attente';\n }else{\n $task->statut = 'en_cours';\n }\n if($task->save()){\n return true;\n }else{\n return false;\n } \n }", "function add_task($userid,$taskcode,$taskname,$taskdetail,$status,$createdOn)\r\n{\r\n\t$sql = \"INSERT INTO tasklist(UserId,TaskCode,TaskName,TaskDetail,TaskNote,Status) VALUES('\".$userid.\"','\".$taskcode.\"','\".$taskname.\"','\".$taskdetail.\"','','0')\";\r\n\t$row=mysql_query($sql);\r\n\tif($row)\r\n\t{\r\n\t\techo \"Task Created Successfully.\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\techo \"Error\";\r\n\t}\r\n\t\t\r\n}", "public function checkExistence($intaskid)\n\t{\n\t\t$retval; \n\t\t\n\t\t$dbhandle = db_connect();\n\t\t$stmt = $dbhandle->stmt_init();\n\t\t\n\t\t$stmt->prepare(\"SELECT TaskID FROM Tasks WHERE TaskID=?\");\n\t\t$stmt->bind_param(\"i\", $intaskid);\n\t\t$stmt->execute();\n\t\t\n\t\t$stmt->store_result();\n\t\t\n\t\tif ($stmt->num_rows == 0)\n\t\t\t$retval = false;\n\t\telse\n\t\t\t$retval = true;\n\t\t\n\t\t$stmt->close();\n\t\t$dbhandle->close();\n\t\t\n\t\treturn $retval;\n\t}", "public function run()\n\t{\n\t\tDB::table('tasks')->insert([\n\t\t\t[\n\t\t\t\t'group_id' => 1,\n\t\t\t\t'user_id' => 1,\n\t\t\t\t'server_id' => 1,\n\t\t\t\t'task_title' => 'PHP脚本文件',\n\t\t\t\t'task_type' => 'script',\n\t\t\t\t'task_lang' => 'php',\n\t\t\t\t'commend_type' => 'file',\n\t\t\t\t'task_command' => storage_path('scripts/php_say_hello.php'),\n\t\t\t\t'task_desc' => '运行PHP脚本文件测试',\n\t\t\t\t'task_run_time' => '*/5 * * * *',\n\t\t\t\t'task_status' => 1,\n\t\t\t\t'created_at' => date('Y-m-d h:i:s'),\n\t\t\t\t'updated_at' => date('Y-m-d h:i:s'),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'group_id' => 1,\n\t\t\t\t'user_id' => 1,\n\t\t\t\t'server_id' => 1,\n\t\t\t\t'task_title' => 'Python脚本文件',\n\t\t\t\t'task_type' => 'script',\n\t\t\t\t'task_lang' => 'python',\n\t\t\t\t'commend_type' => 'file',\n\t\t\t\t'task_command' => storage_path('scripts/python_say_hello.py'),\n\t\t\t\t'task_desc' => '运行python脚本文件测试',\n\t\t\t\t'task_run_time' => '*/5 * * * *',\n\t\t\t\t'task_status' => 0,\n\t\t\t\t'created_at' => date('Y-m-d h:i:s'),\n\t\t\t\t'updated_at' => date('Y-m-d h:i:s'),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'group_id' => 1,\n\t\t\t\t'user_id' => 1,\n\t\t\t\t'server_id' => 1,\n\t\t\t\t'task_title' => 'Shell脚本文件',\n\t\t\t\t'task_type' => 'script',\n\t\t\t\t'task_lang' => 'bash',\n\t\t\t\t'commend_type' => 'file',\n\t\t\t\t'task_command' => storage_path('scripts/shell_say_hello.sh'),\n\t\t\t\t'task_desc' => '运行shell脚本文件测试',\n\t\t\t\t'task_run_time' => '*/5 * * * *',\n\t\t\t\t'task_status' => 1,\n\t\t\t\t'created_at' => date('Y-m-d h:i:s'),\n\t\t\t\t'updated_at' => date('Y-m-d h:i:s'),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'group_id' => 1,\n\t\t\t\t'user_id' => 1,\n\t\t\t\t'server_id' => 1,\n\t\t\t\t'task_title' => 'PHP脚本文件发邮件,不带附件',\n\t\t\t\t'task_type' => 'email',\n\t\t\t\t'task_lang' => 'php',\n\t\t\t\t'commend_type' => 'file',\n\t\t\t\t'task_command' => storage_path('scripts/email_pure_text.php'),\n\t\t\t\t'task_desc' => '运行PHP脚本文件,产生的内容发送邮件',\n\t\t\t\t'task_run_time' => '*/5 * * * *',\n\t\t\t\t'task_status' => 1,\n\t\t\t\t'created_at' => date('Y-m-d h:i:s'),\n\t\t\t\t'updated_at' => date('Y-m-d h:i:s'),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'group_id' => 1,\n\t\t\t\t'user_id' => 1,\n\t\t\t\t'server_id' => 1,\n\t\t\t\t'task_title' => 'PHP脚本文件发邮件,带有附件',\n\t\t\t\t'task_type' => 'email',\n\t\t\t\t'task_lang' => 'php',\n\t\t\t\t'commend_type' => 'file',\n\t\t\t\t'task_command' => storage_path('scripts/email_with_attach.php'),\n\t\t\t\t'task_desc' => 'PHP脚本文件发邮件测试,邮件内容带有附件',\n\t\t\t\t'task_run_time' => '*/5 * * * *',\n\t\t\t\t'task_status' => 1,\n\t\t\t\t'created_at' => date('Y-m-d h:i:s'),\n\t\t\t\t'updated_at' => date('Y-m-d h:i:s'),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'group_id' => 1,\n\t\t\t\t'user_id' => 1,\n\t\t\t\t'server_id' => 1,\n\t\t\t\t'task_title' => 'PHP直接命令',\n\t\t\t\t'task_type' => 'script',\n\t\t\t\t'task_lang' => 'php',\n\t\t\t\t'commend_type' => 'command',\n\t\t\t\t'task_command' => 'echo \"hello\"',\n\t\t\t\t'task_desc' => '直接输入PHP命令测试',\n\t\t\t\t'task_run_time' => '*/5 * * * *',\n\t\t\t\t'task_status' => 1,\n\t\t\t\t'created_at' => date('Y-m-d h:i:s'),\n\t\t\t\t'updated_at' => date('Y-m-d h:i:s'),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'group_id' => 1,\n\t\t\t\t'user_id' => 1,\n\t\t\t\t'server_id' => 1,\n\t\t\t\t'task_title' => 'Python直接命令',\n\t\t\t\t'task_type' => 'script',\n\t\t\t\t'task_lang' => 'python',\n\t\t\t\t'commend_type' => 'command',\n\t\t\t\t'task_command' => 'print(\"hello\")',\n\t\t\t\t'task_desc' => '直接输入python命令测试',\n\t\t\t\t'task_run_time' => '*/5 * * * *',\n\t\t\t\t'task_status' => 1,\n\t\t\t\t'created_at' => date('Y-m-d h:i:s'),\n\t\t\t\t'updated_at' => date('Y-m-d h:i:s'),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'group_id' => 1,\n\t\t\t\t'user_id' => 1,\n\t\t\t\t'server_id' => 1,\n\t\t\t\t'task_title' => 'Shell直接命令',\n\t\t\t\t'task_type' => 'script',\n\t\t\t\t'task_lang' => 'bash',\n\t\t\t\t'commend_type' => 'command',\n\t\t\t\t'task_command' => 'echo hello',\n\t\t\t\t'task_desc' => '直接输入shell命令测试',\n\t\t\t\t'task_run_time' => '*/5 * * * *',\n\t\t\t\t'task_status' => 1,\n\t\t\t\t'created_at' => date('Y-m-d h:i:s'),\n\t\t\t\t'updated_at' => date('Y-m-d h:i:s'),\n\t\t\t],\n\t\t]);\n\t}", "public function addTaskToDb($taskArray){\n \n if(is_array($taskArray)) {\n $this->taskName = $taskArray['taskName'];\n $this->taskDescription = $taskArray['taskDesc'];\n $this->taskCategoryId = (int)$taskArray['taskCategoryId'];\n $this->taskPriorityId = (int)$taskArray['taskPriorityId'];\n $this->taskStatusId = (int)$taskArray['taskStatusId'];\n \n $this->query = \"INSERT INTO tasks\";\n $this->query .= \" (task_name, task_description, task_category_id, task_priority_id, task_status_id)\";\n $this->query .= \" VALUES (:name,:desc,:catid,:priorityid,:statusid);\";\n $this->db->query($this->query);\n \n $this->db->bind(':name', $this->taskName);\n $this->db->bind(':desc', $this->taskDescription);\n $this->db->bind(':catid', $this->taskCategoryId);\n $this->db->bind(':priorityid', $this->taskPriorityId);\n $this->db->bind(':statusid', $this->taskStatusId);\n \n $this->db->execute();\n \n } else {\n die('An unexpected error has occured.');\n }\n \n }", "public function register()\n\t{\n\t\t//validate that all fields are filled and proper\n\t\t$errors = $this->validate();\n\t\tif ($errors != NULL)\n\t\t\treturn $errors;\n\t\t\n\t\t//insert task into database\n\t\t$dbhandle = db_connect();\n\t\t$stmt = $dbhandle->stmt_init();\n\t\t\n\t\t$stmt->prepare(\"INSERT INTO Tasks\n\t\t(\n\t\t\tTitle,\n\t\t\tDescription, \n\t\t\tLocation,\n\t\t\tCategory,\n\t\t\tTags,\n\t\t\tEndDateTime,\n\t\t\tLister,\n\t\t\tNumImages,\n\t\t\tInformation,\n\t\t\tInitialBid,\n\t\t\tActive\n\t\t) \n\t\tVALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 1)\");\n\t\t$stmt->bind_param(\"sssisiiisi\", $this->title, $this->description, $this->location, $this->category, $this->tags, $this->enddatetime, $this->userid, $this->numimg, $this->content, $this->price);\n\t\t$stmt->execute();\n\t\t$stmt->store_result();\n\t\t\n\t\t$this->taskid = $dbhandle->insert_id;\n\t\t\n\t\t//close connection and return 0\n\t\t$stmt->close();\n\t\t$dbhandle->close();\n\t\treturn NULL;\n\t}", "function loadUpdateTaskInfo()\n {\n $task_id = $_POST['task_id'];\n $taskModel = new Task;\n $taskInfo = $taskModel->getLoggedInUsesSingleTask($task_id);\n if ($taskInfo) {\n $this->view('inc/loads/load_task_update', false, $taskInfo);\n } else {\n $this->redirect('login');\n }\n }", "public static function taskGet($taskId);", "public function insert($tblTask){\n\t\t$sql = 'INSERT INTO tbl_task (org_id, task_code, description, rate_per_hour, gl_posting, active, date_created, date_modified) VALUES (?, ?, ?, ?, ?, ?, ?, ?)';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t\n\t\t$sqlQuery->setNumber($tblTask->orgId);\n\t\t$sqlQuery->set($tblTask->taskCode);\n\t\t$sqlQuery->set($tblTask->description);\n\t\t$sqlQuery->set($tblTask->ratePerHour);\n\t\t$sqlQuery->setNumber($tblTask->glPosting);\n\t\t$sqlQuery->set($tblTask->active);\n\t\t$sqlQuery->set($tblTask->dateCreated);\n\t\t$sqlQuery->set($tblTask->dateModified);\n\n\t\t$id = $this->executeInsert($sqlQuery);\t\n\t\t$tblTask->id = $id;\n\t\treturn $id;\n\t}", "function TransactionRecordLoad( &$data ) {\n\t\t$table = BIT_DB_PREFIX.\"task_transaction\";\n\t\t\n\t\t$pDataHash['data_store']['ticket_id'] = $data[0];\n\t\t$pDataHash['data_store']['transact_no'] = $data[1];\n\t\t$pDataHash['data_store']['transact'] = $data[2];\n\t\t$pDataHash['data_store']['ticket_ref'] = $data[3];\n\t\t$pDataHash['data_store']['staff_id'] = $data[4];\n\t\t$pDataHash['data_store']['previous'] = $data[5];\n\t\t$pDataHash['data_store']['room'] = $data[6];\n\t\t$pDataHash['data_store']['applet'] = $data[7];\n\t\t$pDataHash['data_store']['office'] = $data[8];\n\t\t$pDataHash['data_store']['ticket_no'] = $data[9];\n\t\tif ( $data[10] == '[null]' )\n\t\t\t$pDataHash['data_store']['proom'] = 0;\n\t\telse\n\t\t\t$pDataHash['data_store']['proom'] = $data[10];\n\t\tif ( $data[11] == '[null]' )\n\t\t\t$pDataHash['data_store']['tags'] = 0;\n\t\telse\n\t\t\t$pDataHash['data_store']['tags'] = $data[11];\n\t\tif ( $data[12] == '[null]' )\n\t\t\t$pDataHash['data_store']['clearance'] = 0;\n\t\telse\n\t\t\t$pDataHash['data_store']['clearance'] = $data[12];\n\t\t$result = $this->mDb->associateInsert( $table, $pDataHash['data_store'] );\n\t}", "public function getTask(array $task);", "protected function action_add() {\n\n // Where in task list to add the task?\n $project_index = 0;\n $task = $this->request->value;\n\n if ($this->state->event == 'project') {\n $project_index = $this->state->value;\n } else {\n list($task, $project_index) = $this->_split_task_and_project($task);\n }\n $task_added = $this->_taskpaper->add($task, $project_index);\n\n return ($task_added ? self::UPDATED : false);\n }", "public function fetch_all_tasks()\n {\n //\n }", "function helper_import_debug_report($task) {\n drupal_set_header('Content-Type: text/plain');\n drupal_set_header('Content-Disposition: attachment; filename=\"node_import-'. strtr($task['type'], ':', '_') .'-'. $task['taskid'] .'.txt\"');\n\n print \"------------------------------------------------------------\\n\";\n print \"Drupal and PHP version:\\n\";\n print \"------------------------------------------------------------\\n\";\n print \"Drupal version: \". VERSION .\" (\". DRUPAL_CORE_COMPATIBILITY .\")\\n\";\n print \"PHP version: \". PHP_VERSION .\"\\n\";\n print \"\\n\";\n\n print \"------------------------------------------------------------\\n\";\n print \"Enabled modules and versions:\\n\";\n print \"------------------------------------------------------------\\n\";\n foreach (module_rebuild_cache() as $name => $module) {\n if ($module->status && $module->type == 'module') {\n print $name .\" \". $module->info['version'] .\" (\". $module->info['project'] .\")\\n\";\n }\n }\n print \"\\n\";\n\n print \"------------------------------------------------------------\\n\";\n print \"User permissions:\\n\";\n print \"------------------------------------------------------------\\n\";\n if ($task['uid'] == 1) {\n print \"User #1 has all privileges.\\n\";\n }\n else {\n $account = user_load(array('uid' => $task['uid']));\n $result = db_query(\"SELECT p.perm FROM {role} AS r INNER JOIN {permission} AS p ON p.rid = r.rid WHERE r.rid IN (\". db_placeholders($account->roles) .\")\", array_keys($account->roles));\n $perms = array();\n while (($row = db_fetch_object($result))) {\n $perms += array_flip(explode(', ', $row->perm));\n }\n print implode(\"\\n\", array_keys($perms)) .\"\\n\";\n }\n print \"\\n\";\n\n print \"------------------------------------------------------------\\n\";\n print \"Task details:\\n\";\n print \"------------------------------------------------------------\\n\";\n print '$task = '; var_dump($task);\n $fields = node_import_fields($task['type']);\n print '$fields = '; var_dump($fields);\n print \"\\n\";\n\n print \"------------------------------------------------------------\\n\";\n print \"Errors and data from last \". variable_get('node_import:debug:row_count', 5) .\" rows with errors:\\n\";\n print \"------------------------------------------------------------\\n\";\n $result = db_query(\"SELECT * FROM {node_import_status} WHERE taskid = %d AND status = %d LIMIT %d\", $task['taskid'], NODE_IMPORT_STATUS_ERROR, variable_get('node_import:debug:row_count', 5));\n $i = 0;\n while (($row = db_fetch_object($result))) {\n $i++;\n print \"\\n\";\n print \"----- Row $i -------------------------------------------------\\n\";\n $row->errors = unserialize($row->errors);\n print '$row_status = '; var_dump($row);\n\n list($file_offset, $data) = node_import_read_from_file($task['file']->filepath, $row->file_offset, $task['file_options']);\n print '$data = '; var_dump($data);\n }\n print \"\\n\";\n\n exit();\n}", "public function run()\n {\n $dataStatus = TaskManagementConstant::ALL_STATUS;\n foreach ($dataStatus as $status) {\n $dataMainTask = [\n 'project_name' => 'SIS project',\n 'owner_id' => 2168978,\n 'created_by' => 2168978,\n 'short_description' => 'This project is good',\n 'type' => 'Main task',\n 'owner_id_no_sql' => '6284b5c0d04110010102b047',\n ];\n\n $mainTask = MainTaskSQL::query()->create($dataMainTask);\n $taskStatus = TaskStatusSQL::query()->create(['name' => $status]);\n $dataSubTask = [\n 'task_name' => 'Create new content',\n 'type' => 'sub-task',\n 'deadline' => '2022/08/06',\n 'assignee_id' => 2168978,\n 'reviewer_id' => 2168978,\n 'created_by' => 2168978,\n 'description' => 'If you want to be happy, do not dwell in the past, do not worry about the future, focus on living fully in the present.',\n 'main_task_id' => $mainTask->id,\n \"task_status_id\" => $taskStatus->id,\n 'owner_id' => 2168978,\n 'owner_id_no_sql' => '6284b5c0d04110010102b047',\n ];\n $subTask = SubTaskSQL::query()->create($dataSubTask);\n $dataComment = [\n 'name' => \"John Asian\",\n 'avatar' => null,\n 'content' => \"If you want to be happy, do not dwell in the past, do not worry about the future, focus on living fully in the present.\",\n \"sub_task_id\" => $subTask->id,\n \"created_by\" => 2168978,\n ];\n TaskCommentSQl::query()->create($dataComment);\n }\n }", "function saveToDb($task)\n{\n $conn = newDbConnection();\n $task = htmlspecialchars($task);\n if (!$conn->query(\"INSERT INTO tasks(task) VALUES('\".$task.\"')\")) {\n echo(\"Creating task failed\");\n }\n $conn->close();\n}", "public function run()\n {\n DB::table('tasks')->insert([\n [\n 'codtask' => 'TS0001',\n 'description' => 'Registro de usuarios',\n 'role_id' => '1'\n ],\n [\n 'codtask' => 'TS0002',\n 'description' => 'Gestionar roles',\n 'role_id' => '2'\n ],\n [\n 'codtask' => 'TS0003',\n 'description' => 'Gestionar roles de los usaurios',\n 'role_id' => '2'\n ],\n [\n 'codtask' => 'TS0004',\n 'description' => 'Gestionar endpoints',\n 'role_id' => '2'\n ],\n [\n 'codtask' => 'TS0005',\n 'description' => 'Gestionar endpoints sobre roles',\n 'role_id' => '2'\n ],\n [\n 'codtask' => 'TS0006',\n 'description' => 'Consultar usuarios que no tengan endpoints',\n 'role_id' => '2'\n ],\n [\n 'codtask' => 'TS0007',\n 'description' => 'Gestionar su perfil',\n 'role_id' => '3'\n ],\n [\n 'codtask' => 'TS0008',\n 'description' => 'Ver los endpoints a los que tenga permiso',\n 'role_id' => '3'\n ],\n [\n 'codtask' => 'TS0009',\n 'description' => 'Utilizar los endpoints a los que tenga permiso',\n 'role_id' => '3'\n ],\n [\n 'codtask' => 'TS0010',\n 'description' => 'Cerrar sesion',\n 'role_id' => '3'\n ]\n ]);\n }", "public static function BIND_PHOTO_IMPORT_TASK(){\n\t $SQL_String = \"UPDATE task_upload SET utkid=:utkid WHERE urno=:urno;\";\n\t return $SQL_String;\n\t}", "public function run()\n {\n $task = new \\App\\Task();\n $task->id = 1;\n $task->sprint_id = 1;\n $task->nr= '1.1';\n $task->name = 'Testtask';\n $task->estimatedtime = '00:30:00';\n $task->save();\n }", "function newTask($StartTime, $EndTime, $StartPointX, $StartPointY, $TerminalPointX, $TerminalPointY, $LastPointX, $LastPointY, $LastUpdateTime, $UserID){\n $conn = connectDB();\n $newTaskSQL = \"INSERT INTO Task(StartTime, EndTime,StartPointX, StartPointY, TerminalPointX, TerminalPointY, LastPointX, LastPointY, LastUpdateTime, UserID) VALUES('\".$StartTime.\"','\".$EndTime.\"','\".$StartPointX.\"','\".$StartPointY.\"','\".$TerminalPointX.\"','\".$TerminalPointY.\"','\".$LastPointX.\"','\".$LastPointY.\"','\".$LastUpdateTime.\"','\".$UserID.\"');\";\n $conn->query($newTaskSQL);\n $conn->close();\n echo $newTaskSQL;\n}", "public function task_add()\n\t {\n\t \t$data = array();\n\t\t\n if ($this->input->post() != false) {\n // validate input on required fields\n $config = array(\n array(\n 'field' => 'duration',\n 'label' => lang('lbl_duration'),\n 'rules' => 'trim|'\n ), array(\n 'field' => 'date_start',\n 'label' => lang('lbl_date_start'),\n 'rules' => 'trim|required'\n ), array(\n 'field' => 'comment',\n 'label' => lang('lbl_comment'),\n 'rules' => 'trim')\n );\t\n\t\t\t\n\t\t\t//Validate input fields\n $this->load->library('form_validation');\n $this->form_validation->set_rules($config);\n\n\t\t\t//check if validation was successfull\n if ($this->form_validation->run() == false) {\n $data['notify'] = validation_errors();\n } else {\n // fetch data from form \n $task_data = array(\n 'duration' => $this->input->post('duration'),\n 'date_start' => $this->input->post('date_start'),\n 'comment' => $this->input->post('comment'),\n 'billable' => $this->input->post('billable'),\n //'ID_project_fk' => '1', //TODO: modify it to get the ID of the selected project from the DDL\n 'ID_project_fk' => $this->User_model->getActiveProject(), \n 'ID_user_fk' => $this->User_model->getID(),\n\t\t\t\t);\n \n\t\t\t\t//Instance the model in which we're using methods\n\t\t\t\t$this->load->model('Task_model');\n\t\t\t\t\n // insert new task\n if ($this->Task_model->addTask($task_data) == false) {\n // adding to database failed\n $data['notify'] = lang('msg_new_task_fail');\n } else {\n // success\n $data['notify'] = lang('msg_new_task_success');\n }\n }\n }\n\n\t\t//Load the associated view\n $this->load->view('header', $data);\n $this->load->view('nav', $data);\n $this->load->view('task/add', $data);\n $this->load->view('footer', $data);\n\t \t\n\t }", "public function addTask(array $params): int\n {\n $info = array();\n is_null($params['title_lang1']) ? $this->throwException(\"Lack title\", 1) : $info['title_lang1'] = trim($params['title_lang1']);\n is_null($params['title_lang2']) ? false : $info['title_lang2'] = trim($params['title_lang2']);\n is_null($params['title_lang3']) ? false : $info['title_lang3'] = trim($params['title_lang3']);\n is_null($params['pic']) ? false : $info['pic'] = trim($params['pic']);\n is_null($params['price']) ? false : $info['price'] = floatval($params['price']);\n is_null($params['category_id']) ? $this->throwException(\"Lack category_id\", 1) : $info['category_id'] = intval($params['category_id']);\n is_null($params['status']) ? false : $info['status'] = intval($params['status']);\n return $this->_daoTask->addTask($info);\n }", "public function addTask($task) {\n \t$this->tasks()->create($task);\n }", "function loadTransactionList() {\n\t\tif( $this->isValid() ) {\n\t\t\n\t\t\t$sql = \"SELECT tran.* \n\t\t\t\tFROM `\".BIT_DB_PREFIX.\"task_transaction` tran\n\t\t\t\tWHERE tran.ticket_id = ?\";\n\n\t\t\t$result = $this->mDb->query( $sql, array( $this->mContentId ) );\n\n\t\t\twhile( $res = $result->fetchRow() ) {\n\t\t\t\t$this->mInfo['trans'][$res['transact_no']] = $res;\n\t\t\t}\n\t\t}\n\t}", "public function addTask($task){\n $this->tasks()->create($task);\n\n \n \n }", "protected function load()\n {\n //$this->db->beginTransaction();\n $this->inTransaction = true;\n\n $q = $this->db->createSelectQuery();\n\n $q->select( '*' )\n ->from( $this->db->quoteIdentifier( $this->prefix.'pipe_execution' ) )\n ->where( $q->expr->eq( $this->db->quoteIdentifier( 'id' ),\n $q->bindValue( (int)$this->id ) ) );\n\n $stmt = $q->prepare();\n $stmt->execute();\n\n $result = $stmt->fetchAll( PDO::FETCH_ASSOC );\n\n if ( empty( $result ) )\n {\n //@todo better Exception\n throw new Exception(\n 'No state information for execution '.$this->id.'.'\n );\n }\n\n if ( $result === false )\n {\n //@todo better Exception\n throw new Exception(\n 'DB error loading state of execution '.$this->id.'.'\n );\n }\n\n // There can be only one result row\n $result = array_pop( $result );\n\n $this->pipeName = $result['pipe_name'];\n $this->pipeVersion = ( int )$result['pipe_version'];\n $this->executionState = ( int )$result['state'];\n\n //$this->parent = $result['parent'];\n $this->created = new DateTime( '@'.$result['created'] );\n\n // Load variables of this execution and of all nodes\n $q = $this->db->createSelectQuery();\n\n $q->select( '*' )\n ->from( $this->db->quoteIdentifier( $this->prefix.'pipe_execution_state' ) )\n ->where( $q->expr->eq( $this->db->quoteIdentifier( 'execution_id' ),\n $q->bindValue( (int)$this->id ) ) );\n\n $stmt = $q->prepare();\n $stmt->execute();\n\n $result = $stmt->fetchAll( PDO::FETCH_ASSOC );\n //@todo Check result\n\n $nodeStates = array();\n\n foreach( $result as $row )\n {\n $nodeId = ( int )$row['node_id'];\n\n if( 0 === $nodeId )\n {\n // This is the state of the execution \n $this->unserializeState( $row['state'] );\n }\n else\n {\n // It's a node's state\n $nodeStates[$nodeId] = $row['state'];\n }\n }\n\n $this->nodeStates = $nodeStates;\n }", "public function run()\n {\n $tasks = [\n 0 =>[\n 'nome' => 'dormir',\n 'status' => '0'],\n 1 =>[\n 'nome' => 'bebet',\n 'status' => '0']\n ];\n DB::table('tasks')->insert($tasks);\n }", "public function testCreateAndFindTask()\n\t{\n\t\t$user = factory(User::class)->create();\n\t\tPassport::actingAs($user);\n\t\t$category = factory(Category::class)->create(['user_id' => $user->id]);\n\t\t$array_task = array(\n\t\t\t'category_id' => $category->id,\n\t\t\t\"description\" => \"Needs to study more\"\n\t\t);\n\n\t\t$task = factory(Task::class)->create($array_task);\n\n\t\t$response = $this->get('api/categories/' . $category->id . '/tasks/' . $task->id);\n\n\t\t$response->assertStatus(200);\n\t\t$this->assertDatabaseHas('tasks', $array_task);\n\t}", "public function addTask($newTask) {\n //TODO: check for existing connection instead of reconnecting every time\n $db = new mysqli(DB_LOCATION, DB_USERNAME, DB_PASSWORD, DB_NAME);\n if ($db->connect_error) {\n die(\"Connection failed: \" . $db->connect_error);\n }\n // query preparation to avoid injections\n $stmt = $db->prepare(\"INSERT INTO \" . DB_TABLE . \" (title, description, done) VALUES (?, ?, ?)\");\n $stmt->bind_param(\"ssi\", $newTask['title'], $newTask['description'], $newTask['done']);\n $stmt->execute();\n $stmt->close();\n $db->close();\n }", "public function istasksExisting ($task_id){\n $sqlQuery = \"SELECT count (*) as isExisting \";\n $sqlQuery .= \"FROM tasks \";\n $sqlQuery .= \"WHERE task_id= $task_id\";\n $result = $this -> getDbManager() -> executeSelectQuery ( $sqlQuery );\n if ( $result [0][ \" isExisting \"] == 1) return ( true );\n else return ( false );\n }", "public function testCreateTaskVariable()\n {\n }", "public function getTask($id);", "public function _load()\n {\n $query = new Query(\n \"SELECT *\n FROM `\" . Leder::TABLE . \"`\n WHERE `arrangement_fra` = '#fra'\n AND `arrangement_til` = '#til'\",\n [\n 'fra' => $this->getArrangementFraId(),\n 'til' => $this->getArrangementTilId()\n ]\n );\n\n $res = $query->getResults();\n while( $row = Query::fetch($res) ) {\n $this->add(\n Leder::loadFromDatabaseRow( $row )\n );\n }\n }", "public function exec_task($task_id = null, $task_info = null) {\n\t\tif(!$task_id&&!$task_info){\n\t\t\treturn false;\n\t\t}\n\t\t//参数保障\n\t\t$task_id or $task_id = $task_info['task_id'];\n\t\t\n\t\t//这里开始加缓存锁\n\t\tglobal $kekezu;\n\t\tif ($kekezu->_cache_obj->get('taskexec_lock_'.$task_id)){\n\t\t\treturn false;\n\t\t}\n\t\t$kekezu->_cache_obj->set('taskexec_lock_'.$task_id,1,30);\n\t\t\n\t\t$task_info or $task_info = db_factory::get_one(\"select * from \".TABLEPRE.\"witkey_task where task_id = '$task_id' and task_union!=2\");\n\t\t\n\t\tswitch ($task_info['task_status']){\n\t\t\t//进行中状态\n\t\t\tcase 2:\n\t\t\t\t$task_hand_obj = mreward_task_class::get_instance($task_info);\n\t\t\t\t$task_hand_obj->time_hand_end();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$task_hand_obj = mreward_task_class::get_instance($task_info);\n\t\t\t\t$task_hand_obj->time_choose_end();\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$task_hand_obj = mreward_task_class::get_instance($task_info);\n\t\t\t\t$task_hand_obj->lottery_end();\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t$task_hand_obj = mreward_task_class::get_instance($task_info);\n\t\t\t\t$task_hand_obj->time_notice_end();\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tdb_factory::execute(\"update \".TABLEPRE.\"witkey_task set exec_time = 0 where task_id='$task_id'\");\n\t\t\t\tbreak;\n\t\t}\n\t\treturn true;\n\t}", "public function start_task ($vars)\r\n\t{\r\n\t\tif ($this->get_initial_data($vars))\r\n\t\t{\r\n\t\t\tif ($vars[\"only_xml\"] == TRUE)\r\n\t\t\t{\r\n\t\t\t\t$feed = $this->get_xml_string($vars);\r\n\t\t\t\treturn $feed;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->task_process($vars);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//1- Log\r\n\t\t\t$this->get_pt_log_srv()->add_log(-1, \"\", \"\", $vars[\"task_type\"], \"Fail getting initial parameters at \" . date(\"m/d/Y G:i:s\"));\r\n\r\n\t\t\t//2- Return\r\n\t\t\treturn $this->checkout_failure_handler($_SESSION[\"NOTICE\"] . \"fail getting initial parameters\");\r\n\t\t}\r\n\t}", "public function testListTaskVariables()\n {\n }", "public function run()\n {\n $task = new Task();\n $task->name = 'Nguyễn Thiên';\n $task->age = 26;\n $task->phone = 0353377104;\n $task->address = 'Quảng Trị';\n $task->email = '[email protected]';\n $task->save();\n\n $task = new Task();\n $task->name = 'Vũ Văn Mạnh';\n $task->age = 20;\n $task->phone = 03134314314;\n $task->address = 'Hải Dương';\n $task->email = '[email protected]';\n $task->save();\n\n\n }", "public function run()\n {\n $data = [\n [\n 'task_name' => 'Example Sentences for tasks',\n 'task_description' => 'A regret for the mistakes of yesterday must not, however, blind us to the tasks of today.\n\nThe tasks we face are difficult, and we can accomplish them only if we work together.\n\nNo one spoke; the three workers kept at their tasks as if no other person had been in the room with them.\n\nOne after another the men came to report the completion of their tasks.\n\nThere he plied his tasks so diligently that he excelled all in book-learning.\n\nI have therefore had to create for myself some tasks which will hold me to my chains.\n\nHow these expeditions accomplished their tasks shall be told later.\n\nThe overseers were brutal when the slaves did not do the tasks set for them.\n\nThese, also, make easier and bolder the electrician\\'s tasks.\n\nThe daily tasks and pleasures were picked up where they had been dropped.'\n ]\n ];\n\n \\Illuminate\\Support\\Facades\\DB::table('tasks')->insert($data);\n }", "public function CreateTask()\n {\n\n $data = $this->GetParamsFromRequestBody('create');\n\n if (!isset($data['status'])) {\n $data['status'] = \"open\";\n }\n\n $data['createdby'] = $this->loggedUser->getId();\n\n $this->insertArrayIntoDatabase('todo_task', $data);\n $id = mysql_insert_id();\n\n $this->response = array(\n \"status\" => 0,\n \"id\" => $id\n );\n $this->responseStatus = 201;\n }", "public function getTasks($task_id = null, $task_id_in = null, $process_instance_id = null, $process_instance_id_in = null, $process_instance_business_key = null, $process_instance_business_key_expression = null, $process_instance_business_key_in = null, $process_instance_business_key_like = null, $process_instance_business_key_like_expression = null, $process_definition_id = null, $process_definition_key = null, $process_definition_key_in = null, $process_definition_name = null, $process_definition_name_like = null, $execution_id = null, $case_instance_id = null, $case_instance_business_key = null, $case_instance_business_key_like = null, $case_definition_id = null, $case_definition_key = null, $case_definition_name = null, $case_definition_name_like = null, $case_execution_id = null, $activity_instance_id_in = null, $tenant_id_in = null, $without_tenant_id = false, $assignee = null, $assignee_expression = null, $assignee_like = null, $assignee_like_expression = null, $assignee_in = null, $owner = null, $owner_expression = null, $candidate_group = null, $candidate_group_expression = null, $candidate_user = null, $candidate_user_expression = null, $include_assigned_tasks = false, $involved_user = null, $involved_user_expression = null, $assigned = false, $unassigned = false, $task_definition_key = null, $task_definition_key_in = null, $task_definition_key_like = null, $name = null, $name_not_equal = null, $name_like = null, $name_not_like = null, $description = null, $description_like = null, $priority = null, $max_priority = null, $min_priority = null, $due_date = null, $due_date_expression = null, $due_after = null, $due_after_expression = null, $due_before = null, $due_before_expression = null, $without_due_date = false, $follow_up_date = null, $follow_up_date_expression = null, $follow_up_after = null, $follow_up_after_expression = null, $follow_up_before = null, $follow_up_before_expression = null, $follow_up_before_or_not_existent = null, $follow_up_before_or_not_existent_expression = null, $created_on = null, $created_on_expression = null, $created_after = null, $created_after_expression = null, $created_before = null, $created_before_expression = null, $delegation_state = null, $candidate_groups = null, $candidate_groups_expression = null, $with_candidate_groups = false, $without_candidate_groups = false, $with_candidate_users = false, $without_candidate_users = false, $active = false, $suspended = false, $task_variables = null, $process_variables = null, $case_instance_variables = null, $variable_names_ignore_case = false, $variable_values_ignore_case = false, $parent_task_id = null, $sort_by = null, $sort_order = null, $first_result = null, $max_results = null)\n {\n list($response) = $this->getTasksWithHttpInfo($task_id, $task_id_in, $process_instance_id, $process_instance_id_in, $process_instance_business_key, $process_instance_business_key_expression, $process_instance_business_key_in, $process_instance_business_key_like, $process_instance_business_key_like_expression, $process_definition_id, $process_definition_key, $process_definition_key_in, $process_definition_name, $process_definition_name_like, $execution_id, $case_instance_id, $case_instance_business_key, $case_instance_business_key_like, $case_definition_id, $case_definition_key, $case_definition_name, $case_definition_name_like, $case_execution_id, $activity_instance_id_in, $tenant_id_in, $without_tenant_id, $assignee, $assignee_expression, $assignee_like, $assignee_like_expression, $assignee_in, $owner, $owner_expression, $candidate_group, $candidate_group_expression, $candidate_user, $candidate_user_expression, $include_assigned_tasks, $involved_user, $involved_user_expression, $assigned, $unassigned, $task_definition_key, $task_definition_key_in, $task_definition_key_like, $name, $name_not_equal, $name_like, $name_not_like, $description, $description_like, $priority, $max_priority, $min_priority, $due_date, $due_date_expression, $due_after, $due_after_expression, $due_before, $due_before_expression, $without_due_date, $follow_up_date, $follow_up_date_expression, $follow_up_after, $follow_up_after_expression, $follow_up_before, $follow_up_before_expression, $follow_up_before_or_not_existent, $follow_up_before_or_not_existent_expression, $created_on, $created_on_expression, $created_after, $created_after_expression, $created_before, $created_before_expression, $delegation_state, $candidate_groups, $candidate_groups_expression, $with_candidate_groups, $without_candidate_groups, $with_candidate_users, $without_candidate_users, $active, $suspended, $task_variables, $process_variables, $case_instance_variables, $variable_names_ignore_case, $variable_values_ignore_case, $parent_task_id, $sort_by, $sort_order, $first_result, $max_results);\n return $response;\n }", "public function __doLoad()\n {\n $strSQL = $this->getSelectSql();\n $_SESSION[\"logger\"]->info(\"__doLoad: \" . $strSQL);\n\n $result = $this->query($strSQL);\n $_SESSION[\"logger\"]->info(\"Results: \" . $this->rowCount($result));\n if ($result && $this->rowCount($result) > 0) {\n $this->exists = true;\n $this->dxHashToClass($this->torecord($result));\n } else {\n $this->exists = false;\n }\n }", "public function beforeSave($insert)\n {\n if (parent::beforeSave($insert)) {\n $this->setScenario('result');\n $this->task = $this->a . $this->operation . $this->b;\n return true;\n }\n return false;\n }", "public function hasTaskList(){\n return $this->_has(2);\n }", "public function getTask(){\n $query = \"UPDATE \" . $this->table_name . \" \n SET \n stato = 2,\n id_fornitore = :id_fornitore\n WHERE id_ordine = :id_ordine\";\n \n\n $stmt = $this->conn->prepare($query);\n $this->id_ordine=htmlspecialchars(strip_tags($this->id_ordine));\n $this->id_fornitore=htmlspecialchars(strip_tags($this->id_fornitore));\n $stmt->bindParam(\":id_ordine\", $this->id_ordine);\n $stmt->bindParam(\":id_fornitore\", $this->id_fornitore);\n\n if($stmt->execute()){\n return true;\n }\n \n return false;\n }", "public function addTask($task){\n\n $this->tasks()->create($task);\n\n }", "public function Insert() // Inaczej !!! \n\t\t{\n\t\t\t$result = mysqli_query($this->link, $this->task);\n\t\t\treturn mysqli_affected_rows($this->link).\" line affected by SELECT\\n\\n\";\n\t\t}", "public function addTask()\n\t{\n\t\t// Output the HTML\n\t\t$this->editTask();\n\t}", "abstract public function import(): bool;", "public function addTask(Tx_Wpjr_Domain_Model_Task $task) {\n\t\t$this->tasks->attach($task);\n\t}", "public function startTask($data){\n\t\treturn dibi::query(\"insert into [times] \", (array)$data);\n\t}", "public function createTask()\n\t{\n\t\tif ( $this->taskValidate() ) {\n\t\t\tTask::create([\n\t\t\t\t\t'name' => htmlspecialchars($_POST['inputTaskName']),\n\t\t\t\t\t'email' => htmlspecialchars($_POST['inputTaskMail']),\n\t\t\t\t\t'text' => htmlspecialchars($_POST['inputTaskText'])\n\t\t\t\t]);\n\t\t}\n\t\t// to index\n\t\t\theader('Location: /');\n\t}", "public function task_getby_id( $task_id ){\n \n if( $stmt = $this->connection->prepare(\"SELECT * FROM tasks WHERE task_id=?\") ){\n $stmt->bind_param(\"s\", $task_id);\n if( $stmt->execute() ){\n $stmt->bind_result( $id, $name, $client_id, $client_name, $user_id, $user_name, $deadline, $description, $comment, $status, $pinned );\n $stmt->fetch();\n $stmt->close();\n\n $Task = new Task( $id, $name, $client_id, $client_name, $user_id, $user_name, $deadline, $description, $comment, $status, $pinned );\n return $Task;\n }\n $stmt->close();\n }\n return NULL;\n }", "public function actionCreateTask() {\n // Check settings, show errors if there are any\n try {\n craft()->goLive_settings->verifySettings();\n }\n catch (Exception $e) {\n header('HTTP/1.1 ' . 500);\n\n $errorMessage = $e->getMessage();\n $this->returnErrorJson($errorMessage);\n }\n catch (HttpException $e) {\n header('HTTP/1.1 ' . $e->statusCode);\n\n $errorMessage = $e->getMessage();\n $this->returnErrorJson($errorMessage);\n }\n\n // Settings look good, create and run the task.\n // Also, set a random-ish backup file name to be referenced within the task steps\n $deployTask = craft()->tasks->createTask(\n 'GoLive_Deploy',\n 'GoLive_Deploy',\n array(\n 'backupFileName' => uniqid('goLive_') . '.sql'\n )\n );\n\n // Tries to end the HTTP session, and definitely starts running the pending tasks.\n // Our task may or may not be first in that queue.\n craft()->tasks->closeAndRun();\n }", "public function run()\n {\n DB::table('task')->insert([\n 'name' => str_random(10),\n 'date_created' => '11111'\n ]);\n }", "public function run()\n {\n DB::table('tasks')->insert([\n 'name' => str_random(10),\n 'completed' => 1,\n 'project_id' => 1,\n ]);\n }", "abstract protected function doTransload();", "public function createTask()\n {\n return factory($this->model)->create();\n }", "public static function saveTasks( $tasks ){\n\t\tFile::replace__variable( self::CRON_FILE, 'tasks', $tasks );\n\t\treturn ! Err::check();\n\t}", "public function testUpdateTask()\n {\n }", "public function testGetTaskInstanceVariable()\n {\n }" ]
[ "0.63556695", "0.6114586", "0.6054531", "0.6013186", "0.5743756", "0.57344234", "0.56895983", "0.56435984", "0.5598191", "0.5594033", "0.5594033", "0.55607903", "0.55570465", "0.5515365", "0.55142146", "0.55142146", "0.5512232", "0.5495883", "0.54707927", "0.5426024", "0.54258233", "0.5411841", "0.5409645", "0.5338226", "0.5293145", "0.5285996", "0.52768815", "0.5267147", "0.52669704", "0.5253962", "0.5235232", "0.52284056", "0.52178663", "0.52167046", "0.5188156", "0.5181488", "0.5179821", "0.51792765", "0.51758605", "0.5168895", "0.51534677", "0.5151624", "0.5146611", "0.51177114", "0.5108133", "0.5107941", "0.5088302", "0.50804305", "0.5071697", "0.50419253", "0.5025354", "0.50248665", "0.50121355", "0.5011359", "0.5003912", "0.49995944", "0.4998483", "0.49974453", "0.4997325", "0.4995237", "0.4991512", "0.4974899", "0.49725688", "0.4970055", "0.4968067", "0.49643034", "0.49602968", "0.4948874", "0.4940857", "0.49322075", "0.49293298", "0.49279198", "0.49209023", "0.49189073", "0.49181455", "0.49164572", "0.48983055", "0.4891463", "0.4886775", "0.48814645", "0.488117", "0.486827", "0.48612678", "0.48381734", "0.4835847", "0.48248032", "0.4820292", "0.48159996", "0.48130968", "0.4810949", "0.48022783", "0.47947073", "0.47874382", "0.47866225", "0.4780728", "0.47795865", "0.47785428", "0.47753426", "0.47714207", "0.47639084" ]
0.61927474
1
Display a listing of the WorkorderHistory. GET|HEAD /workorderHistories
public function index(Request $request) { $this->workorderHistoryRepository->pushCriteria(new RequestCriteria($request)); $this->workorderHistoryRepository->pushCriteria(new LimitOffsetCriteria($request)); $workorderHistories = $this->workorderHistoryRepository->all(); return $this->sendResponse($workorderHistories->toArray(), 'Workorder Histories retrieved successfully'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCron_jobs_history()\n {\n $request = Yii::app()->request;\n $model = new ConsoleCommandListHistory('search');\n $model->unsetAttributes();\n\n $model->attributes = (array)$request->getQuery($model->modelName, array());\n \n $this->setData(array(\n 'pageMetaTitle' => $this->data->pageMetaTitle . ' | '. Yii::t('cronjobs', 'View cron jobs history'),\n 'pageHeading' => Yii::t('cronjobs', 'View cron jobs history'),\n 'pageBreadcrumbs' => array(\n Yii::t('cronjobs', 'Cron jobs history'),\n )\n ));\n\n $this->render('cron-jobs-history', compact('model'));\n }", "public function index()\n\t{\n\t\t$orders = Order::select()->whereNull('original_order')->orderBy('updated_at', 'desc')->paginate(6);\n\n\t\treturn view('admin.history.index', compact('orders'));\n\t}", "public function actionList()\n {\n\t\tif (!\\Yii::$app->user->can('cmsCommentHistoriesList')) {\n\t\t\tthrow new ForbiddenHttpException('You do not have privileges to view this content.');\n\t\t}\n\t\t\n $searchModel = new CommentHistorySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('list', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionHistory()\n {\n $model= User::findOne(['id' => Yii::$app->user->identity->getId()]);\n $orders = Order::find()->where(['id_user' => $model->id])->with('orderProds')->orderBy('date DESC')->all();\n return $this->render('history', [\n 'model' => $model,\n 'orders' => $orders,\n 'page' => SmapPages::find()->where(['id_class'=>4,'alias' => 'history'])->one()\n ]);\n }", "public function actionHistory()\n {\n $id = Yii::app()->request->getQuery('id');\n $model = Order::model()->findByPk($id);\n\n if (!$model)\n $this->error404(Yii::t('CartModule.admin', 'ORDER_NOT_FOUND'));\n if ($model->is_deleted)\n throw new CHttpException(404, Yii::t('CartModule.admin', 'ORDER_ISDELETED'));\n $this->render('_history', array(\n 'model' => $model\n ));\n }", "public function actionHistory()\n {\n $this->pageTitle = 'Your Viewing History';\n\n $data['pageHistory'] = History::model()->all('page');\n $data['pdfHistory'] = History::model()->all('pdf');\n\n $this->render('//content/history', $data);\n }", "public function getStatusHistory()\n\t\t{\n\t\t\t$list = ECash::getFactory()->getModel(\"StatusHistoryList\");\n\t\t\t$list->loadBy(array(\"application_id\" => $this->application_id));\n\n\t\t\treturn $list->toList();\n\t\t}", "public function show_list()\n {\n $this->output('Workstatus/v_workstatus_ajax');\n }", "public function fetchHistory(): array;", "public function getHistory(){\n \t$History = HPP::where([['hpp_kind','=','history'],['hpp_city_id','=',1]])->get();\n \treturn view('Admin.HistoryPlanPurpose.History' , compact('History'));\n }", "public function index()\n {\n $historys = History::with('getApiKeys')\n ->with('getWorkflow')\n ->with('getStateFrom')\n ->with('getStateTo')\n ->with('getUserName')\n ->paginate(10);\n $now = Carbon::now();\n $dates = [];\n foreach($historys as $history)\n {\n $end = Carbon::parse($history->created_at);\n array_push($dates,$end->diffForHumans($now));\n }\n return view('workflow.history.index',compact('historys', 'dates'));\n }", "public function index()\n {\n $history = App\\Models\\history::latest()->first();\n return view('admin.history.view',compact('history'));\n }", "public function getStatusHistories();", "public function getHistory() {\n $rentalModel = new RentalModel($this->db);\n\n try {\n $rentals = $rentalModel->getAll();\n } catch (\\Exception $e) {\n $properties = ['errorMessage' => 'Error getting rental history.'];\n return $this->render('error.twig', $properties);\n }\n\n $properties = [\"rentals\" => $rentals];\n return $this->render('history.twig', $properties);\n }", "public function actionHistory($id)\n\t\t{\n\t\t\t\t$model = $this->findModel($id);\n\n\t\t\t\t$query = new Query();\n\t\t\t\t$orderHistory = new ActiveDataProvider([\n\t\t\t\t\t\t'query' => OrderHistory::find()->where([\n\t\t\t\t\t\t\t\t'order_id' => $model->order_id,\n\t\t\t\t\t\t\t\t// 'attribute' => 'order_status_id'\n\t\t\t\t\t\t]),\n\t\t\t\t\t\t'sort' => [\n\t\t\t\t\t\t\t\t'defaultOrder' => [\n\t\t\t\t\t\t\t\t\t\t// 'attribute' => SORT_ASC,\n\t\t\t\t\t\t\t\t\t\t'create_time' => SORT_ASC\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'pagination' => [\n\t\t\t\t\t\t\t\t'pageSize' => 20,\n\t\t\t\t\t\t],\n\t\t\t\t]);\n\n\t\t\t\treturn $this->render('history', [\n\t\t\t\t\t\t'model' => $model,\n\t\t\t\t\t\t'orderHistory' => $orderHistory,\n\t\t\t\t\t\t'subData' => $this->subData\n\t\t\t\t]);\n\t\t}", "function simple_history_print_history($args = null) {\n\t\n\tglobal $simple_history;\n\t\n\t$arr_events = simple_history_get_items_array($args);\n\t#sf_d($arr_events);\n\t#sf_d($args);sf_d($arr_events);\n\t$defaults = array(\n\t\t\"page\" => 0,\n\t\t\"items\" => $simple_history->get_pager_size(),\n\t\t\"filter_type\" => \"\",\n\t\t\"filter_user\" => \"\",\n\t\t\"is_ajax\" => false\n\t);\n\n\t$args = wp_parse_args( $args, $defaults );\n\t$output = \"\";\n\tif ($arr_events) {\n\t\tif (!$args[\"is_ajax\"]) {\n\t\t\t// if not ajax, print the div\n\t\t\t$output .= \"<div class='simple-history-ol-wrapper'><ol class='simple-history'>\";\n\t\t}\n\t\n\t\t$loopNum = 0;\n\t\t$real_loop_num = -1;\n\t\tforeach ($arr_events as $one_row) {\n\t\t\t\n\t\t\t$real_loop_num++;\n\n\t\t\t$object_type = $one_row->object_type;\n\t\t\t$object_type_lcase = strtolower($object_type);\n\t\t\t$object_subtype = $one_row->object_subtype;\n\t\t\t$object_id = $one_row->object_id;\n\t\t\t$object_name = $one_row->object_name;\n\t\t\t$user_id = $one_row->user_id;\n\t\t\t$action = $one_row->action;\n\t\t\t$action_description = $one_row->action_description;\n\t\t\t$occasions = $one_row->occasions;\n\t\t\t$num_occasions = sizeof($occasions);\n\t\t\t$object_image_out = \"\";\n\n\t\t\t$css = \"\";\n\t\t\tif (\"attachment\" == $object_type_lcase) {\n\t\t\t\tif (wp_get_attachment_image_src($object_id, array(50,50), true)) {\n\t\t\t\t\t// yep, it's an attachment and it has an icon/thumbnail\n\t\t\t\t\t$css .= ' simple-history-has-attachment-thumnbail ';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (\"user\" == $object_type_lcase) {\n\t\t\t\t$css .= ' simple-history-has-attachment-thumnbail ';\n\t\t\t}\n\n\t\t\tif ($num_occasions > 0) {\n\t\t\t\t$css .= ' simple-history-has-occasions ';\n\t\t\t}\n\t\t\t\n\t\t\t$output .= \"<li class='$css'>\";\n\n\t\t\t$output .= \"<div class='first'>\";\n\t\t\t\n\t\t\t// who performed the action\n\t\t\t$who = \"\";\n\t\t\t$user = get_user_by(\"id\", $user_id); // false if user does not exist\n\n\t\t\tif ($user) {\n\t\t\t\t$user_avatar = get_avatar($user->user_email, \"32\"); \n\t\t\t\t$user_link = \"user-edit.php?user_id={$user->ID}\";\n\t\t\t\t$who_avatar = sprintf('<a class=\"simple-history-who-avatar\" href=\"%2$s\">%1$s</a>', $user_avatar, $user_link);\n\t\t\t} else {\n\t\t\t\t$user_avatar = get_avatar(\"\", \"32\"); \n\t\t\t\t$who_avatar = sprintf('<span class=\"simple-history-who-avatar\">%1$s</span>', $user_avatar);\n\t\t\t}\n\t\t\t$output .= $who_avatar;\n\t\t\t\n\t\t\t// section with info about the user who did something\n\t\t\t$who .= \"<span class='who'>\";\n\t\t\tif ($user) {\n\t\t\t\t$who .= sprintf('<a href=\"%2$s\">%1$s</a>', $user->user_nicename, $user_link);\n\t\t\t\tif (isset($user->first_name) || isset($user->last_name)) {\n\t\t\t\t\tif ($user->first_name || $user->last_name) {\n\t\t\t\t\t\t$who .= \" (\";\n\t\t\t\t\t\tif ($user->first_name && $user->last_name) {\n\t\t\t\t\t\t\t$who .= esc_html($user->first_name) . \" \" . esc_html($user->last_name);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$who .= esc_html($user->first_name) . esc_html($user->last_name); // just one of them, no space necessary\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$who .= \")\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$who .= \"&lt;\" . __(\"Unknown or deleted user\", 'simple-history') .\"&gt;\";\n\t\t\t}\n\t\t\t$who .= \"</span>\";\n\n\t\t\t// what and object\n\t\t\tif (\"post\" == $object_type_lcase) {\n\t\t\t\t\n\t\t\t\t$post_out = \"\";\n\t\t\t\t\n\t\t\t\t// Get real name for post type (not just the slug for custom post types)\n\t\t\t\t$post_type_object = get_post_type_object( $object_subtype );\n\t\t\t\tif ( is_null($post_type_object) ) {\n\t\t\t\t\t$post_out .= esc_html__( ucfirst( $object_subtype ) );\n\t\t\t\t} else {\n\t\t\t\t\t$post_out .= esc_html__( ucfirst( $post_type_object->labels->singular_name ) );\n\t\t\t\t}\n\n\t\t\t\t$post = get_post($object_id);\n\n\t\t\t\tif (null == $post) {\n\t\t\t\t\t// post does not exist, probably deleted\n\t\t\t\t\t// check if object_name exists\n\t\t\t\t\tif ($object_name) {\n\t\t\t\t\t\t$post_out .= \" <span class='simple-history-title'>\\\"\" . esc_html($object_name) . \"\\\"</span>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$post_out .= \" <span class='simple-history-title'>&lt;unknown name&gt;</span>\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t#$title = esc_html($post->post_title);\n\t\t\t\t\t$title = get_the_title($post->ID);\n\t\t\t\t\t$title = esc_html($title);\n\t\t\t\t\t$edit_link = get_edit_post_link($object_id, 'display');\n\t\t\t\t\t$post_out .= \" <a href='$edit_link'>\";\n\t\t\t\t\t$post_out .= \"<span class='simple-history-title'>{$title}</span>\";\n\t\t\t\t\t$post_out .= \"</a>\";\n\t\t\t\t}\n\n\t\t\t\t$post_out .= \" \" . esc_html__($action, \"simple-history\");\n\t\t\t\t\n\t\t\t\t$post_out = ucfirst($post_out);\n\t\t\t\t$output .= $post_out;\n\n\t\t\t\t\n\t\t\t} elseif (\"attachment\" == $object_type_lcase) {\n\t\t\t\n\t\t\t\t$attachment_out = \"\";\n\t\t\t\t$attachment_out .= __(\"attachment\", 'simple-history') . \" \";\n\n\t\t\t\t$post = get_post($object_id);\n\t\t\t\t\n\t\t\t\tif ($post) {\n\n\t\t\t\t\t// Post for attachment was found\n\n\t\t\t\t\t$title = esc_html(get_the_title($post->ID));\n\t\t\t\t\t$edit_link = get_edit_post_link($object_id, 'display');\n\t\t\t\t\t$attachment_metadata = wp_get_attachment_metadata( $object_id );\n\t\t\t\t\t$attachment_file = get_attached_file( $object_id );\n\t\t\t\t\t$attachment_mime = get_post_mime_type( $object_id );\n\t\t\t\t\t$attachment_url = wp_get_attachment_url( $object_id );\n\n // Check that file exists. It may not due to local dev vs remove dev etc.\n $file_exists = file_exists($attachment_file);\n\n\t\t\t\t\t// Get attachment thumbnail. 60 x 60 is the same size as the media overview uses\n\t\t\t\t\t// Is thumbnail of object if image, is wp icon if not\n\t\t\t\t\t$attachment_image_src = wp_get_attachment_image_src($object_id, array(60, 60), true);\t\t\t\t\t\n if ($attachment_image_src && $file_exists) {\n\t\t\t\t\t\t$object_image_out .= \"<a class='simple-history-attachment-thumbnail' href='$edit_link'><img src='{$attachment_image_src[0]}' alt='Attachment icon' width='{$attachment_image_src[1]}' height='{$attachment_image_src[2]}' /></a>\";\n } else {\n $object_image_out .= \"<a class='simple-history-attachment-thumbnail' href='$edit_link'></a>\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Begin adding nice to have meta info about to attachment (name, size, mime, etc.)\t\t\t\t\t\n\t\t\t\t\t$object_image_out .= \"<div class='simple-history-attachment-meta'>\";\n\n\t\t\t\t\t// File name\n\n\t\t\t\t\t// Get size in human readable format. Code snippet from media.php\n\t\t\t\t\t$sizes = array( 'KB', 'MB', 'GB' );\n\n $attachment_filesize = \"\";\n if ( $file_exists ) {\n $attachment_filesize = filesize( $attachment_file );\n for ( $u = -1; $attachment_filesize > 1024 && $u < count( $sizes ) - 1; $u++ ) {\n $attachment_filesize /= 1024;\n }\n }\n\n if (empty($attachment_filesize)) {\n $str_attachment_size = \"<p>\" . __(\"File size: Unknown \", \"simple-history\") . \"</p>\";\n } else {\n $size_unit = ($u == -1) ? __(\"bytes\", \"simple-history\") : $sizes[$u];\n $str_attachment_size = sprintf('<p>%1$s %2$s %3$s</p>', __(\"File size:\", \"simple-history\"), round( $attachment_filesize, 0 ), $size_unit );\n\t\t\t\t\t}\n\n\t\t\t\t\t// File type\n\t\t\t\t\t$file_type_out = \"\";\n\t\t\t\t\tif ( preg_match( '/^.*?\\.(\\w+)$/', $attachment_file, $matches ) )\n\t\t\t\t\t\t$file_type_out .= esc_html( strtoupper( $matches[1] ) );\n\t\t\t\t\telse\n\t\t\t\t\t\t$file_type_out .= strtoupper( str_replace( 'image/', '', $post->post_mime_type ) );\n\t\t\t\n\t\t\t\t\t// Media size, width x height\n\t\t\t\t\t$media_dims = \"\";\n\t\t\t\t\tif ( ! empty( $attachment_metadata['width'] ) && ! empty( $attachment_metadata['height'] ) ) {\n\t\t\t\t\t\t$media_dims .= \"<span>{$attachment_metadata['width']}&nbsp;&times;&nbsp;{$attachment_metadata['height']}</span>\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// Generate string with metainfo\n $object_image_out .= $str_attachment_size;\n $object_image_out .= sprintf('<p>%1$s %2$s</p>', __(\"File type:\"), $file_type_out );\n\t\t\t\t\tif ( ! empty( $media_dims ) ) $object_image_out .= sprintf('<p>%1$s %2$s</p>', __(\"Dimensions:\"), $media_dims );\t\t\t\t\t\n\t\t\t\t\tif ( ! empty( $attachment_metadata[\"length_formatted\"] ) ) $object_image_out .= sprintf('<p>%1$s %2$s</p>', __(\"Length:\"), $attachment_metadata[\"length_formatted\"] );\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// end attachment meta info box output\n\t\t\t\t\t$object_image_out .= \"</div>\"; // close simple-history-attachment-meta\n\n\t\t\t\t\t$attachment_out .= \" <a href='$edit_link'>\";\n\t\t\t\t\t$attachment_out .= \"<span class='simple-history-title'>{$title}</span>\";\n\t\t\t\t\t$attachment_out .= \"</a>\";\n\t\t\t\t\t\n\t\t\t\t} else {\n\n\t\t\t\t\t// Post for attachment was not found\n\t\t\t\t\tif ($object_name) {\n\t\t\t\t\t\t$attachment_out .= \"<span class='simple-history-title'>\\\"\" . esc_html($object_name) . \"\\\"</span>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$attachment_out .= \" <span class='simple-history-title'>&lt;deleted&gt;</span>\";\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$attachment_out .= \" \" . esc_html__($action, \"simple-history\") . \" \";\n\t\t\t\t\n\t\t\t\t$attachment_out = ucfirst($attachment_out);\n\t\t\t\t$output .= $attachment_out;\n\n\t\t\t} elseif (\"user\" == $object_type_lcase) {\n\n\t\t\t\t$user_out = \"\";\n\t\t\t\t$user_out .= __(\"user\", 'simple-history');\n\t\t\t\t$user = get_user_by(\"id\", $object_id);\n\t\t\t\tif ($user) {\n\t\t\t\t\t$user_link = \"user-edit.php?user_id={$user->ID}\";\n\t\t\t\t\t$user_out .= \"<span class='simple-history-title'>\";\n\t\t\t\t\t$user_out .= \" <a href='$user_link'>\";\n\t\t\t\t\t$user_out .= $user->user_nicename;\n\t\t\t\t\t$user_out .= \"</a>\";\n\t\t\t\t\tif (isset($user->first_name) && isset($user->last_name)) {\n\t\t\t\t\t\tif ($user->first_name || $user->last_name) {\n\t\t\t\t\t\t\t$user_out .= \" (\";\n\t\t\t\t\t\t\tif ($user->first_name && $user->last_name) {\n\t\t\t\t\t\t\t\t$user_out .= esc_html($user->first_name) . \" \" . esc_html($user->last_name);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$user_out .= esc_html($user->first_name) . esc_html($user->last_name); // just one of them, no space necessary\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$user_out .= \")\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$user_out .= \"</span>\";\n\t\t\t\t} else {\n\t\t\t\t\t// most likely deleted user\n\t\t\t\t\t$user_link = \"\";\n\t\t\t\t\t$user_out .= \" \\\"\" . esc_html($object_name) . \"\\\"\";\n\t\t\t\t}\n\n\t\t\t\t$user_out .= \" \" . esc_html__($action, \"simple-history\");\n\t\t\t\t\n\t\t\t\t$user_out = ucfirst($user_out);\n\t\t\t\t$output .= $user_out;\n\n\t\t\t} elseif (\"comment\" == $object_type_lcase) {\n\t\t\t\t\n\t\t\t\t$comment_link = get_edit_comment_link($object_id);\n\t\t\t\t$output .= ucwords(esc_html__(ucfirst($object_type))) . \" \" . esc_html($object_subtype) . \" <a href='$comment_link'><span class='simple-history-title'>\" . esc_html($object_name) . \"\\\"</span></a> \" . esc_html__($action, \"simple-history\");\n\n\t\t\t} else {\n\n\t\t\t\t// unknown/general type\n\t\t\t\t// translate the common types\n\t\t\t\t$unknown_action = $action;\n\t\t\t\tswitch ($unknown_action) {\n\t\t\t\t\tcase \"activated\":\n\t\t\t\t\t\t$unknown_action = __(\"activated\", 'simple-history');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"deactivated\":\n\t\t\t\t\t\t$unknown_action = __(\"deactivated\", 'simple-history');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"enabled\":\n\t\t\t\t\t\t$unknown_action = __(\"enabled\", 'simple-history');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"disabled\":\n\t\t\t\t\t\t$unknown_action = __(\"disabled\", 'simple-history');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$unknown_action = $unknown_action; // dah!\n\t\t\t\t}\n\t\t\t\t$output .= ucwords(esc_html__($object_type, \"simple-history\")) . \" \" . ucwords(esc_html__($object_subtype, \"simple-history\")) . \" <span class='simple-history-title'>\\\"\" . esc_html($object_name) . \"\\\"</span> \" . esc_html($unknown_action);\n\n\t\t\t}\n\t\t\t$output .= \"</div>\";\n\t\t\t\n\t\t\t// second div = when and who\n\t\t\t$output .= \"<div class='second'>\";\n\t\t\t\n\t\t\t$date_i18n_date = date_i18n(get_option('date_format'), strtotime($one_row->date), $gmt=false);\n\t\t\t$date_i18n_time = date_i18n(get_option('time_format'), strtotime($one_row->date), $gmt=false);\t\t\n\t\t\t$now = strtotime(current_time(\"mysql\"));\n\t\t\t$diff_str = sprintf( __('<span class=\"when\">%1$s ago</span> by %2$s', \"simple-history\"), human_time_diff(strtotime($one_row->date), $now), $who );\n\t\t\t$output .= $diff_str;\n\t\t\t$output .= \"<span class='when_detail'>\".sprintf(__('%s at %s', 'simple-history'), $date_i18n_date, $date_i18n_time).\"</span>\";\n\n\t\t\t// action description\n\t\t\tif ( trim( $action_description ) ) {\n\t\t\t\t$output .= sprintf(\n\t\t\t\t\t'\n\t\t\t\t\t<a href=\"#\" class=\"simple-history-item-description-toggler\">%2$s</a>\n\t\t\t\t\t<div class=\"simple-history-item-description-wrap\">\n\t\t\t\t\t\t<div class=\"simple-history-action-description\">%1$s</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t',\n\t\t\t\t\tnl2br( esc_attr( $action_description ) ), // 2\n\t\t\t\t\t__(\"Details\", \"simple-history\") // 2\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\t$output .= \"</div>\";\n\n\t\t\t// Object image\n\t\t\tif ( $object_image_out ) {\n\n\t\t\t\t$output .= sprintf(\n\t\t\t\t\t'\n\t\t\t\t\t<div class=\"simple-history-object-image\">\n\t\t\t\t\t\t%1$s\n\t\t\t\t\t</div>\n\t\t\t\t\t',\n\t\t\t\t\t$object_image_out\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t\t// occasions\n\t\t\tif ($num_occasions > 0) {\n\t\t\t\t$output .= \"<div class='third'>\";\n\t\t\t\tif ($num_occasions == 1) {\n\t\t\t\t\t$one_occasion = __(\"+ 1 occasion\", 'simple-history');\n\t\t\t\t\t$output .= \"<a class='simple-history-occasion-show' href='#'>$one_occasion</a>\";\n\t\t\t\t} else {\n\t\t\t\t\t$many_occasion = sprintf(__(\"+ %d occasions\", 'simple-history'), $num_occasions);\n\t\t\t\t\t$output .= \"<a class='simple-history-occasion-show' href='#'>$many_occasion</a>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$output .= \"<ul class='simple-history-occasions hidden'>\";\n\t\t\t\tforeach ($occasions as $one_occasion) {\n\t\t\t\t\n\t\t\t\t\t$output .= \"<li>\";\n\t\t\t\t\n\t\t\t\t\t$date_i18n_date = date_i18n(get_option('date_format'), strtotime($one_occasion->date), $gmt=false);\n\t\t\t\t\t$date_i18n_time = date_i18n(get_option('time_format'), strtotime($one_occasion->date), $gmt=false);\t\t\n\t\t\t\t\n\t\t\t\t\t$output .= \"<div class='simple-history-occasions-one-when'>\";\n\t\t\t\t\t$output .= sprintf(\n\t\t\t\t\t\t\t__('%s ago (%s at %s)', \"simple-history\"), \n\t\t\t\t\t\t\thuman_time_diff(strtotime($one_occasion->date), $now), \n\t\t\t\t\t\t\t$date_i18n_date, \n\t\t\t\t\t\t\t$date_i18n_time\n\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tif ( trim( $one_occasion->action_description ) ) {\n\t\t\t\t\t\t$output .= \"<a href='#' class='simple-history-occasions-details-toggle'>\" . __(\"Details\", \"simple-history\") . \"</a>\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$output .= \"</div>\";\n\n\t\t\t\t\tif ( trim( $one_occasion->action_description ) ) {\n\t\t\t\t\t\t$output .= sprintf(\n\t\t\t\t\t\t\t'<div class=\"simple-history-occasions-one-action-description\">%1$s</div>',\n\t\t\t\t\t\t\tnl2br( esc_attr( $one_occasion->action_description ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\n\t\t\t\t\t$output .= \"</li>\";\n\t\t\t\t}\n\n\t\t\t\t$output .= \"</ul>\";\n\n\t\t\t\t$output .= \"</div>\";\n\t\t\t}\n\n\t\t\t$output .= \"</li>\";\n\n\t\t\t$loopNum++;\n\n\t\t}\n\t\t\n\t\t// if $loopNum == 0 no items where found for this page\n\t\tif ($loopNum == 0) {\n\t\t\t$output .= \"noMoreItems\";\n\t\t}\n\t\t\n\t\tif ( ! $args[\"is_ajax\"] ) {\n\n\t\t\t// if not ajax, print the divs and stuff we need\n\t\t\t$show_more = \"<select>\";\n\t\t\t$show_more .= sprintf('<option value=5 %2$s>%1$s</option>', __(\"Show 5 more\", 'simple-history'), ($args[\"items\"] == 5 ? \" selected \" : \"\") );\n\t\t\t$show_more .= sprintf('<option value=15 %2$s>%1$s</option>', __(\"Show 15 more\", 'simple-history'), ($args[\"items\"] == 15 ? \" selected \" : \"\") );\n\t\t\t$show_more .= sprintf('<option value=50 %2$s>%1$s</option>', __(\"Show 50 more\", 'simple-history'), ($args[\"items\"] == 50 ? \" selected \" : \"\") );\n\t\t\t$show_more .= sprintf('<option value=100 %2$s>%1$s</option>', __(\"Show 100 more\", 'simple-history'), ($args[\"items\"] == 100 ? \" selected \" : \"\") );\n\t\t\t$show_more .= \"</select>\";\n\n\t\t\t$no_found = __(\"No matching items found.\", 'simple-history');\n\t\t\t$view_rss = __(\"RSS feed\", 'simple-history');\n\t\t\t$view_rss_link = simple_history_get_rss_address();\n\t\t\t$str_show = __(\"Show\", 'simple-history');\n\t\t\t$output .= \"</ol>\";\n\n\t\t\t$output .= sprintf( '\n\t\t\t\t\t<div class=\"simple-history-loading\">%2$s %1$s</div>\n\t\t\t\t\t', \n\t\t\t\t\t__(\"Loading...\", 'simple-history'), // 1\n\t\t\t\t\t\"<img src='\".site_url(\"wp-admin/images/loading.gif\").\"' width=16 height=16>\"\n\t\t\t\t);\n\n\t\t\t$output .= \"</div>\";\n\n\t\t\t$output .= \"\n\t\t\t\t<p class='simple-history-no-more-items'>$no_found</p>\t\t\t\n\t\t\t\t<p class='simple-history-rss-feed-dashboard'><a title='$view_rss' href='$view_rss_link'>$view_rss</a></p>\n\t\t\t\t<p class='simple-history-rss-feed-page'><a title='$view_rss' href='$view_rss_link'><span></span>$view_rss</a></p>\n\t\t\t\";\n\n\t\t}\n\n\t} else {\n\n\t\tif ($args[\"is_ajax\"]) {\n\t\t\t$output .= \"noMoreItems\";\n\t\t} else {\n\t\t\t$no_found = __(\"No history items found.\", 'simple-history');\n\t\t\t$please_note = __(\"Please note that Simple History only records things that happen after this plugin have been installed.\", 'simple-history');\n\t\t\t$output .= \"<p>$no_found</p>\";\n\t\t\t$output .= \"<p>$please_note</p>\";\n\t\t}\n\n\t}\n\treturn $output;\n}", "public function actionIndex()\n {\n $searchModel = new WorkItemSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('FauconRankingBundle:RankingHistory')->findAll();\n\n return array('entities' => $entities);\n }", "public function showOrderList() {\n\n $orders = history::orderBy('customer_id')->orderBy('command_at','desc')->paginate(10);\n return view('admin.orderList',compact('orders'));\n }", "public function actionIndex()\n {\n $depositId = \\Yii::$app->request->get('depositId');\n\n $searchModel = new DepositsHistorySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams, $depositId);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'depositId' => $depositId\n ]);\n }", "public function index()\n\t{ \n\t \n\t\t$work = Work::where('status','=',0)->orWhere('status','=',1)->orderBy('created_at','desc')->get();\n\t\treturn view('admin.work.index', compact('work'));\n\t}", "public function actionTaskhistory(){\n $user = Users::findOne(\\Yii::$app->user->getID());\n $tasks = AcceptedOrders::find()->joinWith('posts')->joinWith('order')->where('(post_services.owner_id = '.\\Yii::$app->user->getID() . ' OR accepted_orders.user_id = ' . \\Yii::$app->user->getID() . ') AND accepted_orders.payment = \"paid\" AND closed_date != \"\"')->all();\n return $this->render('taskHistory', ['tasks'=>$tasks, 'user'=>$user]);\n }", "public function get_history()\n {\n return view('content.history')\n ->with('pages', History::page_all())\n ->with('pdfs', History::pdf_all());\n }", "public function actionIndex()\n {\n $searchModel = new HLogSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function action_index()\n{\n $history = Jelly::select( 'user_history' )\n ->where(':primary_key', '=', $this->user->id)\n ->limit( 25 )\n ->execute();\n\n $this->template->content = View::factory('history/index')\n ->set('history', $history);\n\n}", "function action_history()\n{\n\tglobal $pagestore, $page, $full, $HistMax;\n\n\t$history = $pagestore->history($page);\n\n\tgen_headers($history[0][0]);\n\n\n\t$text = '';\n\t$latest_auth = '';\n\t$previous_ver = 0;\n\t$is_latest = 1;\n\n\tfor($i = 0; $i < count($history); $i++)\n\t{\n\t\tif($latest_auth == '')\n\t\t{\n\t\t\t$latest_auth = ($history[$i][3] == '' ? $history[$i][1]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: $history[$i][3]);\n\t\t\t$latest_ver = $history[$i][2];\n\t\t}\n\n\t\tif($previous_ver == 0\n\t\t\t && $latest_auth != ($history[$i][3] == '' ? $history[$i][1]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t : $history[$i][3]))\n\t\t\t{ $previous_ver = $history[$i][2]; }\n\n\t\tif($i < $HistMax || $full)\n\t\t{\n\t\t\t$text = $text . html_history_entry($page, $history[$i][2],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $history[$i][0], $history[$i][1],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $history[$i][3],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $previous_ver == $history[$i][2] || !$full && $i == count($history)-1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $is_latest, $history[$i][4]);\n\t\t}\n\n\t\t$is_latest = 0;\n\t}\n\n\tif($i >= $HistMax && !$full)\n\t\t{ $text = $text . html_fullhistory($page, count($history)); }\n\n\t$p1 = $pagestore->page($page);\n\t$p1->version = $previous_ver;\n\t$p2 = $pagestore->page($page);\n\t$p2->version = $latest_ver;\n\n\t$diff = diff_compute($p1->read(), $p2->read());\n\ttemplate_history(array('page' => $p2->as_array(),\n\t\t\t\t\t\t\t\t\t\t\t\t 'history' => $text,\n\t\t\t\t\t\t\t\t\t\t\t\t 'diff' => diff_parse($diff)));\n}", "public function viewHistory() {\n $historyRows = $this->db->query(\"SELECT * FROM history\");\n if (!$historyRows) die(\"Fatal Error.\");\n\n // Looping through all rows in the histoy table.\n $history = [];\n foreach($historyRows as $historyRow) {\n $regNr = htmlspecialchars($historyRow[\"regNr\"]);\n $ssNr = htmlspecialchars($historyRow[\"ssNr\"]);\n $checkOut = htmlspecialchars($historyRow[\"checkOutTime\"]);\n $checkIn = htmlspecialchars($historyRow[\"checkInTime\"]);\n $days = htmlspecialchars($historyRow[\"days\"]);\n $cost = htmlspecialchars($historyRow[\"cost\"]);\n\n // Setting 0 as default value on days and cost if car not checked in yet.\n if (!$checkIn) {\n $checkIn = \"Checked Out\";\n $days = 0;\n $cost = 0;\n }\n \n $histor = [\"regNr\" => $regNr,\n \"ssNr\" => $ssNr, \n \"checkOut\" => $checkOut,\n \"checkIn\" => $checkIn, \n \"days\" => $days,\n \"cost\" => $cost,\n \"days\" => $days];\n \n $history[] = $histor;\n }\n return $history;\n }", "public function get_history()\n\t{\n return array(\n 'result' => array(\n 'error' => array(\n 'code' => '404',\n 'message' => 'Not Found'\n )\n )\n );\n\t}", "public function actionIndex()\n {\n//\n $req = Yii::$app->request;\n $sort = $req->get('sort');\n $query = Order::find();\n $countQuery = clone $query;\n $pages = new Pagination(['totalCount' => $countQuery->count()]);\n $orders = $query\n ->offset($pages->offset)\n ->orderBy($sort)\n ->limit($pages->limit)\n ->all();\n\n $this->data = [\n 'pages' => $pages,\n 'orders' => $orders,\n ];\n return $this->xrender();\n }", "public static function showList() {\n $template = file_get_contents(plugin_dir_path(__FILE__) . 'templates/login_history.html');\n\n $results = self::queryLoginHistories('desc', 25);\n $histories = '';\n foreach ($results as $history) {\n $histories .= '<tr><td>' . $history->logged_in_at. '</td><td>' . $history->user_login . '</td><td>' . $history->remote_ip . '</td><td>' . $history->user_agent . '</td></tr>';\n }\n\n $output = str_replace('%%page_title%%', get_admin_page_title(), $template);\n $output = str_replace('%%login_histories%%', $histories, $output);\n $output = str_replace('%%Recent%%', __('Recent', 'simple-login-history'), $output);\n $output = str_replace('%%record%%', __('record', 'simple-login-history'), $output);\n $output = str_replace('%%csv_download_link%%', plugin_dir_url(__FILE__) . 'download.php', $output);\n echo $output;\n }", "static function ordersHistory($orders){\n\t\tglobal $jinput, $configClass,$lang_suffix;\n\t\t$db = JFactory::getDbo();\n\t\tif(count($orders) > 0){\n\t\t\tforeach($orders as $order){\n\t\t\t\t$query = \"Select a.pro_name$lang_suffix as pro_name,a.id as pid from #__osrs_properties as a\"\n\t\t\t\t\t\t.\" inner join #__osrs_order_details as b on b.pid = a.id\"\n\t\t\t\t\t\t.\" where b.order_id = '$order->id'\";\n\t\t\t\t$db->setQuery($query);\n\t\t\t\t$properties = $db->loadObjectList();\n\t\t\t\t$property_str = \"\";\n\t\t\t\tfor($j=0;$j<count($properties);$j++){\n\t\t\t\t\t$property =$properties[$j];\n\t\t\t\t\t$property_str .= $property->pro_name.\"<div class='clearfix'></div>\";\n\t\t\t\t}\n\t\t\t\t$order->property = $property_str;\n\t\t\t}\n\t\t\tHTML_OspropertyPayment::listOrdersHistory($orders);\n\t\t}else{\n\t\t\t?>\n\t\t\t<div class=\"row-fluid\">\n\t\t\t\t<div class=\"span12\">\n\t\t\t\t\t<h4>\n\t\t\t\t\t\t<?php echo JText::_('OS_NO_ORDERS_HISTORY_FOUND');?>\n\t\t\t\t\t</h4>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}", "public function index()\n {\n return JournalEntry::currentReport()->orderByDesc('created_at')->get();\n }", "public function getHistory()\r\r\n {\r\r\n return $this->history;\r\r\n }", "function get_history()\n\t{\n\t $this->load->library('pagination');\n\n $config['base_url'] = '/software/index';\n $config['total_rows'] = $this->db->where('company_id', $this->session->userdata('company_id'))->get('software_history')->num_rows();\n $config['per_page'] = 8;\n $config['num_links'] = 9;\n\n $config['full_tag_open'] = '<ul class=\"pagination\">';\n $config['full_tag_close'] = '</ul>';\n\n $config['first_link'] = '&laquo; first';\n $config['first_tag_open'] = '<li class=\"prev page\">';\n $config['first_tag_close'] = '</li>';\n\n $config['last_link'] = 'last &raquo;';\n $config['last_tag_open'] = '<li class=\"next page\">';\n $config['last_tag_close'] = '</li>';\n\n $config['next_link'] = 'next &rarr;';\n $config['next_tag_open'] = '<li class=\"next page\">';\n $config['next_tag_close'] = '</li>';\n\n $config['prev_link'] = '&larr; previous';\n $config['prev_tag_open'] = '<li class=\"prev page\">';\n $config['prev_tag_close'] = '</li>';\n\n $config['cur_tag_open'] = '<li class=\"active\"><a href=\"\">';\n $config['cur_tag_close'] = '</a></li>';\n\n $config['num_tag_open'] = '<li class=\"page\">';\n $config['num_tag_close'] = '</li>';\n\n $this->pagination->initialize($config);\n\n //load and setup table library\n $this->load->library('table');\n\n $this->table->set_heading('Action','Ticket Number', 'Software Name', 'License', 'Computer Serial', 'Agent', 'Date', '');\n\n\t\t//get table information\n\t\t$this->db->order_by(\"date_created\", \"desc\");\n\t\t$this->db->select(\"action_type, ticket_num, name, license, computer_ser, added_by, date_created, sw_code\");\n\t\t$this->db->where('company_id =', $this->session->userdata('company_id'));\n\t\t$rows = $this->db->get('software_history', $config['per_page'], $this->uri->segment(3))->result_array();\n\n foreach ($rows as $count => $row)\n {\n\n if ($rows[$count]['computer_ser'] != '')\n {\n $rows[$count]['computer_ser'] = anchor('itemprofile/index/c/'.$row['computer_ser'],$row['computer_ser']);\n }\n\n if ($rows[$count]['license'] != '')\n {\n $rows[$count]['license'] = anchor('itemprofile/index/s/'.$row['sw_code'],$row['license']);\n }\n\n if ($rows[$count]['added_by'] != NULL)\n {\n $rows[$count]['added_by'] = substr($row['added_by'], 0, strpos($row['added_by'], \"@\"));\n }\n\n $rows[$count]['sw_code'] = \"\";\n }\n\n\t\treturn $rows;\n\t}", "public function tweets_history(){\n\t\t$histories = History::select(array('keyword','count'))->orderBy('id', 'DESC')->get();\n\t\techo json_encode($histories);\n\t}", "public function history()\n\t{\n\t\t$migration = new \\Hubzero\\Content\\Migration();\n\t\t$history = $migration->history();\n\t\t$items = [];\n\t\t$maxFile = 0;\n\t\t$maxUser = 0;\n\t\t$maxScope = 0;\n\n\n\t\tif ($history && count($history) > 0)\n\t\t{\n\t\t\t$items[] = [\n\t\t\t\t'File',\n\t\t\t\t'By',\n\t\t\t\t'Direction',\n\t\t\t\t'Date'\n\t\t\t];\n\n\t\t\tforeach ($history as $entry)\n\t\t\t{\n\t\t\t\t$items[] = [\n\t\t\t\t\t$entry->scope . DS . $entry->file,\n\t\t\t\t\t$entry->action_by,\n\t\t\t\t\t$entry->direction,\n\t\t\t\t\t$entry->date\n\t\t\t\t];\n\t\t\t}\n\n\t\t\t$this->output->addTable($items, true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->addLine('No history to display.');\n\t\t}\n\t}", "public function index() {\n if (!in_array('viewWorkorder', $this->permission)) {\n redirect('dashboard', 'refresh');\n }\n\n $this->render_template('workorder/index', $this->data);\n }", "public function show(Histories $histories)\n {\n //\n }", "function simple_history_management_page() {\n\n\tglobal $simple_history;\n\n\tsimple_history_purge_db();\n\n\t?>\n\n\t<div class=\"wrap simple-history-wrap\">\n\t\t<h2><?php echo __(\"History\", 'simple-history') ?></h2>\n\t\t<?php\t\n\t\tsimple_history_print_nav(array(\"from_page=1\"));\n\t\techo simple_history_print_history(array(\"items\" => $simple_history->get_pager_size(), \"from_page\" => \"1\"));\n\t\techo simple_history_get_pagination();\n\t\t?>\n\t</div>\n\n\t<?php\n\n}", "public function history()\n\t{\n $orders = $this->history->get_history();\n foreach($orders as $order)\n {\n if($order->added_by=='customer')\n {\n $agency_id = $this->Common->get_details('agency_orders',array('order_id'=>$order->order_id))->row()->agency_id;\n $agency_check = $this->Common->get_details('agencies',array('agency_id'=>$agency_id));\n if($agency_check->num_rows()>0)\n {\n $order->agency = $agency_check->row()->agency_name;\n }\n else\n {\n $order->agency = '';\n }\n }\n }\n $data['orders'] = $orders;\n\t\t$this->load->view('admin/bill/history',$data);\n\t}", "public static function getAllHistory()\n\t{\n\t\tglobal $mysql;\n\t\t$output = array();\n\t\t\n\t\t$result = $mysql->query(\"SELECT * FROM `history`\");\n\t\twhile ( $d = mysqli_fetch_array($result) )\n\t\t{\n\t\t\tif ( !empty($d) )\n\t\t\t\t$output[] = $d;\n\t\t}\n\t\treturn $output;\n\t}", "public function indexAction()\r\n {\r\n return ['entries' => $this->getEntryService()->getLasts()];\r\n }", "public function index()\n {\n $items = HistoryAlumni::all();\n\n return view('pages.history.index')->with([\n 'items' => $items \n ]);\n }", "function searchHistoryScreen($request) {\n\n DEFINE(\"RESULTS_ON_PAGE\", \"5\");\n \n $pageNumber = $request->form->get(\"pageNumber\", \"int\", 1);\n \n if( $pageNumber < 1 ) $pageNumber = 1;\n\n $searchHistory = new SearchLogList($request->config->mysqlConnection);\n $searchHistory->setOrder(\"search_date\");\n $searchHistory->setDirection(\"desc\");\n \n $pageCount = ceil($searchHistory->getCount()/RESULTS_ON_PAGE);\n \n $offset = (($pageNumber-1)*RESULTS_ON_PAGE);\n \n $searchHistory->setLimit($offset.\", \".RESULTS_ON_PAGE);\n \n $searchHistory->load();\n \n Leolos\\Status\\Status::OK();\n require_once \"templ/search_history.html\";\n return ;\n}", "public function index()\n {\n // browse of comment\n $recent_all = Project_updates::all();\n return view('Admin.recents.browse',compact('recent_all'));\n \n }", "public function index($filename = '') {\n $repo = Repo::getById($this->repoId);\n $start = App::request()->getParams('start');\n $end = $start + self::MAX_LIST_ITEMS;\n $maxCommits = $repo->run('rev-list --count ' . $this->revision . ' -- ' . $filename);\n\n $cmd = 'log --pretty=\"format:%H\"';\n\n if($start) {\n $cmd .= ' --skip=' . $start;\n }\n\n $cmd .= ' --max-count=' . self::MAX_LIST_ITEMS . ' ' . $this->revision . ' -- ' . $filename;\n\n $hashes = array_map('trim', explode(PHP_EOL, $repo->run($cmd)));\n\n $commits = array_map(function($hash) use($repo) {\n $commit = $repo->getCommitInformation($hash);\n\n $commit->time = date('H:i', $commit->date);\n $commit->avatar = $commit->user ? $commit->user->getProfileData('avatar') : null;\n\n return $commit;\n }, $hashes);\n\n $byDayCommits = array();\n\n foreach($commits as $commit) {\n $formattedDate = date(Lang::get('main.date-format'), $commit->date);\n\n if(empty($byDayCommits[$formattedDate])) {\n $byDayCommits[$formattedDate] = array();\n }\n\n $byDayCommits[$formattedDate][] = $commit;\n }\n\n if(!$start) {\n $this->addJavaScript($this->getPlugin()->getJsUrl('commits.js'));\n\n $breadcrumb = array();\n\n if($filename) {\n $breadcrumb = CodeController::getInstance(array(\n 'repoId' => $this->repoId,\n 'path' => $filename,\n 'type' => $this->type,\n 'revision' => $this->revision\n ))->getBreadcrumb();\n }\n\n $content = View::make($this->getPlugin()->getView('commits/list.tpl'), array(\n 'repo' => $repo,\n 'allCommits' => $byDayCommits,\n 'maxCommits' => $maxCommits,\n 'end' => $end,\n 'filename' => $filename,\n 'breadcrumb' => $breadcrumb\n ));\n\n return RepoController::getInstance(array(\n 'repoId' => $this->repoId\n ))\n ->display(\n $filename ? 'code' : 'commits',\n $content,\n $filename ?\n Lang::get($this->_plugin . '.repo-history-title', array(\n 'repo' => $repo->name,\n 'path' => $filename\n )) :\n Lang::get($this->_plugin . '.repo-commits-title', array(\n 'repo' => $repo->name\n ))\n );\n }\n\n return View::make($this->getPlugin()->getView('commits/list-items.tpl'), array(\n 'repo' => $repo,\n 'allCommits' => $byDayCommits,\n 'maxCommits' => $maxCommits,\n 'end' => $end\n ));\n }", "function lists()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\t#If the user is logged in or attempting to access the full job report, check their access\n\t\tif($this->native_session->get('__user_id') || !empty($data['action']))\n\t\t{\n\t\t\t$instructions['action'] = array('view'=>'view_relevant_jobs', 'report'=>'view_job_applications','apply'=>'apply_for_job','saved'=>'view_my_saved_jobs','status'=>'view_job_application_status');\n\t\t\tcheck_access($this, get_access_code($data, $instructions));\n\t\t}\n\t\t#Fetch the saved job ids if this is the viewed list\n\t\tif(!empty($data['action']) && $data['action'] == 'view') $data['saved_jobs'] = $this->_job->get_saved_jobs();\n\t\t\n\t\tif(empty($data['action'])) $data['action'] = 'view';\n\t\t$data['list'] = $this->_job->get_list(array('action'=>$data['action']));\n\t\t\n\t\tif(!empty($data['action']) && $data['action'] == 'apply') $data['msg'] = \"Search the jobs below to select which one to apply for.\";\n\t\t\n\t\t$viewToLoad = $this->native_session->get('__user_id')? 'job/list_jobs': 'home';\n\t\t$this->load->view($viewToLoad, $data); \n\t}", "public function getHistory()\n {\n return $this->history;\n }", "function get_history() {\n\t\treturn $this->history;\n\t}", "public function allWorkOrder()\n\t{\n\t\t// $data['workOrder']=$this->MainModel->selectAllworkOrder();\n\t\t// $data['worksOrders'] = $this->MainModel->selectAll('work_order', 'client_id');\n\t\t$data['worksOrders'] = $this->MainModel->selectAllworkOrder();\n\t\t$this->load->view('layout/header');\n\t\t$this->load->view('layout/sidebar');\n\t\t$this->load->view('pages/all-workorder', $data);\n\t\t$this->load->view('layout/footer');\n\t}", "public function index()\n {\n \n return view('admin.order_logs.index', ['order_logs'=> Order_log::latest()->paginate(20)]);\n \n }", "public function listAction()\r\n {\r\n $pid = $this->_getParam('projectid');\r\n $where = array();\r\n if ($pid) {\r\n $where['projectid='] = $pid;\r\n }\r\n $cid = $this->_getParam('clientid');\r\n if ($cid) {\r\n $where['clientid='] = $cid;\r\n }\r\n \r\n $this->view->timesheets = $this->projectService->getTimesheets($where);\r\n \r\n $this->renderView('timesheet/list.php');\r\n }", "public function actionCron_jobs_list()\n {\n $this->setData(array(\n 'pageMetaTitle' => $this->data->pageMetaTitle . ' | '. Yii::t('cronjobs', 'View cron jobs list'),\n 'pageHeading' => Yii::t('cronjobs', 'View cron jobs list'),\n 'pageBreadcrumbs' => array(\n Yii::t('cronjobs', 'Cron jobs list'),\n )\n ));\n \n $this->render('cron-jobs-list');\n }", "public function index()\n {\n $elementPropertyHistories = $this->elementPropertyHistoryRepository->paginate(10);\n\n return view('elementPropertyHistories.index')\n ->with('elementPropertyHistories', $elementPropertyHistories);\n }", "public function actionIndex()\n {\n $searchModel = new ReportTrackingHistorySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n if(isset($params['ReportTrackingHistorySearch'])){\n $searchModel->start_periode = $params['ReportTrackingHistorySearch']['start_periode'];\n $searchModel->tujuan = $params['ReportTrackingHistorySearch']['tujuan'];\n $searchModel->mitra = $params['ReportTrackingHistorySearch']['mitra'];\n $searchModel->host = $params['ReportTrackingHistorySearch']['host'];\n $searchModel->stop_periode = $params['ReportTrackingHistorySearch']['stop_periode'];\n }\n\n Yii::$app->session->set('session_tracking',$params);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function cmn_history()\r\n\t{\r\n $content = $this->input->get(\"content\") ? trim($this->input->get(\"content\", TRUE)) : \"\";\r\n $start = $this->input->get(\"start\") ? trim($this->input->get(\"start\", TRUE)) : \"\";\r\n $end = $this->input->get(\"end\") ? trim($this->input->get(\"end\", TRUE)) : \"\";\r\n $date_arr = \"\";\r\n if (! empty($start) || ! empty($end))\r\n {\r\n $this->load->helper(\"common\");\r\n $date_arr = make_date_start_before_end($start, $end);\r\n }\r\n\r\n\t\t$limit = $this->_get_limit();\r\n\t\t$history = $this->model->get_cmn_history($limit, $content, $date_arr);\r\n\r\n\t\tif ( empty($history))\r\n\t\t\t$this->meret(NULL, MERET_EMPTY);\r\n\t\telse\r\n\t\t\t$this->meret($history);\r\n\t}", "public function getHistory()\n {\n return $this->_history;\n }", "function listOrderStatus() {\n\t\tglobal $HTML;\n\t\tglobal $page;\n\n\t\t$_ = '';\n\n\t\t// only show orders if user has access\n\t\tif($page->validatePath(\"/janitor/admin/shop/order/list\")) {\n\n\t\t\tinclude_once(\"classes/shop/supershop.class.php\");\n\t\t\t$model = new SuperShop();\n\n\t\t\t$_ .= '<div class=\"orders\">';\n\t\t\t$_ .= '<h2>Order status</h2>';\n\n\n\t\t\tif($model->order_statuses) {\n\t\t\t\t$_ .= '<ul class=\"orders\">';\n\t\t\t\tforeach($model->order_statuses as $order_status => $order_status_name) {\n\t\t\t\t\t$_ .= '<li class=\"'.superNormalize($order_status_name).'\">';\n\t\t\t\t\t$_ .= '<h3>';\n\t\t\t\t\t$_ .= '<a href=\"/janitor/admin/shop/order/list/\"'.$order_status.'\">'.$order_status_name.'</a> ';\n\t\t\t\t\t$_ .= '<span class=\"count\">'.$model->getOrderCount(array(\"status\" => $order_status)).'</span>';\n\t\t\t\t\t$_ .= '<h3>';\n\n\t\t\t\t\t$_ .= '</li>';\n\t\t\t\t}\n\t\t\t\t$_ .= '</ul>';\n\t\t\t}\n\n\t\t\t$_ .= '</div>';\n\t\t}\n\n\t\treturn $_;\n\t}", "public function actionList()\n {\n $searchModel = new WeekStatsRepository();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render([\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getHistory()\n {\n return view('PagePersonal.history');\n }", "public function index()\n\t{\n\t\t$profile = $this->rest->get('user', null, 'json');\n\t\tif ($this->rest->status() == '404') redirect ('admin');\n\n\t\t$logs = new stdClass();\n\t\t$logs = $this->rest->get('tops', \n\t\t\tarray(\n\t\t\t\t'sort'\t\t => 'admin_keys_history.user_id',\n\t\t\t\t'order'\t\t => 'asc',\n\t\t\t\t'limit'\t\t => 5,\n\t\t\t\t), 'json');\t\n\n\t\t$logs->thumbnail_url \t\t= $profile->thumbnail_url;\n\t\t$logs->first_name \t\t\t= $profile->first_name;\n\t\t$logs->last_name \t\t\t= $profile->last_name;\n\t\t$logs->principal_id \t\t= $profile->principal_id;\n\n\t\tadd_js('libs/backbone.relational.js');\n\t\tadd_js('libs/backbone-paginator.min.js');\n\n\t\tadd_js('modules/log/list/model.js');\n\t\tadd_js('modules/log/list/directory_view.js');\n\t\tadd_js('modules/log/list/options_view.js');\n\t\tadd_js('modules/log/list/paginated_view.js');\n\t\tadd_js('modules/log/list/paginated_collection.js');\n\t\tadd_js('modules/log/list/router.js');\n\t\t\n\t\t$this->layout->view('log/list', $logs);\n\t}", "public function index()\n {\n $history = UserDeviceHistory::latest()->paginate(5);\n\n return view('history.index', compact('history'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $livrs = $em->getRepository('ShopBundle:Livr')->editHistoryAdQB();\n $livrs = $em->getRepository('ShopBundle:Livr')->findAll();\n\n return $this->render('@Shop/Livr/index.html.twig', array(\n 'livrs' => $livrs,\n ));\n }", "function getRecentChanges()\r\n\t{\r\n\t\tinclude_once(\"./Modules/Wiki/classes/class.ilWikiPage.php\");\r\n\t\t$changes = ilWikiPage::getRecentChanges(\"wpg\", $this->wiki_id);\r\n\t\t$this->setDefaultOrderField(\"date\");\r\n\t\t$this->setDefaultOrderDirection(\"desc\");\r\n\t\t$this->setData($changes);\r\n\t}", "public function actionIndex()\n {\n // $searchModel = new BookmakerSearch();\n // $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n // return $this->render('index', [\n // 'searchModel' => $searchModel,\n // 'dataProvider' => $dataProvider,\n // ]);\n $model = (new Query)->select('*')->from('bk_desc')->all();\n return $this->render('index', ['model' => $model, 'work' => file_get_contents(Yii::getAlias('@app').'/bk.work')]);\n }", "public function index()\n {\n $changes = ChangeLog::with('user', 'loggable')->orderBy('created_at', 'desc');\n\n if (request()->has('filters')) {\n $filters = collect(request('filters'))->reject(function($v) { return !strlen($v); });\n\n if ($filters->has('model')) {\n $changes = $changes->where('model', $filters->get('model'));\n }\n\n if ($filters->has('created')) {\n $changes = $changes->where('created', $filters->get('created'));\n }\n\n if ($filters->has('start_at')) {\n $changes = $changes->whereDate('created_at', '>=', date($filters->get('start_at')));\n }\n\n if ($filters->has('end_at')) {\n $changes = $changes->whereDate('created_at', '<=', date($filters->get('end_at')));\n }\n }\n\n return $this->response->view('historiae::changes.index', [\n 'changes' => $changes->paginate(15),\n 'models' => ChangeLog::distinct('model')->get(['model'])->flatMap(function($change) {\n return [$change->getOriginal('model') => $change->model];\n })\n ]);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $machineOrders = $em->getRepository('BioprogrammeProductionBundle:MachineOrder')->findAll();\n\n return $this->render('BioprogrammeProductionBundle:machineorder:index.html.twig', array(\n 'machineOrders' => $machineOrders,\n ));\n }", "function getHistory() {\n\t\treturn db_query_params ('SELECT * FROM artifact_history_user_vw WHERE artifact_id=$1 ORDER BY entrydate DESC, id ASC',\n\t\t\t\t\tarray ($this->getID())) ;\n\t}", "function listar_historial(){\n\t\tif (isset($_POST['buscar']))\n\t\t\t$_SESSION['buscar']=$_POST['buscar'];\n\t\t\n\t\t$sql=\"SELECT * FROM historial ORDER BY id_his\";\n\t\t\n\t\t$consulta=mysql_query($sql);\n\t\twhile ($resultado = mysql_fetch_array($consulta)){\n\t\t\t$this->mensaje=\"si\";\n\t\t\t$this->listado[] = $resultado;\n\t\t}\n\t}", "public function actionIndex()\n {\n\n $searchModel = new SearchForestWork();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n // Для пользователей не из ЦА выводим только отчеты их филиала\n $branchID = Yii::$app->user->identity->branch_id;\n if($branchID != 0) $dataProvider->query->andWhere(\"forest_work.branch_id = $branchID\");\n\n \n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionHistory()\n {\n /*$auditdata = AuditTrailSearch::find()\n ->select(['entry_id', 'model_id', 'user_id', 'created', 'old_value'])\n ->where([\n 'action' => 'DELETE',\n 'model' => 'backend\\models\\Event',\n ])\n ->andFilterWhere(['>', 'old_value', \"''\"])\n ->orderBy(['model_id' => SORT_DESC])\n ->all();*/\n// $historyData = \\yii\\helpers\\ArrayHelper::map($auditdata, 'model_id', 'old_value');\n// \\yii\\helpers\\VarDumper::dump($historyData);\n\n $searchModel = new AuditTrailSearch;\n $searchFilter = [\n 'AuditTrailSearch' => [\n 'action' => 'DELETE',\n 'model' => 'backend\\models\\Event'\n ]\n ];\n $dataProvider = $searchModel->search(\\yii\\helpers\\ArrayHelper::merge(Yii::$app->request->get(), $searchFilter));\n //var_dump(Yii::$app->request->get());\n //\\yii\\helpers\\VarDumper::dump($searchModel);\n $message = \"<ol>恢复操作指引<li><删除内容>中输入内容筛选</li><li>点击复选框选中需要恢复的记录</li><li>点击<恢复记录>按钮</li></ol>\";\n Yii::$app->session->setFlash('info', $message);\n return $this->render('history', [\n 'dataProvider' => $dataProvider,\n 'searchModel' => $searchModel,\n ]);\n }", "public function index()\n {\n $orders = Order::where('status',0)->get();\n return view('Backend.order_list',compact('orders'));\n }", "public function index() {\n\t if(!$page = $this->param(\"page\")) $page=1;\n\t Session::set(\"list_refer\", $_SERVER['REQUEST_URI']);\n\t \n\t\t/** \n\t\t*\tremove temporary files \n\t\t*\t- now using the date_created field to make sure that only files older than an hour created by the logged in user will be deleted. \n\t\t*\tThis is should avoid any accidental deletion of temp records that are still being worked on.\n\t\t**/\n\t if($status_col){\n \t\t$clear_tmp_model = clone $this->model;\n \t\t$time = date(\"Y-m-d H:i:s\", mktime( date(\"H\")-1, 0, 0, date(\"m\"), date(\"d\"), date(\"Y\") ) );\n \t\tif($this->auth_col) $clear_tmp_model->filter(array(\"$this->auth_col\"=>$this->current_user->id));\n \t\tif($this->status_col) $clear_tmp_model->filter(array(\"$this->status_col\"=>3));\n \t\t$clear_tmp_model->filter(\"`\".$this->created_on_col.\"` < '$time'\");\n\t\t\tforeach($clear_tmp_model->all() as $tmp_content) $tmp_content->delete();\n\t\t}\n\t\t/**\n\t\t* work out the items to display - hide those temp files\n\t\t**/\n\t\t$this->display_action_name = 'List Items';\n\t\t$this->all_rows = $this->model->filter(array(\"status\"=>array(0,1)))->order($this->default_order.\" \".$this->default_direction)->page($page, $this->list_limit);\n\t\t$this->filter_block_partial .= $this->render_partial(\"filter_block\");\n\t\t$this->list = $this->render_partial(\"list\");\n\t}", "public function actionIndex()\n {\n $searchModel = new OrderInfoSearch;\n $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());\n\n $dataProvider->pagination=[\n 'pageSize' => 15,\n ];\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n 'searchModel' => $searchModel,\n ]);\n }", "public function index()\n {\n $orders = Order::orderBy('created_at', 'desc')->paginate(20);\n\n\n return view('vendor.voyager.order.browse', ['orders' => $orders]);\n\n }", "public function actionIndex()\n {\n $searchModel = new BranchSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new CarriageSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->pagination->pageSize = 50;\n $statusList = CarriageStatus::getAllStatus();\n $storageList = Warehouse::getWarehouseList();\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'statusList' => $statusList,\n 'storageList' => $storageList\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new OrderSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n //$dataProvider->sort = ['defaultOrder' => ['created_at' => SORT_DESC]];\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new JoborderSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "function geneshop_my_orders_page($account) {\n drupal_set_title(t(\"@name's Order History\", array('@name' => format_username($account))), PASS_THROUGH);\n $build = array();\n $query = db_select('node', 'n')->extend('PagerDefault');\n $nids = $query->fields('n', array('nid', 'sticky', 'created'))->condition('type', geneshop_ORDER_NODETYPE)->condition('uid', $account->uid)->condition('status', 1)->orderBy('created', 'DESC')->limit(variable_get('default_nodes_main', 10))->addTag('node_access')->execute()->fetchCol();\n if (!empty($nids)) {\n $nodes = node_load_multiple($nids);\n $build += node_view_multiple($nodes);\n $build['pager'] = array(\n '#theme' => 'pager',\n '#weight' => 5,\n );\n }\n else {\n drupal_set_message(t('You have no orders for this account.'));\n }\n return $build;\n}", "public function getHistory(): array\n {\n return $this->history;\n }", "public function getHistory(): array\n {\n return $this->history;\n }", "#[Pure]\n public function getHistory() {}", "public function index()\n {\n //we keep completed and refunded orders for 3 days in tracking section\n //so added below conditions\n // ->whereRaw('((status = ' . ORDER_COMPLETED .') OR (status = ' . ORDER_REFUNDED . '))')\n // ->where('updated_at', '<=', $time)\n \n //$time = date('Y-m-d, H:i:s', strtotime('-3 days'));\n $time = date('Y-m-d, H:i:s', strtotime('-3 minutes'));\n $orders = Order::where('customer_id', $this->current_customer->id)\n ->whereRaw('((status = ' . ORDER_COMPLETED .') OR (status = ' . ORDER_REFUNDED . '))')\n ->where('updated_at', '<=', $time)\n ->orderBy('created_at', 'desc')\n ->paginate(5);\n \n return $this->view('customer.orderList', compact('orders')); \n }", "public function clienthistoryAction()\n {\n // If no client ID was provided, bail out.\n if (!$this->_hasParam('id')) {\n throw new UnexpectedValueException('No client ID parameter provided');\n }\n\n $clientId = $this->_getParam('id');\n\n // Pass current and past client and household history.\n $service = new App_Service_Member();\n\n $this->view->pageTitle = 'View Household History';\n $this->view->client = $service->getClientById($clientId);\n $this->view->householders = $service->getHouseholdersByClientId($clientId);\n $this->view->history = $service->getClientHouseholdHistory($clientId);\n }", "public function listing();", "public function index()\n\t{\n\t\tif(!$this->session->userdata('access_token')){\n\n\t\t\treturn redirect(base_url('auth/login'));\n\t\t}\n\n\t\t$data['page'] = 'TH';\n\t\t$client_no = $this->session->userdata('client_no');\n\t\t$this->load->model('currency_model');\n\t\t$this->load->model('accounts_model');\n\t\t$data['accounts'] = $this->accounts_model->get_client_accounts($client_no);\n\t\t$data['currencies'] = $this->currency_model->get_all();\n\t\t$this->load->model('transactions_model');\n\t\t$data['title'] = 'Transaction History';\n\t\t$data['transactions'] = $this->transactions_model->get_all();\n\t\t// return $data['transactions'] = $this->transactions_model->get_all();\n\t\t$this->render('transactions/history',$data);\n\t}", "public function actionIndex()\n {\n\t\t$q = Work::find()\n\t\t\t->select(['diff_days' => 'datediff(updated_at,created_at)', 'tot_count' => 'count(id)'])\n\t\t\t->groupBy('diff_days')\n\t\t\t->orderBy('diff_days')\n\t\t\t->asArray()->all();\n\n return $this->render('index3',[\n\t\t\t'dataProvider' => new ArrayDataProvider([\n\t\t\t\t'allModels' => $q\n\t\t\t]),\n\t\t\t'title' => Yii::t('store', 'Durées des travaux')\n\t\t]);\n }", "public function index()\n {\n $orders = Order::whereState('status', Open::class)\n ->orderBy('created_at')->get()->makeHidden([\n 'meta',\n 'status',\n 'updated_at',\n 'deleted_at',\n 'fulfilled_at',\n ]);\n\n return response([\n 'items' => $orders->toArray(),\n 'count' => $orders->count(),\n ]);\n }", "public function showHistory()\n {\n return view('customer.purchase-history', ['cart_items' => Cart::where('user_id', auth()->user()->id)->where('checkout_id', '!=', null)->simplePaginate(10)]);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $historiques = $em->getRepository('HistoriqueBundle:Historique')->findAll();\n\n return $this->render('HistoriqueBundle:historique:index.html.twig', array(\n 'historiques' => $historiques,\n ));\n }", "public function getResearchHistory()\n {\n return view('research.research_history', [\n 'logs' => Auth::user()->getResearchLogs(0),\n 'trees' => Tree::orderBy('sort', 'DESC')->get(),\n ]);\n }", "public function getHistory() {\n\n if ($this->history) {\n return $this->history;\n }\n\n if (file_exists(static::FILE_HISTORY)) {\n\n $history = file_get_contents(static::FILE_HISTORY);\n\n if (file_exists($history)) {\n return $history;\n }\n }\n }", "public function indexAction() {\n\t\t$sDate = $this->getInput('sdate');\n\t\t$eDate = $this->getInput('edate');\n\t\t$mobile = $this->getInput('mobile');\n\t\t$receive_name = $this->getInput('receive_name');\n\t\t$order_id = $this->getInput('order_id');\n\t\t$channel_id = $this->getInput('channel_id');\n\t\t$status = $this->getInput('status');\n\t\t\n\t\t$page = intval($this->getInput('page'));\n\t\t$param = $this->getInput(array('mobile', 'receive_name', 'order_id','channel_id', 'status', 'sdate','edate'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tif ($param['mobile'] != '') $search['mobile'] = $param['mobile'];\n\t\tif ($param['receive_name'] != '') $search['receive_name'] = $param['receive_name'];\n\t\tif ($param['order_id'] != '') $search['order_id'] = $param['order_id'];\n\t\tif ($param['channel_id'] != '') $search['channel_id'] = $param['channel_id'];\n\t\tif ($param['status']) $search['status'] = $param['status'];\n\t\tif ($param['sdate'] != '') $search['sdate'] = strtotime($param['sdate']);\n\t\tif ($param['edate'] != '') $search['edate'] = strtotime($param['edate']);\n\t\tlist($total, $listordershow) = Gc_Service_OrderShow::getList($page, $perpage, $search);\n\t\t\n\t\t//状态\n\t\t$this->assign('ordershow_status', $this->ordershow_status);\n\t\t\n\t\t//渠道\n\t\tlist(,$ordershow_channel) = Gc_Service_OrderChannel::getAllOrderChannel();\n\t\t$ordershow_channel = Common::resetKey($ordershow_channel, 'id');\n\t\t\n\t\t$this->assign('ordershow_channel', $ordershow_channel);\n\n\t\t$this->assign('param', $param);\n\t\t$url = $this->actions['listUrl'] .'/?'. http_build_query($param) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\t\t\n\t\t$this->assign('sdate', $sDate);\n\t\t$this->assign('edate', $eDate);\n\t\t$this->assign('listordershow', $listordershow);\n\t}", "public function index()\n {\n $data = $this->repository->getAllOrderedByDate();\n return $data;\n }", "public function lists()\n\t{\n\t\t$this->OnlyAdmin();\n\t\t$info = $this->TicketModel->getList('desc');\n\t\t$this->loadView('views/ticket', array('info'=> $info), true);\n\t}", "public function list()\n {\n $orders= Order::orderBy('status')->orderBy('orderdate')->orderBy('id','desc')->paginate(20);\n return view('admin.orders.index',compact('orders'));\n }", "public function index()\n {\n $orders = Order::all();\n \n return view('orderList')->with('orders', $orders);\n }", "public function actionIndex()\n {\n $tags = Tag::findHotTags(8);\n $keyword = SearchHistory::findSearchHistory(5);\n return $this->render('index',['tags' => $tags,'keyword' => $keyword]);\n }", "public function action_chat_history() {\n\t\t$this->_template->set('page_title', 'All Messages');\n\t\t$this->_template->set('page_info', 'view and manage chat messages');\n\t\t$messages = ORM::factory('Message')->get_grouped_messages($this->_current_user->id);\n\t\t$this->_template->set('messages', $messages);\n\t\t$this->_set_content('messages');\n\t}" ]
[ "0.6847907", "0.676982", "0.6766585", "0.67549145", "0.6753486", "0.6400598", "0.632236", "0.6304589", "0.6229612", "0.6200605", "0.6188957", "0.6185267", "0.61846", "0.6176091", "0.61641043", "0.6146382", "0.6133392", "0.6102097", "0.6096873", "0.6071777", "0.6049144", "0.60350066", "0.6030224", "0.6015305", "0.59964764", "0.598711", "0.5985474", "0.5964786", "0.59059453", "0.58545446", "0.5850517", "0.58473086", "0.584438", "0.58443177", "0.5814993", "0.58123887", "0.57819253", "0.5781604", "0.57757527", "0.57735413", "0.5763854", "0.5761499", "0.5758791", "0.57552713", "0.57496387", "0.5743298", "0.5740642", "0.57312477", "0.57300055", "0.5729418", "0.5723586", "0.57175344", "0.57174194", "0.5716554", "0.5709153", "0.57071155", "0.5692305", "0.56831837", "0.5682261", "0.5680225", "0.56780297", "0.56704587", "0.566255", "0.56550163", "0.56487155", "0.56282085", "0.5626979", "0.5623111", "0.56062037", "0.55978906", "0.5587116", "0.55857056", "0.55853987", "0.5578412", "0.55724406", "0.55701834", "0.55574363", "0.5549443", "0.55493706", "0.5543441", "0.5542872", "0.5542872", "0.55424494", "0.553893", "0.5537624", "0.5533442", "0.5531442", "0.55236006", "0.55224866", "0.55218136", "0.5519149", "0.55167735", "0.5504129", "0.5503989", "0.5495322", "0.54920965", "0.5485851", "0.54823995", "0.5475064", "0.5474488" ]
0.6467477
5
Store a newly created WorkorderHistory in storage. POST /workorderHistories
public function store(CreateWorkorderHistoryAPIRequest $request) { $input = $request->all(); $workorderHistories = $this->workorderHistoryRepository->create($input); return $this->sendResponse($workorderHistories->toArray(), 'Workorder History saved successfully'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(StoreUpdateHistoria $request)\n {\n $data = $request->all();\n $this->historias->create($data);\n return redirect()->route('historia-index')->with('mensagem', 'História inserida com Sucesso!');\n }", "public function store(CreateElementPropertyHistoryRequest $request)\n {\n $input = $request->all();\n\n $elementPropertyHistory = $this->elementPropertyHistoryRepository->create($input);\n\n Flash::success('ElementPropertyHistory saved successfully.');\n\n return redirect(route('elementPropertyHistories.index'));\n }", "public function store()\n\t{\n\t\t$validator = Validator::make($data = Input::all(), Historymonth::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\tHistorymonth::create($data);\n\n\t\treturn Redirect::route('historymonths.index');\n\t}", "public function store(order_logsStoreRequest $request)\n {\n \n \n \n $save_success = Order_log::create($request->all());\n \n if($save_success){\n \n $log = \\App\\Order_log::find($save_success->id);\n \n \\App\\Notification::create([\n 'name' => 'Note to your order:'.$log->log_detail,\n 'link' => 'order-summary/'.$log->order_id ,\n 'notification_to' => $log->user_id\n ]);\n \n return [\n \n 'name' => $log->name,\n 'detail' => $log->log_detail,\n 'created_by' => auth()->user()->name,\n 'created_at' => date('M-d-Y')\n \n ];\n \n } else{\n \n return 2;\n \n }\n \n }", "public function store(CreateSalaryBenefitHistoryRequest $request)\n {\n $input = $request->all();\n\n $salaryBenefitHistory = $this->getRepositoryObj()->create($input);\n if ($salaryBenefitHistory instanceof Exception) {\n return redirect()->back()->withInput()->withErrors(['error', $salaryBenefitHistory->getMessage()]);\n }\n\n Flash::success(__('messages.saved', ['model' => __('models/salaryBenefitHistories.singular')]));\n\n return redirect(route('hr.salaryBenefitHistories.index'));\n }", "public function store(StoreRequest $request)\n {\n $this->validarPermisos($this->modelHistorial->getTable(), 1);\n $this->modelHistorial->accion = $request->get('accion');\n // se debe traer de forma automática el usuario actual\n $this->modelHistorial->id_usuario = Authorizer::getResourceOwnerId();\n $this->modelHistorial->id_usuario_m = $request->get('idUsuarioM');\n $this->modelHistorial->id_modulo = $request->get('idModulo');\n $this->modelHistorial->save();\n\n $response = response()->json(['data'=>$this->modelHistorial]);\n # Creacion en modelo log\n $this->CreateRegisterLog($response);\n\n return $response;\n }", "public function store(CreateLogStockRequest $request)\n {\n $input = $request->all();\n\n $logStock = $this->logStockRepository->create($input);\n\n Flash::success('Log Stock saved successfully.');\n\n return redirect(route('logStocks.index'));\n }", "public function store(Request $request)\n {\n $request->validate([\n 'device_id' => 'required|exists:devices,id',\n 'user_id' => 'required|exists:users,id',\n 'created_at' => 'required|date',\n 'updated_at' => 'required|date',\n 'millage_old' => 'required|integer|gte:0',\n 'millage_new' => 'required|integer|gte:millage_old',\n 'note' => 'sometimes|string|max:255'\n ]);\n\n $history = UserDeviceHistory::create([\n 'device_id' => $request->device_id,\n 'user_id' => $request->user_id,\n 'created_at' => Carbon::parse($request->created_at),\n 'updated_at' => Carbon::parse($request->updated_at),\n 'millage_old' => $request->millage_old,\n 'millage_new' => $request->millage_new,\n ]);\n\n Note::create([\n 'text' => $request->note,\n 'history_id' => $history->id\n ]);\n\n return redirect()->route('histories.index')\n ->with('success', 'History created successfully.');\n }", "public function store(Request $request): JsonResponse\n {\n $this->getOrCreateUser($request->input('user_id'));\n\n $req = $request->all();\n\n $workOrder = WorkOrder::create($req);\n\n return $this->success($workOrder);\n }", "public function saveToHistory($path) {\n\n return file_put_contents(static::FILE_HISTORY, $path);\n }", "public function store(Request $request)\n {\n DB::table('history_log')->insert(\n array('user'=>Auth::user()->name,'history_type'=>'stored','path'=>url()->current())\n );\n $request->validate([\n 'report_name' => 'required|string|min:1|max:200',\n ]);\n\n $project_id = $request->project_id;\n $project = ErpProject::find($project_id);\n\n $reporting = new ErpProjectReporting();\n $reporting->project_id = $project_id;\n $reporting->project_phase = $project->project_phase;\n $reporting->report_name = $request->report_name;\n $reporting->no_of_copies = $request->no_of_copies;\n if($request->submitted_on != null){\n $reporting->submitted_on = date('Y-m-d', strtotime($request->submitted_on));\n }\n if($request->due_date != null){\n $reporting->due_date = date('Y-m-d', strtotime($request->due_date));\n }\n $reporting->description = $request->description;\n\n if ($request->amendment == null) {\n $reporting->amendment = 0;\n } else {\n\n $reporting->amendment = $request->amendment;\n }\n $result = $reporting->save();\n\n if($result){\n return redirect('/project/'.$project_id )->with('message-success', 'New Reporting has been assigned.');\n } else {\n return redirect('/project/'.$project_id )->with('message-danger', 'Something went wrong. Please try again.');\n }\n }", "public function store(HistoryAlumnisRequest $request)\n {\n $data = $request->all();\n\n HistoryAlumni::create($data);\n\n return redirect()->route('history.index');\n\n }", "public function store()\r\n\t{\r\n\t\t$jsonData = $this->getAll();\r\n\r\n\t $data = array(\r\n\t\t\t'username'=> $this->user->username,\r\n\t\t\t'post'=> $this->post,\r\n\t\t\t'date'=> $this->date,\r\n\t );\r\n\r\n\t\tarray_unshift($jsonData, $data);\r\n\r\n\t\t$this->save($jsonData);\r\n\t}", "function addHistory($artifact, $history){\n\t\tforeach($history as $h){\n\t\t\t$time = strtotime($h['date']);\n\t\t\t$uid = user_get_object_by_name($h['by'])->getID();\n\t\t\t$importData = array('time' => $time, 'user' => $uid);\n\t//hack!!\n\t\t\t$old = $h['old'];\n\t//\t\tif($h['field']=='assigned_to'){\n\t//\t\t\tif($old!='none'){\n\t//\t\t\t\t$old = user_get_object_by_name($old)->getID();\n\t//\t\t\t} else {\n\t//\t\t\t\t$old = 100;\n\t//\t\t\t}\n\t//\t\t}\n\t//\t\tif($h['field']=='status_id'){\n\t//\t\t\t$status = array('Open' =>1, 'Closed' => 2, 'Deleted' => 3);\n\t//\t\t\t$old = $status[$old];\n\t//\t\t}\n\t//\t\tif($h['field']=='close_date'){\n\t//\t\t\t$old = strtotime($old);\n\t//\t\t}\n\t//end hack\n\t\t\t$artifact->addHistory($h['field'],$old, $importData);\n\t\t}\n\t}", "public function store(StockProcessRequest $request)\n {\n $formInput = $request->validated();\n $formInput['user_id'] = auth()->id();\n $formDataAddUserId = $formInput;\n Stocks::create($formDataAddUserId);\n return redirect()->route('stocks.index');\n }", "public function storeOrder(Request $request){\n\n $shopping = $request->session()->get('shopping');\n $userId = Auth::user()->id;\n $customer = Customer::where('user_id','=',$userId)->firstOrFail();\n\n foreach($shopping as $id => $quantity) {\n\n $product = Product::findOrFail($id);\n\n history::create([\n \"product_id\"=>$id,\n \"price\"=> $product->price,\n \"quantity\"=> $quantity,\n \"customer_id\" => $customer->id,//recup id dans customer\n \"command_at\" => Carbon::now(),\n ]);\n }\n\n Session()->forget('shopping');\n Session()->forget('nbrProduct');\n return redirect ('order')->with([\n 'messageOrderValid'=>trans('app.orderValidSuccess'),\n 'alert' =>'success'\n ]);\n }", "protected function createHistoryRecord() {\n\t\t/** @var HasHistory $model */\n\t\t$model = $this->model;\n\n\t\t$history = HistoryModel::create();\n\t\t$history->save();\n\n\t\t$model->setHistoryId($history->getId());\n\n\t\treturn $history;\n\t}", "public function store(Request $request)\n {\n $workOrder = new WorkOrder();\n\n\n $workOrder->proposition()->associate($proposition);\n\n $workOrder->signatures()->associate();\n\n if (count($request->input('users'))) {\n\t\t\t$assignee = Employee::find( $request->input( 'users' )[0]['id'] );\n\t\t}\n\t\telse {\n\t\t\t$assignee = Auth::user();\n\t\t}\n\t\t$workOrder->assignee()->associate($assignee);\n\n $workOrder->title = $request->input('title');\n\n $workOrder->edition = $request->input('edition');\n\n $workOrder->assigner()->associate(Auth::user());\n\n $workOrder->type = $request->input('type');\n\n $workOrder->status = 'new';\n\n if ($request->input('deadline')) {\n\t\t\t$deadline = Carbon::createFromFormat( '!d. m. Y.', $request->input( 'deadline' ) );\n\t\t\t$workOrder->deadline = $deadline->toDateTimeString();\n\t\t}\n\t\telse {\n\t\t\t$workOrder->deadline = null;\n\t\t}\n\n\t\t$workOrder->priority = $request->input('priority')?$request->input('priority'):'low';\n\n $workOrder->note = $request->input('note');\n\n $workOrder->save();\n\n $final = collect($request->input('files.final'))->mapWithKeys(function($el) {\n\t\t\treturn [$el['id'] => ['is_final' => true]];\n\t\t});\n\t\t$initial = collect($request->input('files.initial'))->mapWithKeys(function($el) {\n\t\t\treturn [$el['id'] => ['is_final' => false]];\n\t\t});\n\t\t$initial = $initial->all();\n\t\t$final = $final->all();\n\t\t$workOrder->documents()->sync($initial + $final);\n\n return response()->json($workOrder);\n }", "public function store(Request $request)\n {\n $historial = new Historial();\n\n $historial->id_producto = $request->get('id_producto');\n $historial->id_empleado = $request->get('id_empleado');\n $historial->unidadesRetiradas = $request->get('unidadesRetiradas');\n $historial->save();\n\n $reporte = Reportes::where('id_producto','=',$historial->id_producto)->orderBy('created_at','desc')->first();\n\n $reporte->stockTeorico -= $historial->unidadesRetiradas;\n\n $reporte->update();\n return redirect('/historial');\n }", "public function store(CreateHistoryClinicAPIRequest $request)\n {\n $input = $request->all();\n\n $historyClinics = $this->historyClinicRepository->create($input);\n\n return $this->sendResponse($historyClinics->toArray(), 'History Clinic saved successfully');\n }", "public function store(WorkCreateRequest $request)\n {\n $this->work->srvStore($request->all());\n\n return redirect()->route('works.index');\n }", "public function storeOrder($request);", "public function historiesCreate(Request $request)\n {\n $user = Auth::user();\n\n $emotion = $request->input('emotion_id');\n\n $h = $user->histories()->create([\n 'description' => $request->input('description'),\n 'history_date' => $request->input('history_date'),\n 'city_id' => $request->input('city'),\n 'emotion_id' => $emotion,\n 'active' => true\n ]);\n\n $histories_to_connect = \\App\\History::whereHas('emotion', function ($query) use($emotion, $user) {\n return $query->where('id', '=', $emotion)->where('user_id', '!=', $user->id);\n })->inRandomOrder()->limit(3)->get();\n\n $h->histories()->saveMany($histories_to_connect);\n\n $histories_to_connect->each(function ($item, $key) use($h) {\n $item->histories()->save($h);\n $item->refresh();\n $item->load('histories');\n });\n\n $h->refresh();\n\n $h->load('histories');\n\n return $h;\n }", "public function store(StoreOrderRequest $request)\n {\n //Input received from the request\n $input = $request->except(['_token']);\n //Create the model using repository create method\n $this->repository->create($input);\n //return with successfull message\n return redirect()->route('admin.orders.index')->withFlashSuccess(trans('alerts.backend.orders.created'));\n }", "public function write(History $history)\n\t\t{\n\t\t\t$dialled_party = $history->getDialledParty();\n\t\t\t$username = $history->getUsername();\t\t\t\n\t\t\t\n\t\t\t$result = pg_query_params(\n\t\t\t\t\t$this->connection,\n\t\t\t\t\t'INSERT INTO history (dialled_party, date_from, date_to, username) values ($1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, $2)',\n\t\t\t\t\tarray($dialled_party, $username));\n\n\t\t\tif(!$result)\n\t\t\t{\n\t\t\t\techo 'Error: object not saved';\n\t\t\t\treturn null;\n\t\t\t}\t\n\t\t\t\t\t\n\t\t\tpg_free_result($result);\n\t\t\treturn $result;\n\t\t\n\t\t}", "public function store(CreateAccountHeadPostRequest $request)\n {\n $response = $this->accountHeadService->store($request->all());\n\n return redirect()->route('chart-of-account')->with('message', $response->getContent());\n }", "private function saveHistory()\n {\n ksort($this->migrations);\n foreach ($this->migrations as $k => $migration) {\n if ($migration['id'] === 0) {\n // new\n $prep = $this->db->prepare(\"INSERT INTO `{$this->table}` (`created_at`,`name`,`author`,`status`) \"\n . \"VALUES (:time, :name, :author, :status)\");\n $prep->execute([\n ':time' => $migration['time'],\n ':name' => $migration['name'],\n ':author' => $migration['author'],\n ':status' => $migration['status'],\n ]);\n // get inserted id\n $sth = $this->db->query('SELECT LAST_INSERT_ID()');\n $newId = $sth->fetchColumn();\n $this->migrations[$k]['id'] = $newId;\n } else if ($migration['id'] === -100) {\n // delete\n $prep = $this->db->prepare(\"DELETE FROM `{$this->table}` WHERE `id` = :id\");\n $prep->execute([':id' => $migration['id']]);\n } else {\n // update\n $prep = $this->db->prepare(\"UPDATE `{$this->table}` SET `status` = :status WHERE `id` = :id\");\n $prep->execute([':id' => $migration['id'], ':status' => $migration['status']]);\n }\n }\n }", "public function store(ReportRequest $request, $workOrderId)\n {\n if ($this->processor->store($request, $workOrderId)) {\n flash()->success('Success!', 'Successfully created work order report.');\n\n return redirect()->route('maintenance.work-orders.show', [$workOrderId]);\n } else {\n flash()->error('Error!', 'There was an issue creating a work order report. Please try again');\n\n return redirect()->route('maintenance.work-orders.report.create', [$workOrderId]);\n }\n }", "public function store(Steps $steps) {\n $temperature = mt_rand(37*10, 38*10) / 10;\n $steps->step(\"entry.entry-form\", 2)\n ->store([\"temperature\" => $temperature])\n ->complete();\n\n $data = $steps->all();\n $data[\"checkin_date\"] = $data[\"checkin_date\"]->setTimezone('UTC');\n\n DB::beginTransaction();\n try {\n $entry = new Entry();\n $entry->fill($data);\n $entry->save();\n\n DB::commit();\n return redirect()->route(\"entry.entry-form.3.index\");\n } catch (Exception $e) {\n DB::rollback();\n dd($e->getMessage());\n }\n }", "public function store(Request $request)\n {\n DB::table('history_log')->insert(\n array('user'=>Auth::user()->name,'history_type'=>'stored','path'=>url()->current())\n );\n $request->validate([\n 'project_code' => 'required',\n 'project_phase' => 'required',\n 'contract_type' => 'required',\n 'epc_lead' => 'required_if:project_type,1',\n 'project_name' => 'required|string|min:3|max:150',\n 'project_full_name' => 'required',\n 'procuring_entity' => 'min:0|max:250',\n 'procuring_entity_district' => 'min:0|max:100',\n 'procurement_entity_code' => 'min:0|max:200',\n 'eoi_reference' => 'min:0|max:100',\n 'eoi_selection' => 'min:0|max:250',\n 'procurement_method' => 'min:0|max:250',\n 'programme_code' => 'min:0|max:100',\n 'programme_name' => 'min:0|max:150',\n 'contact_person' => 'required|min:0|max:100',\n 'designation' => 'min:0|max:100',\n 'contact_person_phone' => 'min:0|max:100',\n 'contact_person_email' => 'min:0|max:100',\n 'execution_authority' => 'min:0|max:250',\n 'project_source' => 'min:0|max:150',\n 'project_status' => 'required',\n 'eoi_publication_date' => 'required',\n 'client_id' => 'required',\n ]);\n// 'eoi_due_date' => 'after:eoi_publication_date',\n\n $project = new ErpProject();\n $project->project_code = $request->get('project_code');\n $project->project_phase = $request->get('project_phase');\n $project->contract_type = $request->get('contract_type');\n $project->project_component = $request->get('project_component');\n if ($request->project_type){\n $type = implode(\",\", $request->get('project_type'));\n $project->project_type = $type;\n }\n if ($project->contract_type == 1) {\n $project->epc_share_percentage = $request->get('epc_share_percentage');\n $project->epc_lead = $request->get('epc_lead');\n }\n $project->project_full_name = $request->get('project_full_name');\n $project->project_name = $request->get('project_name');\n $project->procuring_entity = $request->get('procuring_entity');\n $project->procurement_entity_code = $request->get('procurement_entity_code');\n $project->procuring_entity_district = $request->get('procuring_entity_district');\n $project->procurement_method = $request->get('procurement_method');\n $project->eoi_selection = $request->get('eoi_selection');\n $project->eoi_reference = $request->get('eoi_reference');\n $project->development_partners = $request->get('development_partners');\n $project->programme_code = $request->get('programme_code');\n $project->programme_name = $request->get('programme_name');\n $project->project_director = $request->get('project_director');\n $project->project_lead = $request->get('project_lead');\n $project->client_id = $request->get('client_id');\n $project->project_status = $request->get('project_status');\n $project->project_source = $request->get('project_source');\n $project->contact_person = $request->get('contact_person');\n $project->designation = $request->get('designation');\n $project->contact_person_phone = $request->get('contact_person_phone');\n $project->contact_person_email = $request->get('contact_person_email');\n $project->contact_person_address = $request->get('contact_person_address');\n $project->funded_by = $request->get('funded_by');\n $project->execution_authority = $request->get('execution_authority');\n $project->study_time = $request->get('study_time');\n $project->description = $request->get('description');\n $project->description_2 = $request->get('description_2');\n $project->association = $request->get('association');\n $project->created_by = Auth::user()->id;\n $project->save();\n\n// //CREATE PROJECT DIRECTOR IN PROJECT_EMPLOYEE\n// if ($project->project_director != NULL){\n// $director = User::find($project->project_director);\n//\n// $employee = new ErpProjectEmployee();\n// $employee->project_id = $project->id;\n// $employee->user_id = $director->id;\n// $employee->employee_id = $director->employee_id;\n// $employee->title = \"Project Director\";\n// $employee->created_by = Auth::user()->id;\n// $employee->save();\n// }\n//\n// //CREATE PROJECT SUPERVISOR IN PROJECT_EMPLOYEE\n// if ($project->project_lead != NULL) {\n// $lead = User::find($project->project_lead);\n//\n// $employee = new ErpProjectEmployee();\n// $employee->project_id = $project->id;\n// $employee->user_id = $lead->id;\n// $employee->employee_id = $lead->employee_id;\n// $employee->title = \"Project Supervisor\";\n// $employee->created_by = Auth::user()->id;\n// $employee->save();\n// }\n\n // CREATE PROJECT DETAILS\n $new_project = ErpProject::latest()->first();\n\n $phase = new ErpProjectPhaseDetail;\n $phase->project_id = $new_project->id;\n $phase->project_phase = $request->get('project_phase');\n $phase->phase_status = $request->get('project_status');\n if( $request->get('eoi_publication_date') != ''){\n $phase->phase_start_date = date('Y-m-d', strtotime($request->get('eoi_publication_date')));\n }\n if( $request->get('eoi_due_date') != ''){\n $phase->phase_end_date = date('Y-m-d', strtotime($request->get('eoi_due_date')));\n }\n if( $request->get('eoi_due_time') != ''){\n $phase->phase_end_time = date('H:i', strtotime($request->eoi_due_time));\n }\n $phase->meeting_place = $request->get('meeting_place');\n $phase->created_by = Auth::user()->id;\n $phase->save();\n\n// CREATE PROJECT INCOME ACCOUNTS\n $income = ErpChartOfAccounts::select('coa_reference_no')->where('coa_reference_no','LIKE',\"150505%\")->latest()->first();\n if($income){\n $coa_income_last=$income->coa_reference_no+1;\n }else{\n $coa_income_last= 15050501;\n }\n $coa_income = new ErpChartOfAccounts();\n $coa_income->coa_reference_no = $coa_income_last;\n $coa_income->coa_header_id = 150505;\n $coa_income->coa_name = $request->project_name.' Income';\n $coa_income->project_id = $new_project->id;\n $coa_income->account_type = 'credit';\n $coa_income->save();\n\n// CREATE PROJECT EXPENSE ACCOUNTS\n $expense = ErpChartOfAccounts::select('coa_reference_no')->where('coa_reference_no','LIKE',\"150603%\")->latest()->first();\n if($expense){\n $coa_expense_last=$expense->coa_reference_no+1;\n }else{\n $coa_expense_last= 15060301;\n }\n $coa_expense = new ErpChartOfAccounts();\n $coa_expense->coa_reference_no = $coa_expense_last;\n $coa_expense->coa_header_id = 150603;\n $coa_expense->coa_name = $request->project_name. ' Expenses';\n $coa_expense->project_id = $new_project->id;\n $coa_expense->account_type = 'debit';\n $coa_expense->child = 1;\n $coa_expense->save();\n\n //Create Miscellaneous Expense Account\n $coa_expense_mis = new ErpChartOfAccounts();\n $coa_expense_mis->coa_reference_no = ($coa_expense_last - 15000000) * 100 + 1;\n $coa_expense_mis->coa_parent = $coa_expense->coa_reference_no;\n $coa_expense_mis->coa_name = $request->project_name. ' Miscellaneous Expenses';\n $coa_expense_mis->project_id = $new_project->id;\n $coa_expense_mis->account_type = 'debit';\n $coa_expense_mis->save();\n\n return redirect('/project')->with('message-success', 'Project has been added');\n }", "public function store()\n {\n $timeData = Input::only('worked_hours', 'date', 'notes');\n\n $result = $this->timesRepository->create($timeData);\n\n if ($result instanceof Illuminate\\Validation\\Validator) {\n return $this->notValidResponse($result->messages());\n }\n\n return $this->response($result);\n }", "public function store(RecentRequest $request)\n {\n Project_updates::addRecent($request);\n return redirect('recent');\n\n }", "public function store($order)\n\t{\n $part = Request::json('part');\n \n if(!isset($part)){\n return Error::show(1);\n }\n \n $insert = $this->standingOrders->insertItem($part, $order);\n if(isset($insert)){\n return Response::json(array(\n 'message' => $insert\n ));\n }\n else{\n return Error::show(1);\n }\n\t}", "public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required|max:255',\n 'key' => 'required|max:25',\n ]);\n\n $item = Item::add($request->all());\n History::add([\n 'item_id' => $item->id,\n 'text' => History::setText($item),\n ]);\n\n return redirect()->route('index');\n }", "public function store(Request $request){\n $data = $request->all();\n $data['ip'] = $request->ip();\n Battle_history::create($data);\n }", "public function store(OrderRequest $request)\n\t{\n $order = new Order($request->all());\n $order->tracking_id = mt_rand(100, 999999);\n $order->save();\n\n $this->attachProducts($order, $request);\n\n return redirect()->route('orders.index');\n\t}", "static function addHistory( $order_id, $action, $msg, $details = array(), $success = true ) {\n\t\tglobal $wpdb;\n\n\t\t$table = $wpdb->prefix . self::TABLENAME;\n\n\t\t// build history record\n\t\t$record = new stdClass();\n\t\t$record->action = $action;\n\t\t$record->msg = $msg;\n\t\t$record->details = $details;\n\t\t$record->success = $success;\n\t\t$record->time = time();\n\n\t\t// load history\n\t\t$history = $wpdb->get_var( \"\n\t\t\tSELECT history\n\t\t\tFROM $table\n\t\t\tWHERE order_id = '$order_id'\n\t\t\" );\n\n\t\t// init with empty array\n\t\t$history = maybe_unserialize( $history );\n\t\tif ( ! $history ) $history = array();\n\n\t\t// prevent fatal error if $history is not an array\n\t\tif ( ! is_array( $history ) ) {\n\t\t\tWPLA()->logger->error( \"invalid history value in OrdersImporter::addHistory(): \".$history);\n\n\t\t\t// build history record\n\t\t\t$rec = new stdClass();\n\t\t\t$rec->action = 'reset_history';\n\t\t\t$rec->msg = 'Corrupted history data was cleared';\n\t\t\t$rec->details = array();\n\t\t\t$rec->success = 'ERROR';\n\t\t\t$rec->time = time();\n\n\t\t\t$history = array();\n\t\t\t$history[] = $record;\n\t\t}\n\n\t\t// add record\n\t\t$history[] = $record;\n\n\t\t// update history\n\t\t$history = serialize( $history );\n\t\t$wpdb->query( \"\n\t\t\tUPDATE $table\n\t\t\tSET history = '$history'\n\t\t\tWHERE order_id = '$order_id'\n\t\t\" );\n\n\t}", "public function store()\n\t{\n\t\t$validator = Validator::make($data = Input::all(), Order::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\tOrder::create($data);\n\n\t\treturn Redirect::route('admin.orders.index');\n\t}", "public function store(ProductBacklogRequest $request)\n {\n $productBacklog = ProductBacklog::create($request->all());\n\n return redirect()->route('product_backlogs.show', ['slug' => $productBacklog->slug])\n ->with('success', trans('gitscrum.congratulations-the-product-backlog-has-been-created-with-successfully'));\n }", "public function created(History $history)\n {\n //\n }", "public function store(Request $request, Order $order)\n {\n $request->validate([\n 'recepie_menu_id' => 'required',\n 'qty' => 'required', \n 'status_id' => 'required',\n 'amount' => 'required' \n ]); \n\n $ticket = new Ticket($request->all());\n $ticket->store($order);\n $ticket = $order->tickets()->find($ticket->id);\n\n return response()->json([\n 'data' => $ticket\n ], 201);\n }", "public function store(StoreTaskStatusesRequest $request)\n {\n $task_status = TaskStatus::create($request->all());\n\n\n\n return redirect()->route('admin.task_statuses.index');\n }", "public function work(Request $request)\n {\n $this->authorize('isEmployee_Update');\n $work_history = $request->data;\n $id = $request->id;\n Work_History::where(\"employee_id\", $id)->delete();\n //Create Work Histories\n foreach ($work_history as $data) {\n $Work_History = new Work_History();\n $Work_History->employer = $data['employer'];\n $Work_History->started_date = $data['started_date'];\n $Work_History->ended_date = $data['ended_date'];\n $Work_History->year_employed = $data['year_employed'];\n $Work_History->employee_id = $id;\n $Work_History->save();\n }\n return response()->json(['message' => 'success'], 200);\n }", "public function store(Request $request) {\n\t\t$workDateArr = explode(' ',$request->input('work_date'));\n\t\t$work_date = date('Y-m-d', strtotime($workDateArr[1].' '.$workDateArr[2].' '.$workDateArr[3]));\n\t\t\n\t\t$service = new JobsList;\n $service->address_2 = $request->input('address_2');\n $service->address_1 = $request->input('address_1');\n $service->city = $request->input('city');\n $service->state = $request->input('state');\n\t\t$service->zip = $request->input('zip');\n\t\t$service->billto = $request->input('billto');\n\t\t$service->orders = $request->input('orders');\n\t\t$service->service_id = $request->input('service_id');\n\t\t$service->technician_id = $request->input('technician_id');\n\t\t$service->service_description = $request->input('service_description');\n\t\t$service->detail = $request->input('detail');\n\t\t$service->work_date = $work_date;\n\t\t$service->time_range = $request->input('time_range');\n\t\t$service->order_time = $request->input('order_time');\n\t\t$service->order_instruction = $request->input('order_instruction');\n\t\t$service->service_instructions = $request->input('service_instructions');\n $service->save();\n\t\techo json_encode($service);\n //return 'Service record successfully created with id ' . $service->id;\n }", "public function store(Request $request)\n {\n\t$this->validate($request, [\n 'winner' => 'required|min:1|max:20|alpha_num',\n 'length' => 'required|min:1|max:300|numeric',\n ]);\n\n\t$game_history=new Game_History;\n\t$game_history->game_id = $request->game_id;\n\t$game_history->winner = $request->winner;\n\t$game_history->length = $request->length;\n\t$game_history->user_id=$request->user()->id;\n\t$game_history->save();\n\t\n\tSession::flash('flash_message', 'Game session '.$game_history->id.' was saved.');\n\treturn redirect('/game_histories');\n\t}", "public function store(WorkRequest $request)\n {\n $data = $request->all();\n $data['slug'] = Str::slug($request->title).'-'.Str::slug($request->short_description);\n Work::create($data);\n\n return redirect()->route('work.index');\n }", "public function store(StoreTrackRequest $request)\n {\n $new_track = new Track($request->input());\n $new_track->save();\n return redirect()->back()->withSuccess('Трек был успешно добавлен');\n }", "function addToHistory() {\n if ($this->getRequestMethod() != \"POST\") {\n $this->response('', 406);\n }\n $data = json_decode(file_get_contents(\"php://input\"),true);\n $userId = $data[\"user_id\"];\n $videoId = $data[\"video_id\"];\n $auth = $this->getAuthorization();\n if (!$this->validateAuthorization($userId, $auth)) {\n $this->response('', 400);\n }\n \n $query = \"insert into history (user_id, video_id) values($userId, $videoId);\";\n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n $success = array('status' => \"Success\", \"msg\" => \"Added to History.\", \"data\" => $data);\n $this->response(json_encode($success),200);\n }", "public function store()\n {\n $input = Input::all();\n $validation = Validator::make($input, Obslog::$rules);\n\n if ($validation->passes())\n {\n $input['user_id'] = Auth::user()->id;\n unset($input['hour']);\n unset($input['minute']);\n $this->obslog->create($input);\n return Redirect::route('obslogs.index');\n }\n\n return Redirect::route('obslogs.create')\n ->withInput()\n ->withErrors($validation)\n ->with('message', 'There were validation errors.');\n }", "public function createAction()\n {\n $entity = new RankingHistory();\n $request = $this->getRequest();\n $form = $this->createForm(new RankingHistoryType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('rankinghistory_show', array('id' => $entity->getId())));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function storeDetail(OrderDetailRequest $request, $_hash)\n {\n return $this->buildApiResponse([\n 'order' => new OrderResource($this->orderRepository->storeDetail($request->get('product'), $_hash))\n ]);\n }", "public function store(StoreOrder $request)\n {\n $params = $request->all();\n $order = $this->orderService->create($params);\n\n return json_encode($order);\n }", "public function store(WorkboardFormRequest $request)\n {\n DB::beginTransaction();\n $workboard = Workboard::create(['name' => $request->workboard_name]);\n $this->storeUserWorkboardAccess($workboard);\n DB::commit();\n\n return redirect('/')->with('success', 'Cadastrado com sucesso!');\n }", "public function store(WorkCreateRequest $request)\n {\n $work = Work::create($request->workFillData());\n\n return redirect()\n ->route('admin.works.index')\n ->withSuccess('New Work Successfully Created.');\n }", "public function store(Request $request)\n {\n // Get Redis instance\n $redis = Redis::connection();\n\n // Create order parameters\n $order = array(\n 'portfolio_id' => $request->user()->portfolio->id,\n 'price' => $request->input('price'),\n 'volume' => $request->input('volume'),\n 'visible_volume' => $request->input('volume'),\n 'side' => $request->input('side'),\n 'expires_at' => date(\"Y-m-d H:i:s\"),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'instrument_id' => $request->input('instrument_id'),\n 'status' => '0',\n 'queue_position' => 0,\n 'type' => $request->input('type')\n );\n\n $order = Order::create($order);\n if($order) {\n\n // Put order id last in instrument order queue list\n // Order:{instrument_id}:{side}\n $redis->zIncrBy('orders:' . $order->instrument_id . ':' . $order->side, $order->price, $order->id);\n\n // Store the order as hash\n $redis->hMset('order:' . $order->id, $order->toArray());\n\n // Send an event to redis -> socket\n event(new OrderCreated($order));\n }\n return response(null, 200);\n }", "public function storeJournal(array $data): TransactionJournal;", "public function store(HealthStatisticRequest $request)\n {\n //save statistics\n app(\"HealthOrgStatistic\")->saveStatistic($request, auth()->guard('business')->id());\n \n return redirect(route('business.healthorg.statistics'));\n }", "public function actionCreate()\n {\n $model = new ReportTrackingHistory();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->tbs_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function store( WorkFileRequest $request )\n\t{\n\t\t$data = WorkFile::create( $request->all() );\n\t\treturn response()->success( $this->getMessageFront( 'STORE' ), $data, route('client_works.edit', $data->work_id ) );\n\t}", "public function store(Request $request)\n {\n if (!Gate::allows('add-ratehistory')) {\n return abort(401);\n }\n\n $this->validate($request, [\n 'user_id' => 'required',\n 'currency_id' => 'required',\n 'sale_rate' => 'required',\n 'purchase_rate' => 'required',\n 'date' => 'required'\n ]);\n $requestData = $request->all();\n\n RateHistory::create($requestData);\n\n return redirect('history/rate-history')->with('message', 'RateHistory added!');\n }", "public function store()\n {\n\n try {\n\n $storeRequest = new OrderStatusStoreRequest();\n $validator = Validator::make(request()->all(), $storeRequest->rules());\n\n if ($validator->fails()) {\n\n return $this->sendBadRequest('Validation Error.', $validator->errors()->toArray());\n }\n\n $item = $this->orderStatusService->create(request()->all());\n\n return $this->sendResponse($item->toArray());\n\n } catch (Exception $exception) {\n\n return $this->sendError('Server Error.', $exception);\n\n }\n }", "public function store(WorkRequest $request)\n {\n $work = new Work;\n\n $work->title = $request->title;\n $work->employer = $request->employer;\n $work->location = $request->location;\n $work->website = $request->website;\n $work->description = $request->description;\n $work->start = Carbon::parse($request->start);\n if ( $request->end ) {\n $work->end = Carbon::parse($request->end)->addHours(23)->addMinutes(59)->addSeconds(59);\n }\n else {\n $work->end = null;\n }\n\n $user = $request->user();\n\n $user->works()->save($work);\n\n return Response::json(array('saved'=>true, 'entry'=>view('cv/partials/workentry', ['work'=>$work])->render()));\n }", "public function store()\n {\n $this->validateFootballer();\n\n $footballer = new Footballer();\n $this->takingAndSavingInputsToDB($footballer);\n\n return redirect()->route(\"footballers.index\");\n\n }", "public function store()\n\t{\n\t\t$branch = new Branches();\n\t\t$branch->branch_name\t= Input::get('branch_name');\n\t\t$branch->phone\t\t\t= Input::get('phone');\n\t\t$branch->save();\n\n\t\t$branches = Branches::orderBy('branch_name','asc')->paginate();\n\t\treturn Redirect::route('branches.index');\n\n\t}", "function storeOrdering() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t$model = $this->getDefaultModel();\n\n\t\t$json = KRequest::getVar('updates');\n\t\t$updates = json_decode($json, true);\n\n\t\t$ordering = array();\n\t\tforeach ($updates as $recordId=>$position) {\n\t\t\t$ordering[(int)$recordId] = (int)$position;\n\t\t}\n\n\t\t$success = $model->storeOrdering($ordering);\n\n\t\tif ($success) {\n\t\t\t$this->purgeCache();\n\t\t}\n\t\telse {\n\t\t\tKLog::log('Storing record ordering failed. Error messages were '.var_export($model->getErrors(), true), 'error');\n\t\t}\n\n\t\tKenedoPlatform::p()->setDocumentMimeType('application/json');\n\n\t\techo ConfigboxJsonResponse::makeOne()\n\t\t\t->setSuccess($success)\n\t\t\t->toJson();\n\n\t}", "public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required|max:50',\n 'order_by' => 'required'\n ]);\n\n try {\n $project = Project::where('unique_id', $request->project_id)\n ->first();\n\n $milestone = new ProjectMilestone;\n\n $milestone->unique_id = Str::uuid();\n $milestone->project_id = $project->id;\n $milestone->user_id = Auth::user()->id;\n $milestone->name = $request->name;\n $milestone->order_by = $request->order_by;\n\n $milestone->save();\n\n $data = [];\n\n $data['project_id'] = $project->id;\n $data['user_id'] = Auth::user()->id;\n $data['activity'] = 'Created new milestone!';\n $data['link_title'] = $milestone->name;\n $data['link'] = null;\n\n $project_recent_activity = new ProjectRecentActivityController;\n $project_recent_activity->store($data);\n\n $data_client = [];\n\n $data_client['client_id'] = $project->client_id;\n $data_client['user_id'] = Auth::user()->id;\n $data_client['activity'] = 'Created new milestone';\n $data_client['link_title'] = $milestone->name;\n $data_client['link'] = null;\n\n $client_recent_activity = new ClientRecentActivityController;\n $client_recent_activity->store($data_client);\n\n return redirect()->route('projects.show.milestones', $project->unique_id)->with('success', 'Created new milestone! ' . $milestone->name);\n } catch (\\Exception $e) {\n if (env('APP_DEBUG') == true) {\n dd($e);\n }\n\n \\Log::error($e);\n return redirect()->back()->with('failed', 'Something went wrong');\n }\n }", "public function store()\n\t{\n\t\t$validator = Validator::make($data = Input::all(), Batch::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\tBatch::create($data);\n\n\t\treturn Redirect::route('batches.index');\n\t}", "function store(Request $request) {\n try {\n $contactInfo = Storage::disk('local')->exists('worker.json') ? json_decode(Storage::disk('local')->get('worker.json')) : [];\n\n $inputData = $request->only(['Surname','Name','middle_name', 'Date_of_Birth', 'Date_of_employment','Department_head' ]);\n\n $inputData['datetime_submitted'] = date('Y-m-d H:i:s');\n\n// array_push($contactInfo,$inputData);\n\n Storage::disk('local')->append('worker.json', json_encode($inputData,0,2));\n\n return redirect(route('board..index'));\n\n } catch(Exception $e) {\n\n return ['error' => true, 'message' => $e->getMessage()];\n\n }\n }", "public function store() {\n $logData = \"=========================================\\n\";\n $logData .= \"Date Time: \".$this->record_date.\"\\n\";\n $logData .= $this->title.\" (\".$this->type.\") \\n\";\n if(!empty($this->data)) {\n $logData .= var_export($this->data, true).\"\\n\";\n }\n \n file_put_contents($this->file, $logData, FILE_APPEND);\n \n }", "function store2(Request $request) {\n try {\n// $contactInfo = Storage::disk('local')->exists('worker3.json') ? json_decode(Storage::disk('local')->get('worker2.json')) : [];\n\n $inputData = $request->only(['Surname','Name','middle_name', 'Date_of_Birth', 'Date_of_employment', 'Department']);\n\n $inputData['datetime_submitted'] = date('Y-m-d H:i:s');\n\n// array_push($contactInfo,$inputData);\n\n Storage::disk('local')->append('worker2.json', json_encode($inputData,0,2));\n\n return redirect(route('board..index'));\n\n } catch(Exception $e) {\n\n return ['error' => true, 'message' => $e->getMessage()];\n\n }\n }", "public function store()\n {\n $products = Cart::getProducts();\n\n // Create Order\n $order = new Order;\n $order->products_data = serialize($products);\n $order->user_id = auth()->user()->id;\n $order->save();\n\n return redirect('/orders')->with('success', 'Order Created');\n }", "public function created(QueryHistory $history)\n {\n\t\t\tif($history->has_error) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$payload = [\n\t\t\t\t'username' => $history->user->name,\n\t\t\t\t'data' => $history->data,\n\t\t\t\t'time' => $history->created_at->timestamp,\n\t\t\t\t'name' => $history->queryOfRecord->name,\n\t\t\t\t'structure' => $history->query_structure\n\t\t\t];\n\n\t\t\t$history->user->applications->each(function($application) use ($payload, $history) {\n\t\t\t\t\n\t\t\t\t$client = new Client();\n\n\t\t\t\ttry{\n\t\t\t\t\t$client->request('POST', $application->callback_url, [\n\t\t\t\t\t\t'headers' => [\n\t\t\t\t\t\t\t'Content-Type' => 'application/json',\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'json' => $payload\n\t\t\t\t\t]);\n\n\t\t\t\t} catch (\\RuntimeException$e){\n\t\t\t\t\t\\Log::error($e->getMessage(), ['History' => $history->id, 'Application' => $application->name, 'url' => $application->callback_url]);\n\t\t\t\t}\n\t\t\t});\n }", "public function store(HTRequest $request)\n {\n $horario = new HorarioTenis($request->all());\n $horario ->save();\n \n flash::success('se ha registrado una nueva hora');\n return redirect()-> route('tenishorarios.index');\n }", "function store3(Request $request) {\n try {\n $contactInfo = Storage::disk('local')->exists('worker3.json') ? json_decode(Storage::disk('local')->get('worker3.json')) : [];\n\n $inputData = $request->only(['Surname','Name','middle_name', 'Date_of_Birth', 'Date_of_employment','text_area']);\n\n $inputData['datetime_submitted'] = date('Y-m-d H:i:s');\n\n// array_push($contactInfo,$inputData);\n\n Storage::disk('local')->append('worker3.json', json_encode($inputData,0,2));\n\n return redirect(route('board..index'));\n\n } catch(Exception $e) {\n\n return ['error' => true, 'message' => $e->getMessage()];\n\n }\n }", "public function store(Request $request)\n {\n if (!$request->ajax()) return redirect('/');\n $hwb_tracker = new HwbTracker();\n $hwb_tracker->client_id = $request->client_id;\n $hwb_tracker->description = $request->description;\n $hwb_tracker->date_track = $request->date_track;\n $hwb_tracker->sn_value = $request->sn_value;\n $hwb_tracker->pcls_value = $request->pcls_value;\n $hwb_tracker->emp_value = $request->emp_value;\n $hwb_tracker->nps_value = $request->nps_value;\n $hwb_tracker->ips_value = $request->ips_value;\n $hwb_tracker->smk_value = $request->smk_value;\n $hwb_tracker->sh_value = $request->sh_value;\n $hwb_tracker->ph_value = $request->ph_value;\n $hwb_tracker->mh_value = $request->mh_value;\n $hwb_tracker->dau_value = $request->dau_value;\n $hwb_tracker->sn_notes = $request->sn_notes;\n $hwb_tracker->pcls_notes = $request->pcls_notes;\n $hwb_tracker->emp_notes = $request->emp_notes;\n $hwb_tracker->nps_notes = $request->nps_notes;\n $hwb_tracker->ips_notes = $request->ips_notes;\n $hwb_tracker->smk_notes = $request->smk_notes;\n $hwb_tracker->sh_notes = $request->sh_notes;\n $hwb_tracker->ph_notes = $request->ph_notes;\n $hwb_tracker->mh_notes = $request->mh_notes;\n $hwb_tracker->dau_notes = $request->dau_notes;\n \n $hwb_tracker->save();\n return $hwb_tracker;\n }", "public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$this->commentary->commentary = $input['commentary'];\n\t\t$this->commentary->mid = $input['mid'];\n\t\t$this->commentary->time = $input['time'];\n\t\tif($this->commentary->save()){\n\t\t\t\\Session::flash('notice','Successfully added');\n\t\t\treturn redirect()->back();\n\t\t}\n\t}", "public function store()\n {\n $this->storeKeys();\n }", "public function store(): JsonResponse\n {\n $this->authorize('store', PersonPositionLog::class);\n\n $PersonPositionLog = new PersonPositionLog;\n $this->fromRest($PersonPositionLog);\n\n if ($PersonPositionLog->save()) {\n $PersonPositionLog->loadRelationships();\n return $this->success($PersonPositionLog);\n }\n\n return $this->restError($PersonPositionLog);\n }", "public function store(Request $request)\n {\n $user_id = Auth::user()->id;\n Order::create([\n 'order_number' => $request->order_number,\n 'user_id' => $user_id,\n 'created_at' => $request->created_at\n ]);\n return redirect()->back();\n }", "public function saveHistory($service, $code, $dataSet) {\n \n //walk through the array\n foreach($dataSet as $dataItem) {\n \n //save the array item\n $this->saveHistoryItem($service, $code, $dataItem);\n \n }\n \n }", "public function store(StoreTimeEntriesRequest $request)\n {\n if (! Gate::allows('time_entry_create')) {\n return abort(401);\n }\n $time_entry = TimeEntry::create($request->all());\n $time_entry->student()->sync(array_filter((array)$request->input('student')));\n\n\n\n return redirect()->route('admin.time_entries.index');\n }", "function save_order(){\n\tif( ! current_user_can( 'order_posts' ) ){\n\t\twp_send_json_error( 'Oooops, you haven\\'t got the permission to do that' );\n\n\t\treturn;\n\t}\n\t$ordered_ids = $_POST[ 'id_array' ];\n\t$position = 1;\n\tforeach( $ordered_ids as $id ){\n\t\tupdate_post_meta( (int) $id, 'post_order', $position );\n\t\t$position ++;\n\t}\n}", "public function store(CreateMoneyLogRequest $request)\n {\n $input = $request->all();\n\n $moneyLog = $this->moneyLogRepository->create($input);\n\n Flash::success('Money Log saved successfully.');\n\n return redirect(route('moneyLogs.index'));\n }", "public function store(CreateCompanyHrOtherInfoRequest $request)\n {\n $input = $request->all();\n\n $companyHrOtherInfo = $this->companyHrOtherInfoRepository->create($input);\n\n Flash::success('Company Hr Other Info saved successfully.');\n\n return redirect(route('company.companyHrOtherInfos.index'));\n }", "protected function _saveTry()\n {\n $this->_history[] = $this->_number;\n }", "public function store()\n {\n $ev=new EventlogRegister;\n $ev->registro(1,'Intento de guardar en tabla=Indicadores.',$this->req->user()->id);\n $msj=$this->setMod();\n $ev->registro(1,$msj,$this->req->user()->id);\n return response()->json(['msj'=>$msj]);\n }", "public function store(TrackRequest $request)\n {\n TrackModel::create($request->all());\n\n return redirect()\n ->route('track.index')\n ->with('info', 'Track créée');\n }", "public function store(Request $request)\n {\n $this->validate($request,[\n 'amount'=>'required'\n ]);\n $can = $this->insertOrUpdate();\n\n if($can){\n $topUp = TopUp::find($can);\n $topUp->amount += $request->amount;\n $topUp->save();\n }\n else{\n TopUp::create([\n 'amount'=>$request->amount,\n 'user_id'=>auth()->user()->id\n ]);\n\n }\n\n\n topUpHistory::create([\n 'amount'=> $request->amount,\n 'user_id'=> auth()->user()->id,\n 'topUpDate'=> \\Carbon\\Carbon::now(),\n\n ]);\n $message = 'Top Up of R '. $request->amount . ' is successfully made';\n return response()->json($message,200);\n\n }", "public function store(Request $request)\n {\n $save_details = new ParchaseDetails($request->all());\n $save_details->unit_price = str_replace(\",\",\"\", $request->unit_price);\n try {\n $save_details->save();\n\n $purchase = Parchase::find($save_details->parchase_id);\n $purchase->supplier_id = $request->supplier_id;\n $purchase->save();\n\n // update stock\n // $work_shift = WorkShift::all()->last();\n\n // $record_check = ShiftStock::all()->where('stock_id',$save_details->stock_id)->where('workshift_id',$work_shift->id);\n\n // $save_stock = new ShiftStock();\n\n // if ($record_check->count() == 0) {\n // $save_stock->old_stock = $save_details->quantity;\n // $save_stock->save();\n // }else{\n // $last_record = $record_check->last();\n // $last_record->new_stock = ($last_record->new_stock+$save_details->quantity);\n // $last_record->save();\n // }\n\n echo \"Saved successfully\";\n } catch (\\Exception $e) {\n // echo $e->getMessage();\n }\n }", "public function addHistory($date, $history_id) {\n if ( $_SESSION['addHistory'] = true ) {\n $file = fopen( \"loginHistory.txt\", \"a\");\n if($file) {\n $output = ++$history_id . \"~\" . $_POST['username'] . \"~\" . $date . \"\\n\";\n fwrite($file, $output);\n fclose($file); \n } else {\n echo \"Could not save history!\";\n } \n }\n }", "public function store(Request $request)\n {\n $ingredientsupplyorder = new IngredientSupplyOrder;\n $ingredientsupplyorder->supplyorder_id = $request->supplyorder_id;\n $ingredientsupplyorder->ingredient_id = $request->Ingredient;\n $ingredientsupplyorder->quantity = $request->Quantity;\n $ingredientsupplyorder->save();\n\n $ingredient = Ingredient::find($ingredientsupplyorder->ingredient_id);\n\n Activity::log('Added ' . $ingredient->name . ' to the supply order.');\n\n return Redirect::back()->with('status','Supply order updated!');\n }", "public function store(Request $request)\n {\n \n $data_array = json_decode($request->data_string);\n $total = 0;\n\n foreach ($data_array as $data) {\n $total += $data->price * $data->qty;\n }\n\n $order = new Order;\n $order->voucherno = uniqid();\n $order->orderdate = date('Y-m-d');\n $order->note = $request->note;\n $order->total = $total;\n $order->phone = $request->phone;\n $order->address = $request->address;\n $order->user_id = Auth::id();\n $order->save();\n\n foreach ($data_array as $data) {\n $order->items()->attach($data->id,['qty' => $data->qty]);\n }\n\n return 'Order Successfully!';\n }", "public function store(Request $request)\n {\n $this->business->saveNewWorker($request);\n return redirect(url()->previous());\n }", "public function store()\n\t{\n\t\t$fbf_historico_atleta_cameponato = new FbfHistoricoAtletaCameponato;\n\t\t$fbf_historico_atleta_cameponato->idcampeonato = Input::get('idcampeonato');\n$fbf_historico_atleta_cameponato->idatleta = Input::get('idatleta');\n$fbf_historico_atleta_cameponato->idtime = Input::get('idtime');\n$fbf_historico_atleta_cameponato->classificacao = Input::get('classificacao');\n$fbf_historico_atleta_cameponato->jogos = Input::get('jogos');\n$fbf_historico_atleta_cameponato->gols = Input::get('gols');\n\n\t\t$fbf_historico_atleta_cameponato->save();\n\n\t\t// redirect\n\t\tSession::flash('message', 'Registro cadastrado com sucesso!');\n\t\treturn Redirect::to('fbf_historico_atleta_cameponato');\n\t}", "public function store()\n\t{\n\t\t$inputData = array_except(Input::all(),array('_method','_token'));\t\t\n\t\t$inputData['org_id'] = Session::get('userdata')->org_id;\n\t\t$inputData['last_updated_by'] = Session::get('userdata')->id;\n\t\t$inputData['last_updated_datetime'] = date('Y-m-d H:i:s');\n\n\t\tDB::table($this->common_name)->insert($inputData);\n\t\treturn Redirect::to($this->common_name);\n\t}", "public function store()\n {\n $attributes = request()->validate([\n 'title' => 'bail|required|min:3|max:255|string',\n 'body' => 'bail|required|string|min:5',\n 'attachment' => 'sometimes|nullable|file|mimes:png,jpeg,gif,pdf|max:1024'\n ]);\n \n if (request()->hasFile('attachment')) {\n $path = request()->file('attachment')->store('/', 'ticket');\n $attributes['attachment'] = $path;\n }\n \n $ticket = auth()->user()->tickets()->create($attributes);\n \n if (request()->expectsJson()) {\n return response()->json($ticket->load('replies'));\n }\n \n return redirect(route('tickets.create', app()->getLocale()));\n }", "function storeAndNew() {\n $this->store();\n }", "private function saveRecord(): void\r\n {\r\n $this->order->add_meta_data('_moloni_sent', $this->document_id);\r\n $this->order->save();\r\n }", "public function store(AdminOrderRequest $request)\n {\n $this->orderRepository->create($request->all());\n return redirect()->route('admin.orders.index');\n }", "public function store(CreateTrackRequest $request)\n {\n $user = Auth::user();\n if (!$user->is_admin){\n return response()->json(['message'=>'Only administrators can create a new courses', 'code'=>403],403);\n }\n $values = $request->except('skill_ids');\n $values['user_id'] = $user->id;\n $track = Track::create($values);\n if ($request->skills_ids){\n foreach ($request->skill_ids as $skill_id) {\n $skill = \\App\\Skill::find($skill_id);\n $skill->tracks()->sync($track->id,['skill_order'=>$track->maxSkill($track)? $track->maxSkill($track)->skill_order + 1:1], FALSE);\n }\n }\n return response()->json(['message' => 'Track correctly added.', 'track'=>$track,'code'=>201]);\n }" ]
[ "0.62712455", "0.6189629", "0.61258125", "0.5955997", "0.5929127", "0.5927758", "0.58444715", "0.5750454", "0.57278204", "0.57269835", "0.5695083", "0.56642234", "0.56497097", "0.5649544", "0.56371886", "0.5631975", "0.5623136", "0.5622733", "0.55795413", "0.5573542", "0.55725294", "0.55648035", "0.5529646", "0.5524951", "0.5519452", "0.54854125", "0.5459432", "0.54583216", "0.54492027", "0.5447012", "0.54469407", "0.5446358", "0.544475", "0.5431923", "0.5425558", "0.5422455", "0.5421566", "0.5412626", "0.5406065", "0.5400838", "0.5373899", "0.53667784", "0.5358859", "0.5354067", "0.53513354", "0.5340046", "0.5338978", "0.5334064", "0.53321666", "0.5330191", "0.53254473", "0.53216165", "0.5319827", "0.53121454", "0.5307874", "0.53046685", "0.5290736", "0.52780163", "0.5262027", "0.525841", "0.5257116", "0.5255963", "0.52558666", "0.5255854", "0.52418643", "0.5231122", "0.52269644", "0.5222042", "0.5210053", "0.5206495", "0.5200873", "0.5199683", "0.51995903", "0.5189451", "0.51893985", "0.5188251", "0.5187837", "0.51749545", "0.5169757", "0.5166934", "0.5157803", "0.5157369", "0.5147551", "0.514306", "0.51405776", "0.5136805", "0.51334447", "0.5131879", "0.51268333", "0.5113527", "0.511307", "0.5111998", "0.51075596", "0.5103566", "0.5099697", "0.5095692", "0.5094129", "0.509151", "0.5090517", "0.5090259" ]
0.76488006
0
Attempt insert query execution
function insertmessage($name, $phone,$message) { $name = $this->dbh->getConn()->real_escape_string($name); $phone = $this->dbh->getConn()->real_escape_string($phone); $message = $this->dbh->getConn()->real_escape_string($message); $sql = "INSERT INTO messages (name, phone,message) VALUES ('$name', '$phone','$message')"; if($this->dbh->query($sql) === true){ //echo "Records inserted successfully."; header("location:../View/usercontact.php"); $this->fillArray(); } else{ echo "ERROR: Could not able to execute $sql. " . $conn->error; } //array_push($this->fruits, new Fruit("0","test","1.0")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _insert()\n\t{\n\t}", "function perform_insertion($statement) {\n $dbconn = new DBConnection();\n $conn = $dbconn->getConnection();\n // on the connection, we need to check if the insertion worked.\n // Check affected_rows\n if ($conn->query($statement) == FALSE) {\n return array('response' => 'Failed to insert.');\n }\n return array('response' => 'Success');\n}", "function insert($sql){\n\n\t\tglobal $way;\n\t\t$way -> query($sql);\n\n\t}", "protected function _insert()\n {\n \n }", "protected function _insert()\n {\n \n }", "protected function insert() {\n $dbh = $this->getDbh();\n $table = $this->tableName;\n $data = [];\n\n foreach ($this->fillable as $key => $value) {\n $data[$key] = $this->$key;\n }\n\n $query = 'INSERT INTO `' . $table . '` VALUES (NULL,';\n $first = true;\n foreach ($data AS $k => $value) {\n if (!$first)\n $query .= ', ';\n else\n $first = false;\n $query .= ':'.$k;\n }\n $query .= ')';\n\n $msc = microtime(true);\n\n $sth = $dbh->prepare($query);\n $sth->execute($data);\n\n $msc = microtime(true) - $msc;\n $line = \"insert() => \" . $query . \" with \" . implode(\"', '\", $data);\n $this->writeRequestLog($line, $msc);\n\n return true;\n }", "abstract protected function doInsert($subject, Statement $insertStatement);", "public function insert() {\n\t\t\t\n\t\t\t$insert_array = $this->buildInsertFields();\n\t\t\t$query = \"INSERT INTO \" . $this->table_name . \" (\" . $insert_array['insert_statement'] . \") VALUES (\" . \n\t\t\t\t\t\t\t\t\t$insert_array['values_statement'] . \")\";\n\t\t\treturn $this->query($query, $insert_array['bind_params']);\n\n\t\t}", "function executeInsert($script) {\n\t\t$queryRes = mysqli_query($this->connectionString, $script);\n\t}", "protected function insertRow()\n { \n $assignedValues = $this->getAssignedValues();\n\n $columns = implode(', ', $assignedValues['columns']);\n $values = '\\''.implode('\\', \\'', $assignedValues['values']).'\\'';\n\n $tableName = $this->getTableName($this->className);\n\n $connection = Connection::connect();\n\n $insert = $connection->prepare('insert into '.$tableName.'('.$columns.') values ('.$values.')');\n var_dump($insert);\n if ($insert->execute()) { \n return 'Row inserted successfully'; \n } else { \n var_dump($insert->errorInfo()); \n } \n }", "public function Do_insert_Example1(){\n\n\t}", "abstract public function insert();", "protected function _insert() {\n $def = $this->_getDef();\n if(!isset($def) || !$def){\n return false;\n }\n \n foreach ($this->_tableData as $field) {\n $fields[] = $field['field_name'];\n $value_holder[] = '?';\n $sql_fields[] = '`' . $field['field_name'] . '`';\n $field_name = $field['field_name'];\n \n if(false !== ($overrideKey = $this->_getOverrideKey($field_name))){\n $field_name = $overrideKey;\n }\n \n $$field_name = $this->$field_name;\n \n if($$field_name instanceof \\DateTime){\n $$field_name = $$field_name->format('Y-m-d H:i:s');\n }\n \n if(is_array($$field_name)){\n $$field_name = json_encode($$field_name);\n }\n \n $values[] = $$field_name;\n }\n \n $this->setLastError(NULL);\n \n $sql = \"INSERT INTO `{$this->_table}` (\" . implode(',', $sql_fields) . \") VALUES (\" . implode(',', $value_holder) . \")\";\n $stmt = Database::connection($this->_connection)->prepare($sql, $values);\n $stmt->execute();\n $success = true;\n if ($stmt->error !== '') {\n $this->setLastError($stmt->error);\n $success = false;\n }\n \n $id = $stmt->insert_id;\n \n $stmt->close();\n \n $primaryKey = $this->_getPrimaryKey();\n \n $this->{$primaryKey} = $id;\n \n return $success;\n }", "public static function insert()\n {\n }", "public function insert( )\n {\n $sql_insert_string = $this->formatInsertCommand( );\n if ( $sql_insert_string == false )\n return false;\n\n $l_result = $this->query( $sql_insert_string );\n $this->clearDataBuffer( );\n if($l_result)\n return @mysql_insert_id(underQL::$db_handle);\n\n return false;\n }", "public abstract function insert();", "public function insert(){\n\n global $db;\n\n /** Insert sql query */\n $sql = \"INSERT INTO tbl_calculator (num1, num2, oper, answer)\n VALUES (\" . $this->num1 .\", \" . $this->num2 . \", '\" .$this->oper. \"', \" .$this->answer. \" )\";\n\n /** insert result maintain in log file */ \n error_log($sql);\n\n if ($db->query($sql) === TRUE) {\n error_log(\"New record created successfully\");\n } else {\n error_log(\"Error: \" . $sql . \"<br>\" . $db->error);\n }\n return;\n }", "private function insert()\n {\n $this->query = $this->pdo->prepare(\n 'INSERT INTO ' . $this->table . ' (' .\n implode(', ', array_keys($this->data)) .\n ' ) VALUES (:' .\n implode(', :', array_keys($this->data)) .\n ')'\n );\n }", "public function insert() {\n \n }", "protected function saveInsert()\n {\n }", "public function insert()\n {\n # code...\n }", "public function insert(){\n\t\t$parametro = func_get_args();\n\t\t$resultado = $this->execSql($this->INSERT,$parametro);\n//\t\t\tdie();\n\t\tif(!$resultado){\n\t\t\t$this->onError(\"COD_INSERT\",$this->INSERT);\n\t\t}\n\t\treturn $resultado;\n\t}", "public function insert() {\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\r\n\t\t\t$ks_db->beginTransaction ();\r\n\t\t\t\r\n\t\t\t$arrBindings = array ();\r\n\t\t\t$insertCols = '';\r\n\t\t\t$insertVals = '';\r\n\t\t\t\r\n\t\t\tif (isset ( $this->userid )) {\r\n\t\t\t\t$insertCols .= \"lp_userid, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->userid;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->random )) {\r\n\t\t\t\t$insertCols .= \"lp_random, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->random;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->deadline )) {\r\n\t\t\t\t$insertCols .= \"lp_deadline, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->deadline;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//remove trailing commas\r\n\t\t\t$insertCols = preg_replace(\"/, $/\", \"\", $insertCols);\r\n\t\t\t$insertVals = preg_replace(\"/, $/\", \"\", $insertVals);\r\n\t\t\t\r\n\t\t\t$sql = \"INSERT INTO $this->sqlTable ($insertCols)\";\r\n\t\t\t$sql .= \" VALUES ($insertVals)\";\r\n\t\t\t\r\n\t\t\t$ks_db->query ( $sql, $arrBindings );\r\n\r\n\t\t\t//set the id property\r\n\t\t\t$this->id = $ks_db->lastInsertId();\r\n\t\t\t\r\n\t\t\t$ks_db->commit ();\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_db->rollBack ();\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}", "public function insert_into_table(){\n // VALUES ('$this->item_id', '$this->user_id', '$this->project_id', '$this->user2_id', '$this->post_id', '$this->type', '$this->activity', '$this->date_time')\";\n $query = \"INSERT INTO $this->table_name (item_id, user_id, project_id, user2_id, post_id, post_type, date_time) \n VALUES ('$this->item_id', '$this->user_id', '$this->project_id', '$this->user2_id', '$this->post_id', '$this->type', '$this->date_time')\";\n $result = mysql_query($query);\n\n $err = mysql_error();\n if($err){\n $file = 'errors.txt';\n file_put_contents($file, $err, FILE_APPEND | LOCK_EX);\n }\n }", "public function insert()\n {\n }", "public function insert()\n {\n }", "private function Execute(){\n $this->Connect();\n\n try{\n $this->Create->execute($this->Dados);\n $this->Result = $this->Conn->lastInsertId();\n $this->StatusInsert = true;\n\n }catch (PDOException $e){\n $this->Result = null;\n WSErro(\"<b>Erro ao cadastrar:</b> {$e->getMessage()}\", $e->getCode());\n }\n }", "public function Insert() // Inaczej !!! \n\t\t{\n\t\t\t$result = mysqli_query($this->link, $this->task);\n\t\t\treturn mysqli_affected_rows($this->link).\" line affected by SELECT\\n\\n\";\n\t\t}", "public abstract function Insert();", "public function insert() {\n $sql = \"INSERT INTO contratos (numero_contrato, objeto_contrato, presupuesto, fecha_estimada_finalizacion)\n VALUES (:numero_contrato, :objeto_contrato, :presupuesto, :fecha_estimada_finalizacion)\";\n $args = array(\n \":numero_contrato\" => $this->numeroContrato,\n \":objeto_contrato\" => $this->objetoContrato,\n \":presupuesto\" => $this->presupuesto,\n \":fecha_estimada_finalizacion\" => $this->fechaEstimadaFinalizacion,\n );\n $stmt = $this->executeQuery($sql, $args);\n\n if ($stmt) {\n $this->id = $this->getConnection()->lastInsertId();\n }\n\n return !$stmt ? false : true;\n }", "function insertQuery($sql)\n {\n\t\t\tif($this->rsQry = $this->parse($sql)) \n {\n\t\t\t\t$this->sql = $sql;\n\t\t\t\t\n\t\t\t\t$this->no_of_rows = $this->getNRows();\n\t\t $this->no_of_colums = $this->getNCols(); //Fetch no of rows affected....\n\t\t\t\t$this->close();\n\t\t\t\treturn true;\t\t\t\t\n\t\t\t}\n else\n { \n //echo \"Exit Part\";\n\t\t\t\treturn 0x00; \n\t\t\t}\n\t\t}", "protected function _postInsert()\n\t{\n\t}", "public function insert()\n {\n \n }", "protected function _insert()\n\t{\n\t\t// INSERT INTO 'table'\n\t\t$this->_query = 'INSERT INTO '.$this->_table.' (';\n\n\t\t// * / row1, row2\n\t\t$first = true;\n\t\t$vals = '';\n\t\tforeach($this->_set as $key => $value) {\n\t\t\t$this->_query .= ($first) ? ('') : (', '); \n\t\t\t$vals .= ($first) ? ('') : (', '); \n\t\t\t$first = false;\n\n\t\t\t$this->_query .= $key;\n\t\t\t$vals .= \"'$value'\";\n\t\t} // foreach\n\n\t\t$this->_query .= \") VALUES ($vals);\";\n\n\t\treturn $this->_query;\n\t}", "public function insert()\n {\n $sql = new Sql();\n $result = $sql->select(\"CALL sp_usuario_insert(:LOGIN, :PASSWORD)\", array(\n \":LOGIN\"=>$this->getDeslogin(),\n \":PASSWORD\"=>$this->getDessenha()\n ));\n\n if(count($result) > 0){\n $row = $result[0];\n $this->setIdusuario($row['idusuario']);\n $this->setDeslogin($row['deslogin']);\n $this->setDessenha($row['dessenha']);\n $this->setDataCadastro(new DateTime($row['dataCadastro']));\n }\n }", "public function insert(){\n\t\t$sql = new Sql();\n\t\t$results = $sql->select(\"CALL sp_insert_usuario(:LOGIN, :PASS)\", array(\n\t\t\t':LOGIN'=>$this->getDeslogin(),\n\t\t\t':PASS'=>$this->getDessenha()\n\t\t));\n\n\t\tif (isset($results[0])) {\n\t\t\t\n\t\t\t$this->setData($results[0]);\n\n\t\t}\n\t}", "public function insert(){\n\t\tif(!mysql_query(\"INSERT INTO $this->tabla (nombre) VALUES ('$this->nombre')\")){\n\t\t\tthrow new Exception('Error insertando renglón');\n\t\t}\n\t}", "public function queryInsert($table, $data) : bool;", "public function insert() {\r\n\t\t$this->getMapper()->insert($this);\r\n\t}", "public function testInserting() {\n $this->getConnection()->getConnection()->exec(\"INSERT INTO `owners` (`name`, `email`) VALUES ('Donald Trump', '[email protected]');\");\n }", "public function createInsertSql(): \\Hx\\Db\\Sql\\InsertInterface;", "private function _insert($data){\n if($lastId = $this->insert($data)){\n return $lastId;\n }else{\n // Error\n Application_Core_Logger::log(\"Could not insert into table {$this->_name}\", 'Error');\n return false;\n } \t\n }", "static private function insert($data) {\n $insert_stmt = new SQLExecutor($GLOBALS['cli']->dbconn);\n $insert_item = array();\n // loop over potential insert data\n foreach ($data as $tx) {\n // make sure each tx object has the right stuff\n if ( isset($tx->site_id) && isset($tx->tagid) && isset($tx->pid) ) {\n // build statement\n $insert_item[] = \"({$tx->site_id},{$tx->tagid},{$tx->pid})\";\n }\n }\n\n // complete insert statement if there are insert items\n if (count($insert_item) > 0) {\n $insert_list = implode(\",\",$insert_item);\n $insert_list = rtrim($insert_list,\",\");\n $insert_results = $insert_stmt->sql('INSERT INTO table (site_id, tagid, pid) VALUES ' . $insert_list)->run();\n }\n }", "public function run()\n\t{\n\t\tif (!isset($this->table)) {\n\t\t\tthrow new Exception(\"No table specified\", 1);\n\t\t\t\n\t\t}\n\n\t\tDB::table($this->table)->delete() ;\n\n\t\tDB::table($this->table)->insert($this->getData());\n\t}", "public function insert(){\n $sql = \"INSERT INTO author(\n name,\n job,\n created_at\n )\n VALUES(\n 'tgedf', 'sdvsdv', NOW())\";\n return $this->pdo->exec($sql);\n\n }", "public function insert()\n {\n $this->id = insert($this);\n }", "public function insert($query, $bindings = []);", "public function insert($query, $bindings = []);", "public function insert() {\n\t\t$this->insert_user();\n\t}", "function performSQLInsert($sql) {\n $conn = $GLOBALS[\"connection\"];\n $result = mysqli_query($conn, $sql);\n if (!$result) {\n printCallstackAndDie();\n }\n return mysqli_insert_id($conn);\n}", "public function insert() {\n $query = \"INSERT INTO {$this->Table} SET \";\n if($this->Fields) {\n foreach ($this->Fields as $key => $item) {\n if($item['ignore'] != true && $this->$key != \"\" && $this->$key !== null) {\n if($first === false) $query .= \", \";\n $query .= $key.\" = '\".$this->escape($this->$key).\"'\";\n $first = false;\n }\n }\n }\n $result = $this->query($query);\n $this->clear();\n return $result;\n }", "public static function Insert(){\r\n }", "function insert() {\n\t\t$sql = \"INSERT INTO \".$this->hr_db.\".hr_amphur (amph_name, amph_name_en, amph_pv_id, amph_active)\n\t\t\t\tVALUES(?, ?, ?, ?)\";\n\t\t$this->hr->query($sql, array( $this->amph_name, $this->amph_name_en, $this->amph_pv_id, $this->amph_active));\n\t\t$this->last_insert_id = $this->hr->insert_id();\n\t}", "public function insert($sql){\n\t $query = DB::query(Database::INSERT, $sql);\n\t return $query->execute($this->database);\n\t}", "function insert( $sql ){\n\t\tif( $this->db == null ){\n\t\t\treturn false;\n\t\t}\n\t\t$insert_id = $this->db->query( $sql );\n\n\t\treturn $insert_id;\n\t}", "public function insert()\n\t{\n\t\t$sql_array = array();\n\t\tforeach ($this->object_config as $name => $null)\n\t\t{\n\t\t\t$sql_array[$name] = $this->validate_property($this->$name, $this->object_config[$name]);\n\t\t}\n\n\t\t$sql = 'INSERT INTO ' . $this->sql_table . ' ' . $this->db->sql_build_array('INSERT', $sql_array);\n\t\t$this->db->sql_query($sql);\n\n\t\tif ($id = $this->db->sql_nextid())\n\t\t{\n\t\t\t$this->{$this->sql_id_field} = $id;\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "protected function insert()\n\t{\n\t\t$this->autofill();\n\n\t\tparent::insert();\n\n\t}", "function pg_insert($connection, string $table_name, array $assoc_array, int $options = PGSQL_DML_EXEC)\n{\n error_clear_last();\n $result = \\pg_insert($connection, $table_name, $assoc_array, $options);\n if ($result === false) {\n throw PgsqlException::createFromPhpError();\n }\n return $result;\n}", "protected static function execute_insert($parametros){\n self::StartTrans();\n try {\n $tabla=strtolower(static::$prefijo_tabla.get_called_class());\n if(ACTIVAR_LOG_APACHE_DE_CONSULTAS_SQL) \n Logger::developper('INSERT '.$tabla.' VALUES '.static::$id_tabla.'='.$parametros['id'], 0);\n $tiempo_inicio=microtime(true);\n $result=self::$conection->AutoExecute($tabla, $parametros, 'INSERT');\n if($result) $resultado=true;\n else $resultado=false;\n $duracion=microtime(true)-$tiempo_inicio;\n// if($resultado) $resultado=Gestor_de_log::set_auto('INSERT',$tabla,static::$id_tabla,$parametros, $resultado,$duracion);\n\n } catch (Exception $e) {\n $resultado=false;\n error_log($e->getMessage());\n }\n self::CompleteTrans();\n if($resultado){\n return $result;\n }\n return false; \n }", "public function execute()\n {\n $platform = $this->connection->getDatabasePlatform();\n\n if (method_exists($platform, 'getInsertMaxRows')) {\n $insertMaxRows = $platform->getInsertMaxRows();\n } else {\n $insertMaxRows = 0;\n }\n\n if ($insertMaxRows > 0 && count($this->values) > $insertMaxRows) {\n throw new \\LogicException(\n sprintf(\n 'You can only insert %d rows in a single INSERT statement with platform \"%s\".',\n $insertMaxRows,\n $platform->getName()\n )\n );\n }\n\n return $this->connection->executeUpdate($this->getSQL(), $this->parameters, $this->types);\n }", "public function insert()\n {\n $db = new Database();\n $db->insert(\n \"INSERT INTO position (poste) VALUES ( ? )\",\n [$this->poste]\n );\n }", "public function executeStatement()\n {\n \n }", "#[@test]\n public function insertViaQuery() {\n $this->createTable();\n $this->assertTrue($this->db()->query('insert into unittest values (1, \"kiesel\")'));\n }", "public function testInsert()\n {\n $statement = $this->getQueryBuilderConnection()\n ->insert()\n ->into('querybuilder_tests')\n ->values(\n [\n 'id' => 10,\n 'languageId' => 1,\n 'field' => 'zzzz',\n ]\n )->execute();\n\n $this->assertInstanceOf(\\PDOStatement::class, $statement);\n $this->assertEquals(1, $statement->rowCount());\n\n $result = $this->getQueryBuilderConnection()\n ->select('count(1) as counter')\n ->from('querybuilder_tests')\n ->getOneField('counter');\n\n $this->assertEquals(11, $result);\n\n $statement = $this->getQueryBuilderConnection()\n ->insert(\n [\n 'id' => 11,\n 'languageId' => 1,\n 'field' => 'yyyy',\n ]\n )\n ->into('querybuilder_tests')\n ->execute();\n\n $this->assertInstanceOf(\\PDOStatement::class, $statement);\n $this->assertEquals(1, $statement->rowCount());\n\n $result = $this->getQueryBuilderConnection()\n ->select('count(1) as counter')\n ->from('querybuilder_tests')\n ->getOneField('counter');\n\n $this->assertEquals(12, $result);\n }", "private function execInsertionAlgoritm(){\r\n\t\t$sqlr_result=$this->loadData();\r\n\t\twhile ($array_User=mysql_fetch_array($sqlr_result)) {\r\n\t\t\tif ($this->isAffiliated($array_User)){\r\n\t\t\t\t//echo \"\";\t\t\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$this->insertNewUser($array_User);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function testInsertWithSelectStatement()\n {\n $this->db->insert(\"test\", \"SELECT id FROM settings\");\n $this->assertEquals(\"INSERT INTO test SELECT id FROM settings\", (string) $this->db);\n }", "public function testCanReturnInsertIdAfterSqlQueryExecution()\n\t {\n\t\t$this->object->exec(\"INSERT INTO MySQLdatabase SET string = 'test1'\");\n\t\t$this->assertEquals(1, $this->object->insertID());\n\t\t$this->object->exec(\"INSERT INTO MySQLdatabase SET string = 'test2'\");\n\t\t$this->assertEquals(2, $this->object->insertID());\n\n\t\t$this->object = new MySQLdatabase($GLOBALS[\"DB_HOST\"], \"nonexistentdb\", $GLOBALS[\"DB_USER\"], $GLOBALS[\"DB_PASSWD\"]);\n\t\t$this->object->exec(\"INSERT INTO MySQLdatabase SET string = 'test1'\");\n\t\t$this->assertEquals(false, $this->object->insertID());\n\t }", "public function testInsertStmt()\n {\n $insert = $this->getConnection()\n ->insert()\n ('dummy_posts')\n (['blog_id', 'blog_title'])\n ([':id', ':title']);\n return $this->assertEquals($insert, \"INSERT INTO dummy_posts(blog_id, blog_title) VALUES (:id, :title)\");\n }", "protected function RetInsert() {\n\n if (!isset($this->\n tables[0])) {\n\n throw new \\Exception(\"Error: Table not properly provided in QueryHelper.\");\n }\n\n if (!(is_array($this->\n values) &&\n count($this->\n values)) &&\n !($this->\n values instanceof \\FluitoPHP\\Database\\DBQueryHelper &&\n $this->\n values->\n IsSelect())) {\n\n throw new \\Exception(\"Error: Values not properly provided in QueryHelper.\");\n }\n\n if ($this->\n values instanceof \\FluitoPHP\\Database\\DBQueryHelper &&\n $this->\n values->\n IsSelect()) {\n\n $this->\n values->\n GetRow();\n\n $columnsInfo = $this->\n values->\n GetColInfo();\n\n $columns = [];\n\n foreach ($columnsInfo as $value) {\n\n $columns[] = $value->\n name;\n }\n\n $return = \"INSERT INTO `{$this->\n tables[0]}` (`\" . implode(\"`, `\", $columns) . \"`) \" . $this->\n values->\n Generate();\n } else {\n\n $multi = false;\n $columns = array_keys($this->\n values);\n\n $valuesArr = [];\n\n if (!is_string($columns[0])) {\n\n if (!is_array($this->\n values[$columns[0]])) {\n\n throw new \\Exception(\"Error: Values not properly provided in QueryHelper.\");\n }\n\n $columns = array_keys($this->\n values[$columns[0]]);\n\n $multi = true;\n }\n\n\n $return = \"INSERT INTO `{$this->\n tables[0]}` (`\" . implode(\"`, `\", $columns) . \"`) VALUES \";\n\n\n if ($multi) {\n\n foreach ($this->\n values as $row) {\n\n $values = array_values($row);\n\n foreach ($values as $key => $value) {\n\n if (is_string($value)) {\n\n $value = $this->\n connection->\n GetConn()->\n real_escape_string($value);\n $values[$key] = \"'{$value}'\";\n } else if (isset($value['function'])) {\n\n $values[$key] = $value['function'];\n }\n }\n\n $valuesArr[] = \"(\" . implode(\", \", $values) . \")\";\n }\n } else {\n\n $values = array_values($this->\n values);\n\n foreach ($values as $key => $value) {\n\n if (is_string($value)) {\n\n $value = $this->\n connection->\n GetConn()->\n real_escape_string($value);\n $values[$key] = \"'{$value}'\";\n } else if (isset($value['function'])) {\n\n $values[$key] = $value['function'];\n }\n }\n\n $valuesArr[] = \"(\" . implode(\", \", $values) . \")\";\n }\n\n $return .= implode(\", \", $valuesArr) . \";\";\n }\n\n return $return;\n }", "public function doInsert ($sql) {\n\treturn ($this->_sendQuery($sql)) ? true : false;\n }", "public function execute()\n\t{\n\t\t$insert = $this->offer_cells($this->ns, $this->table, $this->mutateSpec, $this->cells);\n\t\t$this->table = NULL;\n\t\t$this->cells = array();\n\t\t$this->mutateSpec = NULL;\n\t\treturn $insert;\n\t}", "abstract public function insert(string $table, array $row, array $options = []);", "function test_insert($urabe, $body)\n{\n $insert_params = $body->insert_params;\n if ($body->driver == \"PG\")\n $table_name = $body->schema . \".\" . $body->table_name;\n else\n $table_name = $body->table_name;\n return $urabe->insert($table_name, $insert_params);\n}", "public function insert($params){\n\t\t$DB = Registry::getInstance()->DB;\n\t\t$prefix = \"INSERT \";\n\t\t$p = $this->clean($params);\t\n\t\t$statement = $prefix.\" \".$params['tables'][0].\" \".$this->genSet($p['set']);\t\n\t\t$DB->exec($statement);\t\n\t}", "public final function insert()\n {\n // Run beforeCreate event methods and stop when one of them return bool false\n if ($this->runBefore('create') === false)\n return false;\n\n // Create tablename\n $tbl = '{db_prefix}' . $this->tbl;\n\n // Prepare query and content arrays\n $fields = array();\n $values = array();\n $keys = array();\n\n // Build insert fields\n foreach ( $this->data as $fld => $val )\n {\n // Skip datafields not in definition\n if (!$this->isField($fld))\n continue;\n\n // Regardless of all further actions, check and cleanup the value\n $val = $this->checkFieldvalue($fld, $val);\n\n // Put fieldname and the fieldtype to the fields array\n $fields[$fld] = $this->getFieldtype($fld);\n\n // Object or array values are stored serialized to db\n $values[] = is_array($val) || is_object($val) ? serialize($val) : $val;\n }\n\n // Add name of primary key field\n $keys[0] = $this->pk;\n\n // Run query and store insert id as pk value\n $this->data->{$this->pk} = $this->db->insert('insert', $tbl, $fields, $values, $keys);\n\n return $this->data->{$this->pk};\n }", "public function insert($connection, $table, $rows);", "public function insert(){\r\n\t\tif (!$this->new){\r\n\t\t\tMessages::msg(\"Cannot insert {$this->getFullTableName()} record: already exists.\",Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$this->beforeCommit();\r\n\t\t\r\n\t\t$vals = array();\r\n\t\t$error = false;\r\n\t\tforeach ($this->values as $name=>$value){\r\n\t\t\tif ($value->isErroneous()){\r\n\t\t\t\tFramework::reportErrorField($name);\r\n\t\t\t\t$error = true;\r\n\t\t\t}\r\n\t\t\t$vals[\"`$name`\"] = $value->getSQLValue();\r\n\t\t}\r\n\t\tif ($error){\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$sql = 'INSERT INTO '.$this->getFullTableName().' ('.implode(', ',array_keys($vals)).') VALUES ('.implode(', ',$vals).')';\r\n\t\tif (!SQL::query($sql)->success()){\r\n\t\t\tMessages::msg('Failed to insert record into '.$this->getFullTableName().'.',Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t// Get this here, because getPrimaryKey can call other SQL queries and thus override this value\r\n\t\t$auto_id = SQL::getInsertId();\r\n\t\t\r\n\t\t$table = $this->getTable();\r\n\t\t// Load the AUTO_INCREMENT value, if any, before marking record as not new (at which point primary fields cannot be changed)\r\n\t\tforeach ($table->getPrimaryKey()->getColumns() as $name){\r\n\t\t\tif ($table->getColumn($name)->isAutoIncrement()){\r\n\t\t\t\t$this->$name = $auto_id;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->new = false;\r\n\t\t$this->hasChanged = false;\r\n\t\tforeach ($this->values as $value){\r\n\t\t\t$value->setHasChanged(false);\r\n\t\t}\r\n\t\t\r\n\t\t$this->afterCommit();\r\n\t\t\t\r\n\t\treturn self::RES_SUCCESS;\r\n\t}", "private function Insert()\n {\n $return = false;\n $action = $this->Action();\n $values = $this->Values();\n $table = $this->Table();\n $errorInfo = $this->ERROR_INFO(__FUNCTION__);\n if(MySQLChecker::isAction($action, $errorInfo) && MySQLChecker::isTable($table, $errorInfo) &&\n Checker::isArray($values, false)) {\n if (isset($values[Where::VALUES]) && isset($values[self::COLUMNS])) {\n $columns = $values[self::COLUMNS];\n $values = $values[Where::VALUES];\n if (Checker::isArray($columns, false, $errorInfo) && Checker::isArray($values, false, $errorInfo)) {\n $return[Where::QUERY] = \"$action INTO $table (\" . implode(\", \", array_keys($columns)) . \") VALUES (\" .\n implode(\", \", $columns) . \")\";\n $return[Where::VALUES] = $values;\n }\n } else $this->addError(__FUNCTION__, \"Values and Query are not set!\", $values);\n }\n return $return;\n }", "public function insertSql()\n {\n $sql = \"INSERT INTO \" . $this->dbName . '.' . $this->table\n . \" (\" . implode($this->fields, \", \") . \")\n VALUES (:\" . implode($this->fields, \", :\") . \");\";\n\n $this->query = $sql;\n }", "public function insertRecords(){\n // Get the sql statement\n $sql = $this->insertSql();\n // Prepare the query\n $stmt = $this->db->prepare($sql);\n\n foreach ($this->paramsValues as $key=>$value) {\n $stmt->bindParam($this->params['columnNamePdo'][$key], $this->paramsValues[$key]);\n }\n \n $stmt->execute();\n \n return true;\n \n }", "public function insertRow($query,$params=[]){\r\n\t\t\ttry {\r\n\t\t\t\t$dbquery=$this->db->prepare($query);\r\n\t\t\t\t$dbquery->execute($params);\r\n\t\t\t\treturn true;\r\n\t\t\t} catch (PDOException $e) {\r\n\t\t\tthrow new Exception($e->getMessage());\r\n\t\t\t}\r\n\t\t}", "function insert ($query) {\n\n\t\tif (!$this->con) {\n\t\t\t$this->connect();\n\t\t\tif (!$this->con) return false;\n\t\t}\n\n\t\t$res = $this->con->query($query);\n\t\treturn ($res === false ? false : mysqli_insert_id($this->con));\n\t}", "protected function insert()\n\t{\n\t\t//prepare placeholders for SQL query\n\t\t$placeholders = implode(\",\", array_fill(0, count($this->attributes), \"?\"));\n\t\t//prepare columns names for SQL query\n\t\t$columns = implode( \"`,`\", array_keys($this->attributes) );\n\t\t\n\t\t$methodAttributes = array_values($this->attributes);\n\t\t// add first method attribute - query\n\t\tarray_unshift($methodAttributes, \"INSERT INTO `\" . static::$table . \"` (`$columns`) VALUES ($placeholders)\");\n\t\t\n\t\t// inserting\n\t\t$result = call_user_func_array(\"Database::insert\", $methodAttributes);\n\t\tif( $result )\n\t\t{\n\t\t\t$this->isExist = true;\n\t\t\t// set PK\n\t\t\t$this->attributes[static::$primaryKey] = Database::lastInsertId();\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "function insert($sql) {\n\t\t$args = func_get_args();\n\t\tarray_shift($args);\n\n\t\t$statement = $this->execute($sql, $args);\n\t\treturn $this->pdo->lastInsertId();\n\t}", "protected function insert()\n\t{\n\t\t$query = $this->connection->prepare\n\t\t(\"\n\t\t\tinsert into\n\t\t\t\tBooth (BoothNum)\n\t\t\t\tvalues (?)\n\t\t\");\n\n\t\t$query->execute(array_values($this->fields));\n\n\t}", "public function Insert(){\n //Instancia conexao com o PDO\n $pdo = Conecta::getPdo();\n //Cria o sql passa os parametros e etc\n $sql = \"INSERT INTO $this->table (idcidade, cidade) VALUES (?, ?)\";\n $consulta = $pdo->prepare($sql);\n $consulta ->bindValue(1, $this->getIdCidade());\n $consulta ->bindValue(2, $this->getCidade());\n $consulta ->execute();\n $last = $pdo->lastInsertId();\n }", "function insert($query, $param_type, $param_value_array) {\n $sql = $this->connection->prepare($query);\n $this->bindQueryParams($sql, $param_type, $param_value_array);\n $sql->execute();\n $insertId = $sql->insert_id;\n return $insertId;\n }", "public function Insert(){\r\n $query = \"INSERT INTO \". $this->_table_name .\"(ITEM_ID , USER_ITEM_ID , USER_FROM , USER_TO , TOO , IO_TYPE , MODE , TRANK_NO , PERMIT_ID , TYPE , NOTE , IN_UNIT , IN_SUBUNIT , LONGDATE , STATUS , CREATE_ON , CREATE_BY , MODIFY_ON , MODIFY_BY , IS_ACTIVE) \r\n VALUES ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ?) \" ; \r\n $success = 0;\r\n try{\r\n $stmt = $this->conn->prepare($query);\r\n $stmt->bindParam (1 , $this->getItemId()); \r\n $stmt->bindParam (2 , $this->getUserItemId()); \r\n $stmt->bindParam (3 , $this->getUserFrom()); \r\n $stmt->bindParam (4 , $this->getUserTo()); \r\n $stmt->bindParam (5 , $this->getToo()); \r\n $stmt->bindParam (6 , $this->getIoType()); \r\n $stmt->bindParam (7 , $this->getMode()); \r\n $stmt->bindParam (8 , $this->getTrankNo()); \r\n $stmt->bindParam (9 , $this->getPermitId()); \r\n $stmt->bindParam (10 , $this->getType()); \r\n $stmt->bindParam (11 , $this->getNote()); \r\n $stmt->bindParam (12 , $this->getInUnit()); \r\n $stmt->bindParam (13 , $this->getInSubunit()); \r\n $stmt->bindParam (14 , $this->getLongdate()); \r\n $stmt->bindParam (15 , $this->getStatus()); \r\n $stmt->bindParam (16 , $this->getCreateOn()); \r\n $stmt->bindParam (17 , $this->getCreateBy()); \r\n $stmt->bindParam (18 , $this->getModifyOn()); \r\n $stmt->bindParam (19 , $this->getModifyBy()); \r\n $stmt->bindParam (20 , $this->getIsActive()); \r\n\r\n $stmt->execute(); \r\n $this->setId($this->conn->lastInsertId());\r\n $success = 1;}\r\n catch(PDOException $ex){ echo $ex->getMessage(); } \r\n return $success;}", "function insert($sql = \"\") {\n\t\t\t$this->time_start();\n\n\t\t\tif (empty ($sql)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!eregi(\"^insert\", $sql)) {\n\t\t\t\treturn $this->error(\"error, its not a insert-query: \".$sql);\n\t\t\t}\n\t\t\tif (empty ($this->CONN)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$conn = $this->CONN;\n\t\t\t$results = mysqli_query($conn, $sql) or $this->error($sql);\n\t\t\t$results = mysqli_insert_id($conn);\n\t\t\t$results == 0 ? $results = mysqli_affected_rows($conn) : 1;\n\n\t\t\t$this->time_stop(\"insert\");\n\t\t\treturn $results;\n\t\t}", "public function insert($sql)\n { \n if ($this->debug === TRUE) {\n $start = microtime(TRUE);\n }\n \n $result = mysql_query($sql, $this->link);\n \n if ($result === FALSE) {\n $errstr = \"Invalid query: \" . $sql . PHP_EOL;\n $errstr .= \"Server returned: \" . mysql_errno($this->link) . \": \" . mysql_error($this->link);\n throw new Exception($errstr);\n }\n \n if ($this->debug === TRUE) {\n $end = microtime(TRUE);\n $time = sprintf(\"%.8F\", $end - $start);\n $this->queries[] = array(\n \"sql\" => $sql,\n \"sec\" => $time\n );\n }\n \n return mysql_insert_id($this->link);\n }", "function insert( $sql = \"\" )\n\t{\n\t\t$this->time_start();\n\n\t\tif ( empty( $sql ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tif ( !eregi( \"^insert\", $sql ) ) {\n\t\t\treturn $this->error( \"error, its not a insert-query: \" . $sql );\n\t\t}\n\t\tif ( empty( $this->CONN ) ) {\n\t\t\treturn false;\n\t\t}\n\t\t$conn = $this->CONN;\n\t\t$results = mysql_query( $sql, $conn ) or $this->error( $sql );\n\t\t$results = mysql_insert_id( $conn );\n\t\t$results == 0 ? $results = mysql_affected_rows( $conn ): 1;\n\n\t\t$this->time_stop(\"insert\");\n\t\treturn $results;\n\t}", "public function insertQuery($table,$column,$inserts){\n $query=$this->runQuery(\"INSERT INTO $table ($column) VALUES ($inserts)\")or die($this->conn_str->error);\n return $query?true:false;\n }", "function insert() {\n\t\t$sql = \"INSERT INTO lessons\n\t\t\t\tVALUES (?, ?, ?, ?, ?)\";\n\t\t\n\t\t$this->db->query($sql, array($this->lessons_id, $this->name, $this->date, $this->active, $this->rank));\n\t\t$this->last_insert_id = $this->db->insert_id();\t\t\n\t\t\n\t}", "protected function executeInsert($sqlQuery){\r\n\t\treturn QueryExecutor::executeInsert($sqlQuery);\r\n\t}", "protected function executeInsert($sqlQuery){\r\n\t\treturn QueryExecutor::executeInsert($sqlQuery);\r\n\t}", "protected function executeInsert($sqlQuery){\r\n\t\treturn QueryExecutor::executeInsert($sqlQuery);\r\n\t}", "protected function executeInsert($sqlQuery){\r\n\t\treturn QueryExecutor::executeInsert($sqlQuery);\r\n\t}", "protected function executeInsert($sqlQuery){\r\n\t\treturn QueryExecutor::executeInsert($sqlQuery);\r\n\t}", "protected function executeInsert($sqlQuery){\r\n\t\treturn QueryExecutor::executeInsert($sqlQuery);\r\n\t}", "protected function executeInsert($sqlQuery){\r\n\t\treturn QueryExecutor::executeInsert($sqlQuery);\r\n\t}", "protected function executeInsert($sqlQuery){\r\n\t\treturn QueryExecutor::executeInsert($sqlQuery);\r\n\t}" ]
[ "0.72821754", "0.7210543", "0.7191001", "0.71807134", "0.71807134", "0.71479076", "0.70092696", "0.6977297", "0.69654185", "0.6948748", "0.6920546", "0.68751895", "0.6874554", "0.6854166", "0.6837952", "0.6826002", "0.6823446", "0.6802932", "0.6783786", "0.67770296", "0.67673945", "0.674836", "0.6740626", "0.67307746", "0.6722839", "0.6722839", "0.67190063", "0.6672152", "0.6670222", "0.66430575", "0.66397846", "0.663363", "0.6629281", "0.6626501", "0.6624898", "0.66186595", "0.66165435", "0.6612874", "0.65961045", "0.65960896", "0.6591984", "0.65881944", "0.65703577", "0.6569251", "0.65546376", "0.65457374", "0.65392613", "0.65392613", "0.65380883", "0.6520818", "0.6512914", "0.65002644", "0.64951605", "0.64912665", "0.64911956", "0.6489968", "0.648944", "0.6473108", "0.6472522", "0.64682335", "0.64680874", "0.64630723", "0.64550716", "0.64433736", "0.6441708", "0.64367074", "0.64342475", "0.642842", "0.64115417", "0.6408146", "0.63964283", "0.63893723", "0.63887495", "0.63754535", "0.6365347", "0.6365315", "0.6365075", "0.6362165", "0.63507926", "0.6342974", "0.63422686", "0.63417774", "0.63369685", "0.63253313", "0.63244605", "0.6319258", "0.63083774", "0.6302168", "0.62981194", "0.6291114", "0.62883794", "0.62828285", "0.627733", "0.62768656", "0.62768656", "0.62768656", "0.62768656", "0.62768656", "0.62768656", "0.62768656", "0.62768656" ]
0.0
-1
Display a listing of the resource.
public function index() { $contatos = Contatos::all(); return view('contatos.index',['contatos'=>$contatos]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\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\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('contatos.novo'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "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 }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "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}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "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 }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "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 }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "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 }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "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}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "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 }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "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 }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "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 }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "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 }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "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 }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "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 }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "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}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $contato = new Contatos(); $contato->nome = $request->nome; $contato->email = $request->email; $contato->UF = $request->UF; $contato->observacao = $request->observacao; $contato->endereco_id = Enderecos::create(['endereco'=>$request->endereco])->id; $contato->telefone_id = Telefones::create(['telefone'=>$request->telefone])->id; $contato->save(); return redirect()->back()->with('mensagem','Contato criado com sucesso'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { $contato = Contatos::find($id); return view('contatos.show',['contato'=>$contato]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "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\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\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::error('event.view.not_allowed');\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}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $contato = Contatos::find($id); return view('contatos.edit',['contato'=>$contato]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\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('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $contato = Contatos::find($id); $endereco = Enderecos::find($contato->endereco_id); $endereco->endereco = $request->endereco; $endereco->save(); $tel = Telefones::find($contato->telefone_id); $tel->telefone = $request->telefone; $tel->save(); $contato->nome = $request->nome; $contato->email = $request->email; $contato->UF = $request->UF; $contato->observacao = $request->observacao; $contato->endereco_id = $endereco->id; $contato->telefone_id = $tel->id; $contato->save(); return redirect()->back()->with('mensagem','Contato atualizado com sucesso'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $contato = Contatos::find($id); Enderecos::destroy($contato->endereco->id); Telefones::destroy($contato->telefone->id); $contato->delete(); return redirect()->back()->with('mensagem','Contato excluído com sucesso'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Register any application services.
public function register() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n $this->registerMetaService();\n $this->registerLabelService();\n $this->registerTypeService();\n $this->registerGroupeService();\n $this->registerActiviteService();\n $this->registerRiiinglinkService();\n $this->registerInviteService();\n $this->registerTagService();\n $this->registerAuthService();\n $this->registerChangeService();\n $this->registerRevisionService();\n $this->registerUploadService();\n //$this->registerTransformerService();\n }", "public function register()\n { \n // User Repository\n $this->app->bind('App\\Contracts\\Repository\\User', 'App\\Repositories\\User');\n \n // JWT Token Repository\n $this->app->bind('App\\Contracts\\Repository\\JSONWebToken', 'App\\Repositories\\JSONWebToken');\n \n $this->registerClearSettleApiLogin();\n \n $this->registerClearSettleApiClients();\n \n \n }", "public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }", "public function register()\n {\n $this->app->bind(\n PegawaiServiceContract::class,\n PegawaiService::class \n );\n\n $this->app->bind(\n RiwayatPendidikanServiceContract::class,\n RiwayatPendidikanService::class \n );\n\n $this->app->bind(\n ProductionHouseServiceContract::class,\n ProductionHouseService::class\n );\n\n $this->app->bind(\n MovieServiceContract::class,\n MovieService::class\n );\n\n $this->app->bind(\n PangkatServiceContract::class,\n PangkatService::class \n );\n\n }", "public function register()\n {\n // $this->app->bind('AuthService', AuthService::class);\n }", "public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\n }", "public function register()\n {\n $this->registerAccountService();\n\n $this->registerCurrentAccount();\n\n //$this->registerMenuService();\n\n //$this->registerReplyService();\n }", "public function register()\n {\n $this->registerRepositories();\n }", "public function register()\n {\n $this->registerFacades();\n $this->registerRespository();\n }", "public function register()\n {\n $this->app->bind('App\\Services\\UserService');\n $this->app->bind('App\\Services\\PostService');\n $this->app->bind('App\\Services\\MyPickService');\n $this->app->bind('App\\Services\\FacebookService');\n $this->app->bind('App\\Services\\LikeService');\n }", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }", "public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n\n\n\n $this->app->register(ResponseMacroServiceProvider::class);\n $this->app->register(TwitterServiceProvider::class);\n }", "public function register()\n {\n $this->registerGraphQL();\n\n $this->registerConsole();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerCommand();\n $this->registerSchedule();\n $this->registerDev();\n\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/telescope-error-service-client.php', 'telescope-error-service-client'\n );\n\n $this->registerStorageDriver();\n\n $this->commands([\n Console\\InstallCommand::class,\n Console\\PublishCommand::class,\n ]);\n }", "public function register()\n\t{\n\t\t$this->registerPasswordBroker();\n\n\t\t$this->registerTokenRepository();\n\t}", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\UtilitiesServiceProvider');\n $this->registerLogViewer();\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\CommandsServiceProvider');\n }", "public function register() {\n $this->registerProviders();\n $this->registerFacades();\n }", "public function register()\n {\n // $this->app->make('CheckStructureService');\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'APIcoLAB\\Services\\Registrar'\n\t\t);\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Flight\\FlightRepository',\n 'APIcoLAB\\Repositories\\Flight\\SkyScannerFlightRepository'\n );\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Place\\PlaceRepository',\n 'APIcoLAB\\Repositories\\Place\\SkyScannerPlaceRepository'\n );\n\t}", "public function register()\n {\n $this->app->register(\\Maatwebsite\\Excel\\ExcelServiceProvider::class);\n $this->app->register(\\Intervention\\Image\\ImageServiceProvider::class);\n $this->app->register(\\Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\DatatablesServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\ButtonsServiceProvider::class);\n\n $loader = null;\n if (class_exists('Illuminate\\Foundation\\AliasLoader')) {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n }\n\n // Facades\n if ($loader != null) {\n $loader->alias('Image', \\Intervention\\Image\\Facades\\Image::class);\n $loader->alias('Excel', \\Maatwebsite\\Excel\\Facades\\Excel::class);\n\n }\n\n if (app()->environment() != 'production') {\n // Service Providers\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n\n // Facades\n if ($loader != null) {\n $loader->alias('Debugbar', \\Barryvdh\\Debugbar\\Facade::class);\n }\n }\n\n if ($this->app->environment('local', 'testing')) {\n $this->app->register(\\Laravel\\Dusk\\DuskServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerInertia();\n $this->registerLengthAwarePaginator();\n }", "public function register()\n {\n $this->registerFlareFacade();\n $this->registerServiceProviders();\n $this->registerBindings();\n }", "public function register()\n {\n $this->app->bind(\n 'Toyopecas\\Repositories\\TopoRepository',\n 'Toyopecas\\Repositories\\TopoRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ServicesRepository',\n 'Toyopecas\\Repositories\\ServicesRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\SobreRepository',\n 'Toyopecas\\Repositories\\SobreRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ProdutosRepository',\n 'Toyopecas\\Repositories\\ProdutosRepositoryEloquent'\n );\n }", "public function register()\r\n {\r\n Passport::ignoreMigrations();\r\n\r\n $this->app->singleton(\r\n CityRepositoryInterface::class,\r\n CityRepository::class\r\n );\r\n\r\n $this->app->singleton(\r\n BarangayRepositoryInterface::class,\r\n BarangayRepository::class\r\n );\r\n }", "public function register()\n {\n $this->registerRepositories();\n\n $this->pushMiddleware();\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel-base.php', 'laravel-base');\r\n\r\n $this->app->bind(UuidGenerator::class, UuidGeneratorService::class);\r\n\r\n }", "public function register()\n {\n\n $this->app->register(RepositoryServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(\n 'Uhmane\\Repositories\\ContatosRepository', \n 'Uhmane\\Repositories\\ContatosRepositoryEloquent'\n );\n }", "public function register()\r\n {\r\n $this->app->bind(\r\n ViberServiceInterface::class,\r\n ViberService::class\r\n );\r\n\r\n $this->app->bind(\r\n ApplicantServiceInterface::class,\r\n ApplicantService::class\r\n );\r\n }", "public function register()\n {\n $this->app->register('ProAI\\Datamapper\\Providers\\MetadataServiceProvider');\n\n $this->app->register('ProAI\\Datamapper\\Presenter\\Providers\\MetadataServiceProvider');\n\n $this->registerScanner();\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->app->bind(\n 'Larafolio\\Http\\HttpValidator\\HttpValidator',\n 'Larafolio\\Http\\HttpValidator\\CurlValidator'\n );\n\n $this->app->register(ImageServiceProvider::class);\n }", "public function register()\n {\n // Register all repositories\n foreach ($this->repositories as $repository) {\n $this->app->bind(\"App\\Repository\\Contracts\\I{$repository}\",\n \"App\\Repository\\Repositories\\\\{$repository}\");\n }\n\n // Register all services\n foreach ($this->services as $service) {\n $this->app->bind(\"App\\Service\\Contracts\\I{$service}\", \n \"App\\Service\\Modules\\\\{$service}\");\n }\n }", "public function register()\n {\n $this->registerAdapterFactory();\n $this->registerDigitalOceanFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n // Only Environment local\n if ($this->app->environment() !== 'production') {\n foreach ($this->services as $serviceClass) {\n $this->registerClass($serviceClass);\n }\n }\n\n // Register Aliases\n $this->registerAliases();\n }", "public function register()\n {\n $this->app->bind(\n 'App\\Contracts\\UsersInterface',\n 'App\\Services\\UsersService'\n );\n $this->app->bind(\n 'App\\Contracts\\CallsInterface',\n 'App\\Services\\CallsService'\n );\n $this->app->bind(\n 'App\\Contracts\\ContactsInterface',\n 'App\\Services\\ContactsService'\n );\n $this->app->bind(\n 'App\\Contracts\\EmailsInterface',\n 'App\\Services\\EmailsService'\n );\n $this->app->bind(\n 'App\\Contracts\\PhoneNumbersInterface',\n 'App\\Services\\PhoneNumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\NumbersInterface',\n 'App\\Services\\NumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\UserNumbersInterface',\n 'App\\Services\\UserNumbersService'\n );\n }", "public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n $this->app->register(TelescopeServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerBrowser();\n\n $this->registerViewFinder();\n }", "public function register()\n {\n $this->registerFriendsLog();\n $this->registerNotifications();\n $this->registerAPI();\n $this->registerMailChimpIntegration();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/awesio-auth.php', 'awesio-auth');\n\n $this->app->singleton(AuthContract::class, Auth::class);\n\n $this->registerRepositories();\n\n $this->registerServices();\n\n $this->registerHelpers();\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerMigrator();\n $this->registerArtisanCommands();\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/services.php', 'services'\n );\n }", "public function register()\n {\n $this->registerRateLimiting();\n\n $this->registerHttpValidation();\n\n $this->registerHttpParsers();\n\n $this->registerResponseFactory();\n\n $this->registerMiddleware();\n }", "public function register()\n {\n $this->registerConfig();\n $this->registerView();\n $this->registerMessage();\n $this->registerMenu();\n $this->registerOutput();\n $this->registerCommands();\n require __DIR__ . '/Service/ServiceProvider.php';\n require __DIR__ . '/Service/RegisterRepoInterface.php';\n require __DIR__ . '/Service/ErrorHandling.php';\n $this->registerExportDompdf();\n $this->registerExtjs();\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerParser();\n }", "public function register()\n {\n $this->registerOtherProviders()->registerAliases();\n $this->loadViewsFrom(__DIR__.'/../../resources/views', 'jarvisPlatform');\n $this->app->bind('jarvis.auth.provider', AppAuthenticationProvider::class);\n $this->loadRoutes();\n }", "public function register()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\n $loader->alias('Laratrust', 'Laratrust\\LaratrustFacade');\n $loader->alias('Form', 'Collective\\Html\\FormFacade');\n $loader->alias('Html', 'Collective\\Html\\HtmlFacade');\n $loader->alias('Markdown', 'BrianFaust\\Parsedown\\Facades\\Parsedown');\n\n $this->app->register('Baum\\Providers\\BaumServiceProvider');\n $this->app->register('BrianFaust\\Parsedown\\ServiceProvider');\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Laravel\\Scout\\ScoutServiceProvider');\n $this->app->register('Laratrust\\LaratrustServiceProvider');\n\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\AuthServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\EventServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\ViewServiceProvider');\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerGuard();\n $this->registerBladeDirectives();\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register(Providers\\ManagerServiceProvider::class);\n $this->app->register(Providers\\ValidationServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(ReviewService::class, function ($app) {\n return new ReviewService();\n });\n }", "public function register()\n {\n $this->app->bind(\n Services\\UserService::class,\n Services\\Implementations\\UserServiceImplementation::class\n );\n $this->app->bind(\n Services\\FamilyCardService::class,\n Services\\Implementations\\FamilyCardServiceImplementation::class\n );\n }", "public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('gameService', 'App\\Service\\GameService');\n }", "public function register()\n {\n $this->app->bind(VehicleRepository::class, GuzzleVehicleRepository::class);\n }", "public function register()\n {\n $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function($app){\n return new ElasticsearchNedvizhimostsObserver(new Client());\n });\n\n // $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function()\n // {\n // return new ElasticsearchNedvizhimostsObserver(new Client());\n // });\n }", "public function register()\n {\n // Register the app\n $this->registerApp();\n\n // Register Commands\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerGeography();\n\n $this->registerCommands();\n\n $this->mergeConfig();\n\n $this->countriesCache();\n }", "public function register()\n {\n $this->app->bind(CertificationService::class, function($app){\n return new CertificationService();\n });\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'App\\Services\\Registrar'\n\t\t);\n \n $this->app->bind(\"App\\\\Services\\\\ILoginService\",\"App\\\\Services\\\\LoginService\");\n \n $this->app->bind(\"App\\\\Repositories\\\\IItemRepository\",\"App\\\\Repositories\\\\ItemRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IOutletRepository\",\"App\\\\Repositories\\\\OutletRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IInventoryRepository\",\"App\\\\Repositories\\\\InventoryRepository\");\n\t}", "public function register()\n {\n $this->registerRollbar();\n }", "public function register()\n {\n $this->app->bind('activity', function () {\n return new ActivityService(\n $this->app->make(Activity::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('views', function () {\n return new ViewService(\n $this->app->make(View::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('setting', function () {\n return new SettingService(\n $this->app->make(Setting::class),\n $this->app->make(Repository::class)\n );\n });\n\n $this->app->bind('images', function () {\n return new ImageService(\n $this->app->make(Image::class),\n $this->app->make(ImageManager::class),\n $this->app->make(Factory::class),\n $this->app->make(Repository::class)\n );\n });\n }", "public function register()\n {\n App::bind('CreateTagService', function($app) {\n return new CreateTagService;\n });\n\n App::bind('UpdateTagService', function($app) {\n return new UpdateTagService;\n });\n }", "public function register()\n {\n $this->registerDomainLocalization();\n $this->registerDomainLocaleFilter();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(MailConfigServiceProvider::class);\n }", "public function register()\n {\n $this->registerUserProvider();\n $this->registerGroupProvider();\n $this->registerNeo();\n\n $this->registerCommands();\n\n $this->app->booting(function()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('Neo', 'Wetcat\\Neo\\Facades\\Neo');\n });\n }", "public function register()\n {\n //\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\CompanyInterface', \n 'App\\Repositories\\CompanyRepo'\n );\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\UtilityInterface', \n 'App\\Repositories\\UtilityRepo'\n );\n }", "public function register()\n {\n $this->registerPayment();\n\n $this->app->alias('image', 'App\\Framework\\Image\\ImageService');\n }", "public function register()\n {\n $this->app->bind(AttributeServiceInterface::class,AttributeService::class);\n $this->app->bind(ProductServiceIntarface::class,ProductService::class);\n\n\n }", "public function register()\n {\n App::bind('App\\Repositories\\UserRepositoryInterface','App\\Repositories\\UserRepository');\n App::bind('App\\Repositories\\AnimalRepositoryInterface','App\\Repositories\\AnimalRepository');\n App::bind('App\\Repositories\\DonationTypeRepositoryInterface','App\\Repositories\\DonationTypeRepository');\n App::bind('App\\Repositories\\NewsAniRepositoryInterface','App\\Repositories\\NewsAniRepository');\n App::bind('App\\Repositories\\DonationRepositoryInterface','App\\Repositories\\DonationRepository');\n App::bind('App\\Repositories\\ProductRepositoryInterface','App\\Repositories\\ProductRepository');\n App::bind('App\\Repositories\\CategoryRepositoryInterface','App\\Repositories\\CategoryRepository');\n App::bind('App\\Repositories\\TransferMoneyRepositoryInterface','App\\Repositories\\TransferMoneyRepository');\n App::bind('App\\Repositories\\ShippingRepositoryInterface','App\\Repositories\\ShippingRepository');\n App::bind('App\\Repositories\\ReserveProductRepositoryInterface','App\\Repositories\\ReserveProductRepository');\n App::bind('App\\Repositories\\Product_reserveRepositoryInterface','App\\Repositories\\Product_reserveRepository');\n App::bind('App\\Repositories\\Ordering_productRepositoryInterface','App\\Repositories\\Ordering_productRepository');\n App::bind('App\\Repositories\\OrderingRepositoryInterface','App\\Repositories\\OrderingRepository');\n App::bind('App\\Repositories\\UserUpdateSlipRepositoryInterface','App\\Repositories\\UserUpdateSlipRepository');\n }", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->registerPublishing();\n }\n }", "public function register()\n {\n $this->app->bind(HttpClient::class, function ($app) {\n return new HttpClient();\n });\n\n $this->app->bind(SeasonService::class, function ($app) {\n return new SeasonService($app->make(HttpClient::class));\n });\n\n $this->app->bind(MatchListingController::class, function ($app) {\n return new MatchListingController($app->make(SeasonService::class));\n });\n\n }", "public function register()\n {\n $this->setupConfig();\n\n $this->bindServices();\n }", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Console\\MakeEndpointCommand::class,\n Console\\MakeControllerCommand::class,\n Console\\MakeRepositoryCommand::class,\n Console\\MakeTransformerCommand::class,\n Console\\MakeModelCommand::class,\n ]);\n }\n\n $this->registerFractal();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(AuthServiceProvider::class);\n }", "public function register()\n {\n\n $config = $this->app['config']['cors'];\n\n $this->app->bind('Yocome\\Cors\\CorsService', function() use ($config){\n return new CorsService($config);\n });\n\n }", "public function register()\n {\n // Bind facade\n\n $this->registerRepositoryBibdings();\n $this->registerFacades();\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(\\Laravel\\Socialite\\SocialiteServiceProvider::class);\n }", "public function register()\n {\n\n\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\UserRepository',\n 'Onlinecorrection\\Repositories\\UserRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ClientRepository',\n 'Onlinecorrection\\Repositories\\ClientRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ProjectRepository',\n 'Onlinecorrection\\Repositories\\ProjectRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentRepository',\n 'Onlinecorrection\\Repositories\\DocumentRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderRepository',\n 'Onlinecorrection\\Repositories\\OrderRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderItemRepository',\n 'Onlinecorrection\\Repositories\\OrderItemRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentImageRepository',\n 'Onlinecorrection\\Repositories\\DocumentImageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\PackageRepository',\n 'Onlinecorrection\\Repositories\\PackageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\StatusRepository',\n 'Onlinecorrection\\Repositories\\StatusRepositoryEloquent'\n );\n\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->registerDataStore();\n\n $this->registerStorageFactory();\n\n $this->registerStorageManager();\n\n $this->registerSimplePhoto();\n }", "public function register()\n {\n // Default configuration file\n $this->mergeConfigFrom(\n __DIR__.'/Config/auzo_tools.php', 'auzoTools'\n );\n\n $this->registerModelBindings();\n $this->registerFacadesAliases();\n }", "public function register()\n {\n $this->app->bind(\\Cookiesoft\\Repositories\\CategoryRepository::class, \\Cookiesoft\\Repositories\\CategoryRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\BillpayRepository::class, \\Cookiesoft\\Repositories\\BillpayRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\UserRepository::class, \\Cookiesoft\\Repositories\\UserRepositoryEloquent::class);\n //:end-bindings:\n }", "public function register()\n {\n $this->app->singleton(ThirdPartyAuthService::class, function ($app) {\n return new ThirdPartyAuthService(\n config('settings.authentication_services'),\n $app['Laravel\\Socialite\\Contracts\\Factory'],\n $app['Illuminate\\Contracts\\Auth\\Factory']\n );\n });\n\n $this->app->singleton(ImageValidator::class, function ($app) {\n return new ImageValidator(\n config('settings.image.max_filesize'),\n config('settings.image.mime_types'),\n $app['Intervention\\Image\\ImageManager']\n );\n });\n\n $this->app->singleton(ImageService::class, function ($app) {\n return new ImageService(\n config('settings.image.max_width'),\n config('settings.image.max_height'),\n config('settings.image.folder')\n );\n });\n\n $this->app->singleton(RandomWordService::class, function ($app) {\n return new RandomWordService(\n $app['App\\Repositories\\WordRepository'],\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.number_of_words_to_remember')\n );\n });\n\n $this->app->singleton(WordRepository::class, function ($app) {\n return new WordRepository(config('settings.min_number_of_chars_per_one_mistake_in_search'));\n });\n\n $this->app->singleton(CheckAnswerService::class, function ($app) {\n return new CheckAnswerService(\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.min_number_of_chars_per_one_mistake')\n );\n });\n\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerJWT();\n $this->registerJWSProxy();\n $this->registerJWTAlgoFactory();\n $this->registerPayload();\n $this->registerPayloadValidator();\n $this->registerPayloadUtilities();\n\n // use this if your package has a config file\n // config([\n // 'config/JWT.php',\n // ]);\n }", "public function register()\n {\n $this->registerManager();\n $this->registerConnection();\n $this->registerWorker();\n $this->registerListener();\n $this->registerFailedJobServices();\n $this->registerOpisSecurityKey();\n }", "public function register()\n {\n $this->app->register(RouterServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('App\\Services\\TripService.php', function ($app) {\n return new TripService();\n });\n }", "public function register()\n {\n $this->registerUserComponent();\n $this->registerLocationComponent();\n\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\UserCertificate\\IUserCertificateService::class,\n \\App\\Services\\UserCertificate\\UserCertificateService::class\n );\n }", "public function register()\n {\n $this->app->bind(FacebookMarketingContract::class,FacebookMarketingService::class);\n }", "public function register()\n {\n /**\n * Register additional service\n * providers if they exist.\n */\n foreach ($this->providers as $provider) {\n if (class_exists($provider)) {\n $this->app->register($provider);\n }\n }\n }", "public function register()\n {\n $this->app->singleton('composer', function($app)\n {\n return new Composer($app['files'], $app['path.base']);\n });\n\n $this->app->singleton('forge', function($app)\n {\n return new Forge($app);\n });\n\n // Register the additional service providers.\n $this->app->register('Nova\\Console\\ScheduleServiceProvider');\n $this->app->register('Nova\\Queue\\ConsoleServiceProvider');\n }", "public function register()\n {\n\n\n\n $this->mergeConfigFrom(__DIR__ . '/../config/counter.php', 'counter');\n\n $this->app->register(RouteServiceProvider::class);\n\n\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__.'/../config/colissimo.php', 'colissimo');\r\n $this->mergeConfigFrom(__DIR__.'/../config/rules.php', 'colissimo.rules');\r\n $this->mergeConfigFrom(__DIR__.'/../config/prices.php', 'colissimo.prices');\r\n $this->mergeConfigFrom(__DIR__.'/../config/zones.php', 'colissimo.zones');\r\n $this->mergeConfigFrom(__DIR__.'/../config/insurances.php', 'colissimo.insurances');\r\n $this->mergeConfigFrom(__DIR__.'/../config/supplements.php', 'colissimo.supplements');\r\n // Register the service the package provides.\r\n $this->app->singleton('colissimo', function ($app) {\r\n return new Colissimo;\r\n });\r\n }", "public function register(){\n $this->registerDependencies();\n $this->registerAlias();\n $this->registerServiceCommands();\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyService::class,\n \\App\\Services\\Survey\\SurveyService::class\n );\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyQuestionService::class,\n \\App\\Services\\Survey\\SurveyQuestionService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptService::class,\n \\App\\Services\\Survey\\SurveyAttemptService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptDataService::class,\n \\App\\Services\\Survey\\SurveyAttemptDataService::class\n );\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../config/atlas.php', 'atlas'\n );\n \n $this->app->singleton(CoreContract::class, Core::class);\n \n $this->registerFacades([\n 'Atlas' => 'Atlas\\Facades\\Atlas',\n ]);\n }", "public function register()\n {\n $this->app->bind(TelescopeRouteServiceContract::class, TelescopeRouteService::class);\n }", "public function register()\n {\n $this->registerRepositoryBindings();\n\n $this->registerInterfaceBindings();\n\n $this->registerAuthorizationServer();\n\n $this->registerResourceServer();\n\n $this->registerFilterBindings();\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/faithgen-events.php', 'faithgen-events');\n\n $this->app->singleton(EventsService::class);\n $this->app->singleton(GuestService::class);\n }", "public function register()\n {\n $this->registerAliases();\n $this->registerFormBuilder();\n\n // Register package commands\n $this->commands([\n 'CoreDbCommand',\n 'CoreSetupCommand',\n 'CoreSeedCommand',\n 'EventEndCommand',\n 'ArchiveMaxAttempts',\n 'CronCommand',\n 'ExpireInstructors',\n 'SetTestLock',\n 'StudentArchiveTraining',\n 'TestBuildCommand',\n 'TestPublishCommand',\n ]);\n\n // Merge package config with one in outer app \n // the app-level config will override the base package config\n $this->mergeConfigFrom(\n __DIR__.'/../config/core.php', 'core'\n );\n\n // Bind our 'Flash' class\n $this->app->bindShared('flash', function () {\n return $this->app->make('Hdmaster\\Core\\Notifications\\FlashNotifier');\n });\n\n // Register package dependencies\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Bootstrapper\\BootstrapperL5ServiceProvider');\n $this->app->register('Codesleeve\\LaravelStapler\\Providers\\L5ServiceProvider');\n $this->app->register('PragmaRX\\ZipCode\\Vendor\\Laravel\\ServiceProvider');\n $this->app->register('Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider');\n\n $this->app->register('Zizaco\\Confide\\ServiceProvider');\n $this->app->register('Zizaco\\Entrust\\EntrustServiceProvider');\n }" ]
[ "0.7879658", "0.7600202", "0.74930716", "0.73852855", "0.736794", "0.7306089", "0.7291359", "0.72896826", "0.72802424", "0.7268026", "0.7267702", "0.72658145", "0.7249053", "0.72171587", "0.7208486", "0.7198799", "0.7196415", "0.719478", "0.7176513", "0.7176227", "0.7164647", "0.71484524", "0.71337837", "0.7129424", "0.71231985", "0.7120174", "0.7103653", "0.71020955", "0.70977163", "0.7094701", "0.7092148", "0.70914364", "0.7088618", "0.7087278", "0.70827085", "0.70756096", "0.7075115", "0.70741326", "0.7071857", "0.707093", "0.7070619", "0.7067406", "0.7066438", "0.7061766", "0.70562875", "0.7051525", "0.7049684", "0.70467263", "0.7043264", "0.7043229", "0.70429426", "0.7042174", "0.7038729", "0.70384216", "0.70348704", "0.7034105", "0.70324445", "0.70282733", "0.7025024", "0.702349", "0.7023382", "0.702262", "0.7022583", "0.7022161", "0.702139", "0.7021084", "0.7020801", "0.7019928", "0.70180106", "0.7017351", "0.7011482", "0.7008627", "0.7007786", "0.70065045", "0.7006424", "0.70060986", "0.69992065", "0.699874", "0.69980377", "0.69980335", "0.6997871", "0.6996457", "0.69961494", "0.6994749", "0.6991596", "0.699025", "0.6988414", "0.6987274", "0.69865865", "0.69862866", "0.69848233", "0.6978736", "0.69779474", "0.6977697", "0.6976002", "0.69734764", "0.6972392", "0.69721776", "0.6970663", "0.6968296", "0.696758" ]
0.0
-1
Bootstrap any application services.
public function boot() { view()->composer('admin.job._form', function ($view) { $view->with('tipe_job', JobType::query()); }); view()->composer('admin.job._form', function ($view) { $view->with('company', Company::query()); }); view()->composer(['visitor.index','welcome'], function ($view) { $view->with('job', Job::with('company')->whereDate('tanggal_expired','>=', date('Y-m-d'))->latest()->take(6)->get()); }); view()->composer(['visitor.index','welcome'], function ($view) { $view->with('company', Company::inRandomOrder()->take(6)->get()); }); view()->composer(['visitor.index','welcome'], function ($view) { $view->with('kategori', DB::table('userjobs') ->join('job_types', 'job_types.id', 'userjobs.tipe_job') ->select('userjobs.tipe_job','job_types.job_type as tipe', DB::raw('count(*) as total')) ->whereDate('userjobs.tanggal_expired','>=', date('Y-m-d')) ->where('userjobs.deleted_at',null) ->groupBy('userjobs.tipe_job', 'job_types.job_type') ->get()); }); if (env('https',false)) { \URL::forceScheme('https'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\n {\n // Boot here application\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrapperList);\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\r\n {\r\n // Publishing is only necessary when using the CLI.\r\n if ($this->app->runningInConsole()) {\r\n $this->bootForConsole();\r\n }\r\n }", "public function boot()\n {\n $this->app->bind(IUserService::class, UserService::class);\n $this->app->bind(ISeminarService::class, SeminarService::class);\n $this->app->bind(IOrganizationService::class, OrganizationService::class);\n $this->app->bind(ISocialActivityService::class, SocialActivityService::class);\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->loadedServices, function ($s) {\n $this->bootService($s);\n });\n\n $this->booted = true;\n }", "public function boot()\n {\n\n $this->app->bind(FileUploaderServiceInterface::class,FileUploaderService::class);\n $this->app->bind(ShopServiceInterface::class,ShopService::class);\n $this->app->bind(CategoryServiceInterface::class,CategoryService::class);\n $this->app->bind(ProductServiceInterface::class,ProductService::class);\n $this->app->bind(ShopSettingsServiceInterface::class,ShopSettingsService::class);\n $this->app->bind(FeedbackServiceInterface::class,FeedbackService::class);\n $this->app->bind(UserServiceInterface::class,UserService::class);\n $this->app->bind(ShoppingCartServiceInterface::class,ShoppingCartService::class);\n $this->app->bind(WishlistServiceInterface::class,WishlistService::class);\n $this->app->bind(NewPostApiServiceInterface::class,NewPostApiService::class);\n $this->app->bind(DeliveryAddressServiceInterface::class,DeliveryAddressService::class);\n $this->app->bind(StripeServiceInterface::class,StripeService::class);\n $this->app->bind(OrderServiceInterface::class,OrderService::class);\n $this->app->bind(MailSenderServiceInterface::class,MailSenderSenderService::class);\n }", "public function boot()\n {\n $this->setupConfig('delta_service');\n $this->setupMigrations();\n $this->setupConnection('delta_service', 'delta_service.connection');\n }", "public function boot()\n {\n $configuration = [];\n\n if (file_exists($file = getcwd() . '/kaleo.config.php')) {\n $configuration = include_once $file;\n }\n\n $this->app->singleton('kaleo', function () use ($configuration) {\n return new KaleoService($configuration);\n });\n }", "public function boot()\n {\n $this->shareResources();\n $this->mergeConfigFrom(self::CONFIG_PATH, 'amocrm-api');\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Ports\n $this->app->bind(\n IAuthenticationService::class,\n AuthenticationService::class\n );\n $this->app->bind(\n IBeerService::class,\n BeerService::class\n );\n\n // Adapters\n $this->app->bind(\n IUserRepository::class,\n UserEloquentRepository::class\n );\n $this->app->bind(\n IBeerRepository::class,\n BeerEloquentRepository::class\n );\n }", "public function boot()\n {\n $this->setupConfig($this->app);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->loadMigrations();\n }\n if(config($this->vendorNamespace. '::config.enabled')){\n Livewire::component($this->vendorNamespace . '::login-form', LoginForm::class);\n $this->loadRoutes();\n $this->loadViews();\n $this->loadMiddlewares();\n $this->loadTranslations();\n }\n }", "public function boot()\n {\n $source = dirname(__DIR__, 3) . '/config/config.php';\n\n if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {\n $this->publishes([$source => config_path('dubbo_cli.php')]);\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('dubbo_cli');\n }\n\n $this->mergeConfigFrom($source, 'dubbo_cli');\n }", "public function boot()\n {\n $this->package('domain/app');\n\n $this->setApplication();\n }", "public function boot()\n {\n $this->setUpConfig();\n $this->setUpConsoleCommands();\n }", "public function boot()\n {\n $this->strapRoutes();\n $this->strapViews();\n $this->strapMigrations();\n $this->strapCommands();\n\n $this->registerPolicies();\n }", "public function boot()\n {\n $this->app->singleton('LaraCurlService', function ($app) {\n return new LaraCurlService();\n });\n\n $this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $providers = $this->make('config')->get('app.console_providers', array());\n foreach ($providers as $provider) {\n $provider = $this->make($provider);\n if ($provider && method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot()\n {\n foreach (glob(app_path('/Api/config/*.php')) as $path) {\n $path = realpath($path);\n $this->mergeConfigFrom($path, basename($path, '.php'));\n }\n\n // 引入自定义函数\n foreach (glob(app_path('/Helpers/*.php')) as $helper) {\n require_once $helper;\n }\n // 引入 api 版本路由\n $this->loadRoutesFrom(app_path('/Api/Routes/base.php'));\n\n }", "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 }", "protected function boot()\n\t{\n\t\tforeach ($this->serviceProviders as $provider)\n\t\t{\n\t\t\t$provider->boot($this);\n\t\t}\n\n\t\t$this->booted = true;\n\t}", "public function boot()\n {\n $this->setupConfig();\n //register rotating daily monolog provider\n $this->app->register(MonologProvider::class);\n $this->app->register(CircuitBreakerServiceProvider::class);\n $this->app->register(CurlServiceProvider::class);\n }", "public function boot(): void\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->services, function ($service) {\n $this->bootServices($service);\n });\n\n $this->booted = true;\n }", "public static function boot() {\n\t\tstatic::container()->boot();\n\t}", "public function boot()\n {\n include_once('ComposerDependancies\\Global.php');\n //---------------------------------------------\n include_once('ComposerDependancies\\League.php');\n include_once('ComposerDependancies\\Team.php');\n include_once('ComposerDependancies\\Matchup.php');\n include_once('ComposerDependancies\\Player.php');\n include_once('ComposerDependancies\\Trade.php');\n include_once('ComposerDependancies\\Draft.php');\n include_once('ComposerDependancies\\Message.php');\n include_once('ComposerDependancies\\Poll.php');\n include_once('ComposerDependancies\\Chat.php');\n include_once('ComposerDependancies\\Rule.php');\n\n \n include_once('ComposerDependancies\\Admin\\Users.php');\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n if ($this->app instanceof LaravelApplication) {\n $this->publishes([\n __DIR__.'/../config/state-machine.php' => config_path('state-machine.php'),\n ], 'config');\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('state-machine');\n }\n }\n }", "public function boot()\n {\n $this->bootEvents();\n\n $this->bootPublishes();\n\n $this->bootTypes();\n\n $this->bootSchemas();\n\n $this->bootRouter();\n\n $this->bootViews();\n \n $this->bootSecurity();\n }", "public function boot()\n {\n //\n Configuration::environment(\"sandbox\");\n Configuration::merchantId(\"cmpss9trsxsr4538\");\n Configuration::publicKey(\"zy3x5mb5jwkcrxgr\");\n Configuration::privateKey(\"4d63c8b2c340daaa353be453b46f6ac2\");\n\n\n $modules = Directory::listDirectories(app_path('Modules'));\n\n foreach ($modules as $module)\n {\n $routesPath = app_path('Modules/' . $module . '/routes.php');\n $viewsPath = app_path('Modules/' . $module . '/Views');\n\n if (file_exists($routesPath))\n {\n require $routesPath;\n }\n\n if (file_exists($viewsPath))\n {\n $this->app->view->addLocation($viewsPath);\n }\n }\n }", "public function boot()\n {\n resolve(EngineManager::class)->extend('elastic', function () {\n return new ElasticScoutEngine(\n ElasticBuilder::create()\n ->setHosts(config('scout.elastic.hosts'))\n ->build()\n );\n });\n }", "public function boot(): void\n {\n try {\n // Just check if we have DB connection! This is to avoid\n // exceptions on new projects before configuring database options\n // @TODO: refcator the whole accessareas retrieval to be file-based, instead of db based\n DB::connection()->getPdo();\n\n if (Schema::hasTable(config('cortex.foundation.tables.accessareas'))) {\n // Register accessareas into service container, early before booting any module service providers!\n $this->app->singleton('accessareas', fn () => app('cortex.foundation.accessarea')->where('is_active', true)->get());\n }\n } catch (Exception $e) {\n // Be quiet! Do not do or say anything!!\n }\n\n $this->bootstrapModules();\n }", "public function boot()\n {\n $this->app->register(UserServiceProvider::class);\n $this->app->register(DashboardServiceProvider::class);\n $this->app->register(CoreServiceProvider::class);\n $this->app->register(InstitutionalVideoServiceProvider::class);\n $this->app->register(InstitutionalServiceProvider::class);\n $this->app->register(TrainingServiceProvider::class);\n $this->app->register(CompanyServiceProvider::class);\n $this->app->register(LearningUnitServiceProvider::class);\n $this->app->register(PublicationServiceProvider::class);\n }", "public function boot()\n {\n Schema::defaultStringLength(191);\n\n $this->app->bindMethod([SendMailPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(MailService::class));\n });\n\n $this->app->bindMethod([ClearTokenPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(PasswordResetRepository::class));\n });\n\n $this->app->bind(AuthService::class, function ($app) {\n return new AuthService($app->make(HttpService::class));\n });\n }", "public function boot()\n {\n $this->makeRepositories();\n }", "public function boot(): void\n {\n $this->loadMiddlewares();\n }", "public function boot()\n {\n $this->app->when(ChatAPIChannel::class)\n ->needs(ChatAPI::class)\n ->give(function () {\n $config = config('services.chatapi');\n return new ChatAPI(\n $config['token'],\n $config['api_url']\n );\n });\n }", "public function boot() {\r\n\t\t$hosting_service = HostResolver::get_host_service();\r\n\r\n\t\tif ( ! empty( $hosting_service ) ) {\r\n\t\t\t$this->provides[] = $hosting_service;\r\n\t\t}\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n require(__DIR__ . '/../routes/console.php');\n } else {\n // Menus for BPM are done through middleware. \n Route::pushMiddlewareToGroup('web', AddToMenus::class);\n \n // Assigning to the web middleware will ensure all other middleware assigned to 'web'\n // will execute. If you wish to extend the user interface, you'll use the web middleware\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(__DIR__ . '/../routes/web.php');\n \n // If you wish to extend the api, be sure to utilize the api middleware. In your api \n // Routes file, you should prefix your routes with api/1.0\n Route::middleware('api')\n ->namespace($this->namespace)\n ->prefix('api/1.0')\n ->group(__DIR__ . '/../routes/api.php');\n \n Event::listen(ScreenBuilderStarting::class, function($event) {\n $event->manager->addScript(mix('js/screen-builder-extend.js', 'vendor/api-connector'));\n $event->manager->addScript(mix('js/screen-renderer-extend.js', 'vendor/api-connector'));\n });\n }\n\n // load migrations\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n // Load our views\n $this->loadViewsFrom(__DIR__.'/../resources/views/', 'api-connector');\n\n // Load our translations\n $this->loadTranslationsFrom(__DIR__.'/../lang', 'api-connector');\n\n $this->publishes([\n __DIR__.'/../public' => public_path('vendor/api-connector'),\n ], 'api-connector');\n\n $this->publishes([\n __DIR__ . '/../database/seeds' => database_path('seeds'),\n ], 'api-connector');\n\n $this->app['events']->listen(PackageEvent::class, PackageListener::class);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->bindCommands();\n $this->registerCommands();\n $this->app->bind(InstallerContract::class, Installer::class);\n\n $this->publishes([\n __DIR__.'/../config/exceptionlive.php' => base_path('config/exceptionlive.php'),\n ], 'config');\n }\n\n $this->registerMacros();\n }", "public function boot(){\r\n $this->app->configure('sdk');\r\n $this->publishes([\r\n __DIR__.'/../../resources/config/sdk.php' => config_path('sdk.php')\r\n ]);\r\n $this->mergeConfigFrom(__DIR__.'/../../resources/config/sdk.php','sdk');\r\n\r\n $api = config('sdk.api');\r\n foreach($api as $key => $value){\r\n $this->app->singleton($key,$value);\r\n }\r\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n EnvironmentCommand::class,\n EventGenerateCommand::class,\n EventMakeCommand::class,\n JobMakeCommand::class,\n KeyGenerateCommand::class,\n MailMakeCommand::class,\n ModelMakeCommand::class,\n NotificationMakeCommand::class,\n PolicyMakeCommand::class,\n ProviderMakeCommand::class,\n RequestMakeCommand::class,\n ResourceMakeCommand::class,\n RuleMakeCommand::class,\n ServeCommand::class,\n StorageLinkCommand::class,\n TestMakeCommand::class,\n ]);\n }\n }", "public function boot()\n {\n $this->app->bind(WeatherInterface::class, OpenWeatherMapService::class);\n $this->app->bind(OrderRepositoryInterface::class, EloquentOrderRepository::class);\n $this->app->bind(NotifyInterface::class, EmailNotifyService::class);\n }", "public function boot()\n {\n $this->app->bind(DateService::class,DateServiceImpl::class);\n $this->app->bind(DisasterEventQueryBuilder::class,DisasterEventQueryBuilderImpl::class);\n $this->app->bind(MedicalFacilityQueryBuilder::class,MedicalFacilityQueryBuilderImpl::class);\n $this->app->bind(RefugeCampQueryBuilder::class,RefugeCampQueryBuilderImpl::class);\n $this->app->bind(VictimQueryBuilder::class,VictimQueryBuilderImpl::class);\n $this->app->bind(VillageQueryBuilder::class,VillageQueryBuilderImpl::class);\n }", "public function boot()\n {\n\t\tif ( $this->app->runningInConsole() ) {\n\t\t\t$this->loadMigrationsFrom(__DIR__.'/migrations');\n\n//\t\t\t$this->publishes([\n//\t\t\t\t__DIR__.'/config/scheduler.php' => config_path('scheduler.php'),\n//\t\t\t\t__DIR__.'/console/CronTasksList.php' => app_path('Console/CronTasksList.php'),\n//\t\t\t\t__DIR__.'/views' => resource_path('views/vendor/scheduler'),\n//\t\t\t]);\n\n//\t\t\tapp('Revolta77\\ScheduleMonitor\\Conntroller\\CreateController')->index();\n\n//\t\t\t$this->commands([\n//\t\t\t\tConsole\\Commands\\CreateController::class,\n//\t\t\t]);\n\t\t}\n\t\t$this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $this->bootPackages();\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->commands($this->load(__DIR__.'/../Console', Command::class));\n }\n }", "public function boot(): void\n {\n $this->publishes(\n [\n __DIR__ . '/../config/laravel_entity_services.php' =>\n $this->app->make('path.config') . DIRECTORY_SEPARATOR . 'laravel_entity_services.php',\n ],\n 'laravel_repositories'\n );\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel_entity_services.php', 'laravel_entity_services');\n\n $this->registerCustomBindings();\n }", "public function boot()\n {\n // DEFAULT STRING LENGTH\n Schema::defaultStringLength(191);\n\n // PASSPORT\n Passport::routes(function (RouteRegistrar $router)\n {\n $router->forAccessTokens();\n });\n Passport::tokensExpireIn(now()->addDays(1));\n\n // SERVICES, REPOSITORIES, CONTRACTS BINDING\n $this->app->bind('App\\Contracts\\IUser', 'App\\Repositories\\UserRepository');\n $this->app->bind('App\\Contracts\\IUserType', 'App\\Repositories\\UserTypeRepository');\n $this->app->bind('App\\Contracts\\IApiToken', 'App\\Services\\ApiTokenService');\n $this->app->bind('App\\Contracts\\IModule', 'App\\Repositories\\ModuleRepository');\n $this->app->bind('App\\Contracts\\IModuleAction', 'App\\Repositories\\ModuleActionRepository');\n }", "public function bootstrap(): void\n {\n $globalConfigurationBuilder = (new GlobalConfigurationBuilder())->withEnvironmentVariables()\n ->withPhpFileConfigurationSource(__DIR__ . '/../config.php');\n (new BootstrapperCollection())->addMany([\n new DotEnvBootstrapper(__DIR__ . '/../.env'),\n new ConfigurationBootstrapper($globalConfigurationBuilder),\n new GlobalExceptionHandlerBootstrapper($this->container)\n ])->bootstrapAll();\n }", "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'deniskisel');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'deniskisel');\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n $this->bootingDomain();\n\n $this->registerCommands();\n $this->registerListeners();\n $this->registerPolicies();\n $this->registerRoutes();\n $this->registerBladeComponents();\n $this->registerLivewireComponents();\n $this->registerSpotlightCommands();\n\n $this->bootedDomain();\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->registerMigrations();\n $this->registerMigrationFolder();\n $this->registerConfig();\n }\n }", "public function boot()\n {\n $this->bootModulesMenu();\n $this->bootSkinComposer();\n $this->bootCustomBladeDirectives();\n }", "public function boot(): void\n {\n $this->app->bind(Telegram::class, static function () {\n return new Telegram(\n config('services.telegram-bot-api.token'),\n new HttpClient()\n );\n });\n }", "public function boot()\n {\n\n if (! config('app.installed')) {\n return;\n }\n\n $this->loadRoutesFrom(__DIR__ . '/Routes/admin.php');\n $this->loadRoutesFrom(__DIR__ . '/Routes/public.php');\n\n $this->loadMigrationsFrom(__DIR__ . '/Database/Migrations');\n\n// $this->loadViewsFrom(__DIR__ . '/Resources/Views', 'portfolio');\n\n $this->loadTranslationsFrom(__DIR__ . '/Resources/Lang/', 'contact');\n\n //Add menu to admin panel\n $this->adminMenu();\n\n }", "public function boot()\n {\n if (! config('app.installed')) {\n return;\n }\n\n $this->app['config']->set([\n 'scout' => [\n 'driver' => setting('search_engine', 'mysql'),\n 'algolia' => [\n 'id' => setting('algolia_app_id'),\n 'secret' => setting('algolia_secret'),\n ],\n ],\n ]);\n }", "protected function bootServiceProviders()\n {\n foreach($this->activeProviders as $provider)\n {\n // check if the service provider has a boot method.\n if (method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot(): void\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'imc');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'imc');\n $this->registerPackageRoutes();\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Larapex Livewire\n $this->mergeConfigFrom(__DIR__ . '/../configs/larapex-livewire.php', 'larapex-livewire');\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'larapex-livewire');\n\n $this->registerBladeDirectives();\n\n if ($this->app->runningInConsole()) {\n $this->registerCommands();\n $this->publishResources();\n }\n }", "public function boot()\n {\n // Bootstrap code here.\n $this->app->singleton(L9SmsApiChannel::class, function () {\n $config = config('l9smsapi');\n if (empty($config['token']) || empty($config['service'])) {\n throw new \\Exception('L9SmsApi missing token and service in config');\n }\n\n return new L9SmsApiChannel($config['token'], $config['service']);\n });\n\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/l9smsapi.php' => config_path('l9smsapi.php'),\n ], 'config');\n }\n }", "public function boot()\n\t{\n\t\t$this->bindRepositories();\n\t}", "public function boot()\n {\n if (!$this->app->runningInConsole()) {\n return;\n }\n\n $this->commands([\n ListenCommand::class,\n InstallCommand::class,\n EventsListCommand::class,\n ObserverMakeCommand::class,\n ]);\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n RabbitEvents::listen($event, $listener);\n }\n }\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n MultiAuthInstallCommand::class,\n ]);\n }\n }", "public function boot() {\n\n\t\t$this->registerProviders();\n\t\t$this->bootProviders();\n\t\t$this->registerProxies();\n\t}", "public function boot(): void\n {\n // routes\n $this->loadRoutes();\n // assets\n $this->loadAssets('assets');\n // configuration\n $this->loadConfig('configs');\n // views\n $this->loadViews('views');\n // view extends\n $this->extendViews();\n // translations\n $this->loadTranslates('views');\n // adminer\n $this->loadAdminer('adminer');\n // commands\n $this->loadCommands();\n // gates\n $this->registerGates();\n // listeners\n $this->registerListeners();\n // settings\n $this->applySettings();\n }", "public function boot()\n {\n $this->setupFacades();\n $this->setupViews();\n $this->setupBlades();\n }", "public function boot()\n {\n\n $this->app->translate_manager->addTranslateProvider(TranslateMenu::class);\n\n\n\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n $this->loadMigrationsFrom(__DIR__ . '/../migrations/');\n\n\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/larkeauth-rbac-model.conf' => config_path('larkeauth-rbac-model.conf.larkeauth'),\n __DIR__ . '/../config/larkeauth.php' => config_path('larkeauth.php.larkeauth')\n ], 'larke-auth-config');\n\n $this->commands([\n Commands\\Install::class,\n Commands\\GroupAdd::class,\n Commands\\PolicyAdd::class,\n Commands\\RoleAssign::class,\n ]);\n }\n\n $this->mergeConfigFrom(__DIR__ . '/../config/larkeauth.php', 'larkeauth');\n\n $this->bootObserver();\n }", "public function boot(): void\n {\n $this->app\n ->when(RocketChatWebhookChannel::class)\n ->needs(RocketChat::class)\n ->give(function () {\n return new RocketChat(\n new HttpClient(),\n Config::get('services.rocketchat.url'),\n Config::get('services.rocketchat.token'),\n Config::get('services.rocketchat.channel')\n );\n });\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n $this->app->registerConfiguredProvidersInRequest();\n\n $this->fireAppCallbacks($this->bootingCallbacks);\n\n /** array_walk\n * If when a provider booting, it reg some other providers,\n * then the new providers added to $this->serviceProviders\n * then array_walk will loop the new ones and boot them. // pingpong/modules 2.0 use this feature\n */\n array_walk($this->serviceProviders, function ($p) {\n $this->bootProvider($p);\n });\n\n $this->booted = true;\n\n $this->fireAppCallbacks($this->bootedCallbacks);\n }", "public function boot()\n {\n $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n\t{\n\t\t$this->package('atlantis/admin');\n\n\t\t#i: Set the locale\n\t\t$this->setLocale();\n\n $this->registerServiceAdminValidator();\n $this->registerServiceAdminFactory();\n $this->registerServiceAdminDataTable();\n $this->registerServiceModules();\n\n\t\t#i: Include our filters, view composers, and routes\n\t\tinclude __DIR__.'/../../filters.php';\n\t\tinclude __DIR__.'/../../views.php';\n\t\tinclude __DIR__.'/../../routes.php';\n\n\t\t$this->app['events']->fire('admin.ready');\n\t}", "public function boot()\n {\n $this->app->booted(function () {\n $this->callMethodIfExists('jobs');\n });\n }", "public function boot()\n {\n $this->bootSetTimeLocale();\n $this->bootBladeHotelRole();\n $this->bootBladeHotelGuest();\n $this->bootBladeIcon();\n }", "public function boot(): void\n {\n $this->registerRoutes();\n $this->registerResources();\n $this->registerMixins();\n\n if ($this->app->runningInConsole()) {\n $this->offerPublishing();\n $this->registerMigrations();\n }\n }", "public function boot()\n {\n $this->dispatch(new SetCoreConnection());\n $this->dispatch(new ConfigureCommandBus());\n $this->dispatch(new ConfigureTranslator());\n $this->dispatch(new LoadStreamsConfiguration());\n\n $this->dispatch(new InitializeApplication());\n $this->dispatch(new AutoloadEntryModels());\n $this->dispatch(new AddAssetNamespaces());\n $this->dispatch(new AddImageNamespaces());\n $this->dispatch(new AddViewNamespaces());\n $this->dispatch(new AddTwigExtensions());\n $this->dispatch(new RegisterAddons());\n }", "public function boot(): void\n {\n $this->loadViews();\n $this->loadTranslations();\n\n if ($this->app->runningInConsole()) {\n $this->publishMultipleConfig();\n $this->publishViews(false);\n $this->publishTranslations(false);\n }\n }", "public function boot()\n {\n $this->bootForConsole();\n $this->loadRoutesFrom(__DIR__ . '/routes/web.php');\n $this->loadViewsFrom(__DIR__ . '/./../resources/views', 'bakerysoft');\n }", "public function boot()\n {\n $this->app->booted(function () {\n $this->defineRoutes();\n });\n $this->defineResources();\n $this->registerDependencies();\n }", "public function boot()\n {\n $this->app->bind(CustomersRepositoryInterface::class, CustomersRepository::class);\n $this->app->bind(CountryToCodeMapperInterface::class, CountryToCodeMapper::class);\n $this->app->bind(PhoneNumbersValidatorInterface::class, PhoneNumbersRegexValidator::class);\n $this->app->bind(CustomersFilterServiceInterface::class, CustomersFilterService::class);\n $this->app->bind(CacheInterface::class, CacheAdapter::class);\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([$this->configPath() => config_path('oauth.php')], 'oauth');\n }\n\n app()->bind(ClientToken::class, function () {\n return new ClientToken();\n });\n\n app()->bind(TokenParser::class, function () {\n return new TokenParser(\n app()->get(Request::class)\n );\n });\n\n app()->bind(OAuthClient::class, function () {\n return new OAuthClient(\n app()->get(Request::class),\n app()->get(ClientToken::class)\n );\n });\n\n app()->bind(AccountService::class, function () {\n return new AccountService(app()->get(OAuthClient::class));\n });\n }", "public function boot()\n {\n Client::observe(ClientObserver::class);\n $this->app->bind(ClientRepositoryInterface::class, function ($app) {\n return new ClientRepository(Client::class);\n });\n $this->app->bind(UserRepositoryInterface::class, function ($app) {\n return new UserRepository(User::class);\n });\n }", "public function boot()\n {\n $this->setupFacades(); \n //$this->setupConfigs(); \n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n //\n }\n\n $this->loadRoutesFrom(__DIR__ . '/routes.php');\n }", "public function boot()\n {\n $path = __DIR__.'/../..';\n\n $this->package('clumsy/cms', 'clumsy', $path);\n\n $this->registerAuthRoutes();\n $this->registerBackEndRoutes();\n\n require $path.'/helpers.php';\n require $path.'/errors.php';\n require $path.'/filters.php';\n\n if ($this->app->runningInConsole()) {\n $this->app->make('Clumsy\\CMS\\Clumsy');\n }\n\n }", "public function boot()\n {\n $this->mergeConfigFrom(__DIR__ . '/../../config/bs4.php', 'bs4');\n $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'bs');\n $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'bs');\n\n if ($this->app->runningInConsole())\n {\n $this->publishes([\n __DIR__ . '/../../resources/views' => resource_path('views/vendor/bs'),\n ], 'views');\n\n $this->publishes([\n __DIR__ . '/../../resources/lang' => resource_path('lang/vendor/bs'),\n ], 'lang');\n\n $this->publishes([\n __DIR__ . '/../../config' => config_path(),\n ], 'config');\n }\n }", "public function boot()\n {\n $this->client = new HttpClient([\n 'base_uri' => 'https://api.ipfinder.io/v1/',\n 'headers' => [\n 'User-Agent' => 'Laravel-GeoIP-Torann',\n ],\n 'query' => [\n 'token' => $this->config('key'),\n ],\n ]);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Check::class,\n Clear::class,\n Fix::class,\n Fresh::class,\n Foo::class,\n Ide::class,\n MakeDatabase::class,\n Ping::class,\n Version::class,\n ]);\n }\n }", "public function boot()\n {\n $app = $this->app;\n\n if (!$app->runningInConsole()) {\n return;\n }\n\n $source = realpath(__DIR__ . '/config/config.php');\n\n if (class_exists('Illuminate\\Foundation\\Application', false)) {\n // L5\n $this->publishes([$source => config_path('sniffer-rules.php')]);\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } elseif (class_exists('Laravel\\Lumen\\Application', false)) {\n // Lumen\n $app->configure('sniffer-rules');\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } else {\n // L4\n $this->package('chefsplate/sniffer-rules', null, __DIR__);\n }\n }", "public function boot()\r\n\t{\r\n\t\t$this->package('estey/hipsupport');\r\n\t\t$this->registerHipSupport();\r\n\t\t$this->registerHipSupportOnlineCommand();\r\n\t\t$this->registerHipSupportOfflineCommand();\r\n\r\n\t\t$this->registerCommands();\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n ControllerMakeCommand::class,\n ServiceMakeCommand::class,\n RepositoryMakeCommand::class,\n ModelMakeCommand::class,\n RequestRuleMakeCommand::class,\n ]);\n }\n }", "public function boot() {\n $srcDir = __DIR__ . '/../';\n \n $this->package('baseline/baseline', 'baseline', $srcDir);\n \n include $srcDir . 'Http/routes.php';\n include $srcDir . 'Http/filters.php';\n }", "public function boot()\n {\n $this->app->bind('App\\Services\\ProviderAccountService', function() {\n return new ProviderAccountService;\n });\n }", "public function boot()\n {\n $this->loadViewsFrom(__DIR__ . '/resources/views', 'Counters');\n\n $this->loadTranslationsFrom(__DIR__ . '/resources/lang', 'Counters');\n\n\n //To load migration files directly from the package\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n\n $this->app->booted(function () {\n $loader = AliasLoader::getInstance();\n $loader->alias('Counters', Counters::class);\n\n });\n\n $this->publishes([\n __DIR__ . '/../config/counter.php' => config_path('counter.php'),\n ], 'config');\n\n\n\n $this->publishes([\n __DIR__.'/../database/migrations/0000_00_00_000000_create_counters_tables.php' => $this->app->databasePath().\"/migrations/0000_00_00_000000_create_counters_tables.php\",\n ], 'migrations');\n\n\n if ($this->app->runningInConsole()) {\n $this->commands([\\Maher\\Counters\\Commands\\MakeCounter::class]);\n }\n\n\n }", "public function boot(Application $app)\n {\n\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }" ]
[ "0.7344842", "0.7212776", "0.7207748", "0.7123287", "0.7109729", "0.70822036", "0.7076881", "0.70718396", "0.7051853", "0.7025475", "0.7011949", "0.70043486", "0.6955807", "0.69322443", "0.69319373", "0.69272774", "0.6911386", "0.69069713", "0.6898877", "0.6898432", "0.6896597", "0.6889767", "0.6886577", "0.6880688", "0.6875815", "0.6874972", "0.68696195", "0.6864291", "0.6864246", "0.68631536", "0.68599164", "0.6857919", "0.685537", "0.68552583", "0.68522125", "0.6839775", "0.683261", "0.6831196", "0.68272495", "0.68250644", "0.68241394", "0.68181944", "0.68132496", "0.68117976", "0.6811785", "0.6808445", "0.68066794", "0.680175", "0.68005246", "0.67994386", "0.67969066", "0.67912513", "0.67884964", "0.678574", "0.678558", "0.6783794", "0.67782456", "0.6773669", "0.6766658", "0.6766194", "0.67617613", "0.67611295", "0.6758855", "0.6756636", "0.6754412", "0.6751842", "0.6747439", "0.6744991", "0.67441815", "0.6743506", "0.67400324", "0.6739403", "0.6738356", "0.6738189", "0.6731425", "0.6730627", "0.67293024", "0.6726232", "0.67261064", "0.67192256", "0.6716676", "0.6716229", "0.671442", "0.6713091", "0.6702467", "0.66990495", "0.66913867", "0.6689953", "0.66861963", "0.66840357", "0.66826946", "0.6681548", "0.6680455", "0.6676407", "0.6675645", "0.6672465", "0.66722375", "0.66722375", "0.66722375", "0.66722375", "0.66722375" ]
0.0
-1
Creates a new pointer
public function __construct($path) { if ('' === $path) { $this->path= []; } else if (1 === strspn((string)$path, '/')) { $this->path= []; foreach (explode('/', substr($path, 1)) as $token) { $this->path[$token]= $this->address($token); } } else { throw new IllegalArgumentException('Malformed path '.$path.', must either be empty or start with "/"'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function regularNew() {}", "function xptr_new_context()\n{\n}", "public function createNew();", "public static function createNew();", "abstract function &create();", "function _newobj()\n\t\t{\n\t\t\t$this->n++;\n\t\t\t$this->offsets[$this->n]=strlen($this->buffer);\n\t\t\t$this->_out($this->n.' 0 obj');\n\t\t}", "public function new()\n\t{\n\t\t//\n\t}", "public function new()\n\t{\n\t\t//\n\t}", "public function getPointer()\r\n\t{\r\n\t\treturn $this->pointer;\r\n\t}", "abstract public static function new(): static;", "public function &create()\n {\n $obj = null;\n\n if (class_exists($this->_class_name)) {\n // Assigning the return value of new by reference\n $obj = new $this->_class_name();\n }\n\n return $obj;\n }", "public function getPointer()\n {\n return $this->uuid;\n }", "abstract protected function getNewResource();", "public function new()\n {\n //\n }", "public function new()\n {\n //\n }", "function memConnect() {\n return new MemWrapper();\n}", "abstract protected function create ();", "public function new_address() {\n\t\t$address = new Address();\n\n\t\t/*\n\t\t * Twinfield requires one default address:\n\t\t * \"There has to be one default address.\"\n\t\t */\n\t\tif ( empty( $this->addresses ) ) {\n\t\t\t$address->set_default( true );\n\t\t}\n\n\t\t$this->addresses[] = $address;\n\n\t\treturn $address;\n\t}", "public function generateNew() {\n return new Position($this->oTableGateway->getAdapter());\n }", "public function createNew() {\n\t}", "public function newInstance();", "public function newInstance();", "function makeClone()\n {\n $this->id = 0;\n }", "public function newInstance(): object;", "abstract function create();", "public function newConn(){\n $tmp = clone $this;\n $tmp->tbl = \"\";\n $tmp->query = null;\n $tmp->conn = $this->conn;\n \n return $tmp;\n }", "protected function _setPointer($scope, $path, $create = false)\n {\n $varpath = explode('/', $path);\n\n switch (strtoupper($scope)) {\n // GET variables\n case 'GET':\n case '_GET':\n $this->_pointer = &$_GET;\n break;\n\n // POST variables\n case 'POST':\n case '_POST':\n $this->_pointer = &$_POST;\n break;\n\n // SERVER variables\n case 'SERVER':\n case '_SERVER':\n $this->_pointer = &$_SERVER;\n break;\n\n // SESSION variables\n case 'SESSION':\n case '_SESSION':\n $this->_pointer = &$_SESSION;\n break;\n\n // COOKIE variables\n case 'COOKIE':\n case '_COOKIE':\n $this->_pointer = &$_COOKIE;\n break;\n\n // ENV variables\n case 'ENV':\n case '_ENV':\n $this->_pointer = &$_ENV;\n break;\n\n // global variables\n case 'GLOBALS':\n default:\n if (empty($varpath)) {\n throw new \\Exception('GLOBALS needs a path');\n }\n $part = array_shift($varpath);\n if (!isset($GLOBALS[$part])) {\n return false;\n }\n $this->_pointer = &$GLOBALS[$part];\n break;\n }\n if (empty($varpath)) {\n return true;\n }\n\n while ($part = array_shift($varpath)) {\n if (!isset($this->_pointer[$part])) {\n if (!$create) {\n return false;\n }\n if (!empty($varpath)) {\n return false;\n }\n $this->_pointer[$part] = '';\n }\n $this->_pointer = &$this->_pointer[$part];\n }\n return true;\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "function create_refcounted_string() {\n $x = 'bpache';\n $x[0] = 'a';\n return $x;\n}", "public static function getNewInstance() {\n \treturn new static();\n\t }", "public function create( &$object );", "static function create(): self;", "public function __construct($parent, $info=NULL) {\n\t\t$this->type = 'PTR';\n\t\tparent::__construct($parent, $info);\n\t\tif ($this->type != 'PTR')\n\t\t\tthrow new RecordTypeError(sprintf(\n\t\t\t\t_('Invalid record type [%s], must be PTR'), $this->type));\n\t}", "public function newCObj() {}", "abstract protected function createObject();", "public function createDuplicate();", "public function create()/*# : CreateInterface */;", "public static function new(){\n self::$instance = new self();\n return self::$instance;\n }", "function assignObject()\n\t{\n\t\tif ($this->id != 0)\n\t\t{\n\t\t\tif ($this->call_by_reference)\n\t\t\t{\n\t\t\t\t$this->object =& new ilObjAICCLearningModule($this->id, true);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->object =& new ilObjAICCLearningModule($this->id, false);\n\t\t\t}\n\t\t}\n\t}", "function oci_new_descriptor($connection, $type = false)\n{\n}", "function _new($classe)\n{\n return new $classe($bdd, $ObjetBDDParam);\n}", "public function getNew()\n {\n $class = get_class($this);\n\n return new $class;\n }", "public function getPointerToXref() {}", "public function getPointerToXref() {}", "public function create(){\r\n\treturn new $this->class();\r\n }", "public function create() {\n\t \n }", "function newLike();", "public function createNewItem()\n {\n return new Phone(\n new TouchKeyboardA(),\n new TouchDisplayA(),\n 'Abrykos',\n 'A2'\n );\n }", "public function create()\n\t {\n\t //\n\t }", "public function getNewCursor()\n {\n return oci_new_cursor($this->_dbh);\n }", "public function createAddress()\n {\n $class = $this->getClass();\n\n return new $class;\n }", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function createClone()\n {\n return clone $this;\n }", "public function makeNew()\n\t{\n\t\treturn new static($this->view);\n\t}", "public function allocate($length, $skip = true)\n {\n $stream = fopen('php://memory', 'r+');\n if (stream_copy_to_stream($this->_stream_handle, $stream, $length)) {\n if ($skip) {\n $this->skip($length);\n }\n return new static($stream);\n }\n throw RuntimeException::BufferAllocationFailed();\n }", "public function create()\n\t{\n\n\n\t\t//\n\t}", "public function newCurrent()\n {\n return $this->newInstance($this->current);\n }", "abstract protected function createNullInstance();", "function con_ref() {\n global $o; ////E' come $o =& $GLOBALS['o']\n $o =& new stdClass;//qui non faccio altro che riassegnare l'alias della variabile $o, che è locale alla funzione e quindi va persa.\n //stessa logica si applica alle variabili \"static\"\n //tra l'altro:\n //PHP Deprecated: Assigning the return value of new by reference is deprecated\n }", "private function __clone () {}", "public function createNewItem()\n {\n return new Phone(\n new TouchKeyboardB(),\n new TouchDisplayB(),\n 'Slyva',\n 'S2'\n );\n }", "public function create()\r\n\t{\r\n\t\t//\r\n\t}", "public function addAllPointers();", "function create();", "public static function getNewInstance()\n {\n return self::$instance = new self();\n }", "public function getNewCursor(): mixed\n {\n return oci_new_cursor($this->dbh);\n }", "function findNew();", "public function create()\n {\n throw new NotImplementedException();\n }", "protected static function newFactory()\n {\n //\n }", "public function newIdentifier(): string;", "public function newInstance(): object\n {\n return $this->instantiator->instantiate($this->name);\n }", "public function newEntry()\n {\n return new Entry;\n }", "abstract protected function getNewEntityInstance();", "public function newInstance($newStack = null) {\n\t\t$class = get_class($this);\n\t\t// support inheritance by passing old object to overloaded constructor\n\t\t$new = $class != 'phpQuery'\n\t\t\t? new $class($this, $this->getDocumentID())\n\t\t\t: new phpQueryObject($this->getDocumentID());\n\t\t$new->previous = $this;\n\t\tif (is_null($newStack)) {\n\t\t\t$new->elements = $this->elements;\n\t\t\tif ($this->elementsBackup)\n\t\t\t\t$this->elements = $this->elementsBackup;\n\t\t} else if (is_string($newStack)) {\n\t\t\t$new->elements = phpQuery::pq($newStack, $this->getDocumentID())->stack();\n\t\t} else {\n\t\t\t$new->elements = $newStack;\n\t\t}\n\t\treturn $new;\n\t}", "public function newInstance($newStack = null) {\n\t\t$class = get_class($this);\n\t\t// support inheritance by passing old object to overloaded constructor\n\t\t$new = $class != 'phpQuery'\n\t\t\t? new $class($this, $this->getDocumentID())\n\t\t\t: new phpQueryObject($this->getDocumentID());\n\t\t$new->previous = $this;\n\t\tif (is_null($newStack)) {\n\t\t\t$new->elements = $this->elements;\n\t\t\tif ($this->elementsBackup)\n\t\t\t\t$this->elements = $this->elementsBackup;\n\t\t} else if (is_string($newStack)) {\n\t\t\t$new->elements = phpQuery::pq($newStack, $this->getDocumentID())->stack();\n\t\t} else {\n\t\t\t$new->elements = $newStack;\n\t\t}\n\t\treturn $new;\n\t}", "function newDataObject() {\n\t\treturn new EditAssignment();\n\t}", "public function create() {\n //not implemented\n }", "public function create()\n\t{\n\t\t\n\t\t//\n\t}", "public function getNewDescriptor($type = OCI_D_LOB)\n {\n return oci_new_descriptor($this->_dbh, $type);\n }", "public function newInstance() : LocatorInterface\n\t{\n\t}", "function create () {\n\t\t$stm = DB::$pdo->prepare(\"insert into `generated_object` ({$generator_insert_columns}) \n\t\t\t\t\t\t\t\t values ({$generator_insert_values})\");\n\t\t// generator bind hook\n\t\t$stm->execute();\n\n\t\t$this->id = DB::$pdo->lastInsertId();\n\t}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}" ]
[ "0.5981811", "0.56818634", "0.5650713", "0.5644043", "0.5577867", "0.5533378", "0.5425616", "0.5425616", "0.54124284", "0.54108465", "0.5386438", "0.5375945", "0.53138", "0.5292441", "0.5292441", "0.52901727", "0.5276493", "0.52690923", "0.52026576", "0.51705545", "0.51340044", "0.51340044", "0.51248854", "0.5108143", "0.51037025", "0.5080182", "0.506289", "0.50404996", "0.50404996", "0.50404996", "0.503766", "0.50251275", "0.5019091", "0.50179625", "0.49916956", "0.4957523", "0.4935664", "0.49300402", "0.49282834", "0.49188215", "0.49090034", "0.48986882", "0.4860529", "0.48483115", "0.48375517", "0.48373842", "0.4833531", "0.48321348", "0.48179966", "0.48053414", "0.4792029", "0.47757852", "0.47730625", "0.4771796", "0.4771796", "0.4771796", "0.4771796", "0.4771796", "0.4771796", "0.4771796", "0.4771796", "0.4771796", "0.4771796", "0.4771796", "0.47712502", "0.47687805", "0.4757399", "0.4755283", "0.47495714", "0.4744575", "0.4739577", "0.47383836", "0.47365433", "0.4729986", "0.47223896", "0.47188917", "0.46966344", "0.469658", "0.46928295", "0.4684887", "0.4681253", "0.46772236", "0.46747103", "0.4673913", "0.46694028", "0.46669832", "0.46669832", "0.4664873", "0.46639612", "0.4659244", "0.4654117", "0.46540123", "0.4653853", "0.46508425", "0.46508425", "0.46508425", "0.46508425", "0.46508425", "0.46508425", "0.46508425", "0.46508425" ]
0.0
-1
Resolves input to an address
public function resolve(&$input) { $address= new RootOf($input); foreach ($this->path as $resolver) { $address= $resolver($address); } return $address; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAddress();", "public function getAddress();", "public function getAddress() {}", "public function parseAddressesProvider() {}", "private function processAddress(bool $anonymize, ?string $address): ?string\n {\n if (! $anonymize || $address === null || $address === IpAddress::LOCALHOST) {\n return $address;\n }\n\n try {\n return (string) IpAddress::fromString($address)->getAnonymizedCopy();\n } catch (InvalidArgumentException $e) {\n return null;\n }\n }", "protected function _expandAddresses($input)\n {\n $addr_list = IMP::parseAddressList($input, array(\n 'default_domain' => null\n ));\n\n if (!($size = count($addr_list))) {\n return '';\n }\n\n $search = $addr_list[$size - 1];\n\n /* Don't search if the search string looks like an e-mail address. */\n if (!is_null($search->mailbox) && !is_null($search->host)) {\n return strval($search);\n }\n\n /* \"Search\" string will be in mailbox element. */\n $imple = new IMP_Ajax_Imple_ContactAutoCompleter();\n $res = $imple->getAddressList($search->mailbox);\n\n switch (count($res)) {\n case 0:\n $GLOBALS['notification']->push(sprintf(_(\"Search for \\\"%s\\\" failed: no address found.\"), $search->mailbox), 'horde.warning');\n return strval($addr_list);\n case 1:\n $addr_list[$size] = $res[0];\n return strval($addr_list);\n\n default:\n $GLOBALS['notification']->push(_(\"Ambiguous address found.\"), 'horde.warning');\n unset($addr_list[$size]);\n return array(\n strval($addr_list),\n $search->mailbox,\n $res\n );\n }\n }", "function isAddress($input)\n{\n $pattern = \"/^[a-zA-Z0-9]{33,34}$/\";\n return preg_match($pattern, $input);\n}", "static public function ip__resolve($ip)\n\t{\n\t\tif(self::ip__validate($ip)){\n\t\t\t$url = gethostbyaddr($ip);\n\t\t\tif($url)\n\t\t\t\treturn $url;\n\t\t}\n\t\treturn $ip;\n\t}", "public function findAddress()\n {\n $regex = '/.{1,100}[A-Z]{1,2}[0-9]{1}[A-Z0-9]*\\s+[0-9]{1}[A-Z]{2}/si';\n\n if (preg_match_all($regex, $this->data, $matches)) {\n $uniques = array_values(array_unique($matches[0]));\n foreach ($uniques as $key => $address) {\n $uniques[$key] = preg_replace(\"/[\\s\\r\\n]*[|]+[\\s\\r\\n]*/\", \", \", $address);\n }\n $this->address = $uniques;\n }\n }", "public static function canonicalize( $addr ) {\n if ( self::isValid( $addr ) ) {\n return $addr;\n }\n // Turn mapped addresses from ::ce:ffff:1.2.3.4 to 1.2.3.4\n if ( strpos( $addr, ':' ) !== false && strpos( $addr, '.' ) !== false ) {\n $addr = substr( $addr, strrpos( $addr, ':' ) + 1 );\n if ( self::isIPv4( $addr ) ) {\n return $addr;\n }\n }\n // IPv6 loopback address\n $m = array();\n if ( preg_match( '/^0*' . RE_IPV6_GAP . '1$/', $addr, $m ) ) {\n return '127.0.0.1';\n }\n // IPv4-mapped and IPv4-compatible IPv6 addresses\n if ( preg_match( '/^' . RE_IPV6_V4_PREFIX . '(' . RE_IP_ADD . ')$/i', $addr, $m ) ) {\n return $m[1];\n }\n if ( preg_match( '/^' . RE_IPV6_V4_PREFIX . RE_IPV6_WORD .\n ':' . RE_IPV6_WORD . '$/i', $addr, $m ) )\n {\n return long2ip( ( hexdec( $m[1] ) << 16 ) + hexdec( $m[2] ) );\n }\n\n return null; // give up\n }", "public function getAccountAddress($account);", "function ShipToAddress()\r\n\t{\r\n\t\r\n\t}", "public function testAddress()\n {\n $this->assertTrue(RuValidation::address1('Московский пр., д. 100'));\n $this->assertTrue(RuValidation::address1('Moskovskiy ave., bld. 100'));\n\n $this->assertFalse(RuValidation::address1('I would not tell'));\n }", "public function transformUnique($input): Address\n {\n if ($input instanceof Address) {\n return $input;\n }\n\n if (\\is_string($input)) {\n return new Address($input);\n }\n\n if (\\count($input) > 1) {\n $originalKey = array_keys($input)[0];\n $input = [$originalKey => $input[$originalKey]];\n }\n\n $key = key($input);\n $input = current($input);\n\n if (\\is_string($input)) {\n return \\is_int($key) ? new Address($input) : new NamedAddress($key, $input);\n }\n\n return $input;\n }", "function set_SearchAddressFromRequest($currentVal) {\n if ($this->is_address_passed_by_URL() && empty($currentVal)) {\n return stripslashes_deep($_REQUEST['address']);\n }\n return $currentVal;\n }", "static function addressSuggestion($user) {\n $prefixes = ['WORK', 'PERSONAL'];\n // ordered\n $suffixes = ['STATE', 'ZIP', 'CITY', 'STREET'];\n $candidates = _::map($prefixes, function ($prefix) use ($user, $suffixes) {\n return array_reduce($suffixes, function ($m, $s) use ($prefix, $user) {\n $v = $user['~'.$prefix.'_'.$s];\n return str::isEmpty($v) ? $m : _::set($m, $s, $v);\n }, ['prefix' => $prefix]);\n });\n // mutate\n assert(usort($candidates, function ($x, $y) use ($prefixes) {\n $diff = count($y) - count($x);\n // pick the most complete address\n return $diff !== 0\n ? $diff\n : array_search($x['prefix'], $prefixes) - array_search($y['prefix'], $prefixes);\n }));\n $parts = _::remove(_::first($candidates), 'prefix');\n if (_::isEmpty($parts)) {\n return '';\n }\n return join(', ', array_reduce($suffixes, function ($acc, $s) use ($parts) {\n $v = _::get($parts, $s, '');\n return str::isEmpty($v) ? $acc : _::append($acc, $v);\n }, []));\n }", "function resolve_address($link, $page_base)\n {\n #----------------------------------------------------------\n # CONDITION INCOMING LINK ADDRESS\n #\n $link = trim($link);\n $page_base = trim($page_base);\n\n # if there isn't one, put a \"/\" at the end of the $page_base\n $page_base = trim($page_base);\n if( (strrpos($page_base, \"/\")+1) != strlen($page_base) )\n $page_base = $page_base.\"/\";\n\n # remove unwanted characters from $link\n $link = str_replace(\";\", \"\", $link);\t\t\t// remove ; characters\n $link = str_replace(\"\\\"\", \"\", $link);\t\t\t// remove \" characters\n $link = str_replace(\"'\", \"\", $link);\t\t\t// remove ' characters\n $abs_address = $page_base.$link;\n\n $abs_address = str_replace(\"/./\", \"/\", $abs_address);\n\n $abs_done = 0;\n\n #----------------------------------------------------------\n # LOOK FOR REFERENCES TO THE BASE DOMAIN ADDRESS\n #----------------------------------------------------------\n # There are essentially four types of addresses to resolve:\n # 1. References to the base domain address\n # 2. References to higher directories\n # 3. References to the base directory\n # 4. Addresses that are alreday fully resolved\n #\n if($abs_done==0)\n {\n # Use domain base address if $link starts with \"/\"\n if (substr($link, 0, 1) == \"/\")\n {\n // find the left_most \".\"\n $pos_left_most_dot = strrpos($page_base, \".\");\n\n # Find the left-most \"/\" in $page_base after the dot\n for($xx=$pos_left_most_dot; $xx<strlen($page_base); $xx++)\n {\n if( substr($page_base, $xx, 1)==\"/\")\n break;\n }\n\n $domain_base_address = get_base_domain_address($page_base);\n\n $abs_address = $domain_base_address.$link;\n $abs_done=1;\n }\n }\n\n #----------------------------------------------------------\n # LOOK FOR REFERENCES TO HIGHER DIRECTORIES\n #\n if($abs_done==0)\n {\n if (substr($link, 0, 3) == \"../\")\n {\n $page_base=trim($page_base);\n $right_most_slash = strrpos($page_base, \"/\");\n\n // remove slash if at end of $page base\n if($right_most_slash==strlen($page_base)-1)\n {\n $page_base = substr($page_base, 0, strlen($page_base)-1);\n $right_most_slash = strrpos($page_base, \"/\");\n }\n\n if ($right_most_slash<8)\n $unadjusted_base_address = $page_base;\n\n $not_done=TRUE;\n while($not_done)\n {\n // bring page base back one level\n list($page_base, $link) = move_address_back_one_level($page_base, $link);\n if(substr($link, 0, 3)!=\"../\")\n $not_done=FALSE;\n }\n if(isset($unadjusted_base_address))\n $abs_address = $unadjusted_base_address.\"/\".$link;\n else\n $abs_address = $page_base.\"/\".$link;\n $abs_done=1;\n }\n }\n\n #----------------------------------------------------------\n # LOOK FOR REFERENCES TO BASE DIRECTORY\n #\n if($abs_done==0)\n {\n if (substr($link, 0, \"1\") == \"/\")\n {\n $link = substr($link, 1, strlen($link)-1);\t// remove leading \"/\"\n $abs_address = $page_base.$link;\t\t\t// combine object with base address\n $abs_done=1;\n }\n }\n\n #----------------------------------------------------------\n # LOOK FOR REFERENCES THAT ARE ALREADY ABSOLUTE\n #\n if($abs_done==0)\n {\n if (substr($link, 0, 4) == \"http\")\n {\n $abs_address = $link;\n $abs_done=1;\n }\n }\n\n #----------------------------------------------------------\n # ADD PROTOCOL IDENTIFIER IF NEEDED\n #\n if( (substr($abs_address, 0, 7)!=\"http://\") && (substr($abs_address, 0, 8)!=\"https://\") )\n $abs_address = \"http://\".$abs_address;\n\n return $abs_address;\n }", "private function resolve_email_address($email_address)\n\t{\n\t\tif (is_string($email_address)) return $email_address;\n\t\tif (is_array($email_address)) return $this->implode_email_addresses($email_address);\n\t\tif ($email_address instanceof Member) return $email_address->Email; //The Member class cannot be modified to implement the EmailAddressProvider interface, so exceptionally handle it here.\n\t\tif (!$email_address instanceof EmailAddressProvider)\n\t\t{\n\t\t\tthrow new InvalidArgumentException(__METHOD__ . ': Parameter $email_address must either be a string or an instance of a class that implements the EmailAddressProvider interface.');\n\t\t}\n\t\treturn $this->implode_email_addresses($email_address->getEmailAddresses());\n\t}", "public function doResolveHost() {\r\n if (preg_match('|[a-zA-Z]|', $this->getTarget())) {\r\n return $this->resolveHost($this->getTarget());\r\n }\r\n return $this->resolveAddr($this->getTarget());\r\n }", "private function __paramAddress( $param ){\n //if( isset( $input ) ){\n //list( $province,$city ) = explode( ',',$input );\n //isset( $input ) && $result = getAreaInfo( $province).\" \".getAreaInfo($city);\n //}\n //return $result;\n }", "public function addressvs($address) {\n\t\n\t\n\t\n\t\treturn $address;\n\t\n\t}", "public function geocode(Address $address);", "public static function getShipToAddress($address)\n {\n $addressLine1 = \"\";\n if (array_key_exists(0, $address->getStreet(0))) {\n $addressLine1 = $address->getStreet(0)[0];\n }\n $addressLine2 = \"\";\n if (array_key_exists(1, $address->getStreet(0))) {\n $addressLine2 = $address->getStreet(0)[1];\n }\n $city = $address->getCity();\n $stateCode = $address->getRegionCode();\n\n $zip = $address->getPostcode();\n\n $country = $address->getCountryModel()->getIso2Code();\n\n // if we only have state + zip, then don't verify address.\n $tStateCode = trim($stateCode);\n $tZip = trim($zip);\n $verifyAddress =\n (\n (trim($addressLine1) == false)\n && (trim($city) == false)\n && (trim($addressLine2) == false)\n && ($tStateCode != false)\n && ($tZip != false && strlen($tZip) == 5)\n ) == true ? false : true;\n if (isset($country) && strcasecmp($country, 'US') !== 0) {\n $verifyAddress = false;\n }\n\n $estimatedAddress = array(\n 'PrimaryAddressLine'=>$addressLine1,\n 'SecondaryAddressLine'=>$addressLine2,\n 'City'=>$city,\n 'State'=>$stateCode,\n 'PostalCode'=>$zip,\n 'Plus4'=>\"\",\n 'Country'=>$country,\n 'VerifyAddress'=>$verifyAddress);\n\n return $estimatedAddress;\n }", "function verify_address($address) // Colorize: green\n { // Colorize: green\n return isset($address) // Colorize: green\n && // Colorize: green\n is_string($address) // Colorize: green\n && // Colorize: green\n ( // Colorize: green\n filter_var($address, FILTER_VALIDATE_IP) // Colorize: green\n || // Colorize: green\n filter_var($address, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME) // Colorize: green\n ); // Colorize: green\n }", "function alias_expand_host($name) {\n\n\tglobal $aliastable;\n\n\tif (isset($aliastable[$name]) && is_ipaddr($aliastable[$name]))\n\treturn $aliastable[$name];\n\telse if (is_ipaddr($name))\n\treturn $name;\n\telse\n\treturn null;\n}", "public function getaddress(){\n $address = $this->_run('getaddress');\n return $address;\n }", "static public function dns__resolve($host, $out = false)\n\t{\n\t\t\n\t\t// Get DNS records about URL\n\t\tif(function_exists('dns_get_record')){\n\t\t\t$records = dns_get_record($host, DNS_A);\n\t\t\tif($records !== false){\n\t\t\t\t$out = $records[0]['ip'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Another try if first failed\n\t\tif(!$out && function_exists('gethostbynamel')){\n\t\t\t$records = gethostbynamel($host);\n\t\t\tif($records !== false){\n\t\t\t\t$out = $records[0];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $out;\n\t\t\n\t}", "public static function getSystemFromAddress() {}", "public function validAddresses() {}", "public function getAddress() {\n\t\t\t# Default StyleSheet\n\t\t\tif (! $_REQUEST[\"stylesheet\"]) $_REQUEST[\"stylesheet\"] = 'network.address.xsl';\n\t\t\t$response = new \\HTTP\\Response();\n\t\n\t\t\t# Initiate Domain Object\n\t\t\t$address = new \\Network\\IPAddress();\n\t\t\tif (! isset($_REQUEST['address'])) $this->error(\"address required\");\n\t\n\t\t\t$address->get($_REQUEST['address']);\n\t\n\t\t\t# Error Handling\n\t\t\tif ($address->error()) $this->error($address->error());\n\t\t\telseif ($address->id) {\n\t\t\t\t$response->address = $address;\n\t\t\t\t$response->success = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$response->success = 0;\n\t\t\t\t$response->error = \"Address not found\";\n\t\t\t}\n\t\n\t\t\tapi_log('network',$_REQUEST,$response);\n\t\n\t\t\t# Send Response\n\t\t\tprint $this->formatOutput($response);\n\t\t}", "public function isValidAddress($address);", "private function resolveAddr($ipAddress) {\r\n \r\n /* Check for bogus host */\r\n if (!$this->isValidHostAddr($ipAddress)) {\r\n $this->debug('resolveAddr() has invalid IP address: ' . $ipAddress);\r\n return false;\r\n }\r\n \r\n $host = @gethostbyaddr($ipAddress);\r\n if ($host == $ipAddress) {\r\n $this->setError(self::$NQT_RESOLVEFAIL_ADDR);\r\n return false;\r\n }\r\n return $host;\r\n }", "public function getAddress(): ?string\n {\n return $this->source ? $this->rebuild()->source->/** @scrutinizer ignore-call */getAddress() : null;\n }", "public function getAddress(): ?PostalAddressInterface;", "function getServiceAddress();", "public function renderAddress()\n {\n echo $this->getAddressStringSingleLine();\n }", "public function addrFormat($addr)\n {\n }", "function resolve_host($hostname, $family) {\n if ($family == WIN_AF_INET) {\n $dns_family = DNS_A;\n } elseif ($family == WIN_AF_INET6) {\n $dns_family = DNS_AAAA;\n } else {\n my_print('invalid family, must be AF_INET or AF_INET6');\n return NULL;\n }\n\n $dns = dns_get_record($hostname, $dns_family);\n if (empty($dns)) {\n return NULL;\n }\n\n $result = array(\"family\" => $family);\n $record = $dns[0];\n if ($record[\"type\"] == \"A\") {\n $result[\"address\"] = $record[\"ip\"];\n }\n if ($record[\"type\"] == \"AAAA\") {\n $result[\"address\"] = $record[\"ipv6\"];\n }\n $result[\"packed_address\"] = inet_pton($result[\"address\"]);\n return $result;\n}", "public function getInputAddress()\r\n {\r\n return $this->input_address;\r\n }", "public function getAddress()\n {\n return $this->get('address')->value;\n }", "public static function geodecode_request($addr_str){\n\n $url = 'http://maps.googleapis.com/maps/api/geocode/json?';\n\n $param = array(\n 'address' => \"$addr_str\",\n 'sensor' => 'false',\n );\n\n $url = $url.http_build_query($param);\n\n $response = file_get_contents($url);\n $json = json_decode($response, TRUE);\n\n if($json['status'] == 'OVER_QUERY_LIMIT')\n throw new Exception(self::OVER_QUERY_LIMIT);\n\n if($json['status'] != 'OK')\n throw new Exception(self::NO_RESULT);\n\n $results = first($json['results']);\n\n $lat = (float)$results['geometry']['location']['lat'];\n $lon = (float)$results['geometry']['location']['lng'];\n\n return compact('lat', 'lon', 'request');\n }", "public function getCoordinates(Address $address)\n {\n $type = NULL;\n\n //set latitude and longitude of new user\n //remove bis, ter from address street for localization research because it makes the research inaccurate \n $base = strtolower(trim($address->getStreet1().' '.$address->getZipCity()->getZipCode().' '.$address->getZipCity()->getCity())) ; \n \n if(preg_match('/^\\d+/',$base)){\n $type = 'housenumber';\n }elseif(preg_match('/^hameau/',$base)){\n $type = 'locality';\n }elseif(preg_match('/^(allée|allee|rue|impasse|square|avenue)/',$base)){\n $type = 'street';\n }\n\n //replace strings for better score\n $base = preg_replace('/\\s(bis|ter)\\s/',' ',$base);\n $base = preg_replace('/^(\\d+)(bis|ter)\\s/','${1} ',$base);\n $base = preg_replace('/\\,/',' ',$base);\n $base = preg_replace('/\\s(st)e?\\s/',' saint ',$base);\n $base = preg_replace('/\\s(dr)\\s/',' docteur ',$base);\n $base = preg_replace('/\\s(jo|j\\.o)\\s/',' jeux olympiques ',$base);\n\n $arrayParams = array( \n 'q' => $base,\n //'postcode' => $address->getZipCity()->getZipCode(),\n 'lat'=>'45.19251',\n 'lon'=>'5.72756',\n 'limit' => 2 \n ); \n if($type){\n $arrayParams['type'] = $type;\n }\n\n $res = $this->api->get('https://api-adresse.data.gouv.fr/','search/',$arrayParams);\n\n if($res['code'] == 200){ \n $features = $res['results']['features']; \n\n if( count($features) > 1){ \n if($features[0]['properties']['score'] > $features[1]['properties']['score'] ){\n $location = $features[0]; \n }else{\n $location = $features[1]; \n }\n }elseif(count($features) == 1){ \n $location = $features[0]; \n }else{\n return array('latitude'=>NULL ,'longitude'=>NULL, 'closest'=>array('label'=>'Aucune'));\n } \n\n $score = $location['properties']['score'];\n if($score <= 0.67){ \n if($score >= 0.60 && isset($location['properties']['oldcity'])){// if the address matches a former deprecated city name\n return array('latitude'=>$location['geometry']['coordinates'][1] ,'longitude'=>$location['geometry']['coordinates'][0]);\n }\n if($score >= 0.58){\n $similarityStreet = similar_text(strtolower($address->getStreet1()),strtolower($location['properties']['name']),$prec);\n if(! ($location['properties']['type'] == 'municipality')){//if municipality, name is city\n if($prec >= 50){\n return array('latitude'=>$location['geometry']['coordinates'][1] ,'longitude'=>$location['geometry']['coordinates'][0]);\n }\n }\n }\n return array('latitude'=>NULL ,'longitude'=>NULL,'closest' => $location['properties']);\n }else{\n return array('latitude'=>$location['geometry']['coordinates'][1] ,'longitude'=>$location['geometry']['coordinates'][0]);\n }\n }else{\n throw new \\Exception('geolocalization_api_failed : '.$res['results']['description']);\n }\n\n }", "public function getStreet();", "public function validateAddress() {\r\n $leng = mb_strlen($this->data[$this->name]['Address']);\r\n if ($leng > 256) {\r\n return FALSE;\r\n } else if ($leng > 128) {\r\n if (mb_ereg(self::_REGEX_FULLWITH, $this->data[$this->name]['Address']) !== false) {\r\n return FALSE;\r\n }\r\n }\r\n return TRUE;\r\n }", "function parse_danish_address($address)\n {\n $regex = '/^([^0-9]*)([0-9]*)\\s*([A-Z]?)[,\\s]*([0-9]*)?(st|kl)?[\\.,\\s]*([a-zæøå]*)?(\\d{0,4})?.*$/mi';\n preg_match_all($regex, $address, $matches);\n $result = array();\n for ($i = 1; $i < count($matches); $i++) {\n if (isset($matches[$i][0])) {\n $result[] = $matches[$i][0];\n }\n }\n $cleaned = array();\n $components = count($result);\n if ($components > 0) {\n $cleaned['street'] = trim($result[0]);\n }\n if ($components > 1) {\n $cleaned['number'] = $result[1];\n }\n if ($components > 2) {\n $cleaned['letter'] = $result[2];\n }\n if ($components > 3) {\n $cleaned['floor'] = $result[3] == '' ? $result[4] : $result[3];\n }\n if ($components > 5) {\n $cleaned['door'] = $result[5];\n }\n foreach ($cleaned as $name => $value) {\n if (is_null($value) || $value == '') {\n unset($cleaned[$name]);\n }\n }\n return $cleaned;\n }", "function address() { return ($this->address); }", "function get_address_data($address) {\n\n\t$data = explode(',', $address);\n\n\n\t$house = trim($data[count($data)-1]); //last\n\tpreg_match_all('/[\\d]+/m', $house, $matches, PREG_SET_ORDER, 0);\n\t$house = $matches[0][0];\n\n\tif ($house == null) {\n\t\t$house = 0;\n\t\t$street = trim($data[count($data)-1]);\n\t}\n\telse {\n\t\t$street = trim($data[count($data)-2]);\n\t}\n\n\t\n\n\t$street = str_replace('ул.', '', $street);\n\t$street = str_replace('улица', '', $street);\n\t$street = trim($street);\n\t\n\n\treturn [\n\t\t'street' => $street,\n\t\t'house' => $house\n\t];\n}", "function checkAddress($address = null, $state = null, $city = null, $zip = null) {\n $this->autoRender = false;\n if (isset($_POST)) {\n $zipCode = ltrim($zip, \" \");\n $stateName = $state;\n $cityName = strtolower($city);\n $cityName = ucwords($cityName);\n $dlocation = $address . \" \" . $cityName . \" \" . $stateName . \" \" . $zipCode;\n $adjuster_address2 = str_replace(' ', '+', $dlocation);\n $geocode = file_get_contents('https://maps.google.com/maps/api/geocode/json?key='.GOOGLE_GEOMAP_API_KEY.'&address=' . $adjuster_address2 . '&sensor=false');\n $output = json_decode($geocode);\n if ($output->status == \"ZERO_RESULTS\" || $output->status != \"OK\") {\n echo 2;\n die; // Bad Address\n } else {\n $latitude = @$output->results[0]->geometry->location->lat;\n $longitude = @$output->results[0]->geometry->location->lng;\n $formated_address = @$output->results[0]->formatted_address;\n if ($latitude) {\n echo 1;\n die; // Good Address\n }\n }\n }\n }", "public function getStreetNumber();", "public function findAddressById(int $id);", "public function invalidAddresses() {}", "function address($components = 'primary')\n {\n // Check for a configuration reference\n if(is_string($components)) {\n\n // Determine the components from configuration\n $components = config('branding.contacts.addresses.' . $components);\n\n }\n\n // Create and return a new address\n return new Address($components);\n }", "private function get_address()\n\t{\n\t\treturn $this->m_address;\n\t}", "function getAddressCoordinates($address, City $city=null);", "function getAddress($single){\n\t\t\t$list = $this -> makeRequest('GET', '/list', array(\n\t\t\t\t'password'=>$_SESSION['walletpass'],\n\t\t\t\t'confirmations'=>4\n\t\t\t\t));\n\n\t\t\tif($single){\n\t\t\t\treturn $list['addresses'][0]['address'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $list['addresses'];\n\t\t\t}\n\t\t}", "public function getClientAddress(): string {}", "public function address(): string\n {\n return $this->address;\n }", "function fixAddress($str = \"\") {\n\tif ( preg_match(\"/[A-Z]{3}/\", $str) ) {\n\t\t$str = strtolower($str);\n\t}\n\t$str = ucwords($str);\n\t$str = str_replace(\"'\", \"''\", $str);\n\treturn($str);\n//fixAddress\n}", "public function getAddressLine1(): ?string;", "public function handleAddress ()\n {\n /**\n * Wir verzichten der Übersichtlichkeit halber auf eine Validierung. Eigentlich müsste hier eine Daten-\n * validierung durchgeführt werden und etwaige Fehler an den User zurückgespielt werden. Im Login machen wir das\n * beispielsweise und auch bei der Bearbeitung eines Produkts. Der nachfolgende Code dürfte gar nicht mehr\n * ausgeführt werden, wenn Validierungsfehler aufgetreten sind.\n */\n\n /**\n * Eingeloggten User abfragen\n */\n $user = User::getLoggedInUser();\n\n /**\n * Wurde das linke Formular abgeschickt?\n */\n if (isset($_POST['address_id'])) {\n /**\n * Ausgefühlte AddressId in die Session speichern, damit wir sie in einem weiteren Checkout-Schritt wieder\n * verwenden können.\n */\n Session::set(self::ADDRESS_KEY, (int)$_POST['address_id']);\n }\n\n /**\n * Wurde das rechte Formular abgeschickt?\n */\n if (isset($_POST['address'])) {\n /**\n * Neue Addresse erstellen und in die Datenbank speichern.\n */\n $address = new Address();\n $address->address = $_POST['address'];\n $address->user_id = $user->id;\n $address->save();\n\n /**\n * ID der neu erstellten Adresse in die Session speichern, damit wir sie in einem weiteren Checkout-Schritt\n * wieder verwenden können.\n */\n Session::set(self::ADDRESS_KEY, (int)$address->id);\n }\n\n /**\n * Weiterleiten auf den nächsten Schritt im Checkout Prozess.\n */\n $baseUrl = Config::get('app.baseUrl');\n header(\"Location: {$baseUrl}checkout/final\");\n }", "#[Route('/geocode/{address}', name: 'user.geocode', methods: ['GET', 'POST'])]\n public function index(\n GeocodeAddressParser $geocodeAddress,\n Request $request,\n EntityManagerInterface $entityManager,\n UsersProfileAddressHandler $addressHandler,\n string|null $address = null,\n //?string $address = null,\n ): Response {\n// {\n// return new Response(status: 404);\n// }\n\n $UsersProfileAddressDTO = new UsersProfileAddressDTO();\n $UsersProfileAddressDTO->setDesc($address);\n\n if (!empty($address))\n {\n /* Если передан идентификатор адреса */\n if (preg_match('{^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$}Di', $address))\n {\n $GeocodeAddress = $entityManager->getRepository(GeocodeAddress::class)->find($address);\n } elseif ($request->isMethod('GET'))\n {\n /** @var GeocodeAddress $var */\n $GeocodeAddress = $geocodeAddress->getGeocode($address);\n }\n\n $UsersProfileAddressDTO->setAddress($GeocodeAddress);\n $UsersProfileAddressDTO->setLatitude($GeocodeAddress->getLatitude());\n $UsersProfileAddressDTO->setLongitude($GeocodeAddress->getLongitude());\n $UsersProfileAddressDTO->setDesc($GeocodeAddress->getAddress());\n $UsersProfileAddressDTO->setHouse(($GeocodeAddress->getHouse() !== null));\n\n if ($this->getProfileUid())\n {\n $UsersProfileAddressDTO->setProfile($this->getProfileUid());\n }\n }\n\n $form = $this->createForm(UsersProfileAddressForm::class, $UsersProfileAddressDTO, [\n 'action' => $this->generateUrl('UsersAddress:user.geocode', ['address' => $UsersProfileAddressDTO->getAddress()]),\n ]);\n\n $form->handleRequest($request);\n\n\n /* */\n if ($form->isSubmitted() && $form->has('geocode'))\n {\n /* Если пользователь авторизован - прикрепляем адрес */\n if ($this->getProfileUid() && $form->isValid() )\n {\n $UsersProfileAddress = $addressHandler->handle($UsersProfileAddressDTO);\n\n if ($UsersProfileAddress instanceof UsersProfileAddress)\n {\n return new JsonResponse(\n [\n 'type' => 'success',\n 'header' => 'Ваш адрес',\n 'message' => $UsersProfileAddressDTO->getDesc(),\n 'status' => 200,\n ]\n );\n }\n\n return new JsonResponse(\n [\n 'type' => 'danger',\n 'header' => 'Адрес местоположения',\n 'message' => 'Невозможно определить адрес местоположения',\n 'status' => 400,\n ],\n 400\n );\n }\n\n return new JsonResponse(\n [\n 'type' => 'success',\n 'header' => 'Ваш адрес',\n 'message' => $UsersProfileAddressDTO->getDesc(),\n 'status' => 200,\n ]\n );\n }\n\n return $this->render([\n 'form' => $form->createView(),\n ]);\n }", "public function encodeAddress($casilla) {\n\n $casilla = trim($casilla);\n // Si la casilla no trae name, no le hace nada\n if (preg_match('/^<?[_\\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\\.)+[a-zA-Z]{2,6}>?$/', $casilla)) {\n return $casilla;\n };\n\n // Si trae name, ve si hay que encodificarlo\n $matches = array();\n if (preg_match('/(.+)(<[_\\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\\.)+[a-zA-Z]{2,6}>)$/', $casilla, $matches)) {\n $name = $matches[1];\n $email = $matches[2];\n\n // Si el nombre tiene tildes o ()<>@,;\\:\". lo encodifica\n if (preg_match('/([\\x80-\\xFF\\(\\)\\<\\>\\@\\,\\;\\\\\\:\\\"\\.]){1}/', $name)) {\n $preferences = array(\n 'input-charset' => 'UTF-8',\n 'output-charset' => 'UTF-8', // ISO-8859-1 o UTF-8\n 'line-length' => 255,\n 'scheme' => 'B', // o Q\n 'line-break-chars' => \"\\n\"\n );\n $name = iconv_mime_encode('Reply-to', $name, $preferences);\n $name = preg_replace(\"#^Reply-to\\:\\ #\", '', $name);\n $casilla = $name . $email;\n };\n };\n return $casilla;\n }", "public function getAddress()\n {\n if (array_key_exists(\"address\", $this->_propDict)) {\n return $this->_propDict[\"address\"];\n } else {\n return null;\n }\n }", "public function addAddress($address);", "public function getAddress(): ?string\n {\n return $this->address;\n }", "public function lookupAddresses(Request $request)\n {\n $return = \\App\\ChurchAddress::lookupAddresses($request->input('addr'));\n return json_encode($return);\n }", "public function getLocalFormatedAddress()\n\t{\n\t\treturn substr($this->formatedAddress, 0, strrpos($this->formatedAddress, ','));\n\t}", "public function getAddress(): string\n {\n return $this->address;\n }", "public function getBillingAddress() : Address;", "function _address_to_marker ($address) {\r\n\t\t$urladd = rawurlencode($address);\r\n\t\t$url = \"http://maps.google.com/maps/api/geocode/json?address={$urladd}&sensor=false\";\r\n\t\t$result = wp_remote_get($url);\r\n\t\t$json = json_decode($result['body']);\r\n\r\n\t\tif (!$json) return false;\r\n\t\t$result = $json->results[0];\r\n\r\n\t\treturn array(\r\n\t\t\t'title' => $address,\r\n\t\t\t'body' => '',\r\n\t\t\t'icon' => 'marker.png',\r\n\t\t\t'position' => array (\r\n\t\t\t\t$result->geometry->location->lat,\r\n\t\t\t\t$result->geometry->location->lng\r\n\t\t\t),\r\n\t\t);\r\n\t}", "protected function FixAddress()\n {\n $rows = db::Query(\"SELECT min(id) as id, uid, (SELECT wallet FROM finances.accounts WHERE accounts.uid=quests.uid) FROM finances.quests GROUP BY uid ORDER BY uid ASC;\");\n $wallet = LoadModule('api', 'wallet');\n $bitcoin = LoadModule('api', 'bitcoin');\n $ret = array();\n foreach ($rows as $row)\n {\n if ($row['wallet'] === null)\n {\n array_push($ret, $row['uid']);\n echo \"<hr>{$row['uid']}<br>\";\n echo $tx = $wallet->GetFirstSourceTxid($row['id']);\n echo \"<br>\";\n echo $source = $bitcoin->GetSourceByTransaction($tx);\n if (strlen($source))\n db::Query(\"INSERT INTO finances.accounts(uid, wallet) VALUES ($1, $2)\",\n array($row['uid'], $source));\n }\n }\n return $ret;\n }", "public function getAddress(): Address {\n return $this->address;\n }", "function parseAddress() {\n\tglobal $CONTENT;\n\t/**\n\t * Check for actions.If action is set then validate for\n\t * Admin , judge , Login , profile ( View Users Profile ).\n\t \n\tif(isset($_GET['action'])) {\n\t\t$action = $_GET['action'];\n\t\tif($action == 'login' || $action == 'logout') return $CONTENT = getLoginPage();\n\t\tif($action == 'admin') return $CONTENT = adminPage();\n\t\tif($action == 'judge') return $CONTENT = adminPage();\n\t}\n\tif(!isset($_GET['page']) || $_GET['page'] =='/') return $CONTENT = \"WAIT FOR HOME PAGE\";\n\t$urlRequest = explode(\"/\",$_GET['page']);\n\tescape($urlRequest);\n\n\t// complete this if problems statement\n\tif($urlRequest[1] == 'problems') return $CONTENT = \"WAIT\"; \n\treturn $CONTENT = getContestPage($urlRequest);\n\n*/\n\treturn \"Welcome\";\n}", "public function exchange_primary_address($username, $emailaddress, $isGUID=false) {\n if ($username===NULL){ return (\"Missing compulsory field [username]\"); } \n if ($emailaddress===NULL) { return (\"Missing compulsory fields [emailaddress]\"); }\n \n // Find the dn of the user\n $user=$this->user_info($username,array(\"cn\",\"proxyaddresses\"), $isGUID);\n if ($user[0][\"dn\"]===NULL){ return (false); }\n $user_dn=$user[0][\"dn\"];\n \n if (is_array($user[0][\"proxyaddresses\"])) {\n $modaddresses = array();\n for ($i=0;$i<sizeof($user[0]['proxyaddresses']);$i++) {\n if (strstr($user[0]['proxyaddresses'][$i], 'SMTP:') !== false) {\n $user[0]['proxyaddresses'][$i] = str_replace('SMTP:', 'smtp:', $user[0]['proxyaddresses'][$i]);\n }\n if ($user[0]['proxyaddresses'][$i] == 'smtp:' . $emailaddress) {\n $user[0]['proxyaddresses'][$i] = str_replace('smtp:', 'SMTP:', $user[0]['proxyaddresses'][$i]);\n }\n if ($user[0]['proxyaddresses'][$i] != '') {\n $modaddresses['proxyAddresses'][$i] = $user[0]['proxyaddresses'][$i];\n }\n }\n \n $result=@ldap_mod_replace($this->_conn,$user_dn,$modaddresses);\n if ($result==false){ return (false); }\n \n return (true);\n }\n \n }", "private function doSearch($address = null) {\n\n\t\t// clear any ambiguous address we have in the session\n\t\t$this->Session->delete('addressChoices');\n\t\t\n\t\t// Check to make sure they've entered an address before we do a lookup\n\t\t$rawSearchAddress = trim($address);\n\n\t\tif ($rawSearchAddress == 'Enter address' || empty($rawSearchAddress)) {\n\t\t\t$this->Session->setFlash(\"Please enter an address in the search box.\");\n\t\t\t$this->redirect(array('action' => 'index'));\n\t\t}\n\t\t\n\t\t// Check to see if they've entered at least an alpha char.\n\t\t// Looking up just numbers on google returns odd results.\n\t\t/*\n\t\t\tTODO: This sort of validation really needs to be moved to the model!\n\t\t\t* We can use the $validate property of the model class\n\t\t*/\n\t\tif (!preg_match('/[a-zA-Z]+/', $address)) {\n\t\t\t$this->Session->setFlash('That does not appear to be a proper address. Please try again.');\n\t\t\t$this->redirect(array('action' => 'index'));\n\t\t}\n\t\t\n\t\t$searchAddress = ucwords($address);\n\t\t$zone = $this->Zone->get_zone($searchAddress);\n\t\n\t\t// Try to get a result first before adding London ON, etc. to the end (below)\n\t\t$zone_name = null;\n\t\tif( isset($zone[0]) ) {\n\t\t\t$zone_name = $zone[0]->zone_name;\n\t\t\t$searchAddress = $zone[0]->address;\n\t\t}\n\t\n\t\tif( !$zone_name ) {\n\t\t\t//if zone is empty, try to append city\n\t\t\t$zone_name = null;\n\t\t\t$cities = array('London', 'Byron', 'Lambeth', 'Hyde Park');\n\t\t\n\t\t\tforeach($cities as $city) {\n\t\t\t\tif (empty($zone)) {\n\t\t\t\t\t$specificSearchAddress = $searchAddress . ', ' . $city . ', ON';\n\t\t\t\t\t$zone = $this->Zone->get_zone($specificSearchAddress);\n\t\t\n\t\t\t\t\t$zone_name = null;\n\t\t\t\t\tif( isset($zone[0]) ) {\n\t\t\t\t\t\t$zone_name = $zone[0]->zone_name;\n\t\t\t\t\t\t$searchAddress = $zone[0]->address;\n\t\t\t\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\t\t}\n\t\n\t\tif ($this->Zone->are_results_ambiguous()) {\n\t\t\t// pass array to view so we can display it there\n\t\t\t$this->Session->write('addressChoices', $zone);\n\n\t\t\t// redirect them back to search page with their search filled in\n\t\t\t$this->redirect(array('action' => 'index', '?' => array('a' => $rawSearchAddress)));\n\t\t}\n \n\t\tif(!empty($zone_name)) {\n\t\t\t$this->UserData->write($searchAddress, $zone_name);\n\t\t\t$this->redirect(array(\"controller\" => \"zones\", \"action\" => \"view\", $zone_name));\n\t\t} else {\n\t\t\t$this->Session->setFlash(\"Your address was not found. Please verify that you have typed it correctly and search again.\");\n\t\t}\t\t\t\n\t}", "function domaintoip($host, $timeout = 1) {\n $query = `nslookup -timeout=$timeout -retry=1 $host`;\n if(preg_match('/\\nAddress: (.*)\\n/', $query, $matches))\n return trim($matches[1]);\n}", "public function getAddress():?string\n {\n return $this->address;\n }", "public static function FromAddress ($address) {\n if (self::IsValid($address)) {\n $data = explode('@', $address, 2);\n return new self($data[1], $data[0]);\n }\n return null;\n }", "public function findAddresses() {\n\t\t\t# Default StyleSheet\n\t\t\tif (! isset($_REQUEST[\"stylesheet\"])) $_REQUEST[\"stylesheet\"] = 'network.address.xsl';\n\t\t\t$response = new \\HTTP\\Response();\n\t\n\t\t\t# Initiate Address List\n\t\t\t$addressList = new \\Network\\AddressList();\n\t\n\t\t\t# Find Matching Addresses\n\t\t\t$parameters = array();\n\t\t\tif (preg_match('/^([\\w\\-]+)\\.(.*)$/',$_REQUEST['host_name'],$matches)) {\n\t\t\t\t$_REQUEST['host_name'] = $matches[1];\n\t\t\t\t$_REQUEST['domain_name'] = $matches[2];\n\t\t\t}\n\t\t\tif (isset($_REQUEST['domain_name']) && strlen($_REQUEST['domain_name']) > 0) {\n\t\t\t\t$domain = new \\Network\\Domain();\n\t\t\t\t$domain->get($_REQUEST['domain_name']);\n\t\t\t\tif ($domain->id) {\n\t\t\t\t\t$parameters['domain_id'] = $domain->id;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t $this->error(\"domain not found\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset($_REQUEST['host_name']) && strlen($_REQUEST['host_name']) > 0) {\n\t\t\t\t$host = new \\Network\\Host();\n\t\t\t\t$host->get($domain->id,$_REQUEST['host_name']);\n\t\t\t\tif ($host->id) {\n\t\t\t\t\t$parameters['host_id'] = $host->id;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t $this->error(\"host not found\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset($_REQUEST['adapter_name']) && strlen($_REQUEST['adapter_name']) > 0) {\n\t\t\t\t$adapter = new \\Network\\Adapter();\n\t\t\t\t$adapter->get($host->id,$_REQUEST['adapter_name']);\n\t\t\t\tif ($adapter->id) {\n\t\t\t\t\t$parameters['adapter_id'] = $adapter->id;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t $this->error(\"adapter '\".$_REQUEST['adapter_name'].\"' for host '\".$host->name.\"' not found\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset($_REQUEST['type'])) $parameters['type'] = $_REQUEST['type'];\n\t\t\t$addresses = $addressList->find($parameters);\n\t\n\t\t\t# Error Handling\n\t\t\tif ($addressList->error()) $this->error($addressList->error());\n\t\t\telse{\n\t\t\t\t$response->address = $addresses;\n\t\t\t\t$response->success = 1;\n\t\t\t}\n\t\n\t\t\tapi_log('network',$_REQUEST,$response);\n\t\n\t\t\t# Send Response\n\t\t\tprint $this->formatOutput($response);\n\t\t}", "public function getAddressLine2(): ?string;", "function get_blogaddress_by_name($blogname)\n {\n }", "public function setAddress(Address $address);", "private function resolveAddressData()\n {\n /** @var \\Magento\\Quote\\Model\\Quote $quote */\n $quote = $this->checkoutSession->getQuote();\n /** @var \\Magento\\Quote\\Model\\Quote\\Address $shippingAddress */\n $shippingAddress = $quote->getShippingAddress();\n\n $customerData = $this->geoIp->getCurrentLocation();\n if ($customerData->getCode() && $this->helper->isCountryAllowed($customerData->getCode())) {\n /** @var \\Magento\\Directory\\Model\\Country $currentCountry */\n $currentCountry = $shippingAddress\n ->getCountryModel()\n ->loadByCode($customerData->getCode());\n\n if (!$currentCountry) {\n return;\n }\n\n $shippingAddress->setCountryId($currentCountry->getId());\n $shippingAddress->setRegion($customerData->getRegion());\n $shippingAddress->setRegionCode($customerData->getRegionCode());\n $shippingAddress->setCity($customerData->getCity());\n $shippingAddress->setPostcode($customerData->getPosttalCode());\n\n $regionModel = $this->regionFactory->create();\n if ($customerData->getRegionCode() && $currentCountry->getId()) {\n $regionModel->loadByCode($customerData->getRegionCode(), $currentCountry->getId());\n $regionId = $regionModel->getRegionId();\n $shippingAddress->setRegionId($regionId);\n }\n }\n }", "public function createBasedOnInputData(array $addressInput): QuoteAddress\n {\n $addressInput['country_id'] = '';\n if ($addressInput['country_code']) {\n $addressInput['country_code'] = strtoupper($addressInput['country_code']);\n $addressInput['country_id'] = $addressInput['country_code'];\n }\n\n $maxAllowedLineCount = $this->addressHelper->getStreetLines();\n if (is_array($addressInput['street']) && count($addressInput['street']) > $maxAllowedLineCount) {\n throw new GraphQlInputException(\n __('\"Street Address\" cannot contain more than %1 lines.', $maxAllowedLineCount)\n );\n }\n\n $quoteAddress = $this->quoteAddressFactory->create();\n $quoteAddress->addData($addressInput);\n return $quoteAddress;\n }", "public static function parseAddresses($addrstr, $useimap = true, $charset = self::CHARSET_ISO88591)\n {\n }", "public function getAddress(){\n\t\treturn $this->sourceAddress;\n\t}", "function drum_smart_address($address_array) {\n\t// Set up variables\n\t$street1 = $address_array['street1'];\n\t$street2 = $address_array['street2'];\n\t$city = $address_array['city'];\n\t$state = $address_array['state'];\n\t$zip = $address_array['zip'];\n\t// Format address for links to map\n\tif ($street2 == null) {\n\t\t$address = $street1 . ', ' . $street2 . ', ' . $city . ', ' . $state . ' ' . $zip;\n\t} else {\n\t\t$address = $street1 . ', ' . $city . ', ' . $state . ' ' . $zip;\n\t}\n\t// Create address output\n\t$output = $street1 . '<br />';\n\tif ($street2 != null) {\n\t\t$output .= $street2 . '<br />';\n\t}\n\t$output .= $city . ', ' . $state . ' ' . $zip;\n return $output;\n}", "public function setAddress($address);", "public function setAddress($address);", "public static function inet() {}", "public function get_adresse();", "public function testFromString(): void\n {\n $this->expectNotToPerformAssertions();\n\n InternetAddress::fromString('1.1.1.1:1');\n }", "public function cassAddress()\n {\n //TODO - Figure out what this is doing\n $address = new UpsAddress();\n $address->setAddressLine1($this->shipping_line1);\n $address->setAddressLine2($this->shipping_line2);\n $address->setCity($this->shipping_city);\n $address->setStateProvinceCode($this->shipping_state);\n $address->setPostalCode($this->shipping_zip);\n\n //todo: Refactor to leverage DI so that we can actually test this.\n $mrtk = new Satori();\n $mrtk->create(0);\n try {\n //Just return a success result if service is down\n $mrtk->connect(config('app.host_config.mailRoomToolKit'), 5150, 5);\n $certifyResponse = $mrtk->certifyAddress($address);\n } catch (Exception $e) {\n (new Log())->logError('Core', 'Could not connect to MRTK');\n // setup success response\n $certifyResponse['status'] = 0;\n $certifyResponse['address'] = $address;\n }\n\n if (intval($certifyResponse['status']) > 100 || in_array($certifyResponse['status'], array(92,93))) {\n throw new Exception($certifyResponse['message']);\n } else {\n $this->shipping_line1 = $certifyResponse['address']->getAddressLine1();\n $this->shipping_line2 = $certifyResponse['address']->getAddressLine2();\n $this->shipping_city = $certifyResponse['address']->getCity();\n $this->shipping_state = $certifyResponse['address']->getStateProvinceCode();\n $this->shipping_zip = $certifyResponse['address']->getPostalCode();\n $this->save();\n }\n }", "public function GeoLocate($addr){\n $geoapi = \"http://maps.googleapis.com/maps/api/geocode/json\";\n $params = array(\"address\"=>$addr,\"sensor\"=>\"false\");\n $response = $this->GET($geoapi,$params);\n $json = json_decode($response);\n if ($json->status === \"ZERO_RESULTS\") {\n return NULL;\n } else {\n return array($json->results[0]->geometry->location->lat,$json->results[0]->geometry->location->lng);\n }\n }", "public function getExternalIpAddress() {\n\t\treturn trim(shell_exec(\"dig +short myip.opendns.com @resolver1.opendns.com\"));\n\t}", "public function getAddress() : ?string \n {\n if ( ! $this->hasAddress()) {\n $this->setAddress($this->getDefaultAddress());\n }\n return $this->address;\n }", "function parse_address($address) {\n\t\t// USA Addresses\n\t\tif (strstr($address, ', USA')) {\n\t\t\t// Remove 'USA'\n\t\t\t$address = str_replace(', USA', '', $address);\n\n\t\t\t// If there's exactly ONE comma left then return a single line, e.g. \"New York, NY\"\n\t\t\tif (substr_count($address, ',') == 1) {\n\t\t\t\treturn array($address);\n\t\t\t}\n\t\t}\n\n\t\t// If NO commas then use a single line, e.g. \"France\" or \"Ohio\"\n\t\tif (!strpos($address, ','))\n\t\t\treturn array($address);\n\n\t\t// Otherwise return first line from before first comma+space, second line after, e.g. \"Paris, France\" => \"Paris<br>France\"\n\t\t// Or \"1 Main St, Brooklyn, NY\" => \"1 Main St<br>Brooklyn, NY\"\n\t\treturn array(\n\t\t\tsubstr($address, 0, strpos($address, \",\")),\n\t\t\tsubstr($address, strpos($address, \",\") + 2)\n\t\t);\n\t}", "function makeAddress($label){\n\t\t\t$addressdata = $this -> makeRequest('GET', '/new_address', array(\n\t\t\t\t'password'=>$_SESSION['walletpass'],\n\t\t\t\t'label'=>$label\n\t\t\t\t));\n\t\t\treturn $addressdata['address'];\n\t\t\t\n\t\t}", "function address($wallet_id = null) {\n\t\tif(empty($wallet_id)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\t$url = 'https://www.instawallet.org/api/v1/w/' . $wallet_id . '/address';\n\t\t\t$json = file_get_contents($url);\n\t\t\t$data = json_decode($json);\n\t\t\tif(!$data->successful) {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn $data->address;\n\t\t\t}\n\t\t}\n\t}", "public function punyencodeAddress($address)\n {\n }" ]
[ "0.6653128", "0.6653128", "0.6581496", "0.655808", "0.63244957", "0.6274565", "0.6260165", "0.6137691", "0.61244327", "0.60044897", "0.5935135", "0.5914391", "0.58331543", "0.5818694", "0.579091", "0.57752115", "0.5760041", "0.57568413", "0.57357705", "0.5734917", "0.5726397", "0.57244134", "0.57211304", "0.5707866", "0.57011884", "0.5677106", "0.56736225", "0.5640595", "0.5630058", "0.5592463", "0.5589501", "0.5583465", "0.5576801", "0.5574093", "0.55585104", "0.55580634", "0.5554726", "0.55487436", "0.55466825", "0.5522469", "0.55183226", "0.5506834", "0.5486622", "0.5482526", "0.54594433", "0.54429364", "0.54412764", "0.54339993", "0.54256797", "0.54184836", "0.54182994", "0.54156893", "0.5414307", "0.5406821", "0.5397437", "0.53839976", "0.5382989", "0.53805906", "0.53693944", "0.53515625", "0.5343696", "0.5342863", "0.5336011", "0.53312224", "0.5322804", "0.53224766", "0.5320656", "0.5318328", "0.5318", "0.5300756", "0.52977985", "0.5296721", "0.52951396", "0.5290128", "0.52785563", "0.52784", "0.5274258", "0.5270641", "0.5269848", "0.5264368", "0.52633345", "0.5260361", "0.5256441", "0.5252421", "0.5245217", "0.5236422", "0.52354866", "0.5232496", "0.5232496", "0.5230567", "0.52208966", "0.5219648", "0.52073276", "0.52061313", "0.5202345", "0.5199631", "0.5196397", "0.5193765", "0.5193097", "0.519052" ]
0.6298539
5
/ name: getAirportsList params: return: desc: getAirportsList frontend
public static function getAirportsList($qryArray=array()){ $partnerslist = array(); $wheredata = array(); $partnerslist = DB::table('airports'); if(count($qryArray)>0) { if(isset($qryArray['lastAirports']) && $qryArray['lastAirports']=='1'){ $partnerslist->orderBy('city', 'desc'); $partnerslist->take(10); } if(isset($qryArray['portId']) && $qryArray['portId']>'0'){ $partnerslist->where('iddepport', $qryArray['portId']); $partnerslist->take(1); } } $partnerslist->where('stato', '1'); $partnerslist->orderBy('city', 'asc'); $partnerslist = $partnerslist->get(); return $partnerslist; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getAirportList()\n {\n $cache = new FilesystemAdapter();\n $airportCache = $cache->getItem('airportcache.list');\n\n if (!$airportCache->isHit()) {\n $client = $this->container->get('guzzle.avinor.client');\n $response = $client->get('/airportNames.asp');\n $result = $response->getBody()->getContents();\n\n $service = new Service();\n $airports = $service->parse($result);\n\n $airportCache->set($airports);\n $cache->save($airportCache);\n }\n\n return $airportCache->get();\n }", "public function testGetAirportsReturnsList()\n {\n $this->get('/api/v1/airports')->seeJson();\n }", "static public function GetAirports()\n {\n $ids = DbHandler::Query(\"SELECT DISTINCT(airport_id) FROM airports WHERE (airport_id IN ( SELECT airport_start_id FROM traject GROUP BY airport_start_id) OR airport_id IN ( SELECT airport_stop_id FROM traject GROUP BY airport_stop_id)) ;\");\n\n $airports = array();\n for ($i = 0; $i < count($ids); $i++) {\n $airports[] = airports::GetAirportByID($ids[$i][\"airport_id\"]);\n\n }\n\n\n return $airports;\n }", "public function airportList(Request $request)\n {\n if ($request->has('code')) {\n \t\t\t$airports = Airport::where('code', '!=', $request['code'])->get();\n \t\t\treturn $airports;\n\n\t\t}\n $airports = Airport::all();\n\n return $airports;\n }", "public function listAirports($autoComplete = '')\n {\n $uri = '/api/v6/airports';\n $key = 'all.airports';\n $minutes = 60;\n \n $response = app('cache')->get($key, function () use ($key, $minutes, $uri) {\n try {\n /** @var \\Psr\\Http\\Message\\ResponseInterface $response */\n $response = $this->guzzle->get($uri, [\n 'query' => [\n 'lang' => 'en',\n 'api_key' => '8105c628-a86c-41af-85da-828bcf8190e0'\n ],\n ]);\n \n } catch (\\Exception $e) {\n return false;\n }\n \n $result = $response->getBody()->getContents();\n if (empty($result)) {\n return false;\n }\n app('cache')->put($key, $result, $minutes);\n return $result;\n });\n \n if(! $response) {\n return false;\n }\n $result = $this->toAirportCollection($response);\n if ($autoComplete != '') {\n $result = $this->autoCompleteMap($result, $autoComplete);\n }\n return $result;\n }", "public function airlineList()\n {\n $airlines = Airline::all();\n\n return $airlines;\n }", "public function all(){\n $airports = $this->airports->all();\n return response()->json(array('data' =>$airports));\n }", "public function index()\n {\n $airports = $this->airports->getOneAirport('4343');\n $list_airports = $this->airports->all();\n return view('airports.index',[\n 'airports' => $airports,\n 'list_airports' => $list_airports\n ]);\n\n }", "public function getAirlines()\n {\n $airlines = Airline::all();\n \n return response()->json($airlines, 200);\n }", "public function index()\n\t{\n\t\t$airports = $this->airport->all();\n\n\t\treturn View::make('airports.index', compact('airports'));\n\t}", "function getAllAirport() {\n global $airportManager;\n\n $result = [];\n\n // Get All the Airport in the database\n $airports = $airportManager->getAllAirport();\n\n // if not empty, need to transform all object to associative Array\n if ( count( $airports ) ) {\n foreach ( $airports as $airport ) {\n $result[] = [\n \"id\" => $airport->getId(),\n \"code\" => $airport->getCode(),\n \"cityCode\" => $airport->getCityCode(),\n \"name\" => $airport->getName(),\n \"city\" => $airport->getCity(),\n \"countryCode\" => $airport->getCountryCode(),\n \"regionCode\" => $airport->getRegionCode(),\n \"latitude\" => $airport->getlatitude(),\n \"longitude\" => $airport->getLongittude(),\n \"timezone\" => $airport->getTimezone(),\n ];\n }\n } else {\n $result = $airports;\n }\n\n echo json_encode( $result );\n}", "private function loadAirportCharts(array &$airports, string $apIcaoList) {\n $query = \"SELECT *,\";\n $query .= \" (CASE WHEN type LIKE 'AREA%' THEN 1 WHEN type LIKE 'VAC%' THEN 2 WHEN type LIKE 'AD INFO%' THEN 3 ELSE 4 END) AS sortorder1\";\n $query .= \" FROM ad_charts \";\n $query .= \" WHERE airport_icao IN (\" . $apIcaoList . \")\";\n $query .= \" ORDER BY\";\n $query .= \" source ASC,\";\n $query .= \" sortorder1 ASC,\";\n $query .= \" type ASC\";\n\n $result = $this->dbService->execMultiResultQuery($query, \"error reading charts\");\n\n while ($row = $result->fetch_assoc()) {\n foreach ($airports as &$ap) {\n if ($ap->icao === $row[\"airport_icao\"]) {\n $ap->charts[] = DbAirportChartConverter::fromDbRow($row);\n break;\n }\n }\n }\n }", "public function run()\n {\n \t\n$airports = array(\narray('id' => '1','name' => '(UTK) - Utirik Airport, Utirik Island, Marshall Islands','country_id' => '139'),\narray('id' => '2','name' => '(OCA) - Ocean Reef Club Airport, Key Largo, United States','country_id' => '228'),\narray('id' => '3','name' => '(PQS) - Pilot Station Airport, Pilot Station, United States','country_id' => '228'),\narray('id' => '4','name' => '(CSE) - Buckhorn Ranch Airport, Crested Butte, United States','country_id' => '228'),\narray('id' => '5','name' => '(JCY) - LBJ Ranch Airport, Johnson City, United States','country_id' => '228'),\narray('id' => '6','name' => '(PMX) - Metropolitan Airport, Palmer, United States','country_id' => '228'),\narray('id' => '7','name' => '(NUP) - Nunapitchuk Airport, Nunapitchuk, United States','country_id' => '228'),\narray('id' => '8','name' => '(ICY) - Icy Bay Airport, Icy Bay, United States','country_id' => '228'),\narray('id' => '9','name' => '(KKK) - Kalakaket Creek AS Airport, Kalakaket Creek, United States','country_id' => '228'),\narray('id' => '10','name' => '(MHS) - Dunsmuir Muni-Mott Airport, Dunsmuir, United States','country_id' => '228'),\narray('id' => '11','name' => '(LVD) - Lime Village Airport, Lime Village, United States','country_id' => '228'),\narray('id' => '12','name' => '(HGZ) - Hog River Airport, Hogatza, United States','country_id' => '228'),\narray('id' => '13','name' => '(OTN) - Ed-Air Airport, Oaktown, United States','country_id' => '228'),\narray('id' => '14','name' => '(TLF) - Telida Airport, Telida, United States','country_id' => '228'),\narray('id' => '15','name' => '(BZT) - Eagle Air Park, Brazoria, United States','country_id' => '228'),\narray('id' => '16','name' => '(BYW) - Blakely Island Airport, Blakely Island, United States','country_id' => '228'),\narray('id' => '17','name' => '(DRF) - Drift River Airport, Kenai, United States','country_id' => '228'),\narray('id' => '18','name' => '(BDF) - Rinkenberger Restricted Landing Area, Bradford, United States','country_id' => '228'),\narray('id' => '19','name' => '(VRS) - Roy Otten Memorial Airfield, Versailles, United States','country_id' => '228'),\narray('id' => '20','name' => '(ATT) - Atmautluak Airport, Atmautluak, United States','country_id' => '228'),\narray('id' => '21','name' => '(LIV) - Livengood Camp Airport, Livengood, United States','country_id' => '228'),\narray('id' => '22','name' => '(PDB) - Pedro Bay Airport, Pedro Bay, United States','country_id' => '228'),\narray('id' => '23','name' => '(KOZ) - Ouzinkie Airport, Ouzinkie, United States','country_id' => '228'),\narray('id' => '24','name' => '(TNK) - Tununak Airport, Tununak, United States','country_id' => '228'),\narray('id' => '25','name' => '(WKK) - Aleknagik / New Airport, Aleknagik, United States','country_id' => '228'),\narray('id' => '26','name' => '(NNK) - Naknek Airport, Naknek, United States','country_id' => '228'),\narray('id' => '27','name' => '(BCS) - Southern Seaplane Airport, Belle Chasse, United States','country_id' => '228'),\narray('id' => '28','name' => '(BWL) - Earl Henry Airport, Blackwell, United States','country_id' => '228'),\narray('id' => '29','name' => '(CWS) - Center Island Airport, Center Island, United States','country_id' => '228'),\narray('id' => '30','name' => '(TEK) - Tatitlek Airport, Tatitlek, United States','country_id' => '228'),\narray('id' => '31','name' => '(DUF) - Pine Island Airport, Corolla, United States','country_id' => '228'),\narray('id' => '32','name' => '(SSW) - Stuart Island Airpark, Stuart Island, United States','country_id' => '228'),\narray('id' => '33','name' => '(FOB) - Fort Bragg Airport, Fort Bragg, United States','country_id' => '228'),\narray('id' => '34','name' => '(AXB) - Maxson Airfield, Alexandria Bay, United States','country_id' => '228'),\narray('id' => '35','name' => '(REE) - Reese Airpark, Lubbock, United States','country_id' => '228'),\narray('id' => '36','name' => '(WDN) - Waldronaire Airport, East Sound, United States','country_id' => '228'),\narray('id' => '37','name' => '(CHU) - Chuathbaluk Airport, Chuathbaluk, United States','country_id' => '228'),\narray('id' => '38','name' => '(UGS) - Ugashik Airport, Ugashik, United States','country_id' => '228'),\narray('id' => '39','name' => '(KLL) - Levelock Airport, Levelock, United States','country_id' => '228'),\narray('id' => '40','name' => '(WTL) - Tuntutuliak Airport, Tuntutuliak, United States','country_id' => '228'),\narray('id' => '41','name' => '(TWA) - Twin Hills Airport, Twin Hills, United States','country_id' => '228'),\narray('id' => '42','name' => '(KCQ) - Chignik Lake Airport, Chignik Lake, United States','country_id' => '228'),\narray('id' => '43','name' => '(ABP) - Atkamba Airport, Atkamba Mission, Papua New Guinea','country_id' => '172'),\narray('id' => '44','name' => '(ADC) - Andakombe Airport, Andekombe, Papua New Guinea','country_id' => '172'),\narray('id' => '45','name' => '(ADV) - El Daein Airport, El Daein, Sudan','country_id' => '192'),\narray('id' => '46','name' => '(AEE) - Adareil Airport, , South Sudan','country_id' => '203'),\narray('id' => '47','name' => '(AEK) - Aseki Airport, Aseki, Papua New Guinea','country_id' => '172'),\narray('id' => '48','name' => '(URZ) - Or\"zgAn Airport, Or\"zgAn, Afghanistan','country_id' => '2'),\narray('id' => '49','name' => '(OLR) - Salerno Landing Zone Airport, , Afghanistan','country_id' => '2'),\narray('id' => '50','name' => '(AFR) - Afore Airstrip, , Papua New Guinea','country_id' => '172'),\narray('id' => '51','name' => '(AFT) - Afutara Aerodrome, Bila, Solomon Islands','country_id' => '190'),\narray('id' => '52','name' => '(RNA) - Ulawa Airport, Arona, Solomon Islands','country_id' => '190'),\narray('id' => '53','name' => '(ATD) - Uru Harbour Airport, Atoifi, Solomon Islands','country_id' => '190'),\narray('id' => '54','name' => '(VEV) - Barakoma Airport, Barakoma, Solomon Islands','country_id' => '190'),\narray('id' => '55','name' => '(GEF) - Geva Airport, Liangia, Solomon Islands','country_id' => '190'),\narray('id' => '56','name' => '(AGG) - Angoram Airport, Angoram, Papua New Guinea','country_id' => '172'),\narray('id' => '57','name' => '(AKS) - Auki Airport, Auki, Solomon Islands','country_id' => '190'),\narray('id' => '58','name' => '(BNY) - Bellona/Anua Airport, Anua, Solomon Islands','country_id' => '190'),\narray('id' => '59','name' => '(CHY) - Choiseul Bay Airport, , Solomon Islands','country_id' => '190'),\narray('id' => '60','name' => '(BAS) - Ballalae Airport, Ballalae, Solomon Islands','country_id' => '190'),\narray('id' => '61','name' => '(FRE) - Fera/Maringe Airport, Fera Island, Solomon Islands','country_id' => '190'),\narray('id' => '62','name' => '(HIR) - Honiara International Airport, Honiara, Solomon Islands','country_id' => '190'),\narray('id' => '63','name' => '(MBU) - Babanakira Airport, Mbambanakira, Solomon Islands','country_id' => '190'),\narray('id' => '64','name' => '(AVU) - Avu Avu Airport, , Solomon Islands','country_id' => '190'),\narray('id' => '65','name' => '(IRA) - Ngorangora Airport, Kirakira, Solomon Islands','country_id' => '190'),\narray('id' => '66','name' => '(SCZ) - Santa Cruz/Graciosa Bay/Luova Airport, Santa Cruz/Graciosa Bay/Luova, Solomon Islands','country_id' => '190'),\narray('id' => '67','name' => '(MUA) - Munda Airport, , Solomon Islands','country_id' => '190'),\narray('id' => '68','name' => '(GZO) - Nusatupe Airport, Gizo, Solomon Islands','country_id' => '190'),\narray('id' => '69','name' => '(MNY) - Mono Airport, Stirling Island, Solomon Islands','country_id' => '190'),\narray('id' => '70','name' => '(PRS) - Parasi Airport, Parasi, Solomon Islands','country_id' => '190'),\narray('id' => '71','name' => '(RNL) - Rennell/Tingoa Airport, Rennell Island, Solomon Islands','country_id' => '190'),\narray('id' => '72','name' => '(EGM) - Sege Airport, Sege, Solomon Islands','country_id' => '190'),\narray('id' => '73','name' => '(NNB) - Santa Ana Airport, Santa Ana Island, Solomon Islands','country_id' => '190'),\narray('id' => '74','name' => '(RUS) - Marau Airport, Marau, Solomon Islands','country_id' => '190'),\narray('id' => '75','name' => '(VAO) - Suavanao Airport, Suavanao, Solomon Islands','country_id' => '190'),\narray('id' => '76','name' => '(XYA) - Yandina Airport, Yandina, Solomon Islands','country_id' => '190'),\narray('id' => '77','name' => '(AGK) - Kagua Airport, Kagua, Papua New Guinea','country_id' => '172'),\narray('id' => '78','name' => '(KGE) - Kaghau Airport, Kagau Island, Solomon Islands','country_id' => '190'),\narray('id' => '79','name' => '(KUE) - Kukudu Airport, Kolombangara Island, Solomon Islands','country_id' => '190'),\narray('id' => '80','name' => '(KWS) - Kwailabesi Airport, Kwailabesi, Solomon Islands','country_id' => '190'),\narray('id' => '81','name' => '(AGL) - Wanigela Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '82','name' => '(NAZ) - Nana Airport, Star Harbor, Solomon Islands','country_id' => '190'),\narray('id' => '83','name' => '(RIN) - Ringi Cove Airport, Ringi Cove, Solomon Islands','country_id' => '190'),\narray('id' => '84','name' => '(RBV) - Ramata Airport, Ramata, Solomon Islands','country_id' => '190'),\narray('id' => '85','name' => '(AGY) - Argyle Downs Airport, Argyle Downs, Australia','country_id' => '12'),\narray('id' => '86','name' => '(AHJ) - Hongyuan Airport, Aba, China','country_id' => '45'),\narray('id' => '87','name' => '(AHY) - Ambatolhy Airport, Ambatolahy, Madagascar','country_id' => '138'),\narray('id' => '88','name' => '(AIE) - Aiome Airport, Aiome, Papua New Guinea','country_id' => '172'),\narray('id' => '89','name' => '(AIH) - Aiambak Airport, Aiambak, Papua New Guinea','country_id' => '172'),\narray('id' => '90','name' => '(AIC) - Ailinglaplap Airok Airport, Bigatyelang Island, Marshall Islands','country_id' => '139'),\narray('id' => '91','name' => '(CEX) - Chena Hot Springs Airport, Chena Hot Springs, United States','country_id' => '228'),\narray('id' => '92','name' => '(SOL) - Solomon State Field, Solomon, United States','country_id' => '228'),\narray('id' => '93','name' => '(HED) - Herendeen Bay Airport, Herendeen Bay, United States','country_id' => '228'),\narray('id' => '94','name' => '(TWE) - Taylor Airport, Taylor, United States','country_id' => '228'),\narray('id' => '95','name' => '(LNI) - Lonely Air Station, Lonely, United States','country_id' => '228'),\narray('id' => '96','name' => '(CDL) - Candle 2 Airport, Candle, United States','country_id' => '228'),\narray('id' => '97','name' => '(BSZ) - Bartletts Airport, Egegik, United States','country_id' => '228'),\narray('id' => '98','name' => '(BSW) - Boswell Bay Airport, Boswell Bay, United States','country_id' => '228'),\narray('id' => '99','name' => '(AKM) - Zakuoma Airport, ZaKouma, Chad','country_id' => '210'),\narray('id' => '100','name' => '(TGE) - Sharpe Field, Tuskegee, United States','country_id' => '228'),\narray('id' => '101','name' => '(PPE) - Mar de CortAs International Airport, Puerto PeAasco, Mexico','country_id' => '153'),\narray('id' => '102','name' => '(AME) - Alto Molocue Airport, Alto Molocue, Mozambique','country_id' => '155'),\narray('id' => '103','name' => '(AMF) - Ama Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '104','name' => '(AMU) - Amanab Airport, Amanab, Papua New Guinea','country_id' => '172'),\narray('id' => '105','name' => '(AMY) - Ambatomainty Airport, , Madagascar','country_id' => '138'),\narray('id' => '106','name' => '(INU) - Nauru International Airport, Yaren District, Nauru','country_id' => '165'),\narray('id' => '107','name' => '(ANZ) - Angus Downs Airport, Angus Downs Station, Australia','country_id' => '12'),\narray('id' => '108','name' => '(ANL) - Andulo Airport, , Angola','country_id' => '7'),\narray('id' => '109','name' => '(CNZ) - Cangamba Airport, Cangamba, Angola','country_id' => '7'),\narray('id' => '110','name' => '(DRC) - Dirico Airport, Dirico, Angola','country_id' => '7'),\narray('id' => '111','name' => '(GGC) - Lumbala Airport, Lumbala, Angola','country_id' => '7'),\narray('id' => '112','name' => '(JMB) - Jamba Airport, Jamba, Angola','country_id' => '7'),\narray('id' => '113','name' => '(KNP) - Capanda Airport, Capanda, Angola','country_id' => '7'),\narray('id' => '114','name' => '(NDF) - Ndalatandos Airport, Ndalatandos, Angola','country_id' => '7'),\narray('id' => '115','name' => '(AOB) - Annanberg Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '116','name' => '(AOD) - Abou-DeAa Airport, Abou-DeAa, Chad','country_id' => '210'),\narray('id' => '117','name' => '(APP) - Asapa Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '118','name' => '(APR) - April River Airport, April River, Papua New Guinea','country_id' => '172'),\narray('id' => '119','name' => '(AQY) - Girdwood Airport, Girdwood, United States','country_id' => '228'),\narray('id' => '120','name' => '(QRF) - Bragado Airport, Bragado, Argentina','country_id' => '9'),\narray('id' => '121','name' => '(CVI) - Caleta Olivia Airport, Caleta Olivia, Argentina','country_id' => '9'),\narray('id' => '122','name' => '(CNT) - Charata Airport, Charata, Argentina','country_id' => '9'),\narray('id' => '123','name' => '(VGS) - General Villegas Airport, General Villegas, Argentina','country_id' => '9'),\narray('id' => '124','name' => '(LMD) - Los Menucos Airport, Los Menucos, Argentina','country_id' => '9'),\narray('id' => '125','name' => '(VCF) - Valcheta Airport, Valcheta, Argentina','country_id' => '9'),\narray('id' => '126','name' => '(NCJ) - Sunchales Aeroclub Airport, Sunchales, Argentina','country_id' => '9'),\narray('id' => '127','name' => '(CPG) - Carmen De Patagones Airport, Carmen de Patagones, Argentina','country_id' => '9'),\narray('id' => '128','name' => '(PRQ) - Termal Airport, Presidencia Roque SAenz PeAa, Argentina','country_id' => '9'),\narray('id' => '129','name' => '(OLN) - Colonia Sarmiento Airport, Sarmiento, Argentina','country_id' => '9'),\narray('id' => '130','name' => '(ARP) - Aragip Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '131','name' => '(TAV) - Tau Airport, Tau Village, American Samoa','country_id' => '10'),\narray('id' => '132','name' => '(ASZ) - Asirim Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '133','name' => '(ATN) - Namatanai Airport, Namatanai, Papua New Guinea','country_id' => '172'),\narray('id' => '134','name' => '(ATP) - Aitape Airport, Aitape, Papua New Guinea','country_id' => '172'),\narray('id' => '135','name' => '(ATQ) - Shri Guru Ram Dass Ji International Airport Amritsar, Amritsar, India','country_id' => '101'),\narray('id' => '136','name' => '(LYT) - Lady Elliot Island Airstrip, Lady Elliot Island, Australia','country_id' => '12'),\narray('id' => '137','name' => '(AGW) - Agnew Airport, Agnew, Australia','country_id' => '12'),\narray('id' => '138','name' => '(AYD) - Alroy Downs Airport, Alroy Downs, Australia','country_id' => '12'),\narray('id' => '139','name' => '(BYX) - Baniyala Airport, Baniyala, Australia','country_id' => '12'),\narray('id' => '140','name' => '(COB) - Coolibah Airport, Coolibah, Australia','country_id' => '12'),\narray('id' => '141','name' => '(CRJ) - Coorabie Airport, Coorabie, Australia','country_id' => '12'),\narray('id' => '142','name' => '(CRY) - Carlton Hill Airport, Carlton Hill, Australia','country_id' => '12'),\narray('id' => '143','name' => '(CSD) - Cresswell Downs Airport, Cresswell Downs, Australia','country_id' => '12'),\narray('id' => '144','name' => '(DYM) - Diamantina Lakes Airport, Diamantina Lakes, Australia','country_id' => '12'),\narray('id' => '145','name' => '(HLV) - Helenvale Airport, Helenvale, Australia','country_id' => '12'),\narray('id' => '146','name' => '(KBD) - Kimberley Downs Airport, Kimberley Downs, Australia','country_id' => '12'),\narray('id' => '147','name' => '(KGR) - Kulgera Airport, Kulgera, Australia','country_id' => '12'),\narray('id' => '148','name' => '(MWY) - Miranda Downs Airport, Miranda Downs, Australia','country_id' => '12'),\narray('id' => '149','name' => '(MYO) - Camballin Airport, Myroodah, Australia','country_id' => '12'),\narray('id' => '150','name' => '(OKB) - Orchid Beach Airport, Orchid Beach, Australia','country_id' => '12'),\narray('id' => '151','name' => '(PEP) - Peppimenarti Airport, Peppimenarti, Australia','country_id' => '12'),\narray('id' => '152','name' => '(RDA) - Rockhampton Downs Airport, Rockhampton Downs, Australia','country_id' => '12'),\narray('id' => '153','name' => '(SSK) - Sturt Creek Airport, Sturt Creek, Australia','country_id' => '12'),\narray('id' => '154','name' => '(SWB) - Shaw River Airport, Shaw River, Australia','country_id' => '12'),\narray('id' => '155','name' => '(TPR) - Tom Price Airport, Tom Price, Australia','country_id' => '12'),\narray('id' => '156','name' => '(TWP) - Torwood Airport, Torwood, Australia','country_id' => '12'),\narray('id' => '157','name' => '(ZVG) - Springvale Airport, Springvale, Australia','country_id' => '12'),\narray('id' => '158','name' => '(AUI) - Aua Island Airport, Aua Island, Papua New Guinea','country_id' => '172'),\narray('id' => '159','name' => '(AUJ) - Ambunti Airport, Ambunti, Papua New Guinea','country_id' => '172'),\narray('id' => '160','name' => '(AUP) - Agaun Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '161','name' => '(AUV) - Aumo Airport, Aumo, Papua New Guinea','country_id' => '172'),\narray('id' => '162','name' => '(AWE) - Alowe Airport, Wonga WonguA Presidential Reserve, Gabon','country_id' => '73'),\narray('id' => '163','name' => '(AXF) - Alxa Left Banner-Bayanhot Airport, Bayanhot, China','country_id' => '45'),\narray('id' => '164','name' => '(KPM) - Kompiam Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '165','name' => '(BUA) - Buka Airport, Buka Island, Papua New Guinea','country_id' => '172'),\narray('id' => '166','name' => '(BRP) - Biaru Airport, Biaru, Papua New Guinea','country_id' => '172'),\narray('id' => '167','name' => '(CMU) - Chimbu Airport, Kundiawa, Papua New Guinea','country_id' => '172'),\narray('id' => '168','name' => '(MDM) - Munduku Airport, Munduku, Papua New Guinea','country_id' => '172'),\narray('id' => '169','name' => '(KPF) - Kondobol Airport, Kondobol, Papua New Guinea','country_id' => '172'),\narray('id' => '170','name' => '(DNU) - Dinangat Airport, Dinangat, Papua New Guinea','country_id' => '172'),\narray('id' => '171','name' => '(DOI) - Doini Airport, Castori Islets, Papua New Guinea','country_id' => '172'),\narray('id' => '172','name' => '(DAU) - Daru Airport, Daru, Papua New Guinea','country_id' => '172'),\narray('id' => '173','name' => '(EMS) - Embessa Airport, Embessa, Papua New Guinea','country_id' => '172'),\narray('id' => '174','name' => '(XYR) - Edwaki Airport, Yellow River Mission, Papua New Guinea','country_id' => '172'),\narray('id' => '175','name' => '(EPT) - Eliptamin Airport, Eliptamin, Papua New Guinea','country_id' => '172'),\narray('id' => '176','name' => '(EGA) - Engati Airstrip, Engati, Papua New Guinea','country_id' => '172'),\narray('id' => '177','name' => '(EMO) - Emo River Airstrip, Emo Mission, Papua New Guinea','country_id' => '172'),\narray('id' => '178','name' => '(ERU) - Erume Airport, Erume, Papua New Guinea','country_id' => '172'),\narray('id' => '179','name' => '(MFZ) - Meselia Airport, Demgulu, Papua New Guinea','country_id' => '172'),\narray('id' => '180','name' => '(FRQ) - Feramin Airport, Feramin, Papua New Guinea','country_id' => '172'),\narray('id' => '181','name' => '(FAQ) - Frieda River Airport, Frieda River, Papua New Guinea','country_id' => '172'),\narray('id' => '182','name' => '(FUM) - Fuma Airport, Fuma, Papua New Guinea','country_id' => '172'),\narray('id' => '183','name' => '(GKA) - Goroka Airport, Goronka, Papua New Guinea','country_id' => '172'),\narray('id' => '184','name' => '(GUG) - Guari Airport, Guari, Papua New Guinea','country_id' => '172'),\narray('id' => '185','name' => '(GRL) - Garasa Airport, Au, Papua New Guinea','country_id' => '172'),\narray('id' => '186','name' => '(GUR) - Gurney Airport, Gurney, Papua New Guinea','country_id' => '172'),\narray('id' => '187','name' => '(GAP) - Gusap Airport, Gusap, Papua New Guinea','country_id' => '172'),\narray('id' => '188','name' => '(PNP) - Girua Airport, Popondetta, Papua New Guinea','country_id' => '172'),\narray('id' => '189','name' => '(GBC) - Gasuke Airport, Gasuke, Papua New Guinea','country_id' => '172'),\narray('id' => '190','name' => '(HBD) - Habi Airport, Habi, Papua New Guinea','country_id' => '172'),\narray('id' => '191','name' => '(HNI) - Heiweni Airport, Heiweni, Papua New Guinea','country_id' => '172'),\narray('id' => '192','name' => '(HNN) - Honinabi Airport, Honinabi, Papua New Guinea','country_id' => '172'),\narray('id' => '193','name' => '(HKN) - Kimbe Airport, Hoskins, Papua New Guinea','country_id' => '172'),\narray('id' => '194','name' => '(HIT) - Haivaro Airport, Haivaro, Papua New Guinea','country_id' => '172'),\narray('id' => '195','name' => '(IMN) - Imane Airport, Imane, Papua New Guinea','country_id' => '172'),\narray('id' => '196','name' => '(KGM) - Kungim Airport, Kungim, Papua New Guinea','country_id' => '172'),\narray('id' => '197','name' => '(IMD) - Imonda Airport, Imonda, Papua New Guinea','country_id' => '172'),\narray('id' => '198','name' => '(IAL) - Ialibu Airport, Ialibu, Papua New Guinea','country_id' => '172'),\narray('id' => '199','name' => '(WIU) - Witu Airport, Garove Island, Papua New Guinea','country_id' => '172'),\narray('id' => '200','name' => '(KGH) - Yongai Airport, Yongai, Papua New Guinea','country_id' => '172'),\narray('id' => '201','name' => '(LSA) - Losuia Airport, Losuia, Papua New Guinea','country_id' => '172'),\narray('id' => '202','name' => '(KPA) - Kopiago Airport, Kopiago, Papua New Guinea','country_id' => '172'),\narray('id' => '203','name' => '(UNG) - Kiunga Airport, Kiunga, Papua New Guinea','country_id' => '172'),\narray('id' => '204','name' => '(KNE) - Kanainj Airport, Kanainj, Papua New Guinea','country_id' => '172'),\narray('id' => '205','name' => '(KRI) - Kikori Airport, Kikori, Papua New Guinea','country_id' => '172'),\narray('id' => '206','name' => '(KMA) - Kerema Airport, Kerema, Papua New Guinea','country_id' => '172'),\narray('id' => '207','name' => '(KRX) - Kar Kar Airport, Kar Kar Island, Papua New Guinea','country_id' => '172'),\narray('id' => '208','name' => '(KIE) - Kieta Airport, Kieta, Papua New Guinea','country_id' => '172'),\narray('id' => '209','name' => '(KUQ) - Kuri Airport, Kuri, Papua New Guinea','country_id' => '172'),\narray('id' => '210','name' => '(KVG) - Kavieng Airport, Kavieng, Papua New Guinea','country_id' => '172'),\narray('id' => '211','name' => '(LNV) - Londolovit Airport, Londolovit, Papua New Guinea','country_id' => '172'),\narray('id' => '212','name' => '(LAB) - Lab Lab Airport, Lab Lab Mission, Papua New Guinea','country_id' => '172'),\narray('id' => '213','name' => '(LWI) - Lowai Airport, Lowai, Papua New Guinea','country_id' => '172'),\narray('id' => '214','name' => '(LPN) - Leron Plains Airport, Leron Plains, Papua New Guinea','country_id' => '172'),\narray('id' => '215','name' => '(LNG) - Lese Airport, Lese, Papua New Guinea','country_id' => '172'),\narray('id' => '216','name' => '(LSJ) - Long Island Airport, Long Island, Papua New Guinea','country_id' => '172'),\narray('id' => '217','name' => '(MRM) - Manari Airport, Manari, Papua New Guinea','country_id' => '172'),\narray('id' => '218','name' => '(OBM) - Morobe Airport, Morobe, Papua New Guinea','country_id' => '172'),\narray('id' => '219','name' => '(MAG) - Madang Airport, Madang, Papua New Guinea','country_id' => '172'),\narray('id' => '220','name' => '(HGU) - Mount Hagen Kagamuga Airport, Mount Hagen, Papua New Guinea','country_id' => '172'),\narray('id' => '221','name' => '(GUV) - Mougulu Airport, Mougulu, Papua New Guinea','country_id' => '172'),\narray('id' => '222','name' => '(MDU) - Mendi Airport, Mendi, Papua New Guinea','country_id' => '172'),\narray('id' => '223','name' => '(MAS) - Momote Airport, Manus Island, Papua New Guinea','country_id' => '172'),\narray('id' => '224','name' => '(MXH) - Moro Airport, Moro, Papua New Guinea','country_id' => '172'),\narray('id' => '225','name' => '(MIS) - Misima Island Airport, Misima Island, Papua New Guinea','country_id' => '172'),\narray('id' => '226','name' => '(MWG) - Marawaka Airport, Marawaka, Papua New Guinea','country_id' => '172'),\narray('id' => '227','name' => '(NKN) - Nankina Airport, Gwarawon, Papua New Guinea','country_id' => '172'),\narray('id' => '228','name' => '(GBF) - Negarbo(Negabo) Airport, Negarbo, Papua New Guinea','country_id' => '172'),\narray('id' => '229','name' => '(MFO) - Manguna Airport, Manguna, Papua New Guinea','country_id' => '172'),\narray('id' => '230','name' => '(KSB) - Kasonombe Airport, Kasonombe, Papua New Guinea','country_id' => '172'),\narray('id' => '231','name' => '(NMN) - Nomane Airport, Namane, Papua New Guinea','country_id' => '172'),\narray('id' => '232','name' => '(NBA) - Nambaiyufa Airport, Nambaiyufa, Papua New Guinea','country_id' => '172'),\narray('id' => '233','name' => '(LAE) - Nadzab Airport, Lae, Papua New Guinea','country_id' => '172'),\narray('id' => '234','name' => '(KGB) - Konge Airport, Konge, Papua New Guinea','country_id' => '172'),\narray('id' => '235','name' => '(OKP) - Oksapmin Airport, Oksapmin, Papua New Guinea','country_id' => '172'),\narray('id' => '236','name' => '(HOC) - Komako Airport, Komako, Papua New Guinea','country_id' => '172'),\narray('id' => '237','name' => '(KCJ) - Komaio Airport, Komaio, Papua New Guinea','country_id' => '172'),\narray('id' => '238','name' => '(KDE) - Koroba Airport, Koroba, Papua New Guinea','country_id' => '172'),\narray('id' => '239','name' => '(PGB) - Pangoa Airport, Pangoa, Papua New Guinea','country_id' => '172'),\narray('id' => '240','name' => '(PGN) - Pangia Airport, Pangia, Papua New Guinea','country_id' => '172'),\narray('id' => '241','name' => '(MPF) - Mapoda Airport, Mapoda, Papua New Guinea','country_id' => '172'),\narray('id' => '242','name' => '(PMN) - Pumani Airport, Pumani, Papua New Guinea','country_id' => '172'),\narray('id' => '243','name' => '(POM) - Port Moresby Jacksons International Airport, Port Moresby, Papua New Guinea','country_id' => '172'),\narray('id' => '244','name' => '(SPH) - Sopu Airport, Sopu, Papua New Guinea','country_id' => '172'),\narray('id' => '245','name' => '(SXA) - Sialum Airport, Sialum, Papua New Guinea','country_id' => '172'),\narray('id' => '246','name' => '(RMN) - Rumginae Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '247','name' => '(KMR) - Karimui Airport, Karimui, Papua New Guinea','country_id' => '172'),\narray('id' => '248','name' => '(MWI) - Maramuni Airport, Maramuni, Papua New Guinea','country_id' => '172'),\narray('id' => '249','name' => '(MRH) - May River Airstrip, May River, Papua New Guinea','country_id' => '172'),\narray('id' => '250','name' => '(SBE) - Suabi Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '251','name' => '(NIS) - Simberi Airport, Simberi Island, Papua New Guinea','country_id' => '172'),\narray('id' => '252','name' => '(SIL) - Sila Airport, Sila Mission, Papua New Guinea','country_id' => '172'),\narray('id' => '253','name' => '(SBV) - Sabah Airport, Sabah, Papua New Guinea','country_id' => '172'),\narray('id' => '254','name' => '(SIM) - Simbai Airport, Simbai, Papua New Guinea','country_id' => '172'),\narray('id' => '255','name' => '(SBC) - Selbang Airport, Selbang, Papua New Guinea','country_id' => '172'),\narray('id' => '256','name' => '(SPV) - Sepik Plains Airport, Sepik Plains, Papua New Guinea','country_id' => '172'),\narray('id' => '257','name' => '(SXW) - Sauren Airport, Sauren, Papua New Guinea','country_id' => '172'),\narray('id' => '258','name' => '(MBV) - Masa Airport, Masa, Papua New Guinea','country_id' => '172'),\narray('id' => '259','name' => '(TIZ) - Tari Airport, Tari, Papua New Guinea','country_id' => '172'),\narray('id' => '260','name' => '(TBG) - Tabubil Airport, Tabubil, Papua New Guinea','country_id' => '172'),\narray('id' => '261','name' => '(TPI) - Tapini Airport, Tapini, Papua New Guinea','country_id' => '172'),\narray('id' => '262','name' => '(RAB) - Tokua Airport, Tokua, Papua New Guinea','country_id' => '172'),\narray('id' => '263','name' => '(TKW) - Tekin Airport, Tekin, Papua New Guinea','country_id' => '172'),\narray('id' => '264','name' => '(TEP) - Tep Tep Airport, Teptep, Papua New Guinea','country_id' => '172'),\narray('id' => '265','name' => '(TSW) - Tsewi Airport, Tsewi, Papua New Guinea','country_id' => '172'),\narray('id' => '266','name' => '(TRJ) - Tarakbits Airport, Tarakbits, Papua New Guinea','country_id' => '172'),\narray('id' => '267','name' => '(TWY) - Tawa Airport, Tawa, Papua New Guinea','country_id' => '172'),\narray('id' => '268','name' => '(TKB) - Tekadu Airport, Tekadu, Papua New Guinea','country_id' => '172'),\narray('id' => '269','name' => '(AYU) - Aiyura Airport, Aiyura Valley, Papua New Guinea','country_id' => '172'),\narray('id' => '270','name' => '(UMC) - Umba Airport, Umba, Papua New Guinea','country_id' => '172'),\narray('id' => '271','name' => '(URU) - Uroubi Airport, Uroubi, Papua New Guinea','country_id' => '172'),\narray('id' => '272','name' => '(UPR) - Upiara Airport, Upiara, Papua New Guinea','country_id' => '172'),\narray('id' => '273','name' => '(UVO) - Uvol Airport, Uvol, Papua New Guinea','country_id' => '172'),\narray('id' => '274','name' => '(TLW) - Talasea Airport, Talasea, Papua New Guinea','country_id' => '172'),\narray('id' => '275','name' => '(TCJ) - Torembi Airport, Torembi, Papua New Guinea','country_id' => '172'),\narray('id' => '276','name' => '(VAI) - Vanimo Airport, Vanimo, Papua New Guinea','country_id' => '172'),\narray('id' => '277','name' => '(TON) - Tonu Airport, Tonu, Papua New Guinea','country_id' => '172'),\narray('id' => '278','name' => '(WAO) - Wabo Airport, Wabo, Papua New Guinea','country_id' => '172'),\narray('id' => '279','name' => '(WBM) - Wapenamanda Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '280','name' => '(WAJ) - Wawoi Falls Airport, Wavoi Falls, Papua New Guinea','country_id' => '172'),\narray('id' => '281','name' => '(WWK) - Wewak International Airport, Wewak, Papua New Guinea','country_id' => '172'),\narray('id' => '282','name' => '(WOA) - Wonenara Airport, Wonenara, Papua New Guinea','country_id' => '172'),\narray('id' => '283','name' => '(WSU) - Wasu Airport, Wasu, Papua New Guinea','country_id' => '172'),\narray('id' => '284','name' => '(WTP) - Woitape Airport, Fatima Mission, Papua New Guinea','country_id' => '172'),\narray('id' => '285','name' => '(WUG) - Wau Airport, Wau, Papua New Guinea','country_id' => '172'),\narray('id' => '286','name' => '(YVD) - Yeva Airport, Yeva, Papua New Guinea','country_id' => '172'),\narray('id' => '287','name' => '(SMJ) - Sim Airport, Sim, Papua New Guinea','country_id' => '172'),\narray('id' => '288','name' => '(WEP) - Weam Airport, Weam, Papua New Guinea','country_id' => '172'),\narray('id' => '289','name' => '(KYX) - Yalumet Airport, Yalumet, Papua New Guinea','country_id' => '172'),\narray('id' => '290','name' => '(KSX) - Yasuru Airport, Yasuru, Papua New Guinea','country_id' => '172'),\narray('id' => '291','name' => '(WUM) - Wasum Airport, Wasum, Papua New Guinea','country_id' => '172'),\narray('id' => '292','name' => '(ZXT) - Zabrat Airport, Baku, Azerbaijan','country_id' => '14'),\narray('id' => '293','name' => '(AZB) - Amazon Bay Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '294','name' => '(BAJ) - Bali Airport, Unea Island, Papua New Guinea','country_id' => '172'),\narray('id' => '295','name' => '(BKG) - Branson Airport, Branson, United States','country_id' => '228'),\narray('id' => '296','name' => '(BCP) - Bambu Airport, Bambu, Papua New Guinea','country_id' => '172'),\narray('id' => '297','name' => '(BCW) - Benguera Island Airport, Benguera Island, Mozambique','country_id' => '155'),\narray('id' => '298','name' => '(BCZ) - Milyakburra Airport, Bickerton Island, Australia','country_id' => '12'),\narray('id' => '299','name' => '(ILL) - Willmar Municipal -John L Rice Field, Willmar, United States','country_id' => '228'),\narray('id' => '300','name' => '(BDZ) - Baindoung Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '301','name' => '(HKV) - Malevo Airport, Haskovo, Bulgaria','country_id' => '20'),\narray('id' => '302','name' => '(JAM) - Bezmer Air Base, Yambol, Bulgaria','country_id' => '20'),\narray('id' => '303','name' => '(JEG) - Aasiaat Airport, Aasiaat, Greenland','country_id' => '81'),\narray('id' => '304','name' => '(UAK) - Narsarsuaq Airport, Narsarsuaq, Greenland','country_id' => '81'),\narray('id' => '305','name' => '(CNP) - Neerlerit Inaat Airport, Neerlerit Inaat, Greenland','country_id' => '81'),\narray('id' => '306','name' => '(GOH) - Godthaab / Nuuk Airport, Nuuk, Greenland','country_id' => '81'),\narray('id' => '307','name' => '(JAV) - Ilulissat Airport, Ilulissat, Greenland','country_id' => '81'),\narray('id' => '308','name' => '(KUS) - Kulusuk Airport, Kulusuk, Greenland','country_id' => '81'),\narray('id' => '309','name' => '(JSU) - Maniitsoq Airport, Maniitsoq, Greenland','country_id' => '81'),\narray('id' => '310','name' => '(BGP) - Bongo Airport, Bongo, Gabon','country_id' => '73'),\narray('id' => '311','name' => '(JFR) - Paamiut Airport, Paamiut, Greenland','country_id' => '81'),\narray('id' => '312','name' => '(NAQ) - Qaanaaq Airport, Qaanaaq, Greenland','country_id' => '81'),\narray('id' => '313','name' => '(SFJ) - Kangerlussuaq Airport, Kangerlussuaq, Greenland','country_id' => '81'),\narray('id' => '314','name' => '(JHS) - Sisimiut Airport, Sisimiut, Greenland','country_id' => '81'),\narray('id' => '315','name' => '(THU) - Thule Air Base, Thule, Greenland','country_id' => '81'),\narray('id' => '316','name' => '(JUV) - Upernavik Airport, Upernavik, Greenland','country_id' => '81'),\narray('id' => '317','name' => '(JQA) - Qaarsut Airport, Uummannaq, Greenland','country_id' => '81'),\narray('id' => '318','name' => '(BHL) - BahAa de los Angeles Airport, BahAa de los Angeles, Mexico','country_id' => '153'),\narray('id' => '319','name' => '(BHT) - Brighton Downs Airport, , Australia','country_id' => '12'),\narray('id' => '320','name' => '(AEY) - Akureyri Airport, Akureyri, Iceland','country_id' => '105'),\narray('id' => '321','name' => '(BIU) - Bildudalur Airport, Bildudalur, Iceland','country_id' => '105'),\narray('id' => '322','name' => '(BGJ) - BorgarfjArAur eystri Airport, BorgarfjArAur eystri, Iceland','country_id' => '105'),\narray('id' => '323','name' => '(BJD) - BakkafjArAur Airport, BakkafjArAur, Iceland','country_id' => '105'),\narray('id' => '324','name' => '(BLO) - Hjaltabakki Airport, BlAnduAs, Iceland','country_id' => '105'),\narray('id' => '325','name' => '(BQD) - BAoAardalur Airport, BAoAardalur, Iceland','country_id' => '105'),\narray('id' => '326','name' => '(BXV) - BreiAdalsvAk Airport, BreiAdalsvAk, Iceland','country_id' => '105'),\narray('id' => '327','name' => '(DJU) - DjAopivogur Airport, DjAopivogur, Iceland','country_id' => '105'),\narray('id' => '328','name' => '(EGS) - EgilsstaAir Airport, EgilsstaAir, Iceland','country_id' => '105'),\narray('id' => '329','name' => '(FAS) - FAskrAoAsfjArAur Airport, FAskrAoAsfjArAur, Iceland','country_id' => '105'),\narray('id' => '330','name' => '(FAG) - FagurhAlsmAri Airport, FagurhAlsmAri, Iceland','country_id' => '105'),\narray('id' => '331','name' => '(GUU) - GrundarfjArAur Airport, GrundarfjArAur, Iceland','country_id' => '105'),\narray('id' => '332','name' => '(GJR) - GjAgur Airport, GjAgur, Iceland','country_id' => '105'),\narray('id' => '333','name' => '(GRY) - GrAmsey Airport, GrAmsey, Iceland','country_id' => '105'),\narray('id' => '334','name' => '(HVK) - HAlmavAk Airport, HAlmavAk, Iceland','country_id' => '105'),\narray('id' => '335','name' => '(HFN) - HornafjArAur Airport, HAfn, Iceland','country_id' => '105'),\narray('id' => '336','name' => '(FLI) - Holt Airport, Flateyri, Iceland','country_id' => '105'),\narray('id' => '337','name' => '(HZK) - HAosavAk Airport, HAosavAk, Iceland','country_id' => '105'),\narray('id' => '338','name' => '(HVM) - KrAkstaAarmelar Airport, Hvammstangi, Iceland','country_id' => '105'),\narray('id' => '339','name' => '(HLO) - IngjaldssanAur Airport, OnundarfjArAur, Iceland','country_id' => '105'),\narray('id' => '340','name' => '(IFJ) - AsafjArAur Airport, AsafjArAur, Iceland','country_id' => '105'),\narray('id' => '341','name' => '(KEF) - Keflavik International Airport, ReykjavAk, Iceland','country_id' => '105'),\narray('id' => '342','name' => '(OPA) - KApasker Airport, KApasker, Iceland','country_id' => '105'),\narray('id' => '343','name' => '(SAK) - SauAArkrAkur Airport, SauAArkrAkur, Iceland','country_id' => '105'),\narray('id' => '344','name' => '(NOR) - NorAfjArAur Airport, NorAfjArAur, Iceland','country_id' => '105'),\narray('id' => '345','name' => '(OFJ) - A\"lafsfjArAur Airport, A\"lafsfjArAur, Iceland','country_id' => '105'),\narray('id' => '346','name' => '(PFJ) - PatreksfjArAur Airport, PatreksfjArAur, Iceland','country_id' => '105'),\narray('id' => '347','name' => '(RHA) - ReykhAlar Airport, ReykhAlar, Iceland','country_id' => '105'),\narray('id' => '348','name' => '(OLI) - Rif Airport, Rif, Iceland','country_id' => '105'),\narray('id' => '349','name' => '(RFN) - RaufarhAfn Airport, RaufarhAfn, Iceland','country_id' => '105'),\narray('id' => '350','name' => '(RKV) - Reykjavik Airport, Reykjavik, Iceland','country_id' => '105'),\narray('id' => '351','name' => '(MVA) - ReykjahlAA Airport, Myvatn, Iceland','country_id' => '105'),\narray('id' => '352','name' => '(SIJ) - SiglufjArAur Airport, SiglufjArAur, Iceland','country_id' => '105'),\narray('id' => '353','name' => '(SYK) - StykkishAlmur Airport, StykkishAlmur, Iceland','country_id' => '105'),\narray('id' => '354','name' => '(TEY) - Aingeyri Airport, Aingeyri, Iceland','country_id' => '105'),\narray('id' => '355','name' => '(THO) - Thorshofn Airport, Thorshofn, Iceland','country_id' => '105'),\narray('id' => '356','name' => '(VEY) - Vestmannaeyjar Airport, Vestmannaeyjar, Iceland','country_id' => '105'),\narray('id' => '357','name' => '(VPN) - VopnafjArAur Airport, VopnafjArAur, Iceland','country_id' => '105'),\narray('id' => '358','name' => '(BJE) - Baleela Airport, Baleela Base Camp, Sudan','country_id' => '192'),\narray('id' => '359','name' => '(BJQ) - Bahja Airport, Bahja, Oman','country_id' => '168'),\narray('id' => '360','name' => '(PRN) - Pritina International Airport, Prishtina, Kosovo','country_id' => '240'),\narray('id' => '361','name' => '(BMH) - Bomai Airport, Bomai, Papua New Guinea','country_id' => '172'),\narray('id' => '362','name' => '(BMQ) - Bamburi Airport, , Kenya','country_id' => '111'),\narray('id' => '363','name' => '(BMZ) - Bamu Airport, Bamu, Papua New Guinea','country_id' => '172'),\narray('id' => '364','name' => '(BNM) - Bodinumu Airport, Bodinumu, Papua New Guinea','country_id' => '172'),\narray('id' => '365','name' => '(BNT) - Bundi Airport, Bundi, Papua New Guinea','country_id' => '172'),\narray('id' => '366','name' => '(RBQ) - Rurenabaque Airport, Rurenabaque, Bolivia','country_id' => '27'),\narray('id' => '367','name' => '(BVL) - Baures Airport, Baures, Bolivia','country_id' => '27'),\narray('id' => '368','name' => '(BOK) - Brookings Airport, Brookings, United States','country_id' => '228'),\narray('id' => '369','name' => '(BOT) - Bosset Airport, Bosset, Papua New Guinea','country_id' => '172'),\narray('id' => '370','name' => '(BOV) - Boang Airport, Boang Island, Papua New Guinea','country_id' => '172'),\narray('id' => '371','name' => '(BPF) - Batuna Aerodrome, Batuna Mission Station, Solomon Islands','country_id' => '190'),\narray('id' => '372','name' => '(ALT) - Alenquer Airport, Alenquer, Brazil','country_id' => '29'),\narray('id' => '373','name' => '(BSI) - Blairsville, Blairsville, United States','country_id' => '228'),\narray('id' => '374','name' => '(BSP) - Bensbach Airport, Bensbach, Papua New Guinea','country_id' => '172'),\narray('id' => '375','name' => '(BSV) - Besakoa Airport, Besakoa, Madagascar','country_id' => '138'),\narray('id' => '376','name' => '(BUL) - Bulolo Airport, Bulolo, Papua New Guinea','country_id' => '172'),\narray('id' => '377','name' => '(BVR) - Esperadinha Airport, Brava Island, Cape Verde','country_id' => '49'),\narray('id' => '378','name' => '(HUK) - Hukuntsi Airport, Hukuntsi, Botswana','country_id' => '32'),\narray('id' => '379','name' => '(BWJ) - Bawan Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '380','name' => '(BWP) - Bewani Airport, Bewani, Papua New Guinea','country_id' => '172'),\narray('id' => '381','name' => '(BXZ) - Bunsil Airport, Bunsil - Umboi Island, Papua New Guinea','country_id' => '172'),\narray('id' => '382','name' => '(BYA) - Boundary Airport, Boundary, United States','country_id' => '228'),\narray('id' => '383','name' => '(BYL) - Bella Yella Airport, Beliyela, Liberia','country_id' => '127'),\narray('id' => '384','name' => '(BCV) - Belmopan Airport, Belmopan, Belize','country_id' => '34'),\narray('id' => '385','name' => '(BGK) - Big Creek Airport, Big Creek, Belize','country_id' => '34'),\narray('id' => '386','name' => '(CUK) - Caye Caulker Airport, Caye Caulker, Belize','country_id' => '34'),\narray('id' => '387','name' => '(CYC) - Caye Chapel Airport, Caye Chapel, Belize','country_id' => '34'),\narray('id' => '388','name' => '(CZH) - Corozal Municipal Airport, Corozal, Belize','country_id' => '34'),\narray('id' => '389','name' => '(DGA) - Dangriga Airport, Dangriga, Belize','country_id' => '34'),\narray('id' => '390','name' => '(INB) - Independence Airport, Independence, Belize','country_id' => '34'),\narray('id' => '391','name' => '(MDB) - Melinda Airport, Melinda, Belize','country_id' => '34'),\narray('id' => '392','name' => '(ORZ) - Orange Walk Airport, Orange Walk, Belize','country_id' => '34'),\narray('id' => '393','name' => '(PLJ) - Placencia Airport, Placencia, Belize','country_id' => '34'),\narray('id' => '394','name' => '(PND) - Punta Gorda Airport, Punta Gorda, Belize','country_id' => '34'),\narray('id' => '395','name' => '(SJX) - Sartaneja Airport, Sartaneja, Belize','country_id' => '34'),\narray('id' => '396','name' => '(SPR) - San Pedro Airport, San Pedro, Belize','country_id' => '34'),\narray('id' => '397','name' => '(SQS) - Matthew Spain Airport, San Ignacio, Belize','country_id' => '34'),\narray('id' => '398','name' => '(STU) - Santa Cruz Airport, Santa Cruz, Belize','country_id' => '34'),\narray('id' => '399','name' => '(SVK) - Silver Creek Airport, Silver Creek, Belize','country_id' => '34'),\narray('id' => '400','name' => '(TZA) - Belize City Municipal Airport, Belize City, Belize','country_id' => '34'),\narray('id' => '401','name' => '(BZB) - Bazaruto Island Airport, Bazaruto Island, Mozambique','country_id' => '155'),\narray('id' => '402','name' => '(BZM) - Bemolanga Airport, Bemolanga, Madagascar','country_id' => '138'),\narray('id' => '403','name' => '(YRR) - Stuart Island Airstrip, Big Bay, Canada','country_id' => '35'),\narray('id' => '404','name' => '(YMV) - Mary River Aerodrome, , Canada','country_id' => '35'),\narray('id' => '405','name' => '(YZZ) - Trail Airport, Trail, Canada','country_id' => '35'),\narray('id' => '406','name' => '(YMB) - Merritt Airport, Merritt, Canada','country_id' => '35'),\narray('id' => '407','name' => '(CJH) - Chilko Lake (Tsylos Park Lodge) Airport, Chilko Lake, Canada','country_id' => '35'),\narray('id' => '408','name' => '(YCA) - Courtenay Airpark, Courtenay, Canada','country_id' => '35'),\narray('id' => '409','name' => '(CFQ) - Creston Valley Regional Airport - Art Sutcliffe Field, Creston, Canada','country_id' => '35'),\narray('id' => '410','name' => '(YAA) - Anahim Lake Airport, Anahim Lake, Canada','country_id' => '35'),\narray('id' => '411','name' => '(DGF) - Douglas Lake Airport, Douglas Lake, Canada','country_id' => '35'),\narray('id' => '412','name' => '(JHL) - Fort MacKay/Albian Aerodrome, Albian Village, Canada','country_id' => '35'),\narray('id' => '413','name' => '(DUQ) - Duncan Airport, Duncan, Canada','country_id' => '35'),\narray('id' => '414','name' => '(YHS) - Sechelt-Gibsons Airport, Sechelt, Canada','country_id' => '35'),\narray('id' => '415','name' => '(XQU) - Qualicum Beach Airport, Qualicum Beach, Canada','country_id' => '35'),\narray('id' => '416','name' => '(YMP) - Port Mcneill Airport, Port Mcneill, Canada','country_id' => '35'),\narray('id' => '417','name' => '(YZA) - Cache Creek-Ashcroft Regional Airport, Cache Creek, Canada','country_id' => '35'),\narray('id' => '418','name' => '(CBC) - Cherrabun Airport, , Australia','country_id' => '12'),\narray('id' => '419','name' => '(YPB) - Alberni Valley Regional Airport, Port Alberni, Canada','country_id' => '35'),\narray('id' => '420','name' => '(YBO) - Bob Quinn Lake Airport, Bob Quinn Lake, Canada','country_id' => '35'),\narray('id' => '421','name' => '(TNS) - Tungsten (Cantung) Airport, Tungsten, Canada','country_id' => '35'),\narray('id' => '422','name' => '(TUX) - Tumbler Ridge Airport, Tumbler Ridge, Canada','country_id' => '35'),\narray('id' => '423','name' => '(YWM) - Williams Harbour Airport, Williams Harbour, Canada','country_id' => '35'),\narray('id' => '424','name' => '(YSO) - Postville Airport, Postville, Canada','country_id' => '35'),\narray('id' => '425','name' => '(YBI) - Black Tickle Airport, Black Tickle, Canada','country_id' => '35'),\narray('id' => '426','name' => '(YFX) - St. Lewis (Fox Harbour) Airport, St. Lewis, Canada','country_id' => '35'),\narray('id' => '427','name' => '(YHA) - Port Hope Simpson Airport, Port Hope Simpson, Canada','country_id' => '35'),\narray('id' => '428','name' => '(YRG) - Rigolet Airport, Rigolet, Canada','country_id' => '35'),\narray('id' => '429','name' => '(CDK) - George T Lewis Airport, Cedar Key, United States','country_id' => '228'),\narray('id' => '430','name' => '(DVK) - Diavik Airport, Diavik, Canada','country_id' => '35'),\narray('id' => '431','name' => '(JOJ) - Doris Lake, Hope Bay, Canada','country_id' => '35'),\narray('id' => '432','name' => '(ZFW) - Fairview Airport, Fairview, Canada','country_id' => '35'),\narray('id' => '433','name' => '(YJP) - Hinton/Jasper-Hinton Airport, Hinton, Canada','country_id' => '35'),\narray('id' => '434','name' => '(YLE) - WhatA Airport, WhatA, Canada','country_id' => '35'),\narray('id' => '435','name' => '(YGC) - Grande Cache Airport, Grande Cache, Canada','country_id' => '35'),\narray('id' => '436','name' => '(YDC) - Drayton Valley Industrial Airport, Drayton Valley, Canada','country_id' => '35'),\narray('id' => '437','name' => '(NML) - Fort McMurray / Mildred Lake Airport, Fort McMurray, Canada','country_id' => '35'),\narray('id' => '438','name' => '(ZSP) - St. Paul Airport, St. Paul, Canada','country_id' => '35'),\narray('id' => '439','name' => '(GSL) - Taltheilei Narrows Airport, Taltheilei Narrows, Canada','country_id' => '35'),\narray('id' => '440','name' => '(XMP) - Macmillan Pass Airport, Macmillan Pass, Canada','country_id' => '35'),\narray('id' => '441','name' => '(DAS) - Great Bear Lake Airport, Great Bear Lake, Canada','country_id' => '35'),\narray('id' => '442','name' => '(YFI) - Fort Mackay / Firebag, Suncor Energy Site, Canada','country_id' => '35'),\narray('id' => '443','name' => '(YFJ) - WekweAtA Airport, WekweAtA, Canada','country_id' => '35'),\narray('id' => '444','name' => '(YOE) - Donnelly Airport, Donnelly, Canada','country_id' => '35'),\narray('id' => '445','name' => '(TIL) - Cheadle Airport, Cheadle, Canada','country_id' => '35'),\narray('id' => '446','name' => '(OKG) - Okoyo Airport, Okoyo, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '447','name' => '(CGC) - Cape Gloucester Airport, Cape Gloucester, Papua New Guinea','country_id' => '172'),\narray('id' => '448','name' => '(CGG) - Casiguran Airport, Casiguran, Philippines','country_id' => '173'),\narray('id' => '449','name' => '(CGT) - Chinguetti Airport, Chinguetti, Mauritania','country_id' => '147'),\narray('id' => '450','name' => '(CHP) - Circle Hot Springs Airport, Circle Hot Springs, United States','country_id' => '228'),\narray('id' => '451','name' => '(LRQ) - Laurie River Airport, Laurie River, Canada','country_id' => '35'),\narray('id' => '452','name' => '(YDJ) - Hatchet Lake Airport, Hatchet Lake, Canada','country_id' => '35'),\narray('id' => '453','name' => '(YDU) - Kasba Lake Airport, Kasba Lake, Canada','country_id' => '35'),\narray('id' => '454','name' => '(XCL) - Cluff Lake Airport, Cluff Lake, Canada','country_id' => '35'),\narray('id' => '455','name' => '(YKE) - Knee Lake Airport, Knee Lake, Canada','country_id' => '35'),\narray('id' => '456','name' => '(SUR) - Summer Beaver Airport, Summer Beaver, Canada','country_id' => '35'),\narray('id' => '457','name' => '(CKD) - Crooked Creek Airport, Crooked Creek, United States','country_id' => '228'),\narray('id' => '458','name' => '(YTT) - Tisdale Airport, Tisdale, Canada','country_id' => '35'),\narray('id' => '459','name' => '(YAX) - Wapekeka Airport, Angling Lake, Canada','country_id' => '35'),\narray('id' => '460','name' => '(WNN) - Wunnumin Lake Airport, Wunnumin Lake, Canada','country_id' => '35'),\narray('id' => '461','name' => '(YBS) - Opapimiskan Lake Airport, Opapimiskan Lake, Canada','country_id' => '35'),\narray('id' => '462','name' => '(YNO) - North Spirit Lake Airport, North Spirit Lake, Canada','country_id' => '35'),\narray('id' => '463','name' => '(CKR) - Crane Island Airstrip, Crane Island, United States','country_id' => '228'),\narray('id' => '464','name' => '(CKU) - Cordova Municipal Airport, Cordova, United States','country_id' => '228'),\narray('id' => '465','name' => '(YDW) - North of Sixty Airport, Obre Lake, Canada','country_id' => '35'),\narray('id' => '466','name' => '(CKX) - Chicken Airport, Chicken, United States','country_id' => '228'),\narray('id' => '467','name' => '(CMT) - New CametA Airport, CametA, Brazil','country_id' => '29'),\narray('id' => '468','name' => '(CMZ) - Caia Airport, Caia, Mozambique','country_id' => '155'),\narray('id' => '469','name' => '(TVS) - Tangshan SannAhe Airport, Tangshan, China','country_id' => '45'),\narray('id' => '470','name' => '(YUA) - Yuanmou Air Base, Yuanmou, China','country_id' => '45'),\narray('id' => '471','name' => '(ZQZ) - Zhangjiakou Ningyuan Airport, Zhangjiakou, China','country_id' => '45'),\narray('id' => '472','name' => '(BSD) - Baoshan Yunduan Airport, , China','country_id' => '45'),\narray('id' => '473','name' => '(DZU) - Dazu Air Base, Dazu, China','country_id' => '45'),\narray('id' => '474','name' => '(LNJ) - Lintsang Airfield, Lincang, China','country_id' => '45'),\narray('id' => '475','name' => '(RKZ) - Shigatse Air Base, XigazAa, China','country_id' => '45'),\narray('id' => '476','name' => '(PZI) - Bao\\'anying Airport, Panzhihua, China','country_id' => '45'),\narray('id' => '477','name' => '(FUO) - Foshan Shadi Airport, Foshan, China','country_id' => '45'),\narray('id' => '478','name' => '(HUZ) - Huizhou Airport, Huizhou, China','country_id' => '45'),\narray('id' => '479','name' => '(HSC) - Shaoguan Guitou Airport, Shaoguan, China','country_id' => '45'),\narray('id' => '480','name' => '(JGS) - Jinggangshan Airport, Ji\\'an, China','country_id' => '45'),\narray('id' => '481','name' => '(AEB) - Baise Youjiang Airport, Baise, China','country_id' => '45'),\narray('id' => '482','name' => '(DOY) - Dongying Shengli Airport, Dongying, China','country_id' => '45'),\narray('id' => '483','name' => '(XEN) - Xingcheng Air Base, , China','country_id' => '45'),\narray('id' => '484','name' => '(AAT) - Altay Air Base, Altay, China','country_id' => '45'),\narray('id' => '485','name' => '(THQ) - Tianshui Maijishan Airport, Tianshui, China','country_id' => '45'),\narray('id' => '486','name' => '(YZY) - Zhangye Ganzhou Airport, Zhangye, China','country_id' => '45'),\narray('id' => '487','name' => '(DDG) - Dandong Airport, Dandong, China','country_id' => '45'),\narray('id' => '488','name' => '(NTG) - Nantong Airport, Nantong, China','country_id' => '45'),\narray('id' => '489','name' => '(XBE) - Bearskin Lake Airport, Bearskin Lake, Canada','country_id' => '35'),\narray('id' => '490','name' => '(YNP) - Natuashish Airport, Natuashish, Canada','country_id' => '35'),\narray('id' => '491','name' => '(YPD) - Parry Sound Area Municipal Airport, Parry Sound, Canada','country_id' => '35'),\narray('id' => '492','name' => '(XBR) - Brockville - Thousand Islands Regional Tackaberry Airport, Brockville, Canada','country_id' => '35'),\narray('id' => '493','name' => '(KIF) - Kingfisher Lake Airport, Kingfisher Lake, Canada','country_id' => '35'),\narray('id' => '494','name' => '(YOG) - Ogoki Post Airport, Ogoki Post, Canada','country_id' => '35'),\narray('id' => '495','name' => '(ARQ) - El Troncal Airport, Arauquita, Colombia','country_id' => '46'),\narray('id' => '496','name' => '(LCR) - La Chorrera Airport, La Chorrera, Colombia','country_id' => '46'),\narray('id' => '497','name' => '(SNT) - Las Cruces Airport, Sabana De Torres, Colombia','country_id' => '46'),\narray('id' => '498','name' => '(TCD) - TarapacA Airport, TarapacA, Colombia','country_id' => '46'),\narray('id' => '499','name' => '(YEB) - Bar River Airport, Bar River, Canada','country_id' => '35'),\narray('id' => '500','name' => '(CPI) - Cape Orford Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '501','name' => '(YHP) - Poplar Hill Airport, Poplar Hill, Canada','country_id' => '35'),\narray('id' => '502','name' => '(KEW) - Keewaywin Airport, Keewaywin, Canada','country_id' => '35'),\narray('id' => '503','name' => '(YSA) - Sable Island Landing Strip, Sable Island, Canada','country_id' => '35'),\narray('id' => '504','name' => '(YLS) - Lebel-sur-Quevillon Airport, Lebel-sur-QuAvillon, Canada','country_id' => '35'),\narray('id' => '505','name' => '(YNX) - Snap Lake Airport, Snap Lake Mine, Canada','country_id' => '35'),\narray('id' => '506','name' => '(SSQ) - La Sarre Airport, La Sarre, Canada','country_id' => '35'),\narray('id' => '507','name' => '(YKU) - Chisasibi Airport, Chisasibi, Canada','country_id' => '35'),\narray('id' => '508','name' => '(ZTB) - TAate-A-la-Baleine Airport, TAate-A-la-Baleine, Canada','country_id' => '35'),\narray('id' => '509','name' => '(ZKG) - Kegaska Airport, Kegaska, Canada','country_id' => '35'),\narray('id' => '510','name' => '(YAU) - Donaldson Airport, Kattiniq, Canada','country_id' => '35'),\narray('id' => '511','name' => '(YFG) - Fontanges Airport, Fontanges, Canada','country_id' => '35'),\narray('id' => '512','name' => '(ZLT) - La TabatiAre Airport, La TabatiAre, Canada','country_id' => '35'),\narray('id' => '513','name' => '(PST) - Preston Airport, Preston, Cuba','country_id' => '48'),\narray('id' => '514','name' => '(CUJ) - Culion Airport, Culion Island, Philippines','country_id' => '173'),\narray('id' => '515','name' => '(HLI) - Hollister Municipal Airport, Hollister, United States','country_id' => '228'),\narray('id' => '516','name' => '(CVL) - Cape Vogel Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '517','name' => '(CXC) - Chitina Airport, Chitina, United States','country_id' => '228'),\narray('id' => '518','name' => '(GEC) - GeAitkale Air Base, GeAitkale, Cyprus','country_id' => '52'),\narray('id' => '519','name' => '(YAB) - Arctic Bay Airport, Arctic Bay, Canada','country_id' => '35'),\narray('id' => '520','name' => '(YAC) - Cat Lake Airport, Cat Lake, Canada','country_id' => '35'),\narray('id' => '521','name' => '(YAR) - La Grande-3 Airport, La Grande-3, Canada','country_id' => '35'),\narray('id' => '522','name' => '(YAG) - Fort Frances Municipal Airport, Fort Frances, Canada','country_id' => '35'),\narray('id' => '523','name' => '(YAH) - La Grande-4 Airport, La Grande-4, Canada','country_id' => '35'),\narray('id' => '524','name' => '(YAL) - Alert Bay Airport, Alert Bay, Canada','country_id' => '35'),\narray('id' => '525','name' => '(YAM) - Sault Ste Marie Airport, Sault Ste Marie, Canada','country_id' => '35'),\narray('id' => '526','name' => '(XKS) - Kasabonika Airport, Kasabonika, Canada','country_id' => '35'),\narray('id' => '527','name' => '(YKG) - Kangirsuk Airport, Kangirsuk, Canada','country_id' => '35'),\narray('id' => '528','name' => '(YAT) - Attawapiskat Airport, Attawapiskat, Canada','country_id' => '35'),\narray('id' => '529','name' => '(YAY) - St. Anthony Airport, St. Anthony, Canada','country_id' => '35'),\narray('id' => '530','name' => '(YAZ) - Tofino / Long Beach Airport, Tofino, Canada','country_id' => '35'),\narray('id' => '531','name' => '(YBA) - Banff Airport, Banff, Canada','country_id' => '35'),\narray('id' => '532','name' => '(YBB) - Kugaaruk Airport, Kugaaruk, Canada','country_id' => '35'),\narray('id' => '533','name' => '(YBC) - Baie Comeau Airport, Baie-Comeau, Canada','country_id' => '35'),\narray('id' => '534','name' => '(QBC) - Bella Coola Airport, Bella Coola, Canada','country_id' => '35'),\narray('id' => '535','name' => '(YBE) - Uranium City Airport, Uranium City, Canada','country_id' => '35'),\narray('id' => '536','name' => '(YBY) - Bonnyville Airport, Bonnyville, Canada','country_id' => '35'),\narray('id' => '537','name' => '(YBG) - CFB Bagotville, Bagotville, Canada','country_id' => '35'),\narray('id' => '538','name' => '(YBK) - Baker Lake Airport, Baker Lake, Canada','country_id' => '35'),\narray('id' => '539','name' => '(YBL) - Campbell River Airport, Campbell River, Canada','country_id' => '35'),\narray('id' => '540','name' => '(XTL) - Tadoule Lake Airport, Tadoule Lake, Canada','country_id' => '35'),\narray('id' => '541','name' => '(YBR) - Brandon Municipal Airport, Brandon, Canada','country_id' => '35'),\narray('id' => '542','name' => '(YBT) - Brochet Airport, Brochet, Canada','country_id' => '35'),\narray('id' => '543','name' => '(YBV) - Berens River Airport, Berens River, Canada','country_id' => '35'),\narray('id' => '544','name' => '(YBX) - Lourdes de Blanc Sablon Airport, Lourdes-De-Blanc-Sablon, Canada','country_id' => '35'),\narray('id' => '545','name' => '(YRF) - Cartwright Airport, Cartwright, Canada','country_id' => '35'),\narray('id' => '546','name' => '(YCB) - Cambridge Bay Airport, Cambridge Bay, Canada','country_id' => '35'),\narray('id' => '547','name' => '(YCC) - Cornwall Regional Airport, Cornwall, Canada','country_id' => '35'),\narray('id' => '548','name' => '(YCD) - Nanaimo Airport, Nanaimo, Canada','country_id' => '35'),\narray('id' => '549','name' => '(YCE) - James T. Field Memorial Aerodrome, Centralia, Canada','country_id' => '35'),\narray('id' => '550','name' => '(YCG) - Castlegar/West Kootenay Regional Airport, Castlegar, Canada','country_id' => '35'),\narray('id' => '551','name' => '(YCH) - Miramichi Airport, Miramichi, Canada','country_id' => '35'),\narray('id' => '552','name' => '(XCM) - Chatham Kent Airport, Chatham-Kent, Canada','country_id' => '35'),\narray('id' => '553','name' => '(YCL) - Charlo Airport, Charlo, Canada','country_id' => '35'),\narray('id' => '554','name' => '(YCN) - Cochrane Airport, Cochrane, Canada','country_id' => '35'),\narray('id' => '555','name' => '(YCO) - Kugluktuk Airport, Kugluktuk, Canada','country_id' => '35'),\narray('id' => '556','name' => '(YCQ) - Chetwynd Airport, Chetwynd, Canada','country_id' => '35'),\narray('id' => '557','name' => '(YCR) - Cross Lake (Charlie Sinclair Memorial) Airport, Cross Lake, Canada','country_id' => '35'),\narray('id' => '558','name' => '(YCS) - Chesterfield Inlet Airport, Chesterfield Inlet, Canada','country_id' => '35'),\narray('id' => '559','name' => '(YCT) - Coronation Airport, Coronation, Canada','country_id' => '35'),\narray('id' => '560','name' => '(YCW) - Chilliwack Airport, Chilliwack, Canada','country_id' => '35'),\narray('id' => '561','name' => '(YCY) - Clyde River Airport, Clyde River, Canada','country_id' => '35'),\narray('id' => '562','name' => '(YCZ) - Fairmont Hot Springs Airport, Fairmont Hot Springs, Canada','country_id' => '35'),\narray('id' => '563','name' => '(CYD) - San Ignacio Downtown Airstrip, MulegA, Mexico','country_id' => '153'),\narray('id' => '564','name' => '(YDA) - Dawson City Airport, Dawson City, Canada','country_id' => '35'),\narray('id' => '565','name' => '(YDB) - Burwash Airport, Burwash, Canada','country_id' => '35'),\narray('id' => '566','name' => '(YDF) - Deer Lake Airport, Deer Lake, Canada','country_id' => '35'),\narray('id' => '567','name' => '(YDL) - Dease Lake Airport, Dease Lake, Canada','country_id' => '35'),\narray('id' => '568','name' => '(XRR) - Ross River Airport, Ross River, Canada','country_id' => '35'),\narray('id' => '569','name' => '(YDN) - Dauphin Barker Airport, Dauphin, Canada','country_id' => '35'),\narray('id' => '570','name' => '(YDO) - Dolbeau St Felicien Airport, Dolbeau-St-FAlicien, Canada','country_id' => '35'),\narray('id' => '571','name' => '(YDP) - Nain Airport, Nain, Canada','country_id' => '35'),\narray('id' => '572','name' => '(YDQ) - Dawson Creek Airport, Dawson Creek, Canada','country_id' => '35'),\narray('id' => '573','name' => '(YEG) - Edmonton International Airport, Edmonton, Canada','country_id' => '35'),\narray('id' => '574','name' => '(YEK) - Arviat Airport, Arviat, Canada','country_id' => '35'),\narray('id' => '575','name' => '(YEL) - Elliot Lake Municipal Airport, Elliot Lake, Canada','country_id' => '35'),\narray('id' => '576','name' => '(YEM) - Manitoulin East Municipal Airport, Manitowaning, Canada','country_id' => '35'),\narray('id' => '577','name' => '(YEN) - Estevan Airport, Estevan, Canada','country_id' => '35'),\narray('id' => '578','name' => '(YER) - Fort Severn Airport, Fort Severn, Canada','country_id' => '35'),\narray('id' => '579','name' => '(YET) - Edson Airport, Edson, Canada','country_id' => '35'),\narray('id' => '580','name' => '(YEU) - Eureka Airport, Eureka, Canada','country_id' => '35'),\narray('id' => '581','name' => '(YEV) - Inuvik Mike Zubko Airport, Inuvik, Canada','country_id' => '35'),\narray('id' => '582','name' => '(YEY) - Amos Magny Airport, Amos, Canada','country_id' => '35'),\narray('id' => '583','name' => '(YFA) - Fort Albany Airport, Fort Albany, Canada','country_id' => '35'),\narray('id' => '584','name' => '(YFB) - Iqaluit Airport, Iqaluit, Canada','country_id' => '35'),\narray('id' => '585','name' => '(YFC) - Fredericton Airport, Fredericton, Canada','country_id' => '35'),\narray('id' => '586','name' => '(YFE) - Forestville Airport, Forestville, Canada','country_id' => '35'),\narray('id' => '587','name' => '(YFH) - Fort Hope Airport, Fort Hope, Canada','country_id' => '35'),\narray('id' => '588','name' => '(YTM) - La Macaza / Mont-Tremblant International Inc Airport, RiviAre Rouge, Canada','country_id' => '35'),\narray('id' => '589','name' => '(YFO) - Flin Flon Airport, Flin Flon, Canada','country_id' => '35'),\narray('id' => '590','name' => '(YFR) - Fort Resolution Airport, Fort Resolution, Canada','country_id' => '35'),\narray('id' => '591','name' => '(YFS) - Fort Simpson Airport, Fort Simpson, Canada','country_id' => '35'),\narray('id' => '592','name' => '(YMN) - Makkovik Airport, Makkovik, Canada','country_id' => '35'),\narray('id' => '593','name' => '(YGB) - Texada Gillies Bay Airport, Texada, Canada','country_id' => '35'),\narray('id' => '594','name' => '(YGH) - Fort Good Hope Airport, Fort Good Hope, Canada','country_id' => '35'),\narray('id' => '595','name' => '(YGK) - Kingston Norman Rogers Airport, Kingston, Canada','country_id' => '35'),\narray('id' => '596','name' => '(YGL) - La Grande RiviAre Airport, La Grande RiviAre, Canada','country_id' => '35'),\narray('id' => '597','name' => '(YGM) - Gimli Industrial Park Airport, Gimli, Canada','country_id' => '35'),\narray('id' => '598','name' => '(YGO) - Gods Lake Narrows Airport, Gods Lake Narrows, Canada','country_id' => '35'),\narray('id' => '599','name' => '(YGP) - GaspA (Michel-Pouliot) Airport, GaspA, Canada','country_id' => '35'),\narray('id' => '600','name' => '(YGQ) - Geraldton Greenstone Regional Airport, Geraldton, Canada','country_id' => '35'),\narray('id' => '601','name' => '(YGR) - Ales-de-la-Madeleine Airport, Ales-de-la-Madeleine, Canada','country_id' => '35'),\narray('id' => '602','name' => '(YGT) - Igloolik Airport, Igloolik, Canada','country_id' => '35'),\narray('id' => '603','name' => '(YGV) - Havre St Pierre Airport, Havre St-Pierre, Canada','country_id' => '35'),\narray('id' => '604','name' => '(YGW) - Kuujjuarapik Airport, Kuujjuarapik, Canada','country_id' => '35'),\narray('id' => '605','name' => '(YGX) - Gillam Airport, Gillam, Canada','country_id' => '35'),\narray('id' => '606','name' => '(YGZ) - Grise Fiord Airport, Grise Fiord, Canada','country_id' => '35'),\narray('id' => '607','name' => '(YQC) - Quaqtaq Airport, Quaqtaq, Canada','country_id' => '35'),\narray('id' => '608','name' => '(YHB) - Hudson Bay Airport, Hudson Bay, Canada','country_id' => '35'),\narray('id' => '609','name' => '(YHD) - Dryden Regional Airport, Dryden, Canada','country_id' => '35'),\narray('id' => '610','name' => '(YHE) - Hope Airport, Hope, Canada','country_id' => '35'),\narray('id' => '611','name' => '(YHF) - Hearst RenA Fontaine Municipal Airport, Hearst, Canada','country_id' => '35'),\narray('id' => '612','name' => '(YNS) - Nemiscau Airport, Nemiscau, Canada','country_id' => '35'),\narray('id' => '613','name' => '(YHI) - Ulukhaktok Holman Airport, Ulukhaktok, Canada','country_id' => '35'),\narray('id' => '614','name' => '(YHK) - Gjoa Haven Airport, Gjoa Haven, Canada','country_id' => '35'),\narray('id' => '615','name' => '(YHM) - John C. Munro Hamilton International Airport, Hamilton, Canada','country_id' => '35'),\narray('id' => '616','name' => '(YHN) - Hornepayne Municipal Airport, Hornepayne, Canada','country_id' => '35'),\narray('id' => '617','name' => '(YHO) - Hopedale Airport, Hopedale, Canada','country_id' => '35'),\narray('id' => '618','name' => '(YHR) - Chevery Airport, Chevery, Canada','country_id' => '35'),\narray('id' => '619','name' => '(YHT) - Haines Junction Airport, Haines Junction, Canada','country_id' => '35'),\narray('id' => '620','name' => '(YHU) - MontrAal / Saint-Hubert Airport, MontrAal, Canada','country_id' => '35'),\narray('id' => '621','name' => '(YHY) - Hay River / Merlyn Carter Airport, Hay River, Canada','country_id' => '35'),\narray('id' => '622','name' => '(YHZ) - Halifax / Stanfield International Airport, Halifax, Canada','country_id' => '35'),\narray('id' => '623','name' => '(YIB) - Atikokan Municipal Airport, Atikokan, Canada','country_id' => '35'),\narray('id' => '624','name' => '(YDG) - Digby / Annapolis Regional Airport, Digby, Canada','country_id' => '35'),\narray('id' => '625','name' => '(YIF) - St Augustin Airport, St-Augustin, Canada','country_id' => '35'),\narray('id' => '626','name' => '(YIK) - Ivujivik Airport, Ivujivik, Canada','country_id' => '35'),\narray('id' => '627','name' => '(YIO) - Pond Inlet Airport, Pond Inlet, Canada','country_id' => '35'),\narray('id' => '628','name' => '(YIV) - Island Lake Airport, Island Lake, Canada','country_id' => '35'),\narray('id' => '629','name' => '(YJA) - Jasper Airport, Jasper, Canada','country_id' => '35'),\narray('id' => '630','name' => '(YJF) - Fort Liard Airport, Fort Liard, Canada','country_id' => '35'),\narray('id' => '631','name' => '(YJN) - St Jean Airport, St Jean, Canada','country_id' => '35'),\narray('id' => '632','name' => '(ZEL) - Denny Island Airport, Bella Bella, Canada','country_id' => '35'),\narray('id' => '633','name' => '(YJT) - Stephenville Airport, Stephenville, Canada','country_id' => '35'),\narray('id' => '634','name' => '(YKA) - Kamloops Airport, Kamloops, Canada','country_id' => '35'),\narray('id' => '635','name' => '(YKC) - Collins Bay Airport, Collins Bay, Canada','country_id' => '35'),\narray('id' => '636','name' => '(LAK) - Aklavik Airport, Aklavik, Canada','country_id' => '35'),\narray('id' => '637','name' => '(YKF) - Waterloo Airport, Kitchener, Canada','country_id' => '35'),\narray('id' => '638','name' => '(YWB) - Kangiqsujuaq (Wakeham Bay) Airport, Kangiqsujuaq, Canada','country_id' => '35'),\narray('id' => '639','name' => '(YKJ) - Key Lake Airport, Key Lake, Canada','country_id' => '35'),\narray('id' => '640','name' => '(YKL) - Schefferville Airport, Schefferville, Canada','country_id' => '35'),\narray('id' => '641','name' => '(YKD) - Kincardine Municipal Airport, Kincardine, Canada','country_id' => '35'),\narray('id' => '642','name' => '(AKV) - Akulivik Airport, Akulivik, Canada','country_id' => '35'),\narray('id' => '643','name' => '(YKQ) - Waskaganish Airport, Waskaganish, Canada','country_id' => '35'),\narray('id' => '644','name' => '(YKX) - Kirkland Lake Airport, Kirkland Lake, Canada','country_id' => '35'),\narray('id' => '645','name' => '(YKY) - Kindersley Airport, Kindersley, Canada','country_id' => '35'),\narray('id' => '646','name' => '(YKZ) - Buttonville Municipal Airport, Toronto, Canada','country_id' => '35'),\narray('id' => '647','name' => '(YPJ) - Aupaluk Airport, Aupaluk, Canada','country_id' => '35'),\narray('id' => '648','name' => '(YLB) - Lac La Biche Airport, Lac La Biche, Canada','country_id' => '35'),\narray('id' => '649','name' => '(YLC) - Kimmirut Airport, Kimmirut, Canada','country_id' => '35'),\narray('id' => '650','name' => '(YLD) - Chapleau Airport, Chapleau, Canada','country_id' => '35'),\narray('id' => '651','name' => '(YLH) - Lansdowne House Airport, Lansdowne House, Canada','country_id' => '35'),\narray('id' => '652','name' => '(YLJ) - Meadow Lake Airport, Meadow Lake, Canada','country_id' => '35'),\narray('id' => '653','name' => '(YSG) - Lutselk\\'e Airport, Lutselk\\'e, Canada','country_id' => '35'),\narray('id' => '654','name' => '(YLL) - Lloydminster Airport, Lloydminster, Canada','country_id' => '35'),\narray('id' => '655','name' => '(YLQ) - La Tuque Airport, La Tuque, Canada','country_id' => '35'),\narray('id' => '656','name' => '(YLR) - Leaf Rapids Airport, Leaf Rapids, Canada','country_id' => '35'),\narray('id' => '657','name' => '(YLK) - Barrie-Orillia (Lake Simcoe Regional Airport), Barrie-Orillia, Canada','country_id' => '35'),\narray('id' => '658','name' => '(YLT) - Alert Airport, Alert, Canada','country_id' => '35'),\narray('id' => '659','name' => '(XGR) - Kangiqsualujjuaq (Georges River) Airport, Kangiqsualujjuaq, Canada','country_id' => '35'),\narray('id' => '660','name' => '(YLW) - Kelowna International Airport, Kelowna, Canada','country_id' => '35'),\narray('id' => '661','name' => '(YMA) - Mayo Airport, Mayo, Canada','country_id' => '35'),\narray('id' => '662','name' => '(YME) - Matane Airport, Matane, Canada','country_id' => '35'),\narray('id' => '663','name' => '(YMG) - Manitouwadge Airport, Manitouwadge, Canada','country_id' => '35'),\narray('id' => '664','name' => '(YMH) - Mary\\'s Harbour Airport, Mary\\'s Harbour, Canada','country_id' => '35'),\narray('id' => '665','name' => '(YMJ) - Moose Jaw Air Vice Marshal C. M. McEwen Airport, Moose Jaw, Canada','country_id' => '35'),\narray('id' => '666','name' => '(YML) - Charlevoix Airport, Charlevoix, Canada','country_id' => '35'),\narray('id' => '667','name' => '(YMM) - Fort McMurray Airport, Fort McMurray, Canada','country_id' => '35'),\narray('id' => '668','name' => '(YMO) - Moosonee Airport, Moosonee, Canada','country_id' => '35'),\narray('id' => '669','name' => '(YMT) - Chapais Airport, Chibougamau, Canada','country_id' => '35'),\narray('id' => '670','name' => '(YUD) - Umiujaq Airport, Umiujaq, Canada','country_id' => '35'),\narray('id' => '671','name' => '(YMW) - Maniwaki Airport, Maniwaki, Canada','country_id' => '35'),\narray('id' => '672','name' => '(YMX) - Montreal International (Mirabel) Airport, MontrAal, Canada','country_id' => '35'),\narray('id' => '673','name' => '(YNA) - Natashquan Airport, Natashquan, Canada','country_id' => '35'),\narray('id' => '674','name' => '(YNC) - Wemindji Airport, Wemindji, Canada','country_id' => '35'),\narray('id' => '675','name' => '(YND) - Ottawa / Gatineau Airport, Gatineau, Canada','country_id' => '35'),\narray('id' => '676','name' => '(YNE) - Norway House Airport, Norway House, Canada','country_id' => '35'),\narray('id' => '677','name' => '(YNH) - Hudsons Hope Airport, Hudson\\'s Hope, Canada','country_id' => '35'),\narray('id' => '678','name' => '(YLY) - Langley Airport, Langley, Canada','country_id' => '35'),\narray('id' => '679','name' => '(YNL) - Points North Landing Airport, Points North Landing, Canada','country_id' => '35'),\narray('id' => '680','name' => '(YNM) - Matagami Airport, Matagami, Canada','country_id' => '35'),\narray('id' => '681','name' => '(HZP) - Fort Mackay / Horizon Airport, Fort Mackay, Canada','country_id' => '35'),\narray('id' => '682','name' => '(YOA) - Ekati Airport, Ekati, Canada','country_id' => '35'),\narray('id' => '683','name' => '(YOC) - Old Crow Airport, Old Crow, Canada','country_id' => '35'),\narray('id' => '684','name' => '(YOD) - CFB Cold Lake, Cold Lake, Canada','country_id' => '35'),\narray('id' => '685','name' => '(YOH) - Oxford House Airport, Oxford House, Canada','country_id' => '35'),\narray('id' => '686','name' => '(YOJ) - High Level Airport, High Level, Canada','country_id' => '35'),\narray('id' => '687','name' => '(YOO) - Oshawa Airport, Oshawa, Canada','country_id' => '35'),\narray('id' => '688','name' => '(YOP) - Rainbow Lake Airport, Rainbow Lake, Canada','country_id' => '35'),\narray('id' => '689','name' => '(YOS) - Owen Sound / Billy Bishop Regional Airport, Owen Sound, Canada','country_id' => '35'),\narray('id' => '690','name' => '(YOW) - Ottawa Macdonald-Cartier International Airport, Ottawa, Canada','country_id' => '35'),\narray('id' => '691','name' => '(YPA) - Prince Albert Glass Field, Prince Albert, Canada','country_id' => '35'),\narray('id' => '692','name' => '(YPC) - Paulatuk (Nora Aliqatchialuk Ruben) Airport, Paulatuk, Canada','country_id' => '35'),\narray('id' => '693','name' => '(YPS) - Port Hawkesbury Airport, Port Hawkesbury, Canada','country_id' => '35'),\narray('id' => '694','name' => '(YPE) - Peace River Airport, Peace River, Canada','country_id' => '35'),\narray('id' => '695','name' => '(YPG) - Southport Airport, Portage la Prairie, Canada','country_id' => '35'),\narray('id' => '696','name' => '(YPH) - Inukjuak Airport, Inukjuak, Canada','country_id' => '35'),\narray('id' => '697','name' => '(YPL) - Pickle Lake Airport, Pickle Lake, Canada','country_id' => '35'),\narray('id' => '698','name' => '(YPM) - Pikangikum Airport, Pikangikum, Canada','country_id' => '35'),\narray('id' => '699','name' => '(YPN) - Port Menier Airport, Port-Menier, Canada','country_id' => '35'),\narray('id' => '700','name' => '(YPO) - Peawanuck Airport, Peawanuck, Canada','country_id' => '35'),\narray('id' => '701','name' => '(YPQ) - Peterborough Airport, Peterborough, Canada','country_id' => '35'),\narray('id' => '702','name' => '(YPR) - Prince Rupert Airport, Prince Rupert, Canada','country_id' => '35'),\narray('id' => '703','name' => '(YPW) - Powell River Airport, Powell River, Canada','country_id' => '35'),\narray('id' => '704','name' => '(YPX) - Puvirnituq Airport, Puvirnituq, Canada','country_id' => '35'),\narray('id' => '705','name' => '(YPY) - Fort Chipewyan Airport, Fort Chipewyan, Canada','country_id' => '35'),\narray('id' => '706','name' => '(YPZ) - Burns Lake Airport, Burns Lake, Canada','country_id' => '35'),\narray('id' => '707','name' => '(YQA) - Muskoka Airport, Muskoka, Canada','country_id' => '35'),\narray('id' => '708','name' => '(YQB) - Quebec Jean Lesage International Airport, Quebec, Canada','country_id' => '35'),\narray('id' => '709','name' => '(YQD) - The Pas Airport, The Pas, Canada','country_id' => '35'),\narray('id' => '710','name' => '(YQF) - Red Deer Regional Airport, Red Deer, Canada','country_id' => '35'),\narray('id' => '711','name' => '(YQG) - Windsor Airport, Windsor, Canada','country_id' => '35'),\narray('id' => '712','name' => '(YQH) - Watson Lake Airport, Watson Lake, Canada','country_id' => '35'),\narray('id' => '713','name' => '(YQI) - Yarmouth Airport, Yarmouth, Canada','country_id' => '35'),\narray('id' => '714','name' => '(YQK) - Kenora Airport, Kenora, Canada','country_id' => '35'),\narray('id' => '715','name' => '(YQL) - Lethbridge County Airport, Lethbridge, Canada','country_id' => '35'),\narray('id' => '716','name' => '(YQM) - Greater Moncton International Airport, Moncton, Canada','country_id' => '35'),\narray('id' => '717','name' => '(YQN) - Nakina Airport, Nakina, Canada','country_id' => '35'),\narray('id' => '718','name' => '(YQQ) - Comox Airport, Comox, Canada','country_id' => '35'),\narray('id' => '719','name' => '(YQR) - Regina International Airport, Regina, Canada','country_id' => '35'),\narray('id' => '720','name' => '(YQS) - St Thomas Municipal Airport, St Thomas, Canada','country_id' => '35'),\narray('id' => '721','name' => '(YQT) - Thunder Bay Airport, Thunder Bay, Canada','country_id' => '35'),\narray('id' => '722','name' => '(YQU) - Grande Prairie Airport, Grande Prairie, Canada','country_id' => '35'),\narray('id' => '723','name' => '(YQV) - Yorkton Municipal Airport, Yorkton, Canada','country_id' => '35'),\narray('id' => '724','name' => '(YQW) - North Battleford Airport, North Battleford, Canada','country_id' => '35'),\narray('id' => '725','name' => '(YQX) - Gander International Airport, Gander, Canada','country_id' => '35'),\narray('id' => '726','name' => '(YQY) - Sydney / J.A. Douglas McCurdy Airport, Sydney, Canada','country_id' => '35'),\narray('id' => '727','name' => '(YQZ) - Quesnel Airport, Quesnel, Canada','country_id' => '35'),\narray('id' => '728','name' => '(YRA) - Rae Lakes Airport, GamAtA, Canada','country_id' => '35'),\narray('id' => '729','name' => '(YRB) - Resolute Bay Airport, Resolute Bay, Canada','country_id' => '35'),\narray('id' => '730','name' => '(YRI) - RiviAre-du-Loup Airport, RiviAre-du-Loup, Canada','country_id' => '35'),\narray('id' => '731','name' => '(YRJ) - Roberval Airport, Roberval, Canada','country_id' => '35'),\narray('id' => '732','name' => '(YRL) - Red Lake Airport, Red Lake, Canada','country_id' => '35'),\narray('id' => '733','name' => '(YRM) - Rocky Mountain House Airport, Rocky Mountain House, Canada','country_id' => '35'),\narray('id' => '734','name' => '(YRO) - Ottawa / Rockcliffe Airport, Ottawa, Canada','country_id' => '35'),\narray('id' => '735','name' => '(YRQ) - Trois-RiviAres Airport, Trois-RiviAres, Canada','country_id' => '35'),\narray('id' => '736','name' => '(YRS) - Red Sucker Lake Airport, Red Sucker Lake, Canada','country_id' => '35'),\narray('id' => '737','name' => '(YRT) - Rankin Inlet Airport, Rankin Inlet, Canada','country_id' => '35'),\narray('id' => '738','name' => '(YRV) - Revelstoke Airport, Revelstoke, Canada','country_id' => '35'),\narray('id' => '739','name' => '(YSB) - Sudbury Airport, Sudbury, Canada','country_id' => '35'),\narray('id' => '740','name' => '(YSC) - Sherbrooke Airport, Sherbrooke, Canada','country_id' => '35'),\narray('id' => '741','name' => '(YSE) - Squamish Airport, Squamish, Canada','country_id' => '35'),\narray('id' => '742','name' => '(YSF) - Stony Rapids Airport, Stony Rapids, Canada','country_id' => '35'),\narray('id' => '743','name' => '(YSH) - Smiths Falls-Montague (Russ Beach) Airport, Smiths Falls, Canada','country_id' => '35'),\narray('id' => '744','name' => '(YSJ) - Saint John Airport, Saint John, Canada','country_id' => '35'),\narray('id' => '745','name' => '(YSK) - Sanikiluaq Airport, Sanikiluaq, Canada','country_id' => '35'),\narray('id' => '746','name' => '(YSL) - St Leonard Airport, St Leonard, Canada','country_id' => '35'),\narray('id' => '747','name' => '(YSM) - Fort Smith Airport, Fort Smith, Canada','country_id' => '35'),\narray('id' => '748','name' => '(YCM) - Niagara District Airport, St Catharines, Canada','country_id' => '35'),\narray('id' => '749','name' => '(YSP) - Marathon Airport, Marathon, Canada','country_id' => '35'),\narray('id' => '750','name' => '(YST) - St. Theresa Point Airport, St. Theresa Point, Canada','country_id' => '35'),\narray('id' => '751','name' => '(YSU) - Summerside Airport, Summerside, Canada','country_id' => '35'),\narray('id' => '752','name' => '(YSY) - Sachs Harbour (David Nasogaluak Jr. Saaryuaq) Airport, Sachs Harbour, Canada','country_id' => '35'),\narray('id' => '753','name' => '(YTA) - Pembroke Airport, Pembroke, Canada','country_id' => '35'),\narray('id' => '754','name' => '(YTE) - Cape Dorset Airport, Cape Dorset, Canada','country_id' => '35'),\narray('id' => '755','name' => '(YTF) - Alma Airport, Alma, Canada','country_id' => '35'),\narray('id' => '756','name' => '(YTH) - Thompson Airport, Thompson, Canada','country_id' => '35'),\narray('id' => '757','name' => '(YTL) - Big Trout Lake Airport, Big Trout Lake, Canada','country_id' => '35'),\narray('id' => '758','name' => '(YTQ) - Tasiujaq Airport, Tasiujaq, Canada','country_id' => '35'),\narray('id' => '759','name' => '(YTR) - CFB Trenton, Trenton, Canada','country_id' => '35'),\narray('id' => '760','name' => '(YTS) - Timmins/Victor M. Power, Timmins, Canada','country_id' => '35'),\narray('id' => '761','name' => '(YTZ) - Billy Bishop Toronto City Centre Airport, Toronto, Canada','country_id' => '35'),\narray('id' => '762','name' => '(YUB) - Tuktoyaktuk Airport, Tuktoyaktuk, Canada','country_id' => '35'),\narray('id' => '763','name' => '(YUL) - Montreal / Pierre Elliott Trudeau International Airport, MontrAal, Canada','country_id' => '35'),\narray('id' => '764','name' => '(YUT) - Repulse Bay Airport, Repulse Bay, Canada','country_id' => '35'),\narray('id' => '765','name' => '(YUX) - Hall Beach Airport, Hall Beach, Canada','country_id' => '35'),\narray('id' => '766','name' => '(YUY) - Rouyn Noranda Airport, Rouyn-Noranda, Canada','country_id' => '35'),\narray('id' => '767','name' => '(YVB) - Bonaventure Airport, Bonaventure, Canada','country_id' => '35'),\narray('id' => '768','name' => '(YVC) - La Ronge Airport, La Ronge, Canada','country_id' => '35'),\narray('id' => '769','name' => '(YVG) - Vermilion Airport, Vermilion, Canada','country_id' => '35'),\narray('id' => '770','name' => '(YVE) - Vernon Airport, Vernon, Canada','country_id' => '35'),\narray('id' => '771','name' => '(YCK) - Tommy Kochon Airport, Colville Lake, Canada','country_id' => '35'),\narray('id' => '772','name' => '(YVM) - Qikiqtarjuaq Airport, Qikiqtarjuaq, Canada','country_id' => '35'),\narray('id' => '773','name' => '(YVO) - Val-d\\'Or Airport, Val-d\\'Or, Canada','country_id' => '35'),\narray('id' => '774','name' => '(YVP) - Kuujjuaq Airport, Kuujjuaq, Canada','country_id' => '35'),\narray('id' => '775','name' => '(YVQ) - Norman Wells Airport, Norman Wells, Canada','country_id' => '35'),\narray('id' => '776','name' => '(YVR) - Vancouver International Airport, Vancouver, Canada','country_id' => '35'),\narray('id' => '777','name' => '(YVT) - Buffalo Narrows Airport, Buffalo Narrows, Canada','country_id' => '35'),\narray('id' => '778','name' => '(YVV) - Wiarton Airport, Wiarton, Canada','country_id' => '35'),\narray('id' => '779','name' => '(YVZ) - Deer Lake Airport, Deer Lake, Canada','country_id' => '35'),\narray('id' => '780','name' => '(YWA) - Petawawa Airport, Petawawa, Canada','country_id' => '35'),\narray('id' => '781','name' => '(YWG) - Winnipeg / James Armstrong Richardson International Airport, Winnipeg, Canada','country_id' => '35'),\narray('id' => '782','name' => '(YWJ) - DAline Airport, DAline, Canada','country_id' => '35'),\narray('id' => '783','name' => '(YWK) - Wabush Airport, Wabush, Canada','country_id' => '35'),\narray('id' => '784','name' => '(YWL) - Williams Lake Airport, Williams Lake, Canada','country_id' => '35'),\narray('id' => '785','name' => '(YWP) - Webequie Airport, Webequie, Canada','country_id' => '35'),\narray('id' => '786','name' => '(YWY) - Wrigley Airport, Wrigley, Canada','country_id' => '35'),\narray('id' => '787','name' => '(YXC) - Cranbrook/Canadian Rockies International Airport, Cranbrook, Canada','country_id' => '35'),\narray('id' => '788','name' => '(YXE) - Saskatoon John G. Diefenbaker International Airport, Saskatoon, Canada','country_id' => '35'),\narray('id' => '789','name' => '(YXH) - Medicine Hat Airport, Medicine Hat, Canada','country_id' => '35'),\narray('id' => '790','name' => '(YXJ) - Fort St John Airport, Fort St.John, Canada','country_id' => '35'),\narray('id' => '791','name' => '(YXK) - Rimouski Airport, Rimouski, Canada','country_id' => '35'),\narray('id' => '792','name' => '(YXL) - Sioux Lookout Airport, Sioux Lookout, Canada','country_id' => '35'),\narray('id' => '793','name' => '(YXN) - Whale Cove Airport, Whale Cove, Canada','country_id' => '35'),\narray('id' => '794','name' => '(YXP) - Pangnirtung Airport, Pangnirtung, Canada','country_id' => '35'),\narray('id' => '795','name' => '(YXQ) - Beaver Creek Airport, Beaver Creek, Canada','country_id' => '35'),\narray('id' => '796','name' => '(YXR) - Earlton (Timiskaming Regional) Airport, Earlton, Canada','country_id' => '35'),\narray('id' => '797','name' => '(YXS) - Prince George Airport, Prince George, Canada','country_id' => '35'),\narray('id' => '798','name' => '(YXT) - Terrace Airport, Terrace, Canada','country_id' => '35'),\narray('id' => '799','name' => '(YXU) - London Airport, London, Canada','country_id' => '35'),\narray('id' => '800','name' => '(YXX) - Abbotsford Airport, Abbotsford, Canada','country_id' => '35'),\narray('id' => '801','name' => '(YXY) - Whitehorse / Erik Nielsen International Airport, Whitehorse, Canada','country_id' => '35'),\narray('id' => '802','name' => '(YXZ) - Wawa Airport, Wawa, Canada','country_id' => '35'),\narray('id' => '803','name' => '(YYB) - North Bay Airport, North Bay, Canada','country_id' => '35'),\narray('id' => '804','name' => '(YYC) - Calgary International Airport, Calgary, Canada','country_id' => '35'),\narray('id' => '805','name' => '(YYD) - Smithers Airport, Smithers, Canada','country_id' => '35'),\narray('id' => '806','name' => '(YYE) - Fort Nelson Airport, Fort Nelson, Canada','country_id' => '35'),\narray('id' => '807','name' => '(YYF) - Penticton Airport, Penticton, Canada','country_id' => '35'),\narray('id' => '808','name' => '(YYG) - Charlottetown Airport, Charlottetown, Canada','country_id' => '35'),\narray('id' => '809','name' => '(YYH) - Taloyoak Airport, Taloyoak, Canada','country_id' => '35'),\narray('id' => '810','name' => '(YYJ) - Victoria International Airport, Victoria, Canada','country_id' => '35'),\narray('id' => '811','name' => '(YYL) - Lynn Lake Airport, Lynn Lake, Canada','country_id' => '35'),\narray('id' => '812','name' => '(YYM) - Cowley Airport, Cowley, Canada','country_id' => '35'),\narray('id' => '813','name' => '(YYN) - Swift Current Airport, Swift Current, Canada','country_id' => '35'),\narray('id' => '814','name' => '(YYQ) - Churchill Airport, Churchill, Canada','country_id' => '35'),\narray('id' => '815','name' => '(YYR) - Goose Bay Airport, Goose Bay, Canada','country_id' => '35'),\narray('id' => '816','name' => '(YYT) - St. John\\'s International Airport, St. John\\'s, Canada','country_id' => '35'),\narray('id' => '817','name' => '(YYU) - Kapuskasing Airport, Kapuskasing, Canada','country_id' => '35'),\narray('id' => '818','name' => '(YYW) - Armstrong Airport, Armstrong, Canada','country_id' => '35'),\narray('id' => '819','name' => '(YYY) - Mont Joli Airport, Mont-Joli, Canada','country_id' => '35'),\narray('id' => '820','name' => '(YYZ) - Lester B. Pearson International Airport, Toronto, Canada','country_id' => '35'),\narray('id' => '821','name' => '(YZD) - Downsview Airport, Toronto, Canada','country_id' => '35'),\narray('id' => '822','name' => '(YZE) - Gore Bay Manitoulin Airport, Gore Bay, Canada','country_id' => '35'),\narray('id' => '823','name' => '(YZF) - Yellowknife Airport, Yellowknife, Canada','country_id' => '35'),\narray('id' => '824','name' => '(YZG) - Salluit Airport, Salluit, Canada','country_id' => '35'),\narray('id' => '825','name' => '(YZH) - Slave Lake Airport, Slave Lake, Canada','country_id' => '35'),\narray('id' => '826','name' => '(YZP) - Sandspit Airport, Sandspit, Canada','country_id' => '35'),\narray('id' => '827','name' => '(YZR) - Chris Hadfield Airport, Sarnia, Canada','country_id' => '35'),\narray('id' => '828','name' => '(YZS) - Coral Harbour Airport, Coral Harbour, Canada','country_id' => '35'),\narray('id' => '829','name' => '(YZT) - Port Hardy Airport, Port Hardy, Canada','country_id' => '35'),\narray('id' => '830','name' => '(YZU) - Whitecourt Airport, Whitecourt, Canada','country_id' => '35'),\narray('id' => '831','name' => '(YZV) - Sept-Ales Airport, Sept-Ales, Canada','country_id' => '35'),\narray('id' => '832','name' => '(YZW) - Teslin Airport, Teslin, Canada','country_id' => '35'),\narray('id' => '833','name' => '(YZX) - CFB Greenwood, Greenwood, Canada','country_id' => '35'),\narray('id' => '834','name' => '(ZAC) - York Landing Airport, York Landing, Canada','country_id' => '35'),\narray('id' => '835','name' => '(YSN) - Salmon Arm Airport, Salmon Arm, Canada','country_id' => '35'),\narray('id' => '836','name' => '(YDT) - Boundary Bay Airport, Vancouver, Canada','country_id' => '35'),\narray('id' => '837','name' => '(ILF) - Ilford Airport, Ilford, Canada','country_id' => '35'),\narray('id' => '838','name' => '(ZBF) - Bathurst Airport, Bathurst, Canada','country_id' => '35'),\narray('id' => '839','name' => '(ZBM) - Bromont (Roland Desourdy) Airport, Bromont, Canada','country_id' => '35'),\narray('id' => '840','name' => '(KES) - Kelsey Airport, Kelsey, Canada','country_id' => '35'),\narray('id' => '841','name' => '(ZEM) - Eastmain River Airport, Eastmain River, Canada','country_id' => '35'),\narray('id' => '842','name' => '(ZFA) - Faro Airport, Faro, Canada','country_id' => '35'),\narray('id' => '843','name' => '(ZFD) - Fond-Du-Lac Airport, Fond-Du-Lac, Canada','country_id' => '35'),\narray('id' => '844','name' => '(XPK) - Pukatawagan Airport, Pukatawagan, Canada','country_id' => '35'),\narray('id' => '845','name' => '(ZFM) - Fort Mcpherson Airport, Fort Mcpherson, Canada','country_id' => '35'),\narray('id' => '846','name' => '(ZFN) - Tulita Airport, Tulita, Canada','country_id' => '35'),\narray('id' => '847','name' => '(ZGF) - Grand Forks Airport, Grand Forks, Canada','country_id' => '35'),\narray('id' => '848','name' => '(ZGI) - Gods River Airport, Gods River, Canada','country_id' => '35'),\narray('id' => '849','name' => '(ZGR) - Little Grand Rapids Airport, Little Grand Rapids, Canada','country_id' => '35'),\narray('id' => '850','name' => '(ZHP) - High Prairie Airport, High Prairie, Canada','country_id' => '35'),\narray('id' => '851','name' => '(CZJ) - CorazAn de JesAos Airport, CorazAn de JesAos and NarganA Islands, Panama','country_id' => '169'),\narray('id' => '852','name' => '(ZJG) - Jenpeg Airport, Jenpeg, Canada','country_id' => '35'),\narray('id' => '853','name' => '(ZJN) - Swan River Airport, Swan River, Canada','country_id' => '35'),\narray('id' => '854','name' => '(CZK) - Cascade Locks State Airport, Cascade Locks, United States','country_id' => '228'),\narray('id' => '855','name' => '(ZKE) - Kashechewan Airport, Kashechewan, Canada','country_id' => '35'),\narray('id' => '856','name' => '(YTD) - Thicket Portage Airport, Thicket Portage, Canada','country_id' => '35'),\narray('id' => '857','name' => '(MSA) - Muskrat Dam Airport, Muskrat Dam, Canada','country_id' => '35'),\narray('id' => '858','name' => '(ZMH) - South Cariboo Region / 108 Mile Airport, 108 Mile, Canada','country_id' => '35'),\narray('id' => '859','name' => '(PIW) - Pikwitonei Airport, Pikwitonei, Canada','country_id' => '35'),\narray('id' => '860','name' => '(ZMT) - Masset Airport, Masset, Canada','country_id' => '35'),\narray('id' => '861','name' => '(CZN) - Chisana Airport, Chisana, United States','country_id' => '228'),\narray('id' => '862','name' => '(XPP) - Poplar River Airport, Poplar River, Canada','country_id' => '35'),\narray('id' => '863','name' => '(CZO) - Chistochina Airport, Chistochina, United States','country_id' => '228'),\narray('id' => '864','name' => '(ZPB) - Sachigo Lake Airport, Sachigo Lake, Canada','country_id' => '35'),\narray('id' => '865','name' => '(WPC) - Pincher Creek Airport, Pincher Creek, Canada','country_id' => '35'),\narray('id' => '866','name' => '(ZPO) - Pinehouse Lake Airport, Pinehouse Lake, Canada','country_id' => '35'),\narray('id' => '867','name' => '(ZRJ) - Round Lake (Weagamow Lake) Airport, Round Lake, Canada','country_id' => '35'),\narray('id' => '868','name' => '(ZSJ) - Sandy Lake Airport, Sandy Lake, Canada','country_id' => '35'),\narray('id' => '869','name' => '(XSI) - South Indian Lake Airport, South Indian Lake, Canada','country_id' => '35'),\narray('id' => '870','name' => '(ZST) - Stewart Airport, Stewart, Canada','country_id' => '35'),\narray('id' => '871','name' => '(YDV) - Bloodvein River Airport, Bloodvein River, Canada','country_id' => '35'),\narray('id' => '872','name' => '(ZTM) - Shamattawa Airport, Shamattawa, Canada','country_id' => '35'),\narray('id' => '873','name' => '(ZUC) - Ignace Municipal Airport, Ignace, Canada','country_id' => '35'),\narray('id' => '874','name' => '(ZUM) - Churchill Falls Airport, Churchill Falls, Canada','country_id' => '35'),\narray('id' => '875','name' => '(XLB) - Lac Brochet Airport, Lac Brochet, Canada','country_id' => '35'),\narray('id' => '876','name' => '(ZWL) - Wollaston Lake Airport, Wollaston Lake, Canada','country_id' => '35'),\narray('id' => '877','name' => '(DJN) - Delta Junction Airport, Delta Junction, United States','country_id' => '228'),\narray('id' => '878','name' => '(MQV) - Mostaganem Airport, , Algeria','country_id' => '59'),\narray('id' => '879','name' => '(QLD) - Blida Airport, , Algeria','country_id' => '59'),\narray('id' => '880','name' => '(BUJ) - Bou Saada Airport, , Algeria','country_id' => '59'),\narray('id' => '881','name' => '(BJA) - Soummam Airport, BAjaAa, Algeria','country_id' => '59'),\narray('id' => '882','name' => '(ALG) - Houari Boumediene Airport, Algiers, Algeria','country_id' => '59'),\narray('id' => '883','name' => '(DJG) - Djanet Inedbirene Airport, Djanet, Algeria','country_id' => '59'),\narray('id' => '884','name' => '(QFD) - Boufarik Airport, , Algeria','country_id' => '59'),\narray('id' => '885','name' => '(VVZ) - Illizi Takhamalt Airport, Illizi, Algeria','country_id' => '59'),\narray('id' => '886','name' => '(QSF) - Ain Arnat Airport, SAtif, Algeria','country_id' => '59'),\narray('id' => '887','name' => '(TMR) - Aguenar a\" Hadj Bey Akhamok Airport, Tamanrasset, Algeria','country_id' => '59'),\narray('id' => '888','name' => '(GJL) - Jijel Ferhat Abbas Airport, Jijel, Algeria','country_id' => '59'),\narray('id' => '889','name' => '(MZW) - Mecheria Airport, Mecheria, Algeria','country_id' => '59'),\narray('id' => '890','name' => '(QZN) - Relizane Airport, , Algeria','country_id' => '59'),\narray('id' => '891','name' => '(AAE) - Annaba Airport, Annabah, Algeria','country_id' => '59'),\narray('id' => '892','name' => '(CZL) - Mohamed Boudiaf International Airport, Constantine, Algeria','country_id' => '59'),\narray('id' => '893','name' => '(QMH) - Oum el Bouaghi airport, Oum El Bouaghi, Algeria','country_id' => '59'),\narray('id' => '894','name' => '(TEE) - Cheikh Larbi TAbessi Airport, TAbessi, Algeria','country_id' => '59'),\narray('id' => '895','name' => '(BLJ) - Batna Airport, Batna, Algeria','country_id' => '59'),\narray('id' => '896','name' => '(DAF) - Daup Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '897','name' => '(HRM) - Hassi R\\'Mel Airport, , Algeria','country_id' => '59'),\narray('id' => '898','name' => '(QDJ) - Tsletsi Airport, Djelfa, Algeria','country_id' => '59'),\narray('id' => '899','name' => '(DAO) - Dabo Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '900','name' => '(TID) - Bou Chekif Airport, Tiaret, Algeria','country_id' => '59'),\narray('id' => '901','name' => '(TIN) - Tindouf Airport, Tindouf, Algeria','country_id' => '59'),\narray('id' => '902','name' => '(CFK) - Ech Cheliff Airport, , Algeria','country_id' => '59'),\narray('id' => '903','name' => '(TAF) - Tafaraoui Airport, , Algeria','country_id' => '59'),\narray('id' => '904','name' => '(TLM) - Zenata a\" Messali El Hadj Airport, Tlemcen, Algeria','country_id' => '59'),\narray('id' => '905','name' => '(ORN) - Es Senia Airport, Oran, Algeria','country_id' => '59'),\narray('id' => '906','name' => '(CBH) - BAchar Boudghene Ben Ali Lotfi Airport, BAchar, Algeria','country_id' => '59'),\narray('id' => '907','name' => '(BFW) - Sidi Bel Abbes Airport, Sidi Bel AbbAs, Algeria','country_id' => '59'),\narray('id' => '908','name' => '(MUW) - Ghriss Airport, , Algeria','country_id' => '59'),\narray('id' => '909','name' => '(EBH) - El Bayadh Airport, El Bayadh, Algeria','country_id' => '59'),\narray('id' => '910','name' => '(INF) - In Guezzam Airport, In Guezzam, Algeria','country_id' => '59'),\narray('id' => '911','name' => '(BMW) - Bordj Badji Mokhtar Airport, Bordj Badji Mokhtar, Algeria','country_id' => '59'),\narray('id' => '912','name' => '(AZR) - Touat Cheikh Sidi Mohamed Belkebir Airport, , Algeria','country_id' => '59'),\narray('id' => '913','name' => '(BSK) - Biskra Airport, Biskra, Algeria','country_id' => '59'),\narray('id' => '914','name' => '(ELG) - El Golea Airport, , Algeria','country_id' => '59'),\narray('id' => '915','name' => '(GHA) - NoumArat - Moufdi Zakaria Airport, GhardaAa, Algeria','country_id' => '59'),\narray('id' => '916','name' => '(HME) - Oued Irara Airport, Hassi Messaoud, Algeria','country_id' => '59'),\narray('id' => '917','name' => '(INZ) - In Salah Airport, In Salah, Algeria','country_id' => '59'),\narray('id' => '918','name' => '(TGR) - Touggourt Sidi Madhi Airport, Touggourt, Algeria','country_id' => '59'),\narray('id' => '919','name' => '(LOO) - Laghouat Airport, Laghouat, Algeria','country_id' => '59'),\narray('id' => '920','name' => '(ELU) - Guemar Airport, Guemar, Algeria','country_id' => '59'),\narray('id' => '921','name' => '(TMX) - Timimoun Airport, Timimoun, Algeria','country_id' => '59'),\narray('id' => '922','name' => '(OGX) - Ain el Beida Airport, Ouargla, Algeria','country_id' => '59'),\narray('id' => '923','name' => '(IAM) - In AmAnas Airport, AmAnas, Algeria','country_id' => '59'),\narray('id' => '924','name' => '(COO) - Cadjehoun Airport, Cotonou, Benin','country_id' => '23'),\narray('id' => '925','name' => '(DJA) - Djougou Airport, Djougou, Benin','country_id' => '23'),\narray('id' => '926','name' => '(KDC) - Kandi Airport, Kandi, Benin','country_id' => '23'),\narray('id' => '927','name' => '(NAE) - Natitingou Airport, Natitingou, Benin','country_id' => '23'),\narray('id' => '928','name' => '(PKO) - Parakou Airport, Parakou, Benin','country_id' => '23'),\narray('id' => '929','name' => '(SVF) - SavA Airport, SavA, Benin','country_id' => '23'),\narray('id' => '930','name' => '(DBC) - Chang\\'an Airport, Baicheng, China','country_id' => '45'),\narray('id' => '931','name' => '(DBP) - Debepare Airport, Debepare, Papua New Guinea','country_id' => '172'),\narray('id' => '932','name' => '(DCK) - Dahl Creek Airport, Dahl Creek, United States','country_id' => '228'),\narray('id' => '933','name' => '(DDM) - Dodoima Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '934','name' => '(DER) - Derim Airport, Derim, Papua New Guinea','country_id' => '172'),\narray('id' => '935','name' => '(DEX) - Nop Goliath Airport, Yahukimo, Indonesia','country_id' => '97'),\narray('id' => '936','name' => '(XKY) - Kaya Airport, Kaya, Burkina Faso','country_id' => '19'),\narray('id' => '937','name' => '(OUG) - Ouahigouya Airport, Ouahigouya, Burkina Faso','country_id' => '19'),\narray('id' => '938','name' => '(XDJ) - Djibo Airport, Djibo, Burkina Faso','country_id' => '19'),\narray('id' => '939','name' => '(XLU) - Leo Airport, Leo, Burkina Faso','country_id' => '19'),\narray('id' => '940','name' => '(PUP) - Po Airport, Po, Burkina Faso','country_id' => '19'),\narray('id' => '941','name' => '(XBO) - Boulsa Airport, Boulsa, Burkina Faso','country_id' => '19'),\narray('id' => '942','name' => '(XBG) - Bogande Airport, Bogande, Burkina Faso','country_id' => '19'),\narray('id' => '943','name' => '(DIP) - Diapaga Airport, Diapaga, Burkina Faso','country_id' => '19'),\narray('id' => '944','name' => '(DOR) - Dori Airport, Dori, Burkina Faso','country_id' => '19'),\narray('id' => '945','name' => '(FNG) - Fada N\\'gourma Airport, Fada N\\'gourma, Burkina Faso','country_id' => '19'),\narray('id' => '946','name' => '(XGG) - Gorom-Gorom Airport, Gorom-Gorom, Burkina Faso','country_id' => '19'),\narray('id' => '947','name' => '(XKA) - Kantchari Airport, Kantchari, Burkina Faso','country_id' => '19'),\narray('id' => '948','name' => '(TMQ) - Tambao Airport, Tambao, Burkina Faso','country_id' => '19'),\narray('id' => '949','name' => '(XPA) - Pama Airport, Pama, Burkina Faso','country_id' => '19'),\narray('id' => '950','name' => '(ARL) - Arly Airport, Arly, Burkina Faso','country_id' => '19'),\narray('id' => '951','name' => '(XSE) - Sebba Airport, Sebba, Burkina Faso','country_id' => '19'),\narray('id' => '952','name' => '(TEG) - Tenkodogo Airport, Tenkodogo, Burkina Faso','country_id' => '19'),\narray('id' => '953','name' => '(XZA) - ZabrA Airport, ZabrA, Burkina Faso','country_id' => '19'),\narray('id' => '954','name' => '(OUA) - Ouagadougou Airport, Ouagadougou, Burkina Faso','country_id' => '19'),\narray('id' => '955','name' => '(BNR) - Banfora Airport, Banfora, Burkina Faso','country_id' => '19'),\narray('id' => '956','name' => '(DGU) - Dedougou Airport, Dedougou, Burkina Faso','country_id' => '19'),\narray('id' => '957','name' => '(XGA) - Gaoua Airport, Gaoua, Burkina Faso','country_id' => '19'),\narray('id' => '958','name' => '(XNU) - Nouna Airport, Nouna, Burkina Faso','country_id' => '19'),\narray('id' => '959','name' => '(BOY) - Bobo Dioulasso Airport, Bobo Dioulasso, Burkina Faso','country_id' => '19'),\narray('id' => '960','name' => '(TUQ) - Tougan Airport, Tougan, Burkina Faso','country_id' => '19'),\narray('id' => '961','name' => '(XDE) - Diebougou Airport, Diebougou, Burkina Faso','country_id' => '19'),\narray('id' => '962','name' => '(XAR) - Aribinda Airport, Aribinda, Burkina Faso','country_id' => '19'),\narray('id' => '963','name' => '(ACC) - Kotoka International Airport, Accra, Ghana','country_id' => '79'),\narray('id' => '964','name' => '(TML) - Tamale Airport, Tamale, Ghana','country_id' => '79'),\narray('id' => '965','name' => '(KMS) - Kumasi Airport, Kumasi, Ghana','country_id' => '79'),\narray('id' => '966','name' => '(NYI) - Sunyani Airport, Sunyani, Ghana','country_id' => '79'),\narray('id' => '967','name' => '(TKD) - Takoradi Airport, Sekondi-Takoradi, Ghana','country_id' => '79'),\narray('id' => '968','name' => '(ABJ) - Port Bouet Airport, Abidjan, Ivoire Coast','country_id' => '41'),\narray('id' => '969','name' => '(OGO) - Abengourou Airport, Abengourou, Ivoire Coast','country_id' => '41'),\narray('id' => '970','name' => '(BXI) - Boundiali Airport, Boundiali, Ivoire Coast','country_id' => '41'),\narray('id' => '971','name' => '(BYK) - BouakA Airport, , Ivoire Coast','country_id' => '41'),\narray('id' => '972','name' => '(BQO) - Bouna Airport, Bouna, Ivoire Coast','country_id' => '41'),\narray('id' => '973','name' => '(BDK) - Soko Airport, Bondoukou, Ivoire Coast','country_id' => '41'),\narray('id' => '974','name' => '(DIM) - Dimbokro Airport, Dimbokro, Ivoire Coast','country_id' => '41'),\narray('id' => '975','name' => '(DJO) - Daloa Airport, , Ivoire Coast','country_id' => '41'),\narray('id' => '976','name' => '(FEK) - Ferkessedougou Airport, Ferkessedougou, Ivoire Coast','country_id' => '41'),\narray('id' => '977','name' => '(GGN) - Gagnoa Airport, Gagnoa, Ivoire Coast','country_id' => '41'),\narray('id' => '978','name' => '(GGO) - Guiglo Airport, Guiglo, Ivoire Coast','country_id' => '41'),\narray('id' => '979','name' => '(BBV) - Nero-Mer Airport, Grand-BArAby, Ivoire Coast','country_id' => '41'),\narray('id' => '980','name' => '(HGO) - Korhogo Airport, Korhogo, Ivoire Coast','country_id' => '41'),\narray('id' => '981','name' => '(MJC) - Man Airport, , Ivoire Coast','country_id' => '41'),\narray('id' => '982','name' => '(KEO) - Odienne Airport, Odienne, Ivoire Coast','country_id' => '41'),\narray('id' => '983','name' => '(OFI) - Ouango Fitini Airport, Ouango Fitini, Ivoire Coast','country_id' => '41'),\narray('id' => '984','name' => '(SEO) - Seguela Airport, Seguela, Ivoire Coast','country_id' => '41'),\narray('id' => '985','name' => '(SPY) - San Pedro Airport, , Ivoire Coast','country_id' => '41'),\narray('id' => '986','name' => '(ZSS) - Sassandra Airport, Sassandra, Ivoire Coast','country_id' => '41'),\narray('id' => '987','name' => '(TXU) - Tabou Airport, Tabou, Ivoire Coast','country_id' => '41'),\narray('id' => '988','name' => '(TOZ) - Mahana Airport, Touba, Ivoire Coast','country_id' => '41'),\narray('id' => '989','name' => '(ASK) - Yamoussoukro Airport, Yamoussoukro, Ivoire Coast','country_id' => '41'),\narray('id' => '990','name' => '(DKA) - Katsina Airport, Katsina, Nigeria','country_id' => '160'),\narray('id' => '991','name' => '(ABV) - Nnamdi Azikiwe International Airport, Abuja, Nigeria','country_id' => '160'),\narray('id' => '992','name' => '(QUO) - Akwa Ibom International Airport, Uyo, Nigeria','country_id' => '160'),\narray('id' => '993','name' => '(AKR) - Akure Airport, Akure, Nigeria','country_id' => '160'),\narray('id' => '994','name' => '(ABB) - Asaba International Airport, Asaba, Nigeria','country_id' => '160'),\narray('id' => '995','name' => '(BNI) - Benin Airport, Benin, Nigeria','country_id' => '160'),\narray('id' => '996','name' => '(CBQ) - Margaret Ekpo International Airport, Calabar, Nigeria','country_id' => '160'),\narray('id' => '997','name' => '(ENU) - Akanu Ibiam International Airport, Enegu, Nigeria','country_id' => '160'),\narray('id' => '998','name' => '(QUS) - Gusau Airport, Gusau, Nigeria','country_id' => '160'),\narray('id' => '999','name' => '(IBA) - Ibadan Airport, Ibadan, Nigeria','country_id' => '160'),\narray('id' => '1000','name' => '(ILR) - Ilorin International Airport, Ilorin, Nigeria','country_id' => '160'),\narray('id' => '1001','name' => '(QOW) - Sam Mbakwe International Airport, Owerri, Nigeria','country_id' => '160'),\narray('id' => '1002','name' => '(JOS) - Yakubu Gowon Airport, Jos, Nigeria','country_id' => '160'),\narray('id' => '1003','name' => '(KAD) - Kaduna Airport, Kaduna, Nigeria','country_id' => '160'),\narray('id' => '1004','name' => '(KAN) - Mallam Aminu International Airport, Kano, Nigeria','country_id' => '160'),\narray('id' => '1005','name' => '(MIU) - Maiduguri International Airport, Maiduguri, Nigeria','country_id' => '160'),\narray('id' => '1006','name' => '(MDI) - Makurdi Airport, Makurdi, Nigeria','country_id' => '160'),\narray('id' => '1007','name' => '(LOS) - Murtala Muhammed International Airport, Lagos, Nigeria','country_id' => '160'),\narray('id' => '1008','name' => '(MXJ) - Minna Airport, Minna, Nigeria','country_id' => '160'),\narray('id' => '1009','name' => '(PHC) - Port Harcourt International Airport, Port Harcourt, Nigeria','country_id' => '160'),\narray('id' => '1010','name' => '(SKO) - Sadiq Abubakar III International Airport, Sokoto, Nigeria','country_id' => '160'),\narray('id' => '1011','name' => '(YOL) - Yola Airport, Yola, Nigeria','country_id' => '160'),\narray('id' => '1012','name' => '(ZAR) - Zaria Airport, Zaria, Nigeria','country_id' => '160'),\narray('id' => '1013','name' => '(DOO) - Dorobisoro Airport, Dorobisoro, Papua New Guinea','country_id' => '172'),\narray('id' => '1014','name' => '(DPT) - Deputatskiy Airport, Deputatskiy, Russia','country_id' => '187'),\narray('id' => '1015','name' => '(DQA) - Saertu Airport, Daqing Shi, China','country_id' => '45'),\narray('id' => '1016','name' => '(MFQ) - Maradi Airport, Maradi, Niger','country_id' => '158'),\narray('id' => '1017','name' => '(NIM) - Diori Hamani International Airport, Niamey, Niger','country_id' => '158'),\narray('id' => '1018','name' => '(THZ) - Tahoua Airport, Tahoua, Niger','country_id' => '158'),\narray('id' => '1019','name' => '(AJY) - Mano Dayak International Airport, Agadez, Niger','country_id' => '158'),\narray('id' => '1020','name' => '(RLT) - Arlit Airport, Arlit, Niger','country_id' => '158'),\narray('id' => '1021','name' => '(ZND) - Zinder Airport, Zinder, Niger','country_id' => '158'),\narray('id' => '1022','name' => '(DSG) - Dilasag Airport, Dilasag, Philippines','country_id' => '173'),\narray('id' => '1023','name' => '(TBJ) - Tabarka 7 Novembre Airport, Tabarka, Tunisia','country_id' => '218'),\narray('id' => '1024','name' => '(MIR) - Monastir Habib Bourguiba International Airport, Monastir, Tunisia','country_id' => '218'),\narray('id' => '1025','name' => '(TUN) - Tunis Carthage International Airport, Tunis, Tunisia','country_id' => '218'),\narray('id' => '1026','name' => '(QIZ) - Sidi Ahmed Air Base, Sidi Ahmed, Tunisia','country_id' => '218'),\narray('id' => '1027','name' => '(GAF) - Gafsa Ksar International Airport, Gafsa, Tunisia','country_id' => '218'),\narray('id' => '1028','name' => '(GAE) - GabAs Matmata International Airport, GabAs, Tunisia','country_id' => '218'),\narray('id' => '1029','name' => '(DJE) - Djerba Zarzis International Airport, Djerba, Tunisia','country_id' => '218'),\narray('id' => '1030','name' => '(EBM) - El Borma Airport, El Borma, Tunisia','country_id' => '218'),\narray('id' => '1031','name' => '(SFA) - Sfax Thyna International Airport, Sfax, Tunisia','country_id' => '218'),\narray('id' => '1032','name' => '(TOE) - Tozeur Nefta International Airport, Tozeur, Tunisia','country_id' => '218'),\narray('id' => '1033','name' => '(DVD) - Andavadoaka Airport, Andavadoaka, Madagascar','country_id' => '138'),\narray('id' => '1034','name' => '(DWR) - Dywer Airbase, Camp Dwyer, Afghanistan','country_id' => '2'),\narray('id' => '1035','name' => '(LRL) - Niamtougou International Airport, Niamtougou, Togo','country_id' => '212'),\narray('id' => '1036','name' => '(LFW) - LomA-Tokoin Airport, LomA, Togo','country_id' => '212'),\narray('id' => '1037','name' => '(EAL) - Elenak Airport, Mejato Island, Marshall Islands','country_id' => '139'),\narray('id' => '1038','name' => '(QON) - Arlon-Sterpenich ULM, Arlon, Belgium','country_id' => '18'),\narray('id' => '1039','name' => '(ANR) - Antwerp International Airport (Deurne), Antwerp, Belgium','country_id' => '18'),\narray('id' => '1040','name' => '(BRU) - Brussels Airport, Brussels, Belgium','country_id' => '18'),\narray('id' => '1041','name' => '(CRL) - Brussels South Charleroi Airport, Brussels, Belgium','country_id' => '18'),\narray('id' => '1042','name' => '(KJK) - Wevelgem Airport, Wevelgem, Belgium','country_id' => '18'),\narray('id' => '1043','name' => '(LGG) - LiAge Airport, LiAge, Belgium','country_id' => '18'),\narray('id' => '1044','name' => '(QNM) - SuarlAe Airport, Namur, Belgium','country_id' => '18'),\narray('id' => '1045','name' => '(EBO) - Ebon Airport, Ebon Atoll, Marshall Islands','country_id' => '139'),\narray('id' => '1046','name' => '(OST) - Ostend-Bruges International Airport, Ostend, Belgium','country_id' => '18'),\narray('id' => '1047','name' => '(ZGQ) - Tournai/Maubray Airport, Tournai, Belgium','country_id' => '18'),\narray('id' => '1048','name' => '(QHA) - Kiewit Airfield Hasselt, Hasselt, Belgium','country_id' => '18'),\narray('id' => '1049','name' => '(OBL) - Oostmalle Air Base, Zoersel, Belgium','country_id' => '18'),\narray('id' => '1050','name' => '(MZD) - MAndez Airport, Santiago de MAndez, Ecuador','country_id' => '60'),\narray('id' => '1051','name' => '(AOC) - Altenburg-Nobitz Airport, Altenburg, Germany','country_id' => '54'),\narray('id' => '1052','name' => '(HDF) - Heringsdorf Airport, Heringsdorf, Germany','country_id' => '54'),\narray('id' => '1053','name' => '(IES) - Riesa-GAhlis Airport, Riesa, Germany','country_id' => '54'),\narray('id' => '1054','name' => '(REB) - Rechlin-LArz Airport, LArz, Germany','country_id' => '54'),\narray('id' => '1055','name' => '(QXH) - SchAnhagen Airport, Trebbin, Germany','country_id' => '54'),\narray('id' => '1056','name' => '(CSO) - Cochstedt Airport, Magdeburg, Germany','country_id' => '54'),\narray('id' => '1057','name' => '(BBH) - Barth Airport, , Germany','country_id' => '54'),\narray('id' => '1058','name' => '(ZMG) - Magdeburg Airport, Magdeburg, Germany','country_id' => '54'),\narray('id' => '1059','name' => '(FNB) - Neubrandenburg Airport, Neubrandenburg, Germany','country_id' => '54'),\narray('id' => '1060','name' => '(CBU) - Cottbus-Drewitz Airport, Cottbus, Germany','country_id' => '54'),\narray('id' => '1061','name' => '(GTI) - RAgen Airport, RAgen, Germany','country_id' => '54'),\narray('id' => '1062','name' => '(KOQ) - KAthen Airport, KAthen, Germany','country_id' => '54'),\narray('id' => '1063','name' => '(PEF) - PeenemAnde Airport, PeenemAnde, Germany','country_id' => '54'),\narray('id' => '1064','name' => '(SXF) - Berlin-SchAnefeld International Airport, Berlin, Germany','country_id' => '54'),\narray('id' => '1065','name' => '(DRS) - Dresden Airport, Dresden, Germany','country_id' => '54'),\narray('id' => '1066','name' => '(ERF) - Erfurt Airport, Erfurt, Germany','country_id' => '54'),\narray('id' => '1067','name' => '(FRA) - Frankfurt am Main International Airport, Frankfurt-am-Main, Germany','country_id' => '54'),\narray('id' => '1068','name' => '(FMO) - MAnster OsnabrAck Airport, MAnster, Germany','country_id' => '54'),\narray('id' => '1069','name' => '(HAM) - Hamburg Airport, Hamburg, Germany','country_id' => '54'),\narray('id' => '1070','name' => '(CGN) - Cologne Bonn Airport, Cologne, Germany','country_id' => '54'),\narray('id' => '1071','name' => '(DUS) - DAsseldorf International Airport, DAsseldorf, Germany','country_id' => '54'),\narray('id' => '1072','name' => '(MUC) - Munich International Airport, Munich, Germany','country_id' => '54'),\narray('id' => '1073','name' => '(NUE) - Nuremberg Airport, Nuremberg, Germany','country_id' => '54'),\narray('id' => '1074','name' => '(LEJ) - Leipzig Halle Airport, Leipzig, Germany','country_id' => '54'),\narray('id' => '1075','name' => '(SCN) - SaarbrAcken Airport, SaarbrAcken, Germany','country_id' => '54'),\narray('id' => '1076','name' => '(STR) - Stuttgart Airport, Stuttgart, Germany','country_id' => '54'),\narray('id' => '1077','name' => '(TXL) - Berlin-Tegel International Airport, Berlin, Germany','country_id' => '54'),\narray('id' => '1078','name' => '(HAJ) - Hannover Airport, Hannover, Germany','country_id' => '54'),\narray('id' => '1079','name' => '(BRE) - Bremen Airport, Bremen, Germany','country_id' => '54'),\narray('id' => '1080','name' => '(QEF) - Frankfurt-Egelsbach Airport, Egelsbach, Germany','country_id' => '54'),\narray('id' => '1081','name' => '(HHN) - Frankfurt-Hahn Airport, Hahn, Germany','country_id' => '54'),\narray('id' => '1082','name' => '(MHG) - Mannheim-City Airport, Mannheim, Germany','country_id' => '54'),\narray('id' => '1083','name' => '(QMZ) - Mainz-Finthen Airport, Mainz, Germany','country_id' => '54'),\narray('id' => '1084','name' => '(EIB) - Eisenach-Kindel Airport, Eisenach, Germany','country_id' => '54'),\narray('id' => '1085','name' => '(SGE) - Siegerland Airport, , Germany','country_id' => '54'),\narray('id' => '1086','name' => '(XFW) - Hamburg-Finkenwerder Airport, Hamburg, Germany','country_id' => '54'),\narray('id' => '1087','name' => '(KEL) - Kiel-Holtenau Airport, Kiel, Germany','country_id' => '54'),\narray('id' => '1088','name' => '(LBC) - LAbeck Blankensee Airport, LAbeck, Germany','country_id' => '54'),\narray('id' => '1089','name' => '(EUM) - NeumAnster Airport, NeumAnster, Germany','country_id' => '54'),\narray('id' => '1090','name' => '(FMM) - Memmingen Allgau Airport, Memmingen, Germany','country_id' => '54'),\narray('id' => '1091','name' => '(AAH) - Aachen-MerzbrAck Airport, Aachen, Germany','country_id' => '54'),\narray('id' => '1092','name' => '(BNJ) - Bonn-Hangelar Airport, Bonn, Germany','country_id' => '54'),\narray('id' => '1093','name' => '(ESS) - Essen Mulheim Airport, , Germany','country_id' => '54'),\narray('id' => '1094','name' => '(BFE) - Bielefeld Airport, Bielefeld, Germany','country_id' => '54'),\narray('id' => '1095','name' => '(ZOJ) - Marl-LoemAhle Airport, Marl, Germany','country_id' => '54'),\narray('id' => '1096','name' => '(MGL) - MAnchengladbach Airport, MAnchengladbach, Germany','country_id' => '54'),\narray('id' => '1097','name' => '(PAD) - Paderborn Lippstadt Airport, Paderborn, Germany','country_id' => '54'),\narray('id' => '1098','name' => '(NRN) - Weeze Airport, Weeze, Germany','country_id' => '54'),\narray('id' => '1099','name' => '(DTM) - Dortmund Airport, Dortmund, Germany','country_id' => '54'),\narray('id' => '1100','name' => '(AGB) - Augsburg Airport, Augsburg, Germany','country_id' => '54'),\narray('id' => '1101','name' => '(OBF) - Oberpfaffenhofen Airport, , Germany','country_id' => '54'),\narray('id' => '1102','name' => '(RBM) - Straubing Airport, Straubing, Germany','country_id' => '54'),\narray('id' => '1103','name' => '(FDH) - Friedrichshafen Airport, Friedrichshafen, Germany','country_id' => '54'),\narray('id' => '1104','name' => '(FRF) - Oschersleben Airport, Oschersleben, Germany','country_id' => '54'),\narray('id' => '1105','name' => '(SZW) - Schwerin Parchim Airport, , Germany','country_id' => '54'),\narray('id' => '1106','name' => '(BYU) - Bayreuth Airport, Bayreuth, Germany','country_id' => '54'),\narray('id' => '1107','name' => '(URD) - Burg Feuerstein Airport, Ebermannstadt, Germany','country_id' => '54'),\narray('id' => '1108','name' => '(QOB) - Ansbach-Petersdorf Airport, Ansbach, Germany','country_id' => '54'),\narray('id' => '1109','name' => '(GHF) - Giebelstadt Airport, Giebelstadt, Germany','country_id' => '54'),\narray('id' => '1110','name' => '(HOQ) - Hof-Plauen Airport, Hof, Germany','country_id' => '54'),\narray('id' => '1111','name' => '(BBJ) - Bitburg Airport, Bitburg, Germany','country_id' => '54'),\narray('id' => '1112','name' => '(ZQW) - ZweibrAcken Airport, ZweibrAcken, Germany','country_id' => '54'),\narray('id' => '1113','name' => '(FKB) - Karlsruhe Baden-Baden Airport, Baden-Baden, Germany','country_id' => '54'),\narray('id' => '1114','name' => '(ZQL) - Donaueschingen-Villingen Airport, Donaueschingen, Germany','country_id' => '54'),\narray('id' => '1115','name' => '(LHA) - Lahr Airport, , Germany','country_id' => '54'),\narray('id' => '1116','name' => '(BWE) - Braunschweig Wolfsburg Airport, , Germany','country_id' => '54'),\narray('id' => '1117','name' => '(KSF) - Kassel-Calden Airport, Kassel, Germany','country_id' => '54'),\narray('id' => '1118','name' => '(EME) - Emden Airport, Emden, Germany','country_id' => '54'),\narray('id' => '1119','name' => '(AGE) - Wangerooge Airport, Wangerooge, Germany','country_id' => '54'),\narray('id' => '1120','name' => '(WVN) - Wilhelmshaven-Mariensiel Airport, Wilhelmshaven, Germany','country_id' => '54'),\narray('id' => '1121','name' => '(JUI) - Juist Airport, Juist, Germany','country_id' => '54'),\narray('id' => '1122','name' => '(LGO) - Langeoog Airport, Langeoog, Germany','country_id' => '54'),\narray('id' => '1123','name' => '(ZOW) - Nordhorn-Lingen Airport, Klausheide, Germany','country_id' => '54'),\narray('id' => '1124','name' => '(BMK) - Borkum Airport, Borkum, Germany','country_id' => '54'),\narray('id' => '1125','name' => '(NOD) - Norden-Norddeich Airport, Norddeich, Germany','country_id' => '54'),\narray('id' => '1126','name' => '(VAC) - Varrelbusch Airport, Cloppenburg, Germany','country_id' => '54'),\narray('id' => '1127','name' => '(NRD) - Norderney Airport, Norderney, Germany','country_id' => '54'),\narray('id' => '1128','name' => '(BMR) - Baltrum Airport, Baltrum, Germany','country_id' => '54'),\narray('id' => '1129','name' => '(HEI) - Heide-BAsum Airport, BAsum, Germany','country_id' => '54'),\narray('id' => '1130','name' => '(FLF) - Flensburg-SchAferhaus Airport, Flensburg, Germany','country_id' => '54'),\narray('id' => '1131','name' => '(HGL) - Helgoland-DAne Airport, Helgoland, Germany','country_id' => '54'),\narray('id' => '1132','name' => '(QHU) - Husum-Schwesing Airport, Husum, Germany','country_id' => '54'),\narray('id' => '1133','name' => '(NDZ) - Nordholz-Spieka Airport, Cuxhaven, Germany','country_id' => '54'),\narray('id' => '1134','name' => '(PSH) - St. Peter-Ording Airport, Sankt Peter-Ording, Germany','country_id' => '54'),\narray('id' => '1135','name' => '(GWT) - Westerland Sylt Airport, Westerland, Germany','country_id' => '54'),\narray('id' => '1136','name' => '(OHR) - Wyk auf FAhr Airport, Wyk auf FAhr, Germany','country_id' => '54'),\narray('id' => '1137','name' => '(KDL) - KArdla Airport, KArdla, Estonia','country_id' => '61'),\narray('id' => '1138','name' => '(URE) - Kuressaare Airport, Kuressaare, Estonia','country_id' => '61'),\narray('id' => '1139','name' => '(EPU) - PArnu Airport, PArnu, Estonia','country_id' => '61'),\narray('id' => '1140','name' => '(TLL) - Lennart Meri Tallinn Airport, Tallinn, Estonia','country_id' => '61'),\narray('id' => '1141','name' => '(TAY) - Tartu Airport, Tartu, Estonia','country_id' => '61'),\narray('id' => '1142','name' => '(ENF) - Enontekio Airport, Enontekio, Finland','country_id' => '67'),\narray('id' => '1143','name' => '(QVE) - Forssa Airport, Forssa, Finland','country_id' => '67'),\narray('id' => '1144','name' => '(EFG) - Efogi Airport, Efogi, Papua New Guinea','country_id' => '172'),\narray('id' => '1145','name' => '(KEV) - Halli Airport, Halli / Kuorevesi, Finland','country_id' => '67'),\narray('id' => '1146','name' => '(HEM) - Helsinki Malmi Airport, Helsinki, Finland','country_id' => '67'),\narray('id' => '1147','name' => '(HEL) - Helsinki Vantaa Airport, Helsinki, Finland','country_id' => '67'),\narray('id' => '1148','name' => '(HYV) - HyvinkAA Airfield, HyvinkAA, Finland','country_id' => '67'),\narray('id' => '1149','name' => '(KTQ) - Kitee Airport, , Finland','country_id' => '67'),\narray('id' => '1150','name' => '(IVL) - Ivalo Airport, Ivalo, Finland','country_id' => '67'),\narray('id' => '1151','name' => '(JOE) - Joensuu Airport, Joensuu / Liperi, Finland','country_id' => '67'),\narray('id' => '1152','name' => '(JYV) - Jyvaskyla Airport, JyvAskylAn Maalaiskunta, Finland','country_id' => '67'),\narray('id' => '1153','name' => '(KAU) - Kauhava Airport, Kauhava, Finland','country_id' => '67'),\narray('id' => '1154','name' => '(KEM) - Kemi-Tornio Airport, Kemi / Tornio, Finland','country_id' => '67'),\narray('id' => '1155','name' => '(KAJ) - Kajaani Airport, Kajaani, Finland','country_id' => '67'),\narray('id' => '1156','name' => '(KHJ) - Kauhajoki Airport, , Finland','country_id' => '67'),\narray('id' => '1157','name' => '(KOK) - Kokkola-Pietarsaari Airport, Kokkola / Kruunupyy, Finland','country_id' => '67'),\narray('id' => '1158','name' => '(KAO) - Kuusamo Airport, Kuusamo, Finland','country_id' => '67'),\narray('id' => '1159','name' => '(KTT) - KittilA Airport, KittilA, Finland','country_id' => '67'),\narray('id' => '1160','name' => '(KUO) - Kuopio Airport, Kuopio / SiilinjArvi, Finland','country_id' => '67'),\narray('id' => '1161','name' => '(QLF) - Lahti Vesivehmaa Airport, , Finland','country_id' => '67'),\narray('id' => '1162','name' => '(LPP) - Lappeenranta Airport, Lappeenranta, Finland','country_id' => '67'),\narray('id' => '1163','name' => '(MHQ) - Mariehamn Airport, , Finland','country_id' => '67'),\narray('id' => '1164','name' => '(MIK) - Mikkeli Airport, Mikkeli, Finland','country_id' => '67'),\narray('id' => '1165','name' => '(OUL) - Oulu Airport, Oulu / Oulunsalo, Finland','country_id' => '67'),\narray('id' => '1166','name' => '(POR) - Pori Airport, Pori, Finland','country_id' => '67'),\narray('id' => '1167','name' => '(RVN) - Rovaniemi Airport, Rovaniemi, Finland','country_id' => '67'),\narray('id' => '1168','name' => '(SVL) - Savonlinna Airport, Savonlinna, Finland','country_id' => '67'),\narray('id' => '1169','name' => '(SJY) - SeinAjoki Airport, SeinAjoki / Ilmajoki, Finland','country_id' => '67'),\narray('id' => '1170','name' => '(SOT) - Sodankyla Airport, Sodankyla, Finland','country_id' => '67'),\narray('id' => '1171','name' => '(TMP) - Tampere-Pirkkala Airport, Tampere / Pirkkala, Finland','country_id' => '67'),\narray('id' => '1172','name' => '(TKU) - Turku Airport, Turku, Finland','country_id' => '67'),\narray('id' => '1173','name' => '(UTI) - Utti Air Base, Utti / Valkeala, Finland','country_id' => '67'),\narray('id' => '1174','name' => '(VAA) - Vaasa Airport, Vaasa, Finland','country_id' => '67'),\narray('id' => '1175','name' => '(VRK) - Varkaus Airport, Varkaus / Joroinen, Finland','country_id' => '67'),\narray('id' => '1176','name' => '(YLI) - Ylivieska Airport, , Finland','country_id' => '67'),\narray('id' => '1177','name' => '(AUE) - Abu Rudeis Airport, Abu Rudeis, Egypt','country_id' => '62'),\narray('id' => '1178','name' => '(BFS) - Belfast International Airport, Belfast, United Kingdom','country_id' => '74'),\narray('id' => '1179','name' => '(ENK) - St Angelo Airport, Enniskillen, United Kingdom','country_id' => '74'),\narray('id' => '1180','name' => '(BHD) - George Best Belfast City Airport, Belfast, United Kingdom','country_id' => '74'),\narray('id' => '1181','name' => '(LDY) - City of Derry Airport, Derry, United Kingdom','country_id' => '74'),\narray('id' => '1182','name' => '(BHX) - Birmingham International Airport, Birmingham, United Kingdom','country_id' => '74'),\narray('id' => '1183','name' => '(CVT) - Coventry Airport, Coventry, United Kingdom','country_id' => '74'),\narray('id' => '1184','name' => '(GLO) - Gloucestershire Airport, Staverton, United Kingdom','country_id' => '74'),\narray('id' => '1185','name' => '(ORM) - Sywell Aerodrome, Northampton, United Kingdom','country_id' => '74'),\narray('id' => '1186','name' => '(NQT) - Nottingham Airport, Nottingham, United Kingdom','country_id' => '74'),\narray('id' => '1187','name' => '(MAN) - Manchester Airport, Manchester, United Kingdom','country_id' => '74'),\narray('id' => '1188','name' => '(DSA) - Robin Hood Doncaster Sheffield Airport, Doncaster, United Kingdom','country_id' => '74'),\narray('id' => '1189','name' => '(UPV) - Upavon Aerodrome, Upavon, United Kingdom','country_id' => '74'),\narray('id' => '1190','name' => '(LYE) - RAF Lyneham, Lyneham, United Kingdom','country_id' => '74'),\narray('id' => '1191','name' => '(DGX) - MOD St. Athan, St. Athan, United Kingdom','country_id' => '74'),\narray('id' => '1192','name' => '(YEO) - RNAS Yeovilton, Yeovil, United Kingdom','country_id' => '74'),\narray('id' => '1193','name' => '(CAL) - Campbeltown Airport, Campbeltown, United Kingdom','country_id' => '74'),\narray('id' => '1194','name' => '(EOI) - Eday Airport, Eday, United Kingdom','country_id' => '74'),\narray('id' => '1195','name' => '(FIE) - Fair Isle Airport, Fair Isle, United Kingdom','country_id' => '74'),\narray('id' => '1196','name' => '(WHS) - Whalsay Airport, Whalsay, United Kingdom','country_id' => '74'),\narray('id' => '1197','name' => '(COL) - Coll Airport, Coll Island, United Kingdom','country_id' => '74'),\narray('id' => '1198','name' => '(NRL) - North Ronaldsay Airport, North Ronaldsay, United Kingdom','country_id' => '74'),\narray('id' => '1199','name' => '(OBN) - Oban Airport, North Connel, United Kingdom','country_id' => '74'),\narray('id' => '1200','name' => '(PPW) - Papa Westray Airport, Papa Westray, United Kingdom','country_id' => '74'),\narray('id' => '1201','name' => '(SOY) - Stronsay Airport, Stronsay, United Kingdom','country_id' => '74'),\narray('id' => '1202','name' => '(NDY) - Sanday Airport, Sanday, United Kingdom','country_id' => '74'),\narray('id' => '1203','name' => '(LWK) - Lerwick / Tingwall Airport, Lerwick, United Kingdom','country_id' => '74'),\narray('id' => '1204','name' => '(WRY) - Westray Airport, Westray, United Kingdom','country_id' => '74'),\narray('id' => '1205','name' => '(CSA) - Colonsay Airstrip, Colonsay, United Kingdom','country_id' => '74'),\narray('id' => '1206','name' => '(HAW) - Haverfordwest Airport, Haverfordwest, United Kingdom','country_id' => '74'),\narray('id' => '1207','name' => '(CWL) - Cardiff International Airport, Cardiff, United Kingdom','country_id' => '74'),\narray('id' => '1208','name' => '(SWS) - Swansea Airport, Swansea, United Kingdom','country_id' => '74'),\narray('id' => '1209','name' => '(BRS) - Bristol International Airport, Bristol, United Kingdom','country_id' => '74'),\narray('id' => '1210','name' => '(LPL) - Liverpool John Lennon Airport, Liverpool, United Kingdom','country_id' => '74'),\narray('id' => '1211','name' => '(LTN) - London Luton Airport, London, United Kingdom','country_id' => '74'),\narray('id' => '1212','name' => '(LEQ) - Land\\'s End Airport, Land\\'s End, United Kingdom','country_id' => '74'),\narray('id' => '1213','name' => '(PLH) - Plymouth City Airport, Plymouth, United Kingdom','country_id' => '74'),\narray('id' => '1214','name' => '(ISC) - St. Mary\\'s Airport, St. Mary\\'s, United Kingdom','country_id' => '74'),\narray('id' => '1215','name' => '(BOH) - Bournemouth Airport, Bournemouth, United Kingdom','country_id' => '74'),\narray('id' => '1216','name' => '(SOU) - Southampton Airport, Southampton, United Kingdom','country_id' => '74'),\narray('id' => '1217','name' => '(BBP) - Bembridge Airport, Bembridge, United Kingdom','country_id' => '74'),\narray('id' => '1218','name' => '(QLA) - Lasham Airport, Lasham, United Kingdom','country_id' => '74'),\narray('id' => '1219','name' => '(NQY) - Newquay Cornwall Airport, Newquay, United Kingdom','country_id' => '74'),\narray('id' => '1220','name' => '(QUG) - Chichester/Goodwood Airport, Chichester, United Kingdom','country_id' => '74'),\narray('id' => '1221','name' => '(ACI) - Alderney Airport, Saint Anne, Guernsey','country_id' => '78'),\narray('id' => '1222','name' => '(GCI) - Guernsey Airport, Saint Peter Port, Guernsey','country_id' => '78'),\narray('id' => '1223','name' => '(JER) - Jersey Airport, Saint Helier, Jersey','country_id' => '107'),\narray('id' => '1224','name' => '(ESH) - Shoreham Airport, Brighton, United Kingdom','country_id' => '74'),\narray('id' => '1225','name' => '(BQH) - London Biggin Hill Airport, London, United Kingdom','country_id' => '74'),\narray('id' => '1226','name' => '(LGW) - London Gatwick Airport, London, United Kingdom','country_id' => '74'),\narray('id' => '1227','name' => '(KRH) - Redhill Aerodrome, Redhill, United Kingdom','country_id' => '74'),\narray('id' => '1228','name' => '(LCY) - London City Airport, London, United Kingdom','country_id' => '74'),\narray('id' => '1229','name' => '(FAB) - Farnborough Airport, Farnborough, United Kingdom','country_id' => '74'),\narray('id' => '1230','name' => '(BBS) - Blackbushe Airport, Yateley, United Kingdom','country_id' => '74'),\narray('id' => '1231','name' => '(LHR) - London Heathrow Airport, London, United Kingdom','country_id' => '74'),\narray('id' => '1232','name' => '(SEN) - Southend Airport, Southend, United Kingdom','country_id' => '74'),\narray('id' => '1233','name' => '(LYX) - Lydd Airport, Lydd, Ashford, United Kingdom','country_id' => '74'),\narray('id' => '1234','name' => '(CAX) - Carlisle Airport, Carlisle, United Kingdom','country_id' => '74'),\narray('id' => '1235','name' => '(BLK) - Blackpool International Airport, Blackpool, United Kingdom','country_id' => '74'),\narray('id' => '1236','name' => '(HUY) - Humberside Airport, Grimsby, United Kingdom','country_id' => '74'),\narray('id' => '1237','name' => '(BWF) - Barrow Walney Island Airport, Barrow-in-Furness, United Kingdom','country_id' => '74'),\narray('id' => '1238','name' => '(LBA) - Leeds Bradford Airport, Leeds, United Kingdom','country_id' => '74'),\narray('id' => '1239','name' => '(CEG) - Hawarden Airport, Hawarden, United Kingdom','country_id' => '74'),\narray('id' => '1240','name' => '(IOM) - Isle of Man Airport, Castletown, Isle of Man','country_id' => '100'),\narray('id' => '1241','name' => '(NCL) - Newcastle Airport, Newcastle, United Kingdom','country_id' => '74'),\narray('id' => '1242','name' => '(MME) - Durham Tees Valley Airport, Durham, United Kingdom','country_id' => '74'),\narray('id' => '1243','name' => '(EMA) - East Midlands Airport, Nottingham, United Kingdom','country_id' => '74'),\narray('id' => '1244','name' => '(VLY) - Anglesey Airport, Angelsey, United Kingdom','country_id' => '74'),\narray('id' => '1245','name' => '(KOI) - Kirkwall Airport, Orkney Islands, United Kingdom','country_id' => '74'),\narray('id' => '1246','name' => '(LSI) - Sumburgh Airport, Lerwick, United Kingdom','country_id' => '74'),\narray('id' => '1247','name' => '(WIC) - Wick Airport, Wick, United Kingdom','country_id' => '74'),\narray('id' => '1248','name' => '(ABZ) - Aberdeen Dyce Airport, Aberdeen, United Kingdom','country_id' => '74'),\narray('id' => '1249','name' => '(INV) - Inverness Airport, Inverness, United Kingdom','country_id' => '74'),\narray('id' => '1250','name' => '(GLA) - Glasgow International Airport, Glasgow, United Kingdom','country_id' => '74'),\narray('id' => '1251','name' => '(EDI) - Edinburgh Airport, Edinburgh, United Kingdom','country_id' => '74'),\narray('id' => '1252','name' => '(ILY) - Islay Airport, Port Ellen, United Kingdom','country_id' => '74'),\narray('id' => '1253','name' => '(PIK) - Glasgow Prestwick Airport, Glasgow, United Kingdom','country_id' => '74'),\narray('id' => '1254','name' => '(BEB) - Benbecula Airport, Balivanich, United Kingdom','country_id' => '74'),\narray('id' => '1255','name' => '(SCS) - Scatsta Airport, Shetland Islands, United Kingdom','country_id' => '74'),\narray('id' => '1256','name' => '(DND) - Dundee Airport, Dundee, United Kingdom','country_id' => '74'),\narray('id' => '1257','name' => '(SYY) - Stornoway Airport, Stornoway, United Kingdom','country_id' => '74'),\narray('id' => '1258','name' => '(BRR) - Barra Airport, Eoligarry, United Kingdom','country_id' => '74'),\narray('id' => '1259','name' => '(PSL) - Perth/Scone Airport, Perth, United Kingdom','country_id' => '74'),\narray('id' => '1260','name' => '(TRE) - Tiree Airport, Balemartine, United Kingdom','country_id' => '74'),\narray('id' => '1261','name' => '(UNT) - Unst Airport, Shetland Islands, United Kingdom','country_id' => '74'),\narray('id' => '1262','name' => '(BOL) - Ballykelly Airport, Ballykelly, United Kingdom','country_id' => '74'),\narray('id' => '1263','name' => '(FSS) - RAF Kinloss, Kinloss, United Kingdom','country_id' => '74'),\narray('id' => '1264','name' => '(ADX) - RAF Leuchars, St. Andrews, United Kingdom','country_id' => '74'),\narray('id' => '1265','name' => '(LMO) - RAF Lossiemouth, Lossiemouth, United Kingdom','country_id' => '74'),\narray('id' => '1266','name' => '(CBG) - Cambridge Airport, Cambridge, United Kingdom','country_id' => '74'),\narray('id' => '1267','name' => '(NWI) - Norwich International Airport, Norwich, United Kingdom','country_id' => '74'),\narray('id' => '1268','name' => '(STN) - London Stansted Airport, London, United Kingdom','country_id' => '74'),\narray('id' => '1269','name' => '(QFO) - Duxford Airport, Duxford, United Kingdom','country_id' => '74'),\narray('id' => '1270','name' => '(HYC) - Wycombe Air Park, High Wycombe, United Kingdom','country_id' => '74'),\narray('id' => '1271','name' => '(EXT) - Exeter International Airport, Exeter, United Kingdom','country_id' => '74'),\narray('id' => '1272','name' => '(OXF) - Oxford (Kidlington) Airport, Kidlington, United Kingdom','country_id' => '74'),\narray('id' => '1273','name' => '(RCS) - Rochester Airport, Rochester, United Kingdom','country_id' => '74'),\narray('id' => '1274','name' => '(BEX) - RAF Benson, Benson, United Kingdom','country_id' => '74'),\narray('id' => '1275','name' => '(LKZ) - RAF Lakenheath, Lakenheath, United Kingdom','country_id' => '74'),\narray('id' => '1276','name' => '(MHZ) - RAF Mildenhall, Mildenhall, United Kingdom','country_id' => '74'),\narray('id' => '1277','name' => '(QUY) - RAF Wyton, St. Ives, United Kingdom','country_id' => '74'),\narray('id' => '1278','name' => '(FFD) - RAF Fairford, Fairford, United Kingdom','country_id' => '74'),\narray('id' => '1279','name' => '(BZZ) - RAF Brize Norton, Brize Norton, United Kingdom','country_id' => '74'),\narray('id' => '1280','name' => '(ODH) - RAF Odiham, Odiham, United Kingdom','country_id' => '74'),\narray('id' => '1281','name' => '(WXF) - Wethersfield Airport, Wethersfield, United Kingdom','country_id' => '74'),\narray('id' => '1282','name' => '(NHT) - RAF Northolt, London, United Kingdom','country_id' => '74'),\narray('id' => '1283','name' => '(QCY) - RAF Coningsby, Coningsby, United Kingdom','country_id' => '74'),\narray('id' => '1284','name' => '(BEQ) - RAF Honington, Thetford, United Kingdom','country_id' => '74'),\narray('id' => '1285','name' => '(OKH) - RAF Cottesmore, Cottesmore, United Kingdom','country_id' => '74'),\narray('id' => '1286','name' => '(SQZ) - RAF Scampton, Scampton, United Kingdom','country_id' => '74'),\narray('id' => '1287','name' => '(HRT) - RAF Linton-On-Ouse, Linton-On-Ouse, United Kingdom','country_id' => '74'),\narray('id' => '1288','name' => '(WTN) - RAF Waddington, Waddington, United Kingdom','country_id' => '74'),\narray('id' => '1289','name' => '(KNF) - RAF Marham, Marham, United Kingdom','country_id' => '74'),\narray('id' => '1290','name' => '(MPN) - Mount Pleasant Airport, Mount Pleasant, Falkland Islands','country_id' => '69'),\narray('id' => '1291','name' => '(AMS) - Amsterdam Airport Schiphol, Amsterdam, Netherlands','country_id' => '162'),\narray('id' => '1292','name' => '(MST) - Maastricht Aachen Airport, Maastricht, Netherlands','country_id' => '162'),\narray('id' => '1293','name' => '(QAR) - Deelen Air Base, Arnhem, Netherlands','country_id' => '162'),\narray('id' => '1294','name' => '(EIN) - Eindhoven Airport, Eindhoven, Netherlands','country_id' => '162'),\narray('id' => '1295','name' => '(GRQ) - Eelde Airport, Groningen, Netherlands','country_id' => '162'),\narray('id' => '1296','name' => '(GLZ) - Gilze Rijen Air Base, Breda, Netherlands','country_id' => '162'),\narray('id' => '1297','name' => '(DHR) - De Kooy Airport, Den Helder, Netherlands','country_id' => '162'),\narray('id' => '1298','name' => '(LEY) - Lelystad Airport, Lelystad, Netherlands','country_id' => '162'),\narray('id' => '1299','name' => '(LWR) - Leeuwarden Air Base, Leeuwarden, Netherlands','country_id' => '162'),\narray('id' => '1300','name' => '(RTM) - Rotterdam Airport, Rotterdam, Netherlands','country_id' => '162'),\narray('id' => '1301','name' => '(ENS) - Twenthe Airport, Enschede, Netherlands','country_id' => '162'),\narray('id' => '1302','name' => '(UDE) - Volkel Air Base, Uden, Netherlands','country_id' => '162'),\narray('id' => '1303','name' => '(WOE) - Woensdrecht Air Base, Bergen Op Zoom, Netherlands','country_id' => '162'),\narray('id' => '1304','name' => '(BYT) - Bantry Aerodrome, Bantry, Ireland','country_id' => '98'),\narray('id' => '1305','name' => '(BLY) - Belmullet Aerodrome, Belmullet, Ireland','country_id' => '98'),\narray('id' => '1306','name' => '(NNR) - Connemara Regional Airport, Inverin, Ireland','country_id' => '98'),\narray('id' => '1307','name' => '(CLB) - Castlebar Airport, Castlebar, Ireland','country_id' => '98'),\narray('id' => '1308','name' => '(WEX) - Castlebridge Airport, Wexford, Ireland','country_id' => '98'),\narray('id' => '1309','name' => '(ORK) - Cork Airport, Cork, Ireland','country_id' => '98'),\narray('id' => '1310','name' => '(GWY) - Galway Airport, Galway, Ireland','country_id' => '98'),\narray('id' => '1311','name' => '(CFN) - Donegal Airport, Donegal, Ireland','country_id' => '98'),\narray('id' => '1312','name' => '(DUB) - Dublin Airport, Dublin, Ireland','country_id' => '98'),\narray('id' => '1313','name' => '(IOR) - Inishmore Aerodrome, Inis MAr, Ireland','country_id' => '98'),\narray('id' => '1314','name' => '(INQ) - Inisheer Aerodrome, Inis OArr, Ireland','country_id' => '98'),\narray('id' => '1315','name' => '(KKY) - Kilkenny Airport, Kilkenny, Ireland','country_id' => '98'),\narray('id' => '1316','name' => '(NOC) - Ireland West Knock Airport, Charleston, Ireland','country_id' => '98'),\narray('id' => '1317','name' => '(KIR) - Kerry Airport, Killarney, Ireland','country_id' => '98'),\narray('id' => '1318','name' => '(LTR) - Letterkenny Airport, Letterkenny, Ireland','country_id' => '98'),\narray('id' => '1319','name' => '(IIA) - Inishmaan Aerodrome, Inis MeAin, Ireland','country_id' => '98'),\narray('id' => '1320','name' => '(SNN) - Shannon Airport, Limerick, Ireland','country_id' => '98'),\narray('id' => '1321','name' => '(SXL) - Sligo Airport, Sligo, Ireland','country_id' => '98'),\narray('id' => '1322','name' => '(WAT) - Waterford Airport, Waterford, Ireland','country_id' => '98'),\narray('id' => '1323','name' => '(EJN) - Ejin Banner-Taolai Airport, Ejin Banner, China','country_id' => '45'),\narray('id' => '1324','name' => '(EJT) - Enejit Airport, Enejit Island, Marshall Islands','country_id' => '139'),\narray('id' => '1325','name' => '(AAR) - Aarhus Airport, Aarhus, Denmark','country_id' => '56'),\narray('id' => '1326','name' => '(BLL) - Billund Airport, Billund, Denmark','country_id' => '56'),\narray('id' => '1327','name' => '(CPH) - Copenhagen Kastrup Airport, Copenhagen, Denmark','country_id' => '56'),\narray('id' => '1328','name' => '(EBJ) - Esbjerg Airport, Esbjerg, Denmark','country_id' => '56'),\narray('id' => '1329','name' => '(KRP) - Karup Airport, Karup, Denmark','country_id' => '56'),\narray('id' => '1330','name' => '(BYR) - LAsA Airport, LAsA, Denmark','country_id' => '56'),\narray('id' => '1331','name' => '(MRW) - Lolland Falster Maribo Airport, Lolland Falster / Maribo, Denmark','country_id' => '56'),\narray('id' => '1332','name' => '(ODE) - Odense Airport, Odense, Denmark','country_id' => '56'),\narray('id' => '1333','name' => '(RKE) - Copenhagen Roskilde Airport, Copenhagen, Denmark','country_id' => '56'),\narray('id' => '1334','name' => '(RNN) - Bornholm Airport, RAnne, Denmark','country_id' => '56'),\narray('id' => '1335','name' => '(SGD) - SAnderborg Airport, SAnderborg, Denmark','country_id' => '56'),\narray('id' => '1336','name' => '(CNL) - Sindal Airport, Sindal, Denmark','country_id' => '56'),\narray('id' => '1337','name' => '(SKS) - Skrydstrup Air Base, Vojens, Denmark','country_id' => '56'),\narray('id' => '1338','name' => '(SQW) - Skive Airport, Skive, Denmark','country_id' => '56'),\narray('id' => '1339','name' => '(TED) - Thisted Airport, Thisted, Denmark','country_id' => '56'),\narray('id' => '1340','name' => '(FAE) - Vagar Airport, Vagar, Faroe Islands','country_id' => '71'),\narray('id' => '1341','name' => '(STA) - Stauning Airport, Skjern / RingkAbing, Denmark','country_id' => '56'),\narray('id' => '1342','name' => '(AAL) - Aalborg Airport, Aalborg, Denmark','country_id' => '56'),\narray('id' => '1343','name' => '(LUX) - Luxembourg-Findel International Airport, Luxembourg, Luxembourg','country_id' => '130'),\narray('id' => '1344','name' => '(AES) - Alesund Airport, Alesund, Norway','country_id' => '163'),\narray('id' => '1345','name' => '(ANX) - AndAya Airport, Andenes, Norway','country_id' => '163'),\narray('id' => '1346','name' => '(ALF) - Alta Airport, Alta, Norway','country_id' => '163'),\narray('id' => '1347','name' => '(FDE) - FArde Airport, FArde, Norway','country_id' => '163'),\narray('id' => '1348','name' => '(BNN) - BrAnnAysund Airport, BrAnnAy, Norway','country_id' => '163'),\narray('id' => '1349','name' => '(BOO) - BodA Airport, BodA, Norway','country_id' => '163'),\narray('id' => '1350','name' => '(BGO) - Bergen Airport Flesland, Bergen, Norway','country_id' => '163'),\narray('id' => '1351','name' => '(BJF) - BAtsfjord Airport, BAtsfjord, Norway','country_id' => '163'),\narray('id' => '1352','name' => '(BVG) - BerlevAg Airport, BerlevAg, Norway','country_id' => '163'),\narray('id' => '1353','name' => '(KRS) - Kristiansand Airport, Kjevik, Norway','country_id' => '163'),\narray('id' => '1354','name' => '(DLD) - Geilo Airport Dagali, Dagali, Norway','country_id' => '163'),\narray('id' => '1355','name' => '(BDU) - Bardufoss Airport, MAlselv, Norway','country_id' => '163'),\narray('id' => '1356','name' => '(EVE) - Harstad/Narvik Airport, Evenes, Evenes, Norway','country_id' => '163'),\narray('id' => '1357','name' => '(VDB) - Leirin Airport, , Norway','country_id' => '163'),\narray('id' => '1358','name' => '(FRO) - FlorA Airport, FlorA, Norway','country_id' => '163'),\narray('id' => '1359','name' => '(OSL) - Oslo Gardermoen Airport, Oslo, Norway','country_id' => '163'),\narray('id' => '1360','name' => '(HMR) - Stafsberg Airport, Hamar, Norway','country_id' => '163'),\narray('id' => '1361','name' => '(HAU) - Haugesund Airport, KarmAy, Norway','country_id' => '163'),\narray('id' => '1362','name' => '(HFT) - Hammerfest Airport, Hammerfest, Norway','country_id' => '163'),\narray('id' => '1363','name' => '(HAA) - Hasvik Airport, Hasvik, Norway','country_id' => '163'),\narray('id' => '1364','name' => '(HVG) - Valan Airport, HonningsvAg, Norway','country_id' => '163'),\narray('id' => '1365','name' => '(QKX) - Kautokeino Air Base, , Norway','country_id' => '163'),\narray('id' => '1366','name' => '(KSU) - Kristiansund Airport (Kvernberget), Kvernberget, Norway','country_id' => '163'),\narray('id' => '1367','name' => '(GLL) - Gol Airport, Klanten, Norway','country_id' => '163'),\narray('id' => '1368','name' => '(KKN) - Kirkenes Airport (HAybuktmoen), Kirkenes, Norway','country_id' => '163'),\narray('id' => '1369','name' => '(FAN) - Lista Airport, Farsund, Norway','country_id' => '163'),\narray('id' => '1370','name' => '(LKN) - Leknes Airport, Leknes, Norway','country_id' => '163'),\narray('id' => '1371','name' => '(MEH) - Mehamn Airport, Mehamn, Norway','country_id' => '163'),\narray('id' => '1372','name' => '(MOL) - Molde Airport, ArA, Norway','country_id' => '163'),\narray('id' => '1373','name' => '(MJF) - MosjAen Airport (KjArstad), , Norway','country_id' => '163'),\narray('id' => '1374','name' => '(LKL) - Banak Airport, Lakselv, Norway','country_id' => '163'),\narray('id' => '1375','name' => '(NVK) - Narvik Framnes Airport, Narvik, Norway','country_id' => '163'),\narray('id' => '1376','name' => '(OSY) - Namsos HAknesAra Airport, Namsos, Norway','country_id' => '163'),\narray('id' => '1377','name' => '(NTB) - Notodden Airport, Notodden, Norway','country_id' => '163'),\narray('id' => '1378','name' => '(OLA) - Arland Airport, Arland, Norway','country_id' => '163'),\narray('id' => '1379','name' => '(HOV) - Arsta-Volda Airport, Hovden, Arsta, Norway','country_id' => '163'),\narray('id' => '1380','name' => '(MQN) - Mo i Rana Airport, RAssvoll, Mo i Rana, Norway','country_id' => '163'),\narray('id' => '1381','name' => '(RVK) - RArvik Airport, Ryum, RArvik, Norway','country_id' => '163'),\narray('id' => '1382','name' => '(RRS) - RAros Airport, RAros, Norway','country_id' => '163'),\narray('id' => '1383','name' => '(RET) - RAst Airport, , Norway','country_id' => '163'),\narray('id' => '1384','name' => '(RYG) - Moss-Rygge Airport, Oslo, Norway','country_id' => '163'),\narray('id' => '1385','name' => '(LYR) - Svalbard Airport, Longyear, Longyearbyen, Norway','country_id' => '163'),\narray('id' => '1386','name' => '(SDN) - Sandane Airport (Anda), Sandane, Norway','country_id' => '163'),\narray('id' => '1387','name' => '(SOG) - Sogndal Airport, Sogndal, Norway','country_id' => '163'),\narray('id' => '1388','name' => '(SVJ) - SvolvAr Helle Airport, SvolvAr, Norway','country_id' => '163'),\narray('id' => '1389','name' => '(SKN) - Stokmarknes Skagen Airport, Hadsel, Norway','country_id' => '163'),\narray('id' => '1390','name' => '(SKE) - Skien Airport, Geiteryggen, Norway','country_id' => '163'),\narray('id' => '1391','name' => '(SRP) - Stord Airport, Leirvik, Norway','country_id' => '163'),\narray('id' => '1392','name' => '(SOJ) - SArkjosen Airport, SArkjosen, Norway','country_id' => '163'),\narray('id' => '1393','name' => '(VAW) - VardA Airport, Svartnes, VardA, Norway','country_id' => '163'),\narray('id' => '1394','name' => '(SSJ) - SandnessjAen Airport (Stokka), Alstahaug, Norway','country_id' => '163'),\narray('id' => '1395','name' => '(TOS) - TromsA Airport, TromsA, Norway','country_id' => '163'),\narray('id' => '1396','name' => '(TRF) - Sandefjord Airport, Torp, Torp, Norway','country_id' => '163'),\narray('id' => '1397','name' => '(TRD) - Trondheim Airport VArnes, Trondheim, Norway','country_id' => '163'),\narray('id' => '1398','name' => '(VDS) - VadsA Airport, VadsA, Norway','country_id' => '163'),\narray('id' => '1399','name' => '(SVG) - Stavanger Airport Sola, Stavanger, Norway','country_id' => '163'),\narray('id' => '1400','name' => '(QYY) - Bia\\'ystok-Krywlany Airport, Bia\\'ystok, Poland','country_id' => '175'),\narray('id' => '1401','name' => '(BXP) - Bia\\'a Podlaska Airport, Bia\\'a Podlaska, Poland','country_id' => '175'),\narray('id' => '1402','name' => '(BZG) - Bydgoszcz Ignacy Jan Paderewski Airport, Bydgoszcz, Poland','country_id' => '175'),\narray('id' => '1403','name' => '(CZW) - CzAstochowa-Rudniki, CzAstochowa, Poland','country_id' => '175'),\narray('id' => '1404','name' => '(GDN) - Gda\"sk Lech Wa\\'Asa Airport, Gda\"sk, Poland','country_id' => '175'),\narray('id' => '1405','name' => '(QLC) - Gliwice Glider Airport, , Poland','country_id' => '175'),\narray('id' => '1406','name' => '(KRK) - John Paul II International Airport KrakAw-Balice Airport, KrakAw, Poland','country_id' => '175'),\narray('id' => '1407','name' => '(OSZ) - Koszalin Zegrze Airport, , Poland','country_id' => '175'),\narray('id' => '1408','name' => '(KTW) - Katowice International Airport, Katowice, Poland','country_id' => '175'),\narray('id' => '1409','name' => '(QEO) - Bielsko-Bialo Kaniow Airfield, Czechowice-Dziedzice, Poland','country_id' => '175'),\narray('id' => '1410','name' => '(LCJ) - Ado W\\'adys\\'aw Reymont Airport, Ado, Poland','country_id' => '175'),\narray('id' => '1411','name' => '(QLU) - Lublin Radwiec Airport, , Poland','country_id' => '175'),\narray('id' => '1412','name' => '(WMI) - Modlin Airport, Warsaw, Poland','country_id' => '175'),\narray('id' => '1413','name' => '(QWS) - Nowy Targ Airport, Nowy Targ, Poland','country_id' => '175'),\narray('id' => '1414','name' => '(QYD) - Oksywie Military Air Base, Gdynia, Poland','country_id' => '175'),\narray('id' => '1415','name' => '(QPM) - Opole-Polska Nowa Wie\\' Airport, Opole, Poland','country_id' => '175'),\narray('id' => '1416','name' => '(POZ) - Pozna\"-awica Airport, Pozna\", Poland','country_id' => '175'),\narray('id' => '1417','name' => '(RDO) - Radom Airport, Radom, Poland','country_id' => '175'),\narray('id' => '1418','name' => '(RZE) - RzeszAw-Jasionka Airport, RzeszAw, Poland','country_id' => '175'),\narray('id' => '1419','name' => '(SZZ) - Szczecin-GoleniAw \"Solidarno\\'A\" Airport, Goleniow, Poland','country_id' => '175'),\narray('id' => '1420','name' => '(WAW) - Warsaw Chopin Airport, Warsaw, Poland','country_id' => '175'),\narray('id' => '1421','name' => '(WRO) - Copernicus Wroc\\'aw Airport, Wroc\\'aw, Poland','country_id' => '175'),\narray('id' => '1422','name' => '(IEG) - Zielona GAra-Babimost Airport, Babimost, Poland','country_id' => '175'),\narray('id' => '1423','name' => '(ERT) - Erdenet Airport, Erdenet, Mongolia','country_id' => '143'),\narray('id' => '1424','name' => '(RNB) - Ronneby Airport, , Sweden','country_id' => '193'),\narray('id' => '1425','name' => '(XWP) - HAssleholm Bokeberg Airport, HAssleholm, Sweden','country_id' => '193'),\narray('id' => '1426','name' => '(GOT) - Gothenburg-Landvetter Airport, Gothenburg, Sweden','country_id' => '193'),\narray('id' => '1427','name' => '(JKG) - JAnkAping Airport, JAnkAping, Sweden','country_id' => '193'),\narray('id' => '1428','name' => '(GSE) - Gothenburg City Airport, Gothenburg, Sweden','country_id' => '193'),\narray('id' => '1429','name' => '(KVB) - SkAvde Airport, SkAvde, Sweden','country_id' => '193'),\narray('id' => '1430','name' => '(THN) - TrollhAttan-VAnersborg Airport, TrollhAttan, Sweden','country_id' => '193'),\narray('id' => '1431','name' => '(KSK) - Karlskoga Airport, , Sweden','country_id' => '193'),\narray('id' => '1432','name' => '(MXX) - Mora Airport, , Sweden','country_id' => '193'),\narray('id' => '1433','name' => '(NYO) - Stockholm Skavsta Airport, Stockholm / NykAping, Sweden','country_id' => '193'),\narray('id' => '1434','name' => '(KID) - Kristianstad Airport, Kristianstad, Sweden','country_id' => '193'),\narray('id' => '1435','name' => '(OSK) - Oskarshamn Airport, , Sweden','country_id' => '193'),\narray('id' => '1436','name' => '(KLR) - Kalmar Airport, , Sweden','country_id' => '193'),\narray('id' => '1437','name' => '(MMX) - MalmA Sturup Airport, MalmA, Sweden','country_id' => '193'),\narray('id' => '1438','name' => '(HAD) - Halmstad Airport, Halmstad, Sweden','country_id' => '193'),\narray('id' => '1439','name' => '(VXO) - VAxjA Kronoberg Airport, VAxjA, Sweden','country_id' => '193'),\narray('id' => '1440','name' => '(EVG) - Sveg Airport, , Sweden','country_id' => '193'),\narray('id' => '1441','name' => '(GEV) - GAllivare Airport, GAllivare, Sweden','country_id' => '193'),\narray('id' => '1442','name' => '(KRF) - Kramfors SollefteA Airport, Kramfors / SollefteA, Sweden','country_id' => '193'),\narray('id' => '1443','name' => '(LYC) - Lycksele Airport, , Sweden','country_id' => '193'),\narray('id' => '1444','name' => '(SDL) - Sundsvall-HArnAsand Airport, Sundsvall/ HArnAsand, Sweden','country_id' => '193'),\narray('id' => '1445','name' => '(OER) - A-rnskAldsvik Airport, A-rnskAldsvik, Sweden','country_id' => '193'),\narray('id' => '1446','name' => '(KRN) - Kiruna Airport, Kiruna, Sweden','country_id' => '193'),\narray('id' => '1447','name' => '(SFT) - SkellefteA Airport, SkellefteA, Sweden','country_id' => '193'),\narray('id' => '1448','name' => '(UME) - UmeA Airport, UmeA, Sweden','country_id' => '193'),\narray('id' => '1449','name' => '(VHM) - Vilhelmina Airport, , Sweden','country_id' => '193'),\narray('id' => '1450','name' => '(AJR) - Arvidsjaur Airport, Arvidsjaur, Sweden','country_id' => '193'),\narray('id' => '1451','name' => '(SOO) - SAderhamn Airport, SAderhamn, Sweden','country_id' => '193'),\narray('id' => '1452','name' => '(OSD) - Are A-stersund Airport, A-stersund, Sweden','country_id' => '193'),\narray('id' => '1453','name' => '(ORB) - A-rebro Airport, A-rebro, Sweden','country_id' => '193'),\narray('id' => '1454','name' => '(HFS) - Hagfors Airport, , Sweden','country_id' => '193'),\narray('id' => '1455','name' => '(KSD) - Karlstad Airport, Karlstad, Sweden','country_id' => '193'),\narray('id' => '1456','name' => '(VST) - Stockholm VAsterAs Airport, Stockholm / VAsterAs, Sweden','country_id' => '193'),\narray('id' => '1457','name' => '(LLA) - LuleA Airport, LuleA, Sweden','country_id' => '193'),\narray('id' => '1458','name' => '(ARN) - Stockholm-Arlanda Airport, Stockholm, Sweden','country_id' => '193'),\narray('id' => '1459','name' => '(BMA) - Stockholm-Bromma Airport, Stockholm, Sweden','country_id' => '193'),\narray('id' => '1460','name' => '(BLE) - Borlange Airport, , Sweden','country_id' => '193'),\narray('id' => '1461','name' => '(HLF) - Hultsfred Airport, , Sweden','country_id' => '193'),\narray('id' => '1462','name' => '(GVX) - GAvle Sandviken Airport, GAvle / Sandviken, Sweden','country_id' => '193'),\narray('id' => '1463','name' => '(LPI) - LinkAping City Airport, LinkAping, Sweden','country_id' => '193'),\narray('id' => '1464','name' => '(NRK) - NorrkAping Airport, NorrkAping, Sweden','country_id' => '193'),\narray('id' => '1465','name' => '(TYF) - Torsby Airport, , Sweden','country_id' => '193'),\narray('id' => '1466','name' => '(EKT) - Eskilstuna Airport, Eskilstuna, Sweden','country_id' => '193'),\narray('id' => '1467','name' => '(VBY) - Visby Airport, Visby, Sweden','country_id' => '193'),\narray('id' => '1468','name' => '(VVK) - VAstervik Airport, VAstervik, Sweden','country_id' => '193'),\narray('id' => '1469','name' => '(AGH) - A\"ngelholm-Helsingborg Airport, A\"ngelholm, Sweden','country_id' => '193'),\narray('id' => '1470','name' => '(SQO) - Storuman Airport, , Sweden','country_id' => '193'),\narray('id' => '1471','name' => '(IDB) - Idre Airport, Idre, Sweden','country_id' => '193'),\narray('id' => '1472','name' => '(PJA) - Pajala Airport, , Sweden','country_id' => '193'),\narray('id' => '1473','name' => '(HMV) - Hemavan Airport, , Sweden','country_id' => '193'),\narray('id' => '1474','name' => '(GLC) - Geladi Airport, Geladi, Ethiopia','country_id' => '66'),\narray('id' => '1475','name' => '(SHC) - Shire Inda Selassie Airport, Shire Indasilase, Ethiopia','country_id' => '66'),\narray('id' => '1476','name' => '(SPM) - Spangdahlem Air Base, Trier, Germany','country_id' => '54'),\narray('id' => '1477','name' => '(RMS) - Ramstein Air Base, Ramstein, Germany','country_id' => '54'),\narray('id' => '1478','name' => '(ZCN) - Celle Airport, , Germany','country_id' => '54'),\narray('id' => '1479','name' => '(ZPQ) - Rheine Bentlage Airport, , Germany','country_id' => '54'),\narray('id' => '1480','name' => '(FRZ) - Fritzlar Airport, Fritzlar, Germany','country_id' => '54'),\narray('id' => '1481','name' => '(ZNF) - Hanau Army Air Field, , Germany','country_id' => '54'),\narray('id' => '1482','name' => '(FCN) - Nordholz Naval Airbase, Cuxhaven, Germany','country_id' => '54'),\narray('id' => '1483','name' => '(GKE) - Geilenkirchen Airport, , Germany','country_id' => '54'),\narray('id' => '1484','name' => '(RLG) - Rostock-Laage Airport, Rostock, Germany','country_id' => '54'),\narray('id' => '1485','name' => '(QOE) - NArvenich Air Base, , Germany','country_id' => '54'),\narray('id' => '1486','name' => '(WBG) - Schleswig Airport, , Germany','country_id' => '54'),\narray('id' => '1487','name' => '(WIE) - Wiesbaden Army Airfield, Wiesbaden, Germany','country_id' => '54'),\narray('id' => '1488','name' => '(FEL) - FArstenfeldbruck Airport, FArstenfeldbruck, Germany','country_id' => '54'),\narray('id' => '1489','name' => '(IGS) - Ingolstadt Manching Airport, Manching, Germany','country_id' => '54'),\narray('id' => '1490','name' => '(GUT) - GAtersloh Air Base, GAtersloh, Germany','country_id' => '54'),\narray('id' => '1491','name' => '(DGP) - Daugavpils Intrenational Airport, Daugavpils, Latvia','country_id' => '131'),\narray('id' => '1492','name' => '(LPX) - LiepAja International Airport, LiepAja, Latvia','country_id' => '131'),\narray('id' => '1493','name' => '(RIX) - Riga International Airport, Riga, Latvia','country_id' => '131'),\narray('id' => '1494','name' => '(VNT) - Ventspils International Airport, Ventspils, Latvia','country_id' => '131'),\narray('id' => '1495','name' => '(KUN) - Kaunas International Airport, Kaunas, Lithuania','country_id' => '129'),\narray('id' => '1496','name' => '(KLJ) - KlaipAda Airport, KlaipAda, Lithuania','country_id' => '129'),\narray('id' => '1497','name' => '(PLQ) - Palanga International Airport, Palanga, Lithuania','country_id' => '129'),\narray('id' => '1498','name' => '(PNV) - PanevAys Air Base, PanevAys, Lithuania','country_id' => '129'),\narray('id' => '1499','name' => '(SQQ) - iauliai International Airport, iauliai, Lithuania','country_id' => '129'),\narray('id' => '1500','name' => '(HLJ) - Barysiai Airport, Barysiai, Lithuania','country_id' => '129'),\narray('id' => '1501','name' => '(VNO) - Vilnius International Airport, Vilnius, Lithuania','country_id' => '129'),\narray('id' => '1502','name' => '(RGR) - Ranger Municipal Airport, Ranger, United States','country_id' => '228'),\narray('id' => '1503','name' => '(ALJ) - Alexander Bay Airport, Alexander Bay, South Africa','country_id' => '243'),\narray('id' => '1504','name' => '(AGZ) - Aggeneys Airport, Aggeneys, South Africa','country_id' => '243'),\narray('id' => '1505','name' => '(ADY) - Alldays Airport, Alldays, South Africa','country_id' => '243'),\narray('id' => '1506','name' => '(BIY) - Bisho Airport, Bisho, South Africa','country_id' => '243'),\narray('id' => '1507','name' => '(BFN) - Bram Fischer International Airport, Bloemfontain, South Africa','country_id' => '243'),\narray('id' => '1508','name' => '(UTE) - Bultfontein Airport, Bultfontein, South Africa','country_id' => '243'),\narray('id' => '1509','name' => '(CDO) - Cradock Airport, Cradock, South Africa','country_id' => '243'),\narray('id' => '1510','name' => '(CPT) - Cape Town International Airport, Cape Town, South Africa','country_id' => '243'),\narray('id' => '1511','name' => '(DUK) - Mubatuba Airport, Mubatuba, South Africa','country_id' => '243'),\narray('id' => '1512','name' => '(PZL) - Zulu Inyala Airport, Phinda, South Africa','country_id' => '243'),\narray('id' => '1513','name' => '(ELS) - Ben Schoeman Airport, East London, South Africa','country_id' => '243'),\narray('id' => '1514','name' => '(EMG) - Empangeni Airport, Empangeni, South Africa','country_id' => '243'),\narray('id' => '1515','name' => '(ELL) - Ellisras Matimba Airport, Ellisras, South Africa','country_id' => '243'),\narray('id' => '1516','name' => '(FCB) - Ficksburg Sentraoes Airport, Ficksburg, South Africa','country_id' => '243'),\narray('id' => '1517','name' => '(GCJ) - Grand Central Airport, Midrand, South Africa','country_id' => '243'),\narray('id' => '1518','name' => '(GRJ) - George Airport, George, South Africa','country_id' => '243'),\narray('id' => '1519','name' => '(GIY) - Giyani Airport, Giyani, South Africa','country_id' => '243'),\narray('id' => '1520','name' => '(QRA) - Rand Airport, Johannesburg, South Africa','country_id' => '243'),\narray('id' => '1521','name' => '(HLW) - Hluhluwe Airport, Hluhluwe, South Africa','country_id' => '243'),\narray('id' => '1522','name' => '(HRS) - Harrismith Airport, Harrismith, South Africa','country_id' => '243'),\narray('id' => '1523','name' => '(HDS) - Hoedspruit Air Force Base Airport, Hoedspruit, South Africa','country_id' => '243'),\narray('id' => '1524','name' => '(JNB) - OR Tambo International Airport, Johannesburg, South Africa','country_id' => '243'),\narray('id' => '1525','name' => '(KXE) - P C Pelser Airport, Klerksdorp, South Africa','country_id' => '243'),\narray('id' => '1526','name' => '(KIM) - Kimberley Airport, Kimberley, South Africa','country_id' => '243'),\narray('id' => '1527','name' => '(MQP) - Kruger Mpumalanga International Airport, Mpumalanga, South Africa','country_id' => '243'),\narray('id' => '1528','name' => '(KOF) - Komatipoort Airport, Komatipoort, South Africa','country_id' => '243'),\narray('id' => '1529','name' => '(KMH) - Johan Pienaar Airport, Kuruman, South Africa','country_id' => '243'),\narray('id' => '1530','name' => '(KLZ) - Kleinsee Airport, Kleinsee, South Africa','country_id' => '243'),\narray('id' => '1531','name' => '(HLA) - Lanseria Airport, Johannesburg, South Africa','country_id' => '243'),\narray('id' => '1532','name' => '(LMR) - Lime Acres Finsch Mine Airport, Lime Acres, South Africa','country_id' => '243'),\narray('id' => '1533','name' => '(LDZ) - Londolozi Airport, Londolozi, South Africa','country_id' => '243'),\narray('id' => '1534','name' => '(DUR) - King Shaka International Airport, Durban, South Africa','country_id' => '243'),\narray('id' => '1535','name' => '(LUJ) - Lusikisiki Airport, Lusikisiki, South Africa','country_id' => '243'),\narray('id' => '1536','name' => '(LCD) - Louis Trichardt Airport, Louis Trichardt, South Africa','country_id' => '243'),\narray('id' => '1537','name' => '(SDB) - Langebaanweg Airport, Langebaanweg, South Africa','country_id' => '243'),\narray('id' => '1538','name' => '(LAY) - Ladysmith Airport, Ladysmith, South Africa','country_id' => '243'),\narray('id' => '1539','name' => '(AAM) - Malamala Airport, Malamala, South Africa','country_id' => '243'),\narray('id' => '1540','name' => '(MGH) - Margate Airport, Margate, South Africa','country_id' => '243'),\narray('id' => '1541','name' => '(MEZ) - Musina(Messina) Airport, Musina, South Africa','country_id' => '243'),\narray('id' => '1542','name' => '(MBD) - Mmabatho International Airport, Mafeking, South Africa','country_id' => '243'),\narray('id' => '1543','name' => '(LLE) - Riverside Airport, Malelane, South Africa','country_id' => '243'),\narray('id' => '1544','name' => '(MZY) - Mossel Bay Airport, Mossel Bay, South Africa','country_id' => '243'),\narray('id' => '1545','name' => '(MZQ) - Mkuze Airport, Mkuze, South Africa','country_id' => '243'),\narray('id' => '1546','name' => '(NCS) - Newcastle Airport, Newcastle, South Africa','country_id' => '243'),\narray('id' => '1547','name' => '(NGL) - Ngala Airport, Ngala, South Africa','country_id' => '243'),\narray('id' => '1548','name' => '(NLP) - Nelspruit Airport, Nelspruit, South Africa','country_id' => '243'),\narray('id' => '1549','name' => '(OVG) - Overberg Airport, Overberg, South Africa','country_id' => '243'),\narray('id' => '1550','name' => '(OUH) - Oudtshoorn Airport, Oudtshoorn, South Africa','country_id' => '243'),\narray('id' => '1551','name' => '(AFD) - Port Alfred Airport, Port Alfred, South Africa','country_id' => '243'),\narray('id' => '1552','name' => '(PLZ) - Port Elizabeth Airport, Port Elizabeth, South Africa','country_id' => '243'),\narray('id' => '1553','name' => '(PBZ) - Plettenberg Bay Airport, Plettenberg Bay, South Africa','country_id' => '243'),\narray('id' => '1554','name' => '(PHW) - Hendrik Van Eck Airport, Phalaborwa, South Africa','country_id' => '243'),\narray('id' => '1555','name' => '(JOH) - Port St Johns Airport, Port St Johns, South Africa','country_id' => '243'),\narray('id' => '1556','name' => '(PRK) - Prieska Airport, Prieska, South Africa','country_id' => '243'),\narray('id' => '1557','name' => '(PZB) - Pietermaritzburg Airport, Pietermaritzburg, South Africa','country_id' => '243'),\narray('id' => '1558','name' => '(NTY) - Pilanesberg International Airport, Pilanesberg, South Africa','country_id' => '243'),\narray('id' => '1559','name' => '(PTG) - Polokwane International Airport, Polokwane, South Africa','country_id' => '243'),\narray('id' => '1560','name' => '(PCF) - Potchefstroom Airport, Potchefstroom, South Africa','country_id' => '243'),\narray('id' => '1561','name' => '(UTW) - Queenstown Airport, Queenstown, South Africa','country_id' => '243'),\narray('id' => '1562','name' => '(RCB) - Richards Bay Airport, Richards Bay, South Africa','country_id' => '243'),\narray('id' => '1563','name' => '(RVO) - Reivilo Airport, Reivilo, South Africa','country_id' => '243'),\narray('id' => '1564','name' => '(ROD) - Robertson Airport, Robertson, South Africa','country_id' => '243'),\narray('id' => '1565','name' => '(SBU) - Springbok Airport, Springbok, South Africa','country_id' => '243'),\narray('id' => '1566','name' => '(ZEC) - Secunda Airport, Secunda, South Africa','country_id' => '243'),\narray('id' => '1567','name' => '(GSS) - Sabi Sabi Airport, Belfast, South Africa','country_id' => '243'),\narray('id' => '1568','name' => '(SIS) - Sishen Airport, Sishen, South Africa','country_id' => '243'),\narray('id' => '1569','name' => '(SZK) - Skukuza Airport, Skukuza, South Africa','country_id' => '243'),\narray('id' => '1570','name' => '(THY) - Thohoyandou Airport, Thohoyandou, South Africa','country_id' => '243'),\narray('id' => '1571','name' => '(TCU) - Thaba Nchu Tar Airport, Homeward, South Africa','country_id' => '243'),\narray('id' => '1572','name' => '(LTA) - Tzaneen Airport, Tzaneen, South Africa','country_id' => '243'),\narray('id' => '1573','name' => '(ULD) - Prince Mangosuthu Buthelezi Airport, Ulundi, South Africa','country_id' => '243'),\narray('id' => '1574','name' => '(UTN) - Pierre Van Ryneveld Airport, Upington, South Africa','country_id' => '243'),\narray('id' => '1575','name' => '(UTT) - K. D. Matanzima Airport, Mthatha, South Africa','country_id' => '243'),\narray('id' => '1576','name' => '(VRU) - Vryburg Airport, Vyrburg, South Africa','country_id' => '243'),\narray('id' => '1577','name' => '(VIR) - Virginia Airport, Durban, South Africa','country_id' => '243'),\narray('id' => '1578','name' => '(VRE) - Vredendal Airport, Vredendal, South Africa','country_id' => '243'),\narray('id' => '1579','name' => '(VYD) - Vryheid Airport, Vryheid, South Africa','country_id' => '243'),\narray('id' => '1580','name' => '(PRY) - Wonderboom Airport, Pretoria, South Africa','country_id' => '243'),\narray('id' => '1581','name' => '(WKF) - Waterkloof Air Force Base, Pretoria, South Africa','country_id' => '243'),\narray('id' => '1582','name' => '(FRW) - Francistown Airport, Francistown, Botswana','country_id' => '32'),\narray('id' => '1583','name' => '(GNZ) - Ghanzi Airport, Ghanzi, Botswana','country_id' => '32'),\narray('id' => '1584','name' => '(JWA) - Jwaneng Airport, , Botswana','country_id' => '32'),\narray('id' => '1585','name' => '(BBK) - Kasane Airport, Kasane, Botswana','country_id' => '32'),\narray('id' => '1586','name' => '(KHW) - Khwai River Lodge Airport, Khwai River Lodge, Botswana','country_id' => '32'),\narray('id' => '1587','name' => '(LOQ) - Lobatse Airport, Lobatse, Botswana','country_id' => '32'),\narray('id' => '1588','name' => '(MUB) - Maun Airport, Maun, Botswana','country_id' => '32'),\narray('id' => '1589','name' => '(ORP) - Orapa Airport, , Botswana','country_id' => '32'),\narray('id' => '1590','name' => '(QPH) - Palapye Airport, Palapye, Botswana','country_id' => '32'),\narray('id' => '1591','name' => '(GBE) - Sir Seretse Khama International Airport, Gaborone, Botswana','country_id' => '32'),\narray('id' => '1592','name' => '(SXN) - Sua Pan Airport, Sowa, Botswana','country_id' => '32'),\narray('id' => '1593','name' => '(PKW) - Selebi Phikwe Airport, , Botswana','country_id' => '32'),\narray('id' => '1594','name' => '(SVT) - Savuti Airport, Savuti, Botswana','country_id' => '32'),\narray('id' => '1595','name' => '(SWX) - Shakawe Airport, Shakawe, Botswana','country_id' => '32'),\narray('id' => '1596','name' => '(TLD) - Limpopo Valley Airport, Tuli Lodge, Botswana','country_id' => '32'),\narray('id' => '1597','name' => '(TBY) - Tshabong Airport, Tshabong, Botswana','country_id' => '32'),\narray('id' => '1598','name' => '(BZV) - Maya-Maya Airport, Brazzaville, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1599','name' => '(DJM) - Djambala Airport, Djambala, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1600','name' => '(KNJ) - Kindamba Airport, Kindamba, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1601','name' => '(LCO) - Lague Airport, Lague, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1602','name' => '(MUY) - Mouyondzi Airport, Mouyondzi, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1603','name' => '(SIB) - Sibiti Airport, Sibiti, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1604','name' => '(NKY) - Yokangassi Airport, Nkayi, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1605','name' => '(ANJ) - Zanaga Airport, Zanaga, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1606','name' => '(MSX) - Mossendjo Airport, Mossendjo, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1607','name' => '(BOE) - Boundji Airport, Boundji, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1608','name' => '(EWO) - Ewo Airport, Ewo, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1609','name' => '(GMM) - Gamboma Airport, Gamboma, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1610','name' => '(ION) - Impfondo Airport, Impfondo, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1611','name' => '(KEE) - Kelle Airport, Kelle, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1612','name' => '(MKJ) - Makoua Airport, Makoua, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1613','name' => '(FTX) - Owando Airport, Owando, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1614','name' => '(SOE) - Souanke Airport, Souanke, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1615','name' => '(BTB) - Betou Airport, Betou, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1616','name' => '(OUE) - Ouesso Airport, , Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1617','name' => '(KMK) - Makabana Airport, Makabana, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1618','name' => '(DIS) - Ngot Nzoungou Airport, Dolisie, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1619','name' => '(PNR) - Pointe Noire Airport, Pointe Noire, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '1620','name' => '(MTS) - Matsapha Airport, Manzini, Swaziland','country_id' => '208'),\narray('id' => '1621','name' => '(FEA) - Fetlar Airport, Fetlar Island, United Kingdom','country_id' => '74'),\narray('id' => '1622','name' => '(CRF) - Carnot Airport, Carnot, Central African Republic','country_id' => '38'),\narray('id' => '1623','name' => '(BGF) - Bangui M\\'Poko International Airport, Bangui, Central African Republic','country_id' => '38'),\narray('id' => '1624','name' => '(BGU) - Bangassou Airport, Bangassou, Central African Republic','country_id' => '38'),\narray('id' => '1625','name' => '(IRO) - Birao Airport, Birao, Central African Republic','country_id' => '38'),\narray('id' => '1626','name' => '(BEM) - BossembAlA Airport, BossembAlA, Central African Republic','country_id' => '38'),\narray('id' => '1627','name' => '(BBY) - Bambari Airport, Bambari, Central African Republic','country_id' => '38'),\narray('id' => '1628','name' => '(NDL) - N\\'DAlA Airport, N\\'DAlA, Central African Republic','country_id' => '38'),\narray('id' => '1629','name' => '(BOP) - Bouar Airport, Bouar, Central African Republic','country_id' => '38'),\narray('id' => '1630','name' => '(BIV) - Bria Airport, Bria, Central African Republic','country_id' => '38'),\narray('id' => '1631','name' => '(BSN) - Bossangoa Airport, Bossangoa, Central African Republic','country_id' => '38'),\narray('id' => '1632','name' => '(BBT) - BerbArati Airport, BerbArati, Central African Republic','country_id' => '38'),\narray('id' => '1633','name' => '(ODA) - Ouadda Airport, Ouadda, Central African Republic','country_id' => '38'),\narray('id' => '1634','name' => '(AIG) - Yalinga Airport, Yalinga, Central African Republic','country_id' => '38'),\narray('id' => '1635','name' => '(IMO) - Zemio Airport, Zemio, Central African Republic','country_id' => '38'),\narray('id' => '1636','name' => '(MKI) - M\\'Boki Airport, Mboki, Central African Republic','country_id' => '38'),\narray('id' => '1637','name' => '(BTG) - Batangafo Airport, Batangafo, Central African Republic','country_id' => '38'),\narray('id' => '1638','name' => '(GDI) - Gordil Airport, Melle, Central African Republic','country_id' => '38'),\narray('id' => '1639','name' => '(BMF) - Bakouma Airport, Bakouma, Central African Republic','country_id' => '38'),\narray('id' => '1640','name' => '(ODJ) - Ouanda DjallA Airport, Ouanda DjallA, Central African Republic','country_id' => '38'),\narray('id' => '1641','name' => '(RFA) - RafaA Airport, RafaA, Central African Republic','country_id' => '38'),\narray('id' => '1642','name' => '(BCF) - Bouca Airport, Bouca, Central African Republic','country_id' => '38'),\narray('id' => '1643','name' => '(BOZ) - Bozoum Airport, Bozoum, Central African Republic','country_id' => '38'),\narray('id' => '1644','name' => '(NBN) - AnnobAn Airport, San Antonio de PalA, Equatorial Guinea','country_id' => '85'),\narray('id' => '1645','name' => '(BSG) - Bata Airport, , Equatorial Guinea','country_id' => '85'),\narray('id' => '1646','name' => '(GEM) - President Obiang Nguema International Airport, MengomeyAn, Equatorial Guinea','country_id' => '85'),\narray('id' => '1647','name' => '(SSG) - Malabo Airport, Malabo, Equatorial Guinea','country_id' => '85'),\narray('id' => '1648','name' => '(ASI) - RAF Ascension Island, Ascension Island, Saint Helena','country_id' => '195'),\narray('id' => '1649','name' => '(MRU) - Sir Seewoosagur Ramgoolam International Airport, Port Louis, Mauritius','country_id' => '150'),\narray('id' => '1650','name' => '(RRG) - Sir Charles Gaetan Duval Airport, Port Mathurin, Mauritius','country_id' => '150'),\narray('id' => '1651','name' => '(FIN) - Finschhafen Airport, Buki, Papua New Guinea','country_id' => '172'),\narray('id' => '1652','name' => '(NKW) - Diego Garcia Naval Support Facility, Diego Garcia, British Indian Ocean Territory','country_id' => '102'),\narray('id' => '1653','name' => '(NKS) - Nkongsamba Airport, Nkongsamba, Cameroon','country_id' => '44'),\narray('id' => '1654','name' => '(KBI) - Kribi Airport, Kribi, Cameroon','country_id' => '44'),\narray('id' => '1655','name' => '(TKC) - Tiko Airport, Tiko, Cameroon','country_id' => '44'),\narray('id' => '1656','name' => '(DLA) - Douala International Airport, Douala, Cameroon','country_id' => '44'),\narray('id' => '1657','name' => '(MMF) - Mamfe Airport, Mamfe, Cameroon','country_id' => '44'),\narray('id' => '1658','name' => '(BLC) - Bali Airport, Bali, Cameroon','country_id' => '44'),\narray('id' => '1659','name' => '(KLE) - KaAlA Airport, KaAlA, Cameroon','country_id' => '44'),\narray('id' => '1660','name' => '(OUR) - Batouri Airport, Batouri, Cameroon','country_id' => '44'),\narray('id' => '1661','name' => '(GXX) - Yagoua Airport, Yagoua, Cameroon','country_id' => '44'),\narray('id' => '1662','name' => '(MVR) - Salak Airport, Maroua, Cameroon','country_id' => '44'),\narray('id' => '1663','name' => '(FOM) - Foumban Nkounja Airport, Foumban, Cameroon','country_id' => '44'),\narray('id' => '1664','name' => '(NGE) - N\\'GaoundArA Airport, N\\'GaoundArA, Cameroon','country_id' => '44'),\narray('id' => '1665','name' => '(BTA) - Bertoua Airport, Bertoua, Cameroon','country_id' => '44'),\narray('id' => '1666','name' => '(GOU) - Garoua International Airport, Garoua, Cameroon','country_id' => '44'),\narray('id' => '1667','name' => '(DSC) - Dschang Airport, Dschang, Cameroon','country_id' => '44'),\narray('id' => '1668','name' => '(BFX) - Bafoussam Airport, Bafoussam, Cameroon','country_id' => '44'),\narray('id' => '1669','name' => '(BPC) - Bamenda Airport, Bamenda, Cameroon','country_id' => '44'),\narray('id' => '1670','name' => '(EBW) - Ebolowa Airport, Ebolowa, Cameroon','country_id' => '44'),\narray('id' => '1671','name' => '(YAO) - YaoundA Airport, YaoundA, Cameroon','country_id' => '44'),\narray('id' => '1672','name' => '(NSI) - YaoundA Nsimalen International Airport, YaoundA, Cameroon','country_id' => '44'),\narray('id' => '1673','name' => '(MMQ) - Mbala Airport, Mbala, Zambia','country_id' => '244'),\narray('id' => '1674','name' => '(CIP) - Chipata Airport, Chipata, Zambia','country_id' => '244'),\narray('id' => '1675','name' => '(JEK) - Jeki Airport, Lower Zambezi Natational Park, Zambia','country_id' => '244'),\narray('id' => '1676','name' => '(CGJ) - Kasompe Airport, Chingola, Zambia','country_id' => '244'),\narray('id' => '1677','name' => '(KLB) - Kalabo Airport, Kalabo, Zambia','country_id' => '244'),\narray('id' => '1678','name' => '(KMZ) - Kaoma Airport, Kaoma, Zambia','country_id' => '244'),\narray('id' => '1679','name' => '(KAA) - Kasama Airport, Kasama, Zambia','country_id' => '244'),\narray('id' => '1680','name' => '(ZKB) - Kasaba Bay Airport, Kasaba Bay, Zambia','country_id' => '244'),\narray('id' => '1681','name' => '(LVI) - Livingstone Airport, Livingstone, Zambia','country_id' => '244'),\narray('id' => '1682','name' => '(LXU) - Lukulu Airport, Lukulu, Zambia','country_id' => '244'),\narray('id' => '1683','name' => '(LUN) - Kenneth Kaunda International Airport Lusaka, Lusaka, Zambia','country_id' => '244'),\narray('id' => '1684','name' => '(MNS) - Mansa Airport, Mansa, Zambia','country_id' => '244'),\narray('id' => '1685','name' => '(MFU) - Mfuwe Airport, Mfuwe, Zambia','country_id' => '244'),\narray('id' => '1686','name' => '(MNR) - Mongu Airport, Mongu, Zambia','country_id' => '244'),\narray('id' => '1687','name' => '(ZGM) - Ngoma Airport, Ngoma, Zambia','country_id' => '244'),\narray('id' => '1688','name' => '(NLA) - Simon Mwansa Kapwepwe International Airport, Ndola, Zambia','country_id' => '244'),\narray('id' => '1689','name' => '(SXG) - Senanga Airport, Senanga, Zambia','country_id' => '244'),\narray('id' => '1690','name' => '(KIW) - Southdowns Airport, Kitwe, Zambia','country_id' => '244'),\narray('id' => '1691','name' => '(SJQ) - Sesheke Airport, Sesheke, Zambia','country_id' => '244'),\narray('id' => '1692','name' => '(SLI) - Solwesi Airport, Solwesi, Zambia','country_id' => '244'),\narray('id' => '1693','name' => '(FLT) - Flat Airport, Flat, United States','country_id' => '228'),\narray('id' => '1694','name' => '(BBZ) - Zambezi Airport, Zambezi, Zambia','country_id' => '244'),\narray('id' => '1695','name' => '(ULI) - Ulithi Airport, Falalop Island, Micronesia','country_id' => '70'),\narray('id' => '1696','name' => '(HAH) - Prince Said Ibrahim International Airport, Moroni, Comoros','country_id' => '115'),\narray('id' => '1697','name' => '(NWA) - MohAli Bandar Es Eslam Airport, , Comoros','country_id' => '115'),\narray('id' => '1698','name' => '(YVA) - Iconi Airport, Moroni, Comoros','country_id' => '115'),\narray('id' => '1699','name' => '(AJN) - Ouani Airport, Ouani, Comoros','country_id' => '115'),\narray('id' => '1700','name' => '(DZA) - Dzaoudzi Pamandzi International Airport, Dzaoudzi, Mayotte','country_id' => '242'),\narray('id' => '1701','name' => '(RUN) - Roland Garros Airport, St Denis, RAunion','country_id' => '184'),\narray('id' => '1702','name' => '(ZSE) - Pierrefonds Airport, St Pierre, RAunion','country_id' => '184'),\narray('id' => '1703','name' => '(WML) - Malaimbandy Airport, Malaimbandy, Madagascar','country_id' => '138'),\narray('id' => '1704','name' => '(ATJ) - Antsirabe Airport, Antsirabe, Madagascar','country_id' => '138'),\narray('id' => '1705','name' => '(WAQ) - Antsalova Airport, Antsalova, Madagascar','country_id' => '138'),\narray('id' => '1706','name' => '(VVB) - Mahanoro Airport, Mahanoro, Madagascar','country_id' => '138'),\narray('id' => '1707','name' => '(TNR) - Ivato Airport, Antananarivo, Madagascar','country_id' => '138'),\narray('id' => '1708','name' => '(JVA) - Ankavandra Airport, Ankavandra, Madagascar','country_id' => '138'),\narray('id' => '1709','name' => '(BMD) - Belo sur Tsiribihina Airport, Belo sur Tsiribihina, Madagascar','country_id' => '138'),\narray('id' => '1710','name' => '(ZVA) - Miandrivazo Airport, , Madagascar','country_id' => '138'),\narray('id' => '1711','name' => '(MXT) - Maintirano Airport, Maintirano, Madagascar','country_id' => '138'),\narray('id' => '1712','name' => '(ILK) - Atsinanana Airport, Ilaka, Madagascar','country_id' => '138'),\narray('id' => '1713','name' => '(TVA) - Morafenobe Airport, Morafenobe, Madagascar','country_id' => '138'),\narray('id' => '1714','name' => '(SMS) - Sainte Marie Airport, , Madagascar','country_id' => '138'),\narray('id' => '1715','name' => '(TMM) - Toamasina Airport, , Madagascar','country_id' => '138'),\narray('id' => '1716','name' => '(WTA) - Tambohorano Airport, Tambohorano, Madagascar','country_id' => '138'),\narray('id' => '1717','name' => '(MOQ) - Morondava Airport, , Madagascar','country_id' => '138'),\narray('id' => '1718','name' => '(WTS) - Tsiroanomandidy Airport, Tsiroanomandidy, Madagascar','country_id' => '138'),\narray('id' => '1719','name' => '(VAT) - Vatomandry Airport, Vatomandry, Madagascar','country_id' => '138'),\narray('id' => '1720','name' => '(WAM) - Ambatondrazaka Airport, Ambatondrazaka, Madagascar','country_id' => '138'),\narray('id' => '1721','name' => '(DIE) - Arrachart Airport, , Madagascar','country_id' => '138'),\narray('id' => '1722','name' => '(WMR) - Mananara Nord Airport, Mananara Nord, Madagascar','country_id' => '138'),\narray('id' => '1723','name' => '(ZWA) - Andapa Airport, , Madagascar','country_id' => '138'),\narray('id' => '1724','name' => '(AMB) - Ambilobe Airport, , Madagascar','country_id' => '138'),\narray('id' => '1725','name' => '(WBD) - Avaratra Airport, Befandriana, Madagascar','country_id' => '138'),\narray('id' => '1726','name' => '(WPB) - Port BergA Airport, Port BergA, Madagascar','country_id' => '138'),\narray('id' => '1727','name' => '(ANM) - Antsirabato Airport, , Madagascar','country_id' => '138'),\narray('id' => '1728','name' => '(HVA) - Analalava Airport, , Madagascar','country_id' => '138'),\narray('id' => '1729','name' => '(MJN) - Amborovy Airport, , Madagascar','country_id' => '138'),\narray('id' => '1730','name' => '(NOS) - Fascene Airport, Nosy Be, Madagascar','country_id' => '138'),\narray('id' => '1731','name' => '(DWB) - Soalala Airport, Soalala, Madagascar','country_id' => '138'),\narray('id' => '1732','name' => '(WMP) - Mampikony Airport, Mampikony, Madagascar','country_id' => '138'),\narray('id' => '1733','name' => '(BPY) - Besalampy Airport, , Madagascar','country_id' => '138'),\narray('id' => '1734','name' => '(WMN) - Maroantsetra Airport, , Madagascar','country_id' => '138'),\narray('id' => '1735','name' => '(SVB) - Sambava Airport, , Madagascar','country_id' => '138'),\narray('id' => '1736','name' => '(TTS) - Tsaratanana Airport, Tsaratanana, Madagascar','country_id' => '138'),\narray('id' => '1737','name' => '(VOH) - Vohimarina Airport, , Madagascar','country_id' => '138'),\narray('id' => '1738','name' => '(WAI) - Ambalabe Airport, Antsohihy, Madagascar','country_id' => '138'),\narray('id' => '1739','name' => '(WMA) - Mandritsara Airport, Mandritsara, Madagascar','country_id' => '138'),\narray('id' => '1740','name' => '(IVA) - Ampampamena Airport, , Madagascar','country_id' => '138'),\narray('id' => '1741','name' => '(WBO) - Antsoa Airport, Beroroha, Madagascar','country_id' => '138'),\narray('id' => '1742','name' => '(WMD) - Mandabe Airport, Mandabe, Madagascar','country_id' => '138'),\narray('id' => '1743','name' => '(FTU) - TAlanaro Airport, TAlanaro, Madagascar','country_id' => '138'),\narray('id' => '1744','name' => '(WFI) - Fianarantsoa Airport, , Madagascar','country_id' => '138'),\narray('id' => '1745','name' => '(RVA) - Farafangana Airport, , Madagascar','country_id' => '138'),\narray('id' => '1746','name' => '(IHO) - Ihosy Airport, Ihosy, Madagascar','country_id' => '138'),\narray('id' => '1747','name' => '(MJA) - Manja Airport, Manja, Madagascar','country_id' => '138'),\narray('id' => '1748','name' => '(WVK) - Manakara Airport, , Madagascar','country_id' => '138'),\narray('id' => '1749','name' => '(OVA) - Bekily Airport, Bekily, Madagascar','country_id' => '138'),\narray('id' => '1750','name' => '(MNJ) - Mananjary Airport, , Madagascar','country_id' => '138'),\narray('id' => '1751','name' => '(TDV) - Samangoky Airport, Tanandava, Madagascar','country_id' => '138'),\narray('id' => '1752','name' => '(MXM) - Morombe Airport, , Madagascar','country_id' => '138'),\narray('id' => '1753','name' => '(TLE) - Toliara Airport, , Madagascar','country_id' => '138'),\narray('id' => '1754','name' => '(VND) - Vangaindrano Airport, Vangaindrano, Madagascar','country_id' => '138'),\narray('id' => '1755','name' => '(BKU) - Betioky Airport, Betioky, Madagascar','country_id' => '138'),\narray('id' => '1756','name' => '(AMP) - Ampanihy Airport, Ampanihy, Madagascar','country_id' => '138'),\narray('id' => '1757','name' => '(WAK) - Ankazoabo Airport, Ankazoabo, Madagascar','country_id' => '138'),\narray('id' => '1758','name' => '(AZZ) - Ambriz Airport, Ambriz, Angola','country_id' => '7'),\narray('id' => '1759','name' => '(SSY) - Mbanza Congo Airport, Mbanza Congo, Angola','country_id' => '7'),\narray('id' => '1760','name' => '(BUG) - Benguela Airport, Benguela, Angola','country_id' => '7'),\narray('id' => '1761','name' => '(GGC) - Lumbala Airport, Lumbala N\\'guimbo, Angola','country_id' => '7'),\narray('id' => '1762','name' => '(CAB) - Cabinda Airport, Cabinda, Angola','country_id' => '7'),\narray('id' => '1763','name' => '(CFF) - Cafunfo Airport, Cafunfo, Angola','country_id' => '7'),\narray('id' => '1764','name' => '(PGI) - Chitato Airport, Chitato, Angola','country_id' => '7'),\narray('id' => '1765','name' => '(CBT) - Catumbela Airport, Catumbela, Angola','country_id' => '7'),\narray('id' => '1766','name' => '(CTI) - Cuito Cuanavale Airport, Cuito Cuanavale, Angola','country_id' => '7'),\narray('id' => '1767','name' => '(CXM) - Camaxilo Airport, Camaxilo, Angola','country_id' => '7'),\narray('id' => '1768','name' => '(CAV) - Cazombo Airport, Cazombo, Angola','country_id' => '7'),\narray('id' => '1769','name' => '(DUE) - Dundo Airport, Chitato, Angola','country_id' => '7'),\narray('id' => '1770','name' => '(FNE) - Fane Airport, Fane Mission, Papua New Guinea','country_id' => '172'),\narray('id' => '1771','name' => '(VPE) - Ngjiva Pereira Airport, Ngiva, Angola','country_id' => '7'),\narray('id' => '1772','name' => '(NOV) - Nova Lisboa Airport, Huambo, Angola','country_id' => '7'),\narray('id' => '1773','name' => '(SVP) - Kuito Airport, Kuito, Angola','country_id' => '7'),\narray('id' => '1774','name' => '(LBZ) - Lucapa Airport, Lucapa, Angola','country_id' => '7'),\narray('id' => '1775','name' => '(LAD) - Quatro de Fevereiro Airport, Luanda, Angola','country_id' => '7'),\narray('id' => '1776','name' => '(LZM) - Luzamba Airport, Luzamba, Angola','country_id' => '7'),\narray('id' => '1777','name' => '(MEG) - Malanje Airport, Malanje, Angola','country_id' => '7'),\narray('id' => '1778','name' => '(SPP) - Menongue Airport, Menongue, Angola','country_id' => '7'),\narray('id' => '1779','name' => '(MSZ) - Namibe Airport, Namibe, Angola','country_id' => '7'),\narray('id' => '1780','name' => '(GXG) - Negage Airport, Negage, Angola','country_id' => '7'),\narray('id' => '1781','name' => '(PBN) - Porto Amboim Airport, Port Amboim, Angola','country_id' => '7'),\narray('id' => '1782','name' => '(VHC) - Saurimo Airport, Saurimo, Angola','country_id' => '7'),\narray('id' => '1783','name' => '(SZA) - Soyo Airport, Soyo, Angola','country_id' => '7'),\narray('id' => '1784','name' => '(NDD) - Sumbe Airport, Sumbe, Angola','country_id' => '7'),\narray('id' => '1785','name' => '(UAL) - Luau Airport, Luau, Angola','country_id' => '7'),\narray('id' => '1786','name' => '(SDD) - Lubango Airport, Lubango, Angola','country_id' => '7'),\narray('id' => '1787','name' => '(LUO) - Luena Airport, Luena, Angola','country_id' => '7'),\narray('id' => '1788','name' => '(UGO) - Uige Airport, Uige, Angola','country_id' => '7'),\narray('id' => '1789','name' => '(CEO) - Waco Kungo Airport, Waco Kungo, Angola','country_id' => '7'),\narray('id' => '1790','name' => '(XGN) - Xangongo Airport, Xangongo, Angola','country_id' => '7'),\narray('id' => '1791','name' => '(ARZ) - N\\'zeto Airport, N\\'zeto, Angola','country_id' => '7'),\narray('id' => '1792','name' => '(NZA) - Nzagi Airport, Nzagi, Angola','country_id' => '7'),\narray('id' => '1793','name' => '(BGB) - Booue Airport, Booue, Gabon','country_id' => '73'),\narray('id' => '1794','name' => '(KDN) - Ndende Airport, Ndende, Gabon','country_id' => '73'),\narray('id' => '1795','name' => '(FOU) - Fougamou Airport, Fougamou, Gabon','country_id' => '73'),\narray('id' => '1796','name' => '(MBC) - M\\'Bigou Airport, M\\'Bigou, Gabon','country_id' => '73'),\narray('id' => '1797','name' => '(MGX) - Moabi Airport, Moabi, Gabon','country_id' => '73'),\narray('id' => '1798','name' => '(KDJ) - Ville Airport, N\\'DjolA, Gabon','country_id' => '73'),\narray('id' => '1799','name' => '(KOU) - Koulamoutou Mabimbi Airport, Koulamoutou, Gabon','country_id' => '73'),\narray('id' => '1800','name' => '(MJL) - Mouilla Ville Airport, Mouila, Gabon','country_id' => '73'),\narray('id' => '1801','name' => '(OYE) - Oyem Airport, Oyem, Gabon','country_id' => '73'),\narray('id' => '1802','name' => '(OKN) - Okondja Airport, Okondja, Gabon','country_id' => '73'),\narray('id' => '1803','name' => '(LBQ) - Lambarene Airport, Lambarene, Gabon','country_id' => '73'),\narray('id' => '1804','name' => '(MVX) - Minvoul Airport, Minvoul, Gabon','country_id' => '73'),\narray('id' => '1805','name' => '(BMM) - Bitam Airport, Bitam, Gabon','country_id' => '73'),\narray('id' => '1806','name' => '(MFF) - Moanda Airport, Moanda, Gabon','country_id' => '73'),\narray('id' => '1807','name' => '(MKB) - Mekambo Airport, Mekambo, Gabon','country_id' => '73'),\narray('id' => '1808','name' => '(POG) - Port Gentil Airport, Port Gentil, Gabon','country_id' => '73'),\narray('id' => '1809','name' => '(OMB) - Omboue Hopital Airport, Omboue, Gabon','country_id' => '73'),\narray('id' => '1810','name' => '(IGE) - Tchongorove Airport, Iguela, Gabon','country_id' => '73'),\narray('id' => '1811','name' => '(MKU) - Makokou Airport, Makokou, Gabon','country_id' => '73'),\narray('id' => '1812','name' => '(LBV) - Libreville Leon M\\'ba International Airport, Libreville, Gabon','country_id' => '73'),\narray('id' => '1813','name' => '(MZC) - Mitzic Airport, Mitzic, Gabon','country_id' => '73'),\narray('id' => '1814','name' => '(MVB) - M\\'Vengue El Hadj Omar Bongo Ondimba International Airport, Franceville, Gabon','country_id' => '73'),\narray('id' => '1815','name' => '(LTL) - Lastourville Airport, Lastourville, Gabon','country_id' => '73'),\narray('id' => '1816','name' => '(ZKM) - Sette Cama Airport, Sette Cama, Gabon','country_id' => '73'),\narray('id' => '1817','name' => '(TCH) - Tchibanga Airport, Tchibanga, Gabon','country_id' => '73'),\narray('id' => '1818','name' => '(MYB) - Mayumba Airport, Mayumba, Gabon','country_id' => '73'),\narray('id' => '1819','name' => '(FOY) - Foya Airport, Foya, Liberia','country_id' => '127'),\narray('id' => '1820','name' => '(PCP) - Principe Airport, , SAo TomA and Principe','country_id' => '204'),\narray('id' => '1821','name' => '(TMS) - SAo TomA International Airport, SAo TomA, SAo TomA and Principe','country_id' => '204'),\narray('id' => '1822','name' => '(ANO) - Angoche Airport, Angoche, Mozambique','country_id' => '155'),\narray('id' => '1823','name' => '(BEW) - Beira Airport, Beira, Mozambique','country_id' => '155'),\narray('id' => '1824','name' => '(FXO) - Cuamba Airport, Cuamba, Mozambique','country_id' => '155'),\narray('id' => '1825','name' => '(VPY) - Chimoio Airport, Chimoio, Mozambique','country_id' => '155'),\narray('id' => '1826','name' => '(IHC) - Inhaca Airport, Inhaca, Mozambique','country_id' => '155'),\narray('id' => '1827','name' => '(INH) - Inhambane Airport, Inhambabe, Mozambique','country_id' => '155'),\narray('id' => '1828','name' => '(VXC) - Lichinga Airport, Lichinga, Mozambique','country_id' => '155'),\narray('id' => '1829','name' => '(LFB) - Lumbo Airport, Lumbo, Mozambique','country_id' => '155'),\narray('id' => '1830','name' => '(MPM) - Maputo Airport, Maputo, Mozambique','country_id' => '155'),\narray('id' => '1831','name' => '(MUD) - Mueda Airport, Mueda, Mozambique','country_id' => '155'),\narray('id' => '1832','name' => '(MZB) - MocAmboa da Praia Airport, MocAmboa da Praia, Mozambique','country_id' => '155'),\narray('id' => '1833','name' => '(MNC) - Nacala Airport, Nacala, Mozambique','country_id' => '155'),\narray('id' => '1834','name' => '(APL) - Nampula Airport, Nampula, Mozambique','country_id' => '155'),\narray('id' => '1835','name' => '(POL) - Pemba Airport, Pemba / Porto Amelia, Mozambique','country_id' => '155'),\narray('id' => '1836','name' => '(PDD) - Ponta do Ouro Airport, Ponta do Ouro, Mozambique','country_id' => '155'),\narray('id' => '1837','name' => '(UEL) - Quelimane Airport, Quelimane, Mozambique','country_id' => '155'),\narray('id' => '1838','name' => '(TET) - Chingozi Airport, Tete, Mozambique','country_id' => '155'),\narray('id' => '1839','name' => '(VNX) - Vilankulo Airport, Vilanculo, Mozambique','country_id' => '155'),\narray('id' => '1840','name' => '(VJB) - Xai-Xai Airport, Xai-Xai, Mozambique','country_id' => '155'),\narray('id' => '1841','name' => '(BVE) - Brive Souillac Airport, , France','country_id' => '72'),\narray('id' => '1842','name' => '(DES) - Desroches Airport, Desroches Island, Seychelles','country_id' => '191'),\narray('id' => '1843','name' => '(SEZ) - Seychelles International Airport, Mahe Island, Seychelles','country_id' => '191'),\narray('id' => '1844','name' => '(FSL) - Fossil Downs Airport, Fossil Downs Station, Australia','country_id' => '12'),\narray('id' => '1845','name' => '(PRI) - Praslin Airport, Praslin Island, Seychelles','country_id' => '191'),\narray('id' => '1846','name' => '(BDI) - Bird Island Airport, Bird Island, Seychelles','country_id' => '191'),\narray('id' => '1847','name' => '(DEI) - Denis Island Airport, Denis Island, Seychelles','country_id' => '191'),\narray('id' => '1848','name' => '(FRK) - FrAgate Island Airport, FrAgate Island, Seychelles','country_id' => '191'),\narray('id' => '1849','name' => '(SRH) - Sarh Airport, Sarh, Chad','country_id' => '210'),\narray('id' => '1850','name' => '(OGR) - Bongor Airport, Bongor, Chad','country_id' => '210'),\narray('id' => '1851','name' => '(AEH) - Abeche Airport, , Chad','country_id' => '210'),\narray('id' => '1852','name' => '(MQQ) - Moundou Airport, , Chad','country_id' => '210'),\narray('id' => '1853','name' => '(LTC) - Lai Airport, Lai, Chad','country_id' => '210'),\narray('id' => '1854','name' => '(ATV) - Ati Airport, Ati, Chad','country_id' => '210'),\narray('id' => '1855','name' => '(NDJ) - N\\'Djamena International Airport, N\\'Djamena, Chad','country_id' => '210'),\narray('id' => '1856','name' => '(BKR) - Bokoro Airport, Bokoro, Chad','country_id' => '210'),\narray('id' => '1857','name' => '(OTC) - Bol Airport, Bol, Chad','country_id' => '210'),\narray('id' => '1858','name' => '(MVO) - Mongo Airport, Mongo, Chad','country_id' => '210'),\narray('id' => '1859','name' => '(AMC) - Am Timan Airport, Am Timan, Chad','country_id' => '210'),\narray('id' => '1860','name' => '(PLF) - Pala Airport, Pala, Chad','country_id' => '210'),\narray('id' => '1861','name' => '(OUT) - Bousso Airport, Bousso, Chad','country_id' => '210'),\narray('id' => '1862','name' => '(AMO) - Mao Airport, Mao, Chad','country_id' => '210'),\narray('id' => '1863','name' => '(FYT) - Faya Largeau Airport, , Chad','country_id' => '210'),\narray('id' => '1864','name' => '(FUB) - Fulleborn Airport, Fulleborn, Papua New Guinea','country_id' => '172'),\narray('id' => '1865','name' => '(BZH) - Bumi Airport, Bumi, Zimbabwe','country_id' => '245'),\narray('id' => '1866','name' => '(BUQ) - Joshua Mqabuko Nkomo International Airport, Bulawayo, Zimbabwe','country_id' => '245'),\narray('id' => '1867','name' => '(CHJ) - Chipinge Airport, Chipinge, Zimbabwe','country_id' => '245'),\narray('id' => '1868','name' => '(BFO) - Buffalo Range Airport, Chiredzi, Zimbabwe','country_id' => '245'),\narray('id' => '1869','name' => '(VFA) - Victoria Falls International Airport, Victoria Falls, Zimbabwe','country_id' => '245'),\narray('id' => '1870','name' => '(HRE) - Harare International Airport, Harare, Zimbabwe','country_id' => '245'),\narray('id' => '1871','name' => '(KAB) - Kariba International Airport, Kariba, Zimbabwe','country_id' => '245'),\narray('id' => '1872','name' => '(MJW) - Mahenye Airport, Gonarezhou National Park, Zimbabwe','country_id' => '245'),\narray('id' => '1873','name' => '(UTA) - Mutare Airport, Mutare, Zimbabwe','country_id' => '245'),\narray('id' => '1874','name' => '(MVZ) - Masvingo International Airport, Masvingo, Zimbabwe','country_id' => '245'),\narray('id' => '1875','name' => '(GWE) - Thornhill Air Base, Gweru, Zimbabwe','country_id' => '245'),\narray('id' => '1876','name' => '(HWN) - Hwange National Park Airport, Hwange, Zimbabwe','country_id' => '245'),\narray('id' => '1877','name' => '(WKI) - Hwange Airport, Hwange, Zimbabwe','country_id' => '245'),\narray('id' => '1878','name' => '(CEH) - Chelinda Malawi Airport, , Malawi','country_id' => '152'),\narray('id' => '1879','name' => '(BLZ) - Chileka International Airport, Blantyre, Malawi','country_id' => '152'),\narray('id' => '1880','name' => '(CMK) - Club Makokola Airport, Club Makokola, Malawi','country_id' => '152'),\narray('id' => '1881','name' => '(DWA) - Dwangwa Airport, Dwangwa, Malawi','country_id' => '152'),\narray('id' => '1882','name' => '(KGJ) - Karonga Airport, Karonga, Malawi','country_id' => '152'),\narray('id' => '1883','name' => '(KBQ) - Kasungu Airport, Kasungu, Malawi','country_id' => '152'),\narray('id' => '1884','name' => '(LLW) - Lilongwe International Airport, Lilongwe, Malawi','country_id' => '152'),\narray('id' => '1885','name' => '(LIX) - Likoma Island Airport, Likoma Island, Malawi','country_id' => '152'),\narray('id' => '1886','name' => '(MAI) - Mangochi Airport, Mangochi, Malawi','country_id' => '152'),\narray('id' => '1887','name' => '(MYZ) - Monkey Bay Airport, Monkey Bay, Malawi','country_id' => '152'),\narray('id' => '1888','name' => '(LMB) - Salima Airport, Salima, Malawi','country_id' => '152'),\narray('id' => '1889','name' => '(ZZU) - Mzuzu Airport, Mzuzu, Malawi','country_id' => '152'),\narray('id' => '1890','name' => '(LEF) - Lebakeng Airport, Lebakeng, Lesotho','country_id' => '128'),\narray('id' => '1891','name' => '(LRB) - Leribe Airport, Leribe, Lesotho','country_id' => '128'),\narray('id' => '1892','name' => '(LES) - Lesobeng Airport, Lesobeng, Lesotho','country_id' => '128'),\narray('id' => '1893','name' => '(FXM) - Flaxman Island Airstrip, Flaxman Island, United States','country_id' => '228'),\narray('id' => '1894','name' => '(MFC) - Mafeteng Airport, Mafeteng, Lesotho','country_id' => '128'),\narray('id' => '1895','name' => '(MKH) - Mokhotlong Airport, Mokhotlong, Lesotho','country_id' => '128'),\narray('id' => '1896','name' => '(MSU) - Moshoeshoe I International Airport, Maseru, Lesotho','country_id' => '128'),\narray('id' => '1897','name' => '(NKU) - Nkaus Airport, Nkaus, Lesotho','country_id' => '128'),\narray('id' => '1898','name' => '(PEL) - Pelaneng Airport, Pelaneng, Lesotho','country_id' => '128'),\narray('id' => '1899','name' => '(UTG) - Quthing Airport, Quthing, Lesotho','country_id' => '128'),\narray('id' => '1900','name' => '(UNE) - Qacha\\'s Nek Airport, Qacha\\'s Nek, Lesotho','country_id' => '128'),\narray('id' => '1901','name' => '(SHK) - Sehonghong Airport, Sehonghong, Lesotho','country_id' => '128'),\narray('id' => '1902','name' => '(SKQ) - Sekakes Airport, Sekakes, Lesotho','country_id' => '128'),\narray('id' => '1903','name' => '(SOK) - Semonkong Airport, Semonkong, Lesotho','country_id' => '128'),\narray('id' => '1904','name' => '(SHZ) - Seshutes Airport, Seshutes, Lesotho','country_id' => '128'),\narray('id' => '1905','name' => '(THB) - Thaba-Tseka Airport, Thaba-Tseka, Lesotho','country_id' => '128'),\narray('id' => '1906','name' => '(TKO) - Tlokoeng Airport, Tlokoeng, Lesotho','country_id' => '128'),\narray('id' => '1907','name' => '(AIW) - Ai-Ais Airport, Ai-Ais, Namibia','country_id' => '156'),\narray('id' => '1908','name' => '(ADI) - Arandis Airport, Arandis, Namibia','country_id' => '156'),\narray('id' => '1909','name' => '(GOG) - Gobabis Airport, Gobabis, Namibia','country_id' => '156'),\narray('id' => '1910','name' => '(GFY) - Grootfontein Airport, Grootfontein, Namibia','country_id' => '156'),\narray('id' => '1911','name' => '(HAL) - Halali Airport, Halali, Namibia','country_id' => '156'),\narray('id' => '1912','name' => '(KAS) - Karasburg Airport, Karasburg, Namibia','country_id' => '156'),\narray('id' => '1913','name' => '(MPA) - Katima Mulilo Airport, Mpacha, Namibia','country_id' => '156'),\narray('id' => '1914','name' => '(KMP) - Keetmanshoop Airport, Keetmanshoop, Namibia','country_id' => '156'),\narray('id' => '1915','name' => '(LHU) - Lianshulu Airport, Lianshulu Lodge, Namibia','country_id' => '156'),\narray('id' => '1916','name' => '(LUD) - Luderitz Airport, Luderitz, Namibia','country_id' => '156'),\narray('id' => '1917','name' => '(MJO) - Mount Etjo Airport, Mount Etjo Safari Lodge, Namibia','country_id' => '156'),\narray('id' => '1918','name' => '(MQG) - Midgard Airport, Midgard, Namibia','country_id' => '156'),\narray('id' => '1919','name' => '(OKU) - Mokuti Lodge Airport, Mokuti Lodge, Namibia','country_id' => '156'),\narray('id' => '1920','name' => '(NNI) - Namutoni Airport, Namutoni, Namibia','country_id' => '156'),\narray('id' => '1921','name' => '(OND) - Ondangwa Airport, Ondangwa, Namibia','country_id' => '156'),\narray('id' => '1922','name' => '(OMG) - Omega Airport, Omega, Namibia','country_id' => '156'),\narray('id' => '1923','name' => '(OMD) - Oranjemund Airport, Oranjemund, Namibia','country_id' => '156'),\narray('id' => '1924','name' => '(OKF) - Okaukuejo Airport, Okaukuejo, Namibia','country_id' => '156'),\narray('id' => '1925','name' => '(OPW) - Opuwa Airport, Opuwa, Namibia','country_id' => '156'),\narray('id' => '1926','name' => '(OHI) - Oshakati Airport, Oshakati, Namibia','country_id' => '156'),\narray('id' => '1927','name' => '(OTJ) - Otjiwarongo Airport, Otjiwarongo, Namibia','country_id' => '156'),\narray('id' => '1928','name' => '(NDU) - Rundu Airport, Rundu, Namibia','country_id' => '156'),\narray('id' => '1929','name' => '(RHN) - Skorpion Mine Airport, Rosh Pinah, Namibia','country_id' => '156'),\narray('id' => '1930','name' => '(SWP) - Swakopmund Airport, Swakopmund, Namibia','country_id' => '156'),\narray('id' => '1931','name' => '(SZM) - Sesriem Airstrip, , Namibia','country_id' => '156'),\narray('id' => '1932','name' => '(TCY) - Terrace Bay Airport, Terrace Bay, Namibia','country_id' => '156'),\narray('id' => '1933','name' => '(TSB) - Tsumeb Airport, Tsumeb, Namibia','country_id' => '156'),\narray('id' => '1934','name' => '(WVB) - Walvis Bay Airport, Walvis Bay, Namibia','country_id' => '156'),\narray('id' => '1935','name' => '(ERS) - Eros Airport, Windhoek, Namibia','country_id' => '156'),\narray('id' => '1936','name' => '(WDH) - Hosea Kutako International Airport, Windhoek, Namibia','country_id' => '156'),\narray('id' => '1937','name' => '(FIH) - Ndjili International Airport, Kinshasa, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1938','name' => '(NLO) - Ndolo Airport, N\\'dolo, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1939','name' => '(MNB) - Muanda Airport, , Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1940','name' => '(BOA) - Boma Airport, Boma, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1941','name' => '(LZI) - Luozi Airport, Luozi, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1942','name' => '(MAT) - Tshimpi Airport, Matadi, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1943','name' => '(NKL) - N\\'Kolo-Fuma Airport, N\\'Kolo-Fuma, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1944','name' => '(INO) - Inongo Airport, Inongo, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1945','name' => '(NIO) - Nioki Airport, Nioki, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1946','name' => '(FDU) - Bandundu Airport, , Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1947','name' => '(KRZ) - Basango Mboliasa Airport, Kiri, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1948','name' => '(KKW) - Kikwit Airport, , Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1949','name' => '(IDF) - Idiofa Airport, Idiofa, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1950','name' => '(LUS) - Lusanga Airport, Lusanga, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1951','name' => '(MSM) - Masi Manimba Airport, Masi Manimba, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1952','name' => '(MDK) - Mbandaka Airport, Mbandaka, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1953','name' => '(BSU) - Basankusu Airport, Basankusu, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1954','name' => '(LIE) - Libenge Airport, Libenge, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1955','name' => '(BDT) - Gbadolite Airport, , Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1956','name' => '(GMA) - Gemena Airport, Gemena, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1957','name' => '(KLI) - Kotakoli Airport, , Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1958','name' => '(BMB) - Bumbar Airport, Bumbar, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1959','name' => '(LIQ) - Lisala Airport, , Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1960','name' => '(BNB) - Boende Airport, Boende, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1961','name' => '(IKL) - Ikela Airport, Ikela, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1962','name' => '(FKI) - Bangoka International Airport, Kisangani, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1963','name' => '(YAN) - Yangambi Airport, Yangambi, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1964','name' => '(IRP) - Matari Airport, , Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1965','name' => '(BUX) - Bunia Airport, , Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1966','name' => '(BZU) - Buta Zega Airport, , Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1967','name' => '(BKY) - Bukavu Kavumu Airport, , Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1968','name' => '(RUE) - Rughenda Airfield, Butembo, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1969','name' => '(GOM) - Goma International Airport, Goma, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1970','name' => '(BNC) - Beni Airport, Beni, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1971','name' => '(KND) - Kindu Airport, Kindu, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1972','name' => '(KLY) - Kinkungwa Airport, Kalima, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1973','name' => '(PUN) - Punia Airport, Punia, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1974','name' => '(FBM) - Lubumbashi International Airport, Lubumbashi, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1975','name' => '(PWO) - Pweto Airport, Pweto, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1976','name' => '(KEC) - Kasenga Airport, Kasenga, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1977','name' => '(KWZ) - Kolwezi Airport, , Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1978','name' => '(MNO) - Manono Airport, Manono, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1979','name' => '(BDV) - Moba Airport, Moba, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1980','name' => '(FMI) - Kalemie Airport, , Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1981','name' => '(KBO) - Kabalo Airport, Kabalo, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1982','name' => '(KOO) - Kongolo Airport, Kongolo, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1983','name' => '(KMN) - Kamina Base Airport, , Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1984','name' => '(KAP) - Kapanga Airport, Kapanga, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1985','name' => '(KNM) - Kaniama Airport, Kaniama, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1986','name' => '(KGA) - Kananga Airport, Kananga, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1987','name' => '(LZA) - Luiza Airport, Luiza, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1988','name' => '(TSH) - Tshikapa Airport, Tshikapa, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1989','name' => '(LJA) - Lodja Airport, Lodja, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1990','name' => '(LBO) - Lusambo Airport, Lusambo, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1991','name' => '(MEW) - Mweka Airport, Mweka, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1992','name' => '(BAN) - Basongo Airport, Basongo, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1993','name' => '(PFR) - Ilebo Airport, Ilebo, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1994','name' => '(MJM) - Mbuji Mayi Airport, Mbuji Mayi, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1995','name' => '(GDJ) - Gandajika Airport, Gandajika, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1996','name' => '(KBN) - Tunta Airport, Kabinda, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '1997','name' => '(AKE) - Akieni Airport, Akieni, Gabon','country_id' => '73'),\narray('id' => '1998','name' => '(GAX) - Gamba Airport, Gamba, Gabon','country_id' => '73'),\narray('id' => '1999','name' => '(GAB) - Gabbs Airport, Gabbs, United States','country_id' => '228'),\narray('id' => '2000','name' => '(BKO) - Senou Airport, Senou, Mali','country_id' => '141'),\narray('id' => '2001','name' => '(GUD) - Goundam Airport, Goundam, Mali','country_id' => '141'),\narray('id' => '2002','name' => '(GAQ) - Gao Airport, , Mali','country_id' => '141'),\narray('id' => '2003','name' => '(KNZ) - Kenieba Airport, Kenieba, Mali','country_id' => '141'),\narray('id' => '2004','name' => '(KTX) - Koutiala Airport, Koutiala, Mali','country_id' => '141'),\narray('id' => '2005','name' => '(KYS) - Kayes Dag Dag Airport, , Mali','country_id' => '141'),\narray('id' => '2006','name' => '(MZI) - Mopti Airport, , Mali','country_id' => '141'),\narray('id' => '2007','name' => '(NRM) - Nara Airport, Nara, Mali','country_id' => '141'),\narray('id' => '2008','name' => '(NIX) - Nioro du Sahel Airport, Nioro du Sahel, Mali','country_id' => '141'),\narray('id' => '2009','name' => '(KSS) - Sikasso Airport, Sikasso, Mali','country_id' => '141'),\narray('id' => '2010','name' => '(TOM) - Timbuktu Airport, Timbuktu, Mali','country_id' => '141'),\narray('id' => '2011','name' => '(EYL) - YAlimanA Airport, YAlimanA, Mali','country_id' => '141'),\narray('id' => '2012','name' => '(GAZ) - Guasopa Airport, Woodlark (Muyua) Island, Papua New Guinea','country_id' => '172'),\narray('id' => '2013','name' => '(HOY) - Hoy/Longhope Airfield, Orkney Isle, United Kingdom','country_id' => '74'),\narray('id' => '2014','name' => '(DOC) - Dornoch Airport, Dornoch, United Kingdom','country_id' => '74'),\narray('id' => '2015','name' => '(FLH) - Flotta Isle Airport, Flotta Isle, United Kingdom','country_id' => '74'),\narray('id' => '2016','name' => '(FOA) - Foula Airport, Foula, United Kingdom','country_id' => '74'),\narray('id' => '2017','name' => '(OUK) - Outer Skerries Airport, Grunay Island, United Kingdom','country_id' => '74'),\narray('id' => '2018','name' => '(PSV) - Papa Stour Airport, Papa Stour Island, United Kingdom','country_id' => '74'),\narray('id' => '2019','name' => '(ULL) - Glenforsa Airfield, Glenforsa, United Kingdom','country_id' => '74'),\narray('id' => '2020','name' => '(BJL) - Banjul International Airport, Banjul, Gambia','country_id' => '82'),\narray('id' => '2021','name' => '(FUE) - Fuerteventura Airport, Fuerteventura Island, Spain','country_id' => '65'),\narray('id' => '2022','name' => '(GMZ) - La Gomera Airport, Alajero, La Gomera Island, Spain','country_id' => '65'),\narray('id' => '2023','name' => '(VDE) - Hierro Airport, El Hierro Island, Spain','country_id' => '65'),\narray('id' => '2024','name' => '(SPC) - La Palma Airport, Sta Cruz de la Palma, La Palma Island, Spain','country_id' => '65'),\narray('id' => '2025','name' => '(LPA) - Gran Canaria Airport, Gran Canaria Island, Spain','country_id' => '65'),\narray('id' => '2026','name' => '(ACE) - Lanzarote Airport, Lanzarote Island, Spain','country_id' => '65'),\narray('id' => '2027','name' => '(TFS) - Tenerife South Airport, Tenerife Island, Spain','country_id' => '65'),\narray('id' => '2028','name' => '(GCV) - Gravatai Airport, Gravatai, Brazil','country_id' => '29'),\narray('id' => '2029','name' => '(TFN) - Tenerife Norte Airport, Tenerife Island, Spain','country_id' => '65'),\narray('id' => '2030','name' => '(MLN) - Melilla Airport, Melilla, Spain','country_id' => '65'),\narray('id' => '2031','name' => '(GEW) - Gewoia Airport, Gewoia, Papua New Guinea','country_id' => '172'),\narray('id' => '2032','name' => '(BTE) - Sherbro International Airport, Bonthe, Sierra Leone','country_id' => '198'),\narray('id' => '2033','name' => '(KBS) - Bo Airport, Bo, Sierra Leone','country_id' => '198'),\narray('id' => '2034','name' => '(GFD) - Pope Field, Greenfield, United States','country_id' => '228'),\narray('id' => '2035','name' => '(GBK) - Gbangbatok Airport, Gbangbatok, Sierra Leone','country_id' => '198'),\narray('id' => '2036','name' => '(HGS) - Hastings Airport, Freetown, Sierra Leone','country_id' => '198'),\narray('id' => '2037','name' => '(KBA) - Kabala Airport, Kabala, Sierra Leone','country_id' => '198'),\narray('id' => '2038','name' => '(KEN) - Kenema Airport, Kenema, Sierra Leone','country_id' => '198'),\narray('id' => '2039','name' => '(FNA) - Lungi International Airport, Freetown, Sierra Leone','country_id' => '198'),\narray('id' => '2040','name' => '(WYE) - Yengema Airport, Yengema, Sierra Leone','country_id' => '198'),\narray('id' => '2041','name' => '(BQE) - Bubaque Airport, Bubaque, Guinea-Bissau','country_id' => '90'),\narray('id' => '2042','name' => '(OXB) - Osvaldo Vieira International Airport, Bissau, Guinea-Bissau','country_id' => '90'),\narray('id' => '2043','name' => '(GHE) - GarachinA Airport, GarachinA, Panama','country_id' => '169'),\narray('id' => '2044','name' => '(UCN) - Buchanan Airport, Buchanan, Liberia','country_id' => '127'),\narray('id' => '2045','name' => '(CPA) - Cape Palmas Airport, Harper, Liberia','country_id' => '127'),\narray('id' => '2046','name' => '(SNI) - Greenville Sinoe Airport, Greenville, Liberia','country_id' => '127'),\narray('id' => '2047','name' => '(UCN) - Lamco Airport, Buchanan, Liberia','country_id' => '127'),\narray('id' => '2048','name' => '(MLW) - Spriggs Payne Airport, Monrovia, Liberia','country_id' => '127'),\narray('id' => '2049','name' => '(NIA) - Nimba Airport, Nimba, Liberia','country_id' => '127'),\narray('id' => '2050','name' => '(GLP) - Gulgubip Airport, Gulgubip, Papua New Guinea','country_id' => '172'),\narray('id' => '2051','name' => '(ROB) - Roberts International Airport, Monrovia, Liberia','country_id' => '127'),\narray('id' => '2052','name' => '(SAZ) - Sasstown Airport, Sasstown, Liberia','country_id' => '127'),\narray('id' => '2053','name' => '(THC) - Tchien Airport, Tchien, Liberia','country_id' => '127'),\narray('id' => '2054','name' => '(VOI) - Voinjama Airport, Voinjama, Liberia','country_id' => '127'),\narray('id' => '2055','name' => '(AGA) - Al Massira Airport, Agadir, Morocco','country_id' => '133'),\narray('id' => '2056','name' => '(TTA) - Tan Tan Airport, Tan Tan, Morocco','country_id' => '133'),\narray('id' => '2057','name' => '(OZG) - Zagora Airport, Zagora, Morocco','country_id' => '133'),\narray('id' => '2058','name' => '(UAR) - Bouarfa Airport, Bouarfa, Morocco','country_id' => '133'),\narray('id' => '2059','name' => '(FEZ) - SaAss Airport, Fes, Morocco','country_id' => '133'),\narray('id' => '2060','name' => '(ERH) - Moulay Ali Cherif Airport, Errachidia, Morocco','country_id' => '133'),\narray('id' => '2061','name' => '(MEK) - Bassatine Airport, Meknes, Morocco','country_id' => '133'),\narray('id' => '2062','name' => '(OUD) - Angads Airport, Oujda, Morocco','country_id' => '133'),\narray('id' => '2063','name' => '(SMW) - Smara Airport, Smara, Western Sahara','country_id' => '63'),\narray('id' => '2064','name' => '(GMD) - Ben Slimane Airport, Ben Slimane, Morocco','country_id' => '133'),\narray('id' => '2065','name' => '(RBA) - Rabat-SalA Airport, Rabat, Morocco','country_id' => '133'),\narray('id' => '2066','name' => '(SII) - Sidi Ifni Xx Airport, Sidi Ifni, Morocco','country_id' => '133'),\narray('id' => '2067','name' => '(VIL) - Dakhla Airport, Dakhla, Western Sahara','country_id' => '63'),\narray('id' => '2068','name' => '(ESU) - Mogador Airport, Essaouira, Morocco','country_id' => '133'),\narray('id' => '2069','name' => '(EUN) - Hassan I Airport, El AaiAon, Western Sahara','country_id' => '63'),\narray('id' => '2070','name' => '(CMN) - Mohammed V International Airport, Casablanca, Morocco','country_id' => '133'),\narray('id' => '2071','name' => '(SFI) - Safi Airport, Safi, Morocco','country_id' => '133'),\narray('id' => '2072','name' => '(NDR) - Nador International Airport, Nador, Morocco','country_id' => '133'),\narray('id' => '2073','name' => '(RAK) - Menara Airport, Marrakech, Morocco','country_id' => '133'),\narray('id' => '2074','name' => '(NNA) - Kenitra Airport, , Morocco','country_id' => '133'),\narray('id' => '2075','name' => '(OZZ) - Ouarzazate Airport, Ouarzazate, Morocco','country_id' => '133'),\narray('id' => '2076','name' => '(AHU) - Cherif Al Idrissi Airport, Al Hoceima, Morocco','country_id' => '133'),\narray('id' => '2077','name' => '(TTU) - Saniat R\\'mel Airport, TAtouan, Morocco','country_id' => '133'),\narray('id' => '2078','name' => '(TNG) - Ibn Batouta Airport, Tangier, Morocco','country_id' => '133'),\narray('id' => '2079','name' => '(GNU) - Goodnews Airport, Goodnews, United States','country_id' => '228'),\narray('id' => '2080','name' => '(GOC) - Gora Airstrip, Gora, Papua New Guinea','country_id' => '172'),\narray('id' => '2081','name' => '(KDA) - Kolda North Airport, Kolda, Senegal','country_id' => '200'),\narray('id' => '2082','name' => '(ZIG) - Ziguinchor Airport, Ziguinchor, Senegal','country_id' => '200'),\narray('id' => '2083','name' => '(CSK) - Cap Skirring Airport, Cap Skirring, Senegal','country_id' => '200'),\narray('id' => '2084','name' => '(KLC) - Kaolack Airport, Kaolack, Senegal','country_id' => '200'),\narray('id' => '2085','name' => '(DKR) - LAopold SAdar Senghor International Airport, Dakar, Senegal','country_id' => '200'),\narray('id' => '2086','name' => '(MAX) - Ouro Sogui Airport, Matam, Senegal','country_id' => '200'),\narray('id' => '2087','name' => '(POD) - Podor Airport, Podor, Senegal','country_id' => '200'),\narray('id' => '2088','name' => '(RDT) - Richard Toll Airport, Richard Toll, Senegal','country_id' => '200'),\narray('id' => '2089','name' => '(XLS) - Saint Louis Airport, Saint Louis, Senegal','country_id' => '200'),\narray('id' => '2090','name' => '(BXE) - Bakel Airport, Bakel, Senegal','country_id' => '200'),\narray('id' => '2091','name' => '(KGG) - KAdougou Airport, KAdougou, Senegal','country_id' => '200'),\narray('id' => '2092','name' => '(SMY) - Simenti Airport, Simenti, Senegal','country_id' => '200'),\narray('id' => '2093','name' => '(TUD) - Tambacounda Airport, Tambacounda, Senegal','country_id' => '200'),\narray('id' => '2094','name' => '(AEO) - Aioun el Atrouss Airport, Aioun El Atrouss, Mauritania','country_id' => '147'),\narray('id' => '2095','name' => '(OTL) - Boutilimit Airport, Boutilimit, Mauritania','country_id' => '147'),\narray('id' => '2096','name' => '(THI) - Tichitt Airport, Tichitt, Mauritania','country_id' => '147'),\narray('id' => '2097','name' => '(TIY) - Tidjikja Airport, Tidjikja, Mauritania','country_id' => '147'),\narray('id' => '2098','name' => '(BGH) - Abbaye Airport, Boghe, Mauritania','country_id' => '147'),\narray('id' => '2099','name' => '(KFA) - Kiffa Airport, Kiffa, Mauritania','country_id' => '147'),\narray('id' => '2100','name' => '(TMD) - Timbedra Airport, Timbedra, Mauritania','country_id' => '147'),\narray('id' => '2101','name' => '(EMN) - NAma Airport, NAma, Mauritania','country_id' => '147'),\narray('id' => '2102','name' => '(AJJ) - Akjoujt Airport, Akjoujt, Mauritania','country_id' => '147'),\narray('id' => '2103','name' => '(KED) - KaAdi Airport, KaAdi, Mauritania','country_id' => '147'),\narray('id' => '2104','name' => '(MOM) - Letfotar Airport, Moudjeria, Mauritania','country_id' => '147'),\narray('id' => '2105','name' => '(NKC) - Nouakchott International Airport, Nouakchott, Mauritania','country_id' => '147'),\narray('id' => '2106','name' => '(SEY) - SAlibaby Airport, SAlibaby, Mauritania','country_id' => '147'),\narray('id' => '2107','name' => '(THT) - Tamchakett Airport, Tamchakett, Mauritania','country_id' => '147'),\narray('id' => '2108','name' => '(ATR) - Atar International Airport, Atar, Mauritania','country_id' => '147'),\narray('id' => '2109','name' => '(FGD) - Fderik Airport, Fderik, Mauritania','country_id' => '147'),\narray('id' => '2110','name' => '(NDB) - Nouadhibou International Airport, Nouadhibou, Mauritania','country_id' => '147'),\narray('id' => '2111','name' => '(OUZ) - Tazadit Airport, ZouArate, Mauritania','country_id' => '147'),\narray('id' => '2112','name' => '(JSS) - Spetsai Airport, Spetsai, Greece','country_id' => '86'),\narray('id' => '2113','name' => '(GRC) - Grand Cess Airport, Grand Cess, Liberia','country_id' => '127'),\narray('id' => '2114','name' => '(GMT) - Granite Mountain Air Station, Granite Mountain, United States','country_id' => '228'),\narray('id' => '2115','name' => '(CIQ) - Chiquimula Airport, Chiquimula, Guatemala','country_id' => '88'),\narray('id' => '2116','name' => '(DON) - Dos Lagunas Airport, Dos Lagunas, Guatemala','country_id' => '88'),\narray('id' => '2117','name' => '(ENJ) - El Naranjo Airport, El Naranjo, Guatemala','country_id' => '88'),\narray('id' => '2118','name' => '(PCG) - Paso Caballos Airport, Paso Caballos, Guatemala','country_id' => '88'),\narray('id' => '2119','name' => '(TKM) - El PetAn Airport, Tikal, Guatemala','country_id' => '88'),\narray('id' => '2120','name' => '(UAX) - Uaxactun Airport, Uaxactun, Guatemala','country_id' => '88'),\narray('id' => '2121','name' => '(PKJ) - Playa Grande Airport, Playa Grande, Guatemala','country_id' => '88'),\narray('id' => '2122','name' => '(GTZ) - Kirawira B Aerodrome, Grumeti Game Reserve, Tanzania','country_id' => '224'),\narray('id' => '2123','name' => '(CKY) - Conakry International Airport, Conakry, Guinea','country_id' => '83'),\narray('id' => '2124','name' => '(GUE) - Guriaso (Keraso) Airport, Guriaso, Papua New Guinea','country_id' => '172'),\narray('id' => '2125','name' => '(FIG) - Fria Airport, Fria, Guinea','country_id' => '83'),\narray('id' => '2126','name' => '(FAA) - Faranah Airport, Faranah, Guinea','country_id' => '83'),\narray('id' => '2127','name' => '(KSI) - Kissidougou Airport, Kissidougou, Guinea','country_id' => '83'),\narray('id' => '2128','name' => '(LEK) - Tata Airport, LabA, Guinea','country_id' => '83'),\narray('id' => '2129','name' => '(MCA) - Macenta Airport, Macenta, Guinea','country_id' => '83'),\narray('id' => '2130','name' => '(NZE) - NzArAkorA Airport, NzArAkorA, Guinea','country_id' => '83'),\narray('id' => '2131','name' => '(BKJ) - BokA Baralande Airport, BokA, Guinea','country_id' => '83'),\narray('id' => '2132','name' => '(SBI) - Sambailo Airport, Koundara, Guinea','country_id' => '83'),\narray('id' => '2133','name' => '(GII) - Siguiri Airport, Siguiri, Guinea','country_id' => '83'),\narray('id' => '2134','name' => '(KNN) - Kankan Airport, Kankan, Guinea','country_id' => '83'),\narray('id' => '2135','name' => '(SID) - AmAlcar Cabral International Airport, Espargos, Cape Verde','country_id' => '49'),\narray('id' => '2136','name' => '(NTO) - Agostinho Neto Airport, Ponta do Sol, Cape Verde','country_id' => '49'),\narray('id' => '2137','name' => '(BVC) - Rabil Airport, Rabil, Cape Verde','country_id' => '49'),\narray('id' => '2138','name' => '(GVE) - Gordonsville Municipal Airport, Gordonsville, United States','country_id' => '228'),\narray('id' => '2139','name' => '(MMO) - Maio Airport, Vila do Maio, Cape Verde','country_id' => '49'),\narray('id' => '2140','name' => '(MTI) - Mosteiros Airport, Vila do Mosteiros, Cape Verde','country_id' => '49'),\narray('id' => '2141','name' => '(RAI) - Praia International Airport, Praia, Cape Verde','country_id' => '49'),\narray('id' => '2142','name' => '(SFL) - SAo Filipe Airport, SAo Filipe, Cape Verde','country_id' => '49'),\narray('id' => '2143','name' => '(SNE) - PreguiAa Airport, PreguiAa, Cape Verde','country_id' => '49'),\narray('id' => '2144','name' => '(VXE) - SAo Pedro Airport, SAo Pedro, Cape Verde','country_id' => '49'),\narray('id' => '2145','name' => '(BCG) - Bemichi Airport, Bemichi, Guyana','country_id' => '91'),\narray('id' => '2146','name' => '(BTO) - Botopasi Airport, Botopasi, Suriname','country_id' => '202'),\narray('id' => '2147','name' => '(DOE) - Djumu-Djomoe Airport, Djumu-Djomoe, Suriname','country_id' => '202'),\narray('id' => '2148','name' => '(LDO) - Ladouanie Airport, Aurora, Suriname','country_id' => '202'),\narray('id' => '2149','name' => '(WSO) - Washabo Airport, Washabo, Suriname','country_id' => '202'),\narray('id' => '2150','name' => '(ADD) - Addis Ababa Bole International Airport, Addis Ababa, Ethiopia','country_id' => '66'),\narray('id' => '2151','name' => '(AMH) - Arba Minch Airport, , Ethiopia','country_id' => '66'),\narray('id' => '2152','name' => '(AXU) - Axum Airport, , Ethiopia','country_id' => '66'),\narray('id' => '2153','name' => '(BCO) - Baco Airport, Baco, Ethiopia','country_id' => '66'),\narray('id' => '2154','name' => '(BJR) - Bahir Dar Airport, Bahir Dar, Ethiopia','country_id' => '66'),\narray('id' => '2155','name' => '(BEI) - Beica Airport, Beica, Ethiopia','country_id' => '66'),\narray('id' => '2156','name' => '(DSE) - Combolcha Airport, Dessie, Ethiopia','country_id' => '66'),\narray('id' => '2157','name' => '(DEM) - Dembidollo Airport, Dembidollo, Ethiopia','country_id' => '66'),\narray('id' => '2158','name' => '(DBM) - Debra Marcos Airport, Debra Marcos, Ethiopia','country_id' => '66'),\narray('id' => '2159','name' => '(DIR) - Aba Tenna Dejazmach Yilma International Airport, Dire Dawa, Ethiopia','country_id' => '66'),\narray('id' => '2160','name' => '(DBT) - Debre Tabor Airport, Debre Tabor, Ethiopia','country_id' => '66'),\narray('id' => '2161','name' => '(FNH) - Fincha Airport, Fincha, Ethiopia','country_id' => '66'),\narray('id' => '2162','name' => '(GOB) - Robe Airport, Goba, Ethiopia','country_id' => '66'),\narray('id' => '2163','name' => '(GNN) - Ghinnir Airport, Ghinnir, Ethiopia','country_id' => '66'),\narray('id' => '2164','name' => '(GMB) - Gambella Airport, Gambela, Ethiopia','country_id' => '66'),\narray('id' => '2165','name' => '(GDQ) - Gonder Airport, Gondar, Ethiopia','country_id' => '66'),\narray('id' => '2166','name' => '(GDE) - Gode Airport, Gode, Ethiopia','country_id' => '66'),\narray('id' => '2167','name' => '(GOR) - Gore Airport, Gore, Ethiopia','country_id' => '66'),\narray('id' => '2168','name' => '(QHR) - Harar Meda Airport, Debre Zeyit, Ethiopia','country_id' => '66'),\narray('id' => '2169','name' => '(HUE) - Humera Airport, Humera, Ethiopia','country_id' => '66'),\narray('id' => '2170','name' => '(JIJ) - Wilwal International Airport, Jijiga, Ethiopia','country_id' => '66'),\narray('id' => '2171','name' => '(JIM) - Jimma Airport, Jimma, Ethiopia','country_id' => '66'),\narray('id' => '2172','name' => '(ABK) - Kabri Dehar Airport, Kabri Dehar, Ethiopia','country_id' => '66'),\narray('id' => '2173','name' => '(LFO) - Kelafo East Airport, Kelafo, Ethiopia','country_id' => '66'),\narray('id' => '2174','name' => '(AWA) - Awassa Airport, Awassa, Ethiopia','country_id' => '66'),\narray('id' => '2175','name' => '(LLI) - Lalibella Airport, Lalibela, Ethiopia','country_id' => '66'),\narray('id' => '2176','name' => '(MKS) - Mekane Selam Airport, Mekane Selam, Ethiopia','country_id' => '66'),\narray('id' => '2177','name' => '(MQX) - Mekele Airport, , Ethiopia','country_id' => '66'),\narray('id' => '2178','name' => '(ETE) - Metema Airport, Metema, Ethiopia','country_id' => '66'),\narray('id' => '2179','name' => '(NDM) - Mendi Airport, Mendi, Ethiopia','country_id' => '66'),\narray('id' => '2180','name' => '(MUJ) - Mui River Airport, Omo National Park, Ethiopia','country_id' => '66'),\narray('id' => '2181','name' => '(MTF) - Mizan Teferi Airport, Mizan Teferi, Ethiopia','country_id' => '66'),\narray('id' => '2182','name' => '(EGL) - Negele Airport, Negele Borana, Ethiopia','country_id' => '66'),\narray('id' => '2183','name' => '(NEJ) - Nejjo Airport, Nejjo, Ethiopia','country_id' => '66'),\narray('id' => '2184','name' => '(NEK) - Nekemte Airport, Nekemte, Ethiopia','country_id' => '66'),\narray('id' => '2185','name' => '(PWI) - Beles Airport, Pawe, Ethiopia','country_id' => '66'),\narray('id' => '2186','name' => '(SXU) - Soddu Airport, Soddu, Ethiopia','country_id' => '66'),\narray('id' => '2187','name' => '(SKR) - Shakiso Airport, Shakiso, Ethiopia','country_id' => '66'),\narray('id' => '2188','name' => '(SZE) - Semera Airport, Semera, Ethiopia','country_id' => '66'),\narray('id' => '2189','name' => '(ASO) - Asosa Airport, Asosa, Ethiopia','country_id' => '66'),\narray('id' => '2190','name' => '(TIE) - Tippi Airport, Tippi, Ethiopia','country_id' => '66'),\narray('id' => '2191','name' => '(WAC) - Waca Airport, Waca, Ethiopia','country_id' => '66'),\narray('id' => '2192','name' => '(WRA) - Warder Airport, Warder, Ethiopia','country_id' => '66'),\narray('id' => '2193','name' => '(HAY) - Haycock Airport, Haycock, United States','country_id' => '228'),\narray('id' => '2194','name' => '(HAZ) - Hatzfeldhaven Airport, Hatzfeldhaven, Papua New Guinea','country_id' => '172'),\narray('id' => '2195','name' => '(BJM) - Bujumbura International Airport, Bujumbura, Burundi','country_id' => '22'),\narray('id' => '2196','name' => '(GID) - Gitega Airport, Gitega, Burundi','country_id' => '22'),\narray('id' => '2197','name' => '(KRE) - Kirundo Airport, Kirundo, Burundi','country_id' => '22'),\narray('id' => '2198','name' => '(ALU) - Alula Airport, Alula, Somalia','country_id' => '201'),\narray('id' => '2199','name' => '(BIB) - Baidoa Airport, Baidoa, Somalia','country_id' => '201'),\narray('id' => '2200','name' => '(CXN) - Candala Airport, Candala, Somalia','country_id' => '201'),\narray('id' => '2201','name' => '(BSY) - Bardera Airport, , Somalia','country_id' => '201'),\narray('id' => '2202','name' => '(HCM) - Eil Airport, Eyl, Somalia','country_id' => '201'),\narray('id' => '2203','name' => '(BSA) - Bosaso Airport, Bosaso, Somalia','country_id' => '201'),\narray('id' => '2204','name' => '(GSR) - Gardo Airport, Gardo, Somalia','country_id' => '201'),\narray('id' => '2205','name' => '(HGA) - Egal International Airport, Hargeisa, Somalia','country_id' => '201'),\narray('id' => '2206','name' => '(BBO) - Berbera Airport, Berbera, Somalia','country_id' => '201'),\narray('id' => '2207','name' => '(LGX) - Lugh Ganane Airport, Luuq, Somalia','country_id' => '201'),\narray('id' => '2208','name' => '(KMU) - Kisimayu Airport, , Somalia','country_id' => '201'),\narray('id' => '2209','name' => '(MGQ) - Aden Adde International Airport, Mogadishu, Somalia','country_id' => '201'),\narray('id' => '2210','name' => '(CMO) - Obbia Airport, Obbia, Somalia','country_id' => '201'),\narray('id' => '2211','name' => '(GLK) - Galcaio Airport, Galcaio, Somalia','country_id' => '201'),\narray('id' => '2212','name' => '(CMS) - Scusciuban Airport, Scusciuban, Somalia','country_id' => '201'),\narray('id' => '2213','name' => '(ERA) - Erigavo Airport, Erigavo, Somalia','country_id' => '201'),\narray('id' => '2214','name' => '(BUO) - Burao Airport, Burao, Somalia','country_id' => '201'),\narray('id' => '2215','name' => '(JIB) - Djibouti-Ambouli Airport, Djibouti City, Djibouti','country_id' => '55'),\narray('id' => '2216','name' => '(AII) - Ali-Sabieh Airport, Ali-Sabieh, Djibouti','country_id' => '55'),\narray('id' => '2217','name' => '(MHI) - Moucha Airport, Moucha Island, Djibouti','country_id' => '55'),\narray('id' => '2218','name' => '(OBC) - Obock Airport, Obock, Djibouti','country_id' => '55'),\narray('id' => '2219','name' => '(TDJ) - Tadjoura Airport, Tadjoura, Djibouti','country_id' => '55'),\narray('id' => '2220','name' => '(SEW) - Siwa Oasis North Airport, Siwa, Egypt','country_id' => '62'),\narray('id' => '2221','name' => '(EMY) - El Minya Airport, Minya, Egypt','country_id' => '62'),\narray('id' => '2222','name' => '(SQK) - Sidi Barrani Airport, Sidi Barrani, Egypt','country_id' => '62'),\narray('id' => '2223','name' => '(DBB) - El Alamein International Airport, El Alamein, Egypt','country_id' => '62'),\narray('id' => '2224','name' => '(AAC) - El Arish International Airport, El Arish, Egypt','country_id' => '62'),\narray('id' => '2225','name' => '(ATZ) - Assiut International Airport, Assiut, Egypt','country_id' => '62'),\narray('id' => '2226','name' => '(ALY) - El Nouzha Airport, Alexandria, Egypt','country_id' => '62'),\narray('id' => '2227','name' => '(HBE) - Borg El Arab International Airport, Alexandria, Egypt','country_id' => '62'),\narray('id' => '2228','name' => '(ABS) - Abu Simbel Airport, Abu Simbel, Egypt','country_id' => '62'),\narray('id' => '2229','name' => '(CAI) - Cairo International Airport, Cairo, Egypt','country_id' => '62'),\narray('id' => '2230','name' => '(CWE) - Cairo West Airport, El Cairo, Egypt','country_id' => '62'),\narray('id' => '2231','name' => '(DAK) - Dakhla Airport, , Egypt','country_id' => '62'),\narray('id' => '2232','name' => '(HRG) - Hurghada International Airport, Hurghada, Egypt','country_id' => '62'),\narray('id' => '2233','name' => '(EGH) - El Gora Airport, El Gora, Egypt','country_id' => '62'),\narray('id' => '2234','name' => '(UVL) - El Kharga Airport, , Egypt','country_id' => '62'),\narray('id' => '2235','name' => '(LXR) - Luxor International Airport, Luxor, Egypt','country_id' => '62'),\narray('id' => '2236','name' => '(RMF) - Marsa Alam International Airport, Marsa Alam, Egypt','country_id' => '62'),\narray('id' => '2237','name' => '(HMB) - Sohag International Airport, Sohag, Egypt','country_id' => '62'),\narray('id' => '2238','name' => '(MUH) - Mersa Matruh Airport, Mersa Matruh, Egypt','country_id' => '62'),\narray('id' => '2239','name' => '(HEO) - Haelogo Airport, Haelogo, Papua New Guinea','country_id' => '172'),\narray('id' => '2240','name' => '(GSQ) - Shark El Oweinat International Airport, , Egypt','country_id' => '62'),\narray('id' => '2241','name' => '(PSD) - Port Said Airport, Port Said, Egypt','country_id' => '62'),\narray('id' => '2242','name' => '(SKV) - St Catherine International Airport, , Egypt','country_id' => '62'),\narray('id' => '2243','name' => '(SSH) - Sharm El Sheikh International Airport, Sharm el-Sheikh, Egypt','country_id' => '62'),\narray('id' => '2244','name' => '(ASW) - Aswan International Airport, Aswan, Egypt','country_id' => '62'),\narray('id' => '2245','name' => '(TCP) - Taba International Airport, Taba, Egypt','country_id' => '62'),\narray('id' => '2246','name' => '(ELT) - El Tor Airport, , Egypt','country_id' => '62'),\narray('id' => '2247','name' => '(HGI) - Paloich Airport, Heliport, Higleig, South Sudan','country_id' => '203'),\narray('id' => '2248','name' => '(ASM) - Asmara International Airport, Asmara, Eritrea','country_id' => '64'),\narray('id' => '2249','name' => '(MSW) - Massawa International Airport, Massawa, Eritrea','country_id' => '64'),\narray('id' => '2250','name' => '(ASA) - Assab International Airport, Asab, Eritrea','country_id' => '64'),\narray('id' => '2251','name' => '(TES) - Tessenei Airport, Tessenei, Eritrea','country_id' => '64'),\narray('id' => '2252','name' => '(HPV) - Princeville Airport, Hanalei, United States','country_id' => '228'),\narray('id' => '2253','name' => '(HIA) - Lianshui Airport, Huai\\'an, China','country_id' => '45'),\narray('id' => '2254','name' => '(HIL) - Shilavo Airport, Shilavo, Ethiopia','country_id' => '66'),\narray('id' => '2255','name' => '(ASV) - Amboseli Airport, Amboseli National Park, Kenya','country_id' => '111'),\narray('id' => '2256','name' => '(HKB) - Healy Lake Airport, Healy Lake, United States','country_id' => '228'),\narray('id' => '2257','name' => '(EDL) - Eldoret International Airport, Eldoret, Kenya','country_id' => '111'),\narray('id' => '2258','name' => '(EYS) - Eliye Springs Airport, Eliye Springs, Kenya','country_id' => '111'),\narray('id' => '2259','name' => '(KLK) - Kalokol Airport, Kalokol, Kenya','country_id' => '111'),\narray('id' => '2260','name' => '(GAS) - Garissa Airport, Garissa, Kenya','country_id' => '111'),\narray('id' => '2261','name' => '(HOA) - Hola Airport, Hola, Kenya','country_id' => '111'),\narray('id' => '2262','name' => '(NBO) - Jomo Kenyatta International Airport, Nairobi, Kenya','country_id' => '111'),\narray('id' => '2263','name' => '(GGM) - Kakamega Airport, Kakamega, Kenya','country_id' => '111'),\narray('id' => '2264','name' => '(KIS) - Kisumu Airport, Kisumu, Kenya','country_id' => '111'),\narray('id' => '2265','name' => '(ILU) - Kilaguni Airport, Kilaguni, Kenya','country_id' => '111'),\narray('id' => '2266','name' => '(KEY) - Kericho Airport, Kericho, Kenya','country_id' => '111'),\narray('id' => '2267','name' => '(KTL) - Kitale Airport, Kitale, Kenya','country_id' => '111'),\narray('id' => '2268','name' => '(LKG) - Lokichoggio Airport, Lokichoggio, Kenya','country_id' => '111'),\narray('id' => '2269','name' => '(LOK) - Lodwar Airport, Lodwar, Kenya','country_id' => '111'),\narray('id' => '2270','name' => '(LAU) - Manda Airstrip, Lamu, Kenya','country_id' => '111'),\narray('id' => '2271','name' => '(LOY) - Loyengalani Airport, Loyengalani, Kenya','country_id' => '111'),\narray('id' => '2272','name' => '(NDE) - Mandera Airport, Mandera, Kenya','country_id' => '111'),\narray('id' => '2273','name' => '(RBT) - Marsabit Airport, Marsabit, Kenya','country_id' => '111'),\narray('id' => '2274','name' => '(MYD) - Malindi Airport, Malindi, Kenya','country_id' => '111'),\narray('id' => '2275','name' => '(MBA) - Mombasa Moi International Airport, Mombasa, Kenya','country_id' => '111'),\narray('id' => '2276','name' => '(MRE) - Mara Serena Lodge Airstrip, Masai Mara, Kenya','country_id' => '111'),\narray('id' => '2277','name' => '(OYL) - Moyale Airport, Moyale (Lower), Kenya','country_id' => '111'),\narray('id' => '2278','name' => '(NYE) - Nyeri Airport, Nyeri, Kenya','country_id' => '111'),\narray('id' => '2279','name' => '(NUU) - Nakuru Airport, Nakuru, Kenya','country_id' => '111'),\narray('id' => '2280','name' => '(WIL) - Nairobi Wilson Airport, Nairobi, Kenya','country_id' => '111'),\narray('id' => '2281','name' => '(NYK) - Nanyuki Airport, Nanyuki, Kenya','country_id' => '111'),\narray('id' => '2282','name' => '(UAS) - Samburu South Airport, Samburu South, Kenya','country_id' => '111'),\narray('id' => '2283','name' => '(UKA) - Ukunda Airstrip, Ukunda, Kenya','country_id' => '111'),\narray('id' => '2284','name' => '(WJR) - Wajir Airport, Wajir, Kenya','country_id' => '111'),\narray('id' => '2285','name' => '(SRX) - Gardabya Airport, Sirt, Libya','country_id' => '132'),\narray('id' => '2286','name' => '(TOB) - Gamal Abdel Nasser Airport, Tobruk, Libya','country_id' => '132'),\narray('id' => '2287','name' => '(GHT) - Ghat Airport, Ghat, Libya','country_id' => '132'),\narray('id' => '2288','name' => '(AKF) - Kufra Airport, Kufra, Libya','country_id' => '132'),\narray('id' => '2289','name' => '(BEN) - Benina International Airport, Benghazi, Libya','country_id' => '132'),\narray('id' => '2290','name' => '(MJI) - Mitiga Airport, Tripoli, Libya','country_id' => '132'),\narray('id' => '2291','name' => '(LAQ) - La Abraq Airport, Al Bayda\\', Libya','country_id' => '132'),\narray('id' => '2292','name' => '(SEB) - Sabha Airport, Sabha, Libya','country_id' => '132'),\narray('id' => '2293','name' => '(TIP) - Tripoli International Airport, Tripoli, Libya','country_id' => '132'),\narray('id' => '2294','name' => '(LMQ) - Marsa Brega Airport, , Libya','country_id' => '132'),\narray('id' => '2295','name' => '(HUQ) - Hon Airport, , Libya','country_id' => '132'),\narray('id' => '2296','name' => '(LTD) - Ghadames East Airport, Ghadames, Libya','country_id' => '132'),\narray('id' => '2297','name' => '(WAX) - Zwara Airport, Zuwara, Libya','country_id' => '132'),\narray('id' => '2298','name' => '(EDQ) - Erandique Airport, Erandique, Honduras','country_id' => '93'),\narray('id' => '2299','name' => '(HNE) - Tahneta Pass Airport, Tahneta Pass Lodge, United States','country_id' => '228'),\narray('id' => '2300','name' => '(HOO) - Nhon Co Airfield, Quang Duc, Vietnam','country_id' => '236'),\narray('id' => '2301','name' => '(HRC) - Sary Su Airport, Zhayrem, Kazakhstan','country_id' => '121'),\narray('id' => '2302','name' => '(GYI) - Gisenyi Airport, Gisenyi, Rwanda','country_id' => '188'),\narray('id' => '2303','name' => '(BTQ) - Butare Airport, Butare, Rwanda','country_id' => '188'),\narray('id' => '2304','name' => '(KGL) - Kigali International Airport, Kigali, Rwanda','country_id' => '188'),\narray('id' => '2305','name' => '(RHG) - Ruhengeri Airport, Ruhengeri, Rwanda','country_id' => '188'),\narray('id' => '2306','name' => '(KME) - Kamembe Airport, Kamembe, Rwanda','country_id' => '188'),\narray('id' => '2307','name' => '(ATB) - Atbara Airport, Atbara, Sudan','country_id' => '192'),\narray('id' => '2308','name' => '(EDB) - El Debba Airport, El Debba, Sudan','country_id' => '192'),\narray('id' => '2309','name' => '(DOG) - Dongola Airport, Dongola, Sudan','country_id' => '192'),\narray('id' => '2310','name' => '(RSS) - Damazin Airport, Ad Damazin, Sudan','country_id' => '192'),\narray('id' => '2311','name' => '(ELF) - El Fasher Airport, El Fasher, Sudan','country_id' => '192'),\narray('id' => '2312','name' => '(GSU) - Azaza Airport, Gedaref, Sudan','country_id' => '192'),\narray('id' => '2313','name' => '(DNX) - Galegu Airport, Dinder, Sudan','country_id' => '192'),\narray('id' => '2314','name' => '(EGN) - Geneina Airport, Geneina, Sudan','country_id' => '192'),\narray('id' => '2315','name' => '(HEG) - Heglig Airport, Heglig Oilfield, Sudan','country_id' => '192'),\narray('id' => '2316','name' => '(KSL) - Kassala Airport, Kassala, Sudan','country_id' => '192'),\narray('id' => '2317','name' => '(GBU) - Khashm El Girba Airport, Khashm El Girba, Sudan','country_id' => '192'),\narray('id' => '2318','name' => '(KST) - Kosti Airport, Kosti, Sudan','country_id' => '192'),\narray('id' => '2319','name' => '(KDX) - Kadugli Airport, Kadugli, Sudan','country_id' => '192'),\narray('id' => '2320','name' => '(RBX) - Rumbek Airport, Rumbek, South Sudan','country_id' => '203'),\narray('id' => '2321','name' => '(MWE) - Merowe New Airport, Merowe, Sudan','country_id' => '192'),\narray('id' => '2322','name' => '(NUD) - En Nahud Airport, En Nahud, Sudan','country_id' => '192'),\narray('id' => '2323','name' => '(UYL) - Nyala Airport, Nyala, Sudan','country_id' => '192'),\narray('id' => '2324','name' => '(NHF) - New Halfa Airport, New Halfa, Sudan','country_id' => '192'),\narray('id' => '2325','name' => '(EBD) - El Obeid Airport, Al-Ubayyid, Sudan','country_id' => '192'),\narray('id' => '2326','name' => '(PZU) - Port Sudan New International Airport, Port Sudan, Sudan','country_id' => '192'),\narray('id' => '2327','name' => '(JUB) - Juba International Airport, Juba, South Sudan','country_id' => '203'),\narray('id' => '2328','name' => '(MAK) - Malakal Airport, Malakal, South Sudan','country_id' => '203'),\narray('id' => '2329','name' => '(KRT) - Khartoum International Airport, Khartoum, Sudan','country_id' => '192'),\narray('id' => '2330','name' => '(WHF) - Wadi Halfa Airport, Wadi Halfa, Sudan','country_id' => '192'),\narray('id' => '2331','name' => '(DNI) - Wad Medani Airport, Wad Medani, Sudan','country_id' => '192'),\narray('id' => '2332','name' => '(WUU) - Wau Airport, Wau, South Sudan','country_id' => '203'),\narray('id' => '2333','name' => '(ZLX) - Zalingei Airport, Zalingei, Sudan','country_id' => '192'),\narray('id' => '2334','name' => '(ARK) - Arusha Airport, Arusha, Tanzania','country_id' => '224'),\narray('id' => '2335','name' => '(BKZ) - Bukoba Airport, Bukoba, Tanzania','country_id' => '224'),\narray('id' => '2336','name' => '(DAR) - Julius Nyerere International Airport, Dar es Salaam, Tanzania','country_id' => '224'),\narray('id' => '2337','name' => '(DOD) - Dodoma Airport, Dodoma, Tanzania','country_id' => '224'),\narray('id' => '2338','name' => '(IRI) - Iringa Airport, Nduli, Tanzania','country_id' => '224'),\narray('id' => '2339','name' => '(TKQ) - Kigoma Airport, Kigoma, Tanzania','country_id' => '224'),\narray('id' => '2340','name' => '(KIY) - Kilwa Masoko Airport, Kilwa Masoko, Tanzania','country_id' => '224'),\narray('id' => '2341','name' => '(JRO) - Kilimanjaro International Airport, Arusha, Tanzania','country_id' => '224'),\narray('id' => '2342','name' => '(LDI) - Kikwetu Airport, Lindi, Tanzania','country_id' => '224'),\narray('id' => '2343','name' => '(LKY) - Lake Manyara Airport, Lake Manyara National Park, Tanzania','country_id' => '224'),\narray('id' => '2344','name' => '(HTM) - Khatgal Airport, Hatgal, Mongolia','country_id' => '143'),\narray('id' => '2345','name' => '(MFA) - Mafia Island Airport, Mafia Island, Tanzania','country_id' => '224'),\narray('id' => '2346','name' => '(MBI) - Mbeya Airport, Mbeya, Tanzania','country_id' => '224'),\narray('id' => '2347','name' => '(MWN) - Mwadui Airport, Mwadui, Tanzania','country_id' => '224'),\narray('id' => '2348','name' => '(XMI) - Masasi Airport, Masasi, Tanzania','country_id' => '224'),\narray('id' => '2349','name' => '(QSI) - Moshi Airport, Moshi, Tanzania','country_id' => '224'),\narray('id' => '2350','name' => '(MYW) - Mtwara Airport, Mtwara, Tanzania','country_id' => '224'),\narray('id' => '2351','name' => '(MUZ) - Musoma Airport, Musoma, Tanzania','country_id' => '224'),\narray('id' => '2352','name' => '(MWZ) - Mwanza Airport, Mwanza, Tanzania','country_id' => '224'),\narray('id' => '2353','name' => '(NCH) - Nachingwea Airport, Nachingwea, Tanzania','country_id' => '224'),\narray('id' => '2354','name' => '(JOM) - Njombe Airport, Njombe, Tanzania','country_id' => '224'),\narray('id' => '2355','name' => '(PMA) - Pemba Airport, Chake, Tanzania','country_id' => '224'),\narray('id' => '2356','name' => '(SEU) - Seronera Airport, Seronera, Tanzania','country_id' => '224'),\narray('id' => '2357','name' => '(SGX) - Songea Airport, Songea, Tanzania','country_id' => '224'),\narray('id' => '2358','name' => '(SUT) - Sumbawanga Airport, Sumbawanga, Tanzania','country_id' => '224'),\narray('id' => '2359','name' => '(SHY) - Shinyanga Airport, Shinyanga, Tanzania','country_id' => '224'),\narray('id' => '2360','name' => '(TBO) - Tabora Airport, Tabora, Tanzania','country_id' => '224'),\narray('id' => '2361','name' => '(TGT) - Tanga Airport, Tanga, Tanzania','country_id' => '224'),\narray('id' => '2362','name' => '(ZNZ) - Abeid Amani Karume International Airport, Zanzibar, Tanzania','country_id' => '224'),\narray('id' => '2363','name' => '(RUA) - Arua Airport, Arua, Uganda','country_id' => '226'),\narray('id' => '2364','name' => '(EBB) - Entebbe International Airport, Kampala, Uganda','country_id' => '226'),\narray('id' => '2365','name' => '(ULU) - Gulu Airport, Gulu, Uganda','country_id' => '226'),\narray('id' => '2366','name' => '(JIN) - Jinja Airport, Jinja, Uganda','country_id' => '226'),\narray('id' => '2367','name' => '(PAF) - Pakuba Airfield, Kabalega Falls, Uganda','country_id' => '226'),\narray('id' => '2368','name' => '(KSE) - Kasese Airport, Kasese, Uganda','country_id' => '226'),\narray('id' => '2369','name' => '(MBQ) - Mbarara Airport, Mbarara, Uganda','country_id' => '226'),\narray('id' => '2370','name' => '(KCU) - Masindi Airport, Masindi, Uganda','country_id' => '226'),\narray('id' => '2371','name' => '(SRT) - Soroti Airport, Soroti, Uganda','country_id' => '226'),\narray('id' => '2372','name' => '(TRY) - Tororo Airport, Tororo, Uganda','country_id' => '226'),\narray('id' => '2373','name' => '(HWA) - Hawabango Airport, Hawabango, Papua New Guinea','country_id' => '172'),\narray('id' => '2374','name' => '(IBI) - Iboki Airport, Iboki, Papua New Guinea','country_id' => '172'),\narray('id' => '2375','name' => '(IBL) - Indigo Bay Lodge Airport, Bazaruto Island, Mozambique','country_id' => '155'),\narray('id' => '2376','name' => '(ICO) - Sicogon Airstrip, Sicogon Island, Philippines','country_id' => '173'),\narray('id' => '2377','name' => '(PPJ) - Pulau Panjang Airport, Jakarta, Indonesia','country_id' => '97'),\narray('id' => '2378','name' => '(BWX) - Blimbingsari Airport, Banyuwangi, Indonesia','country_id' => '97'),\narray('id' => '2379','name' => '(AAS) - Apalapsili Airport, Apalapsili, Indonesia','country_id' => '97'),\narray('id' => '2380','name' => '(AGD) - Anggi Airport, Anggi-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '2381','name' => '(AKQ) - Gunung Batin Airport, Astraksetra-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '2382','name' => '(AYW) - Ayawasi Airport, Ayawasi-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '2383','name' => '(BJG) - Boalang Airport, Boalang-Celebes Island, Indonesia','country_id' => '97'),\narray('id' => '2384','name' => '(BXM) - Batom Airport, Batom-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '2385','name' => '(DRH) - Dabra Airport, Dabra-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '2386','name' => '(ELR) - Elelim Airport, Elelim-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '2387','name' => '(EWE) - Ewer Airport, Asmat, Indonesia','country_id' => '97'),\narray('id' => '2388','name' => '(FOO) - Kornasoren Airfield, Kornasoren-Numfoor Island, Indonesia','country_id' => '97'),\narray('id' => '2389','name' => '(GAV) - Gag Island Airport, Gag Island, Indonesia','country_id' => '97'),\narray('id' => '2390','name' => '(IUL) - Ilu Airport, Ilu-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '2391','name' => '(KBF) - Karubaga Airport, Karubaga-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '2392','name' => '(KBX) - Kambuaya Airport, Kambuaya-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '2393','name' => '(KCD) - Kamur Airport, Kamur-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '2394','name' => '(KCI) - Kon Airport, Kon, Timor-Leste','country_id' => '216'),\narray('id' => '2395','name' => '(KEA) - Keisah Airport, Keisah-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '2396','name' => '(KMM) - Kiman Airport, Kiman-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '2397','name' => '(KOD) - Kotabangun Airport, Kotabangun-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '2398','name' => '(KRC) - Departi Parbo Airport, Sungai Penuh, Indonesia','country_id' => '97'),\narray('id' => '2399','name' => '(KWB) - Dewadaru Airport, Karimunjawa-Karimunjawa Island, Indonesia','country_id' => '97'),\narray('id' => '2400','name' => '(LLN) - Kelila Airport, Kelila-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '2401','name' => '(LWE) - Lewoleba Airport, Lewoleba-Lembata Island, Indonesia','country_id' => '97'),\narray('id' => '2402','name' => '(LYK) - Lunyuk Airport, Lunyuk-Simbawa Island, Indonesia','country_id' => '97'),\narray('id' => '2403','name' => '(MJY) - Mangunjaya Airport, Mangungaya-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '2404','name' => '(MPT) - Maliana airport, Maliana-Alor Island, Indonesia','country_id' => '97'),\narray('id' => '2405','name' => '(MSI) - Masalembo Airport, Masalembo Island, Indonesia','country_id' => '97'),\narray('id' => '2406','name' => '(MUF) - Muting Airport, Muting, Indonesia','country_id' => '97'),\narray('id' => '2407','name' => '(NAF) - Banaina Airport, Banaina-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '2408','name' => '(OBD) - Obano Airport, Obano-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '2409','name' => '(PPJ) - Pulau Panjang Airport, Pulau Panjang-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '2410','name' => '(PUM) - Pomala Airport, Kolaka, Indonesia','country_id' => '97'),\narray('id' => '2411','name' => '(PWL) - Purwokerto Airport, Purwokerto-Java Island, Indonesia','country_id' => '97'),\narray('id' => '2412','name' => '(RAQ) - Sugimanuru Airport, Raha-Muna Island, Indonesia','country_id' => '97'),\narray('id' => '2413','name' => '(RKI) - Rokot Airport, Rokot-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '2414','name' => '(RTI) - Roti Airport, Roti-Rote Island, Indonesia','country_id' => '97'),\narray('id' => '2415','name' => '(RUF) - Yuruf Airport, Amgotro, Indonesia','country_id' => '97'),\narray('id' => '2416','name' => '(RZS) - Sawan Airport, Sawan-Bali Island, Indonesia','country_id' => '97'),\narray('id' => '2417','name' => '(SAE) - Sangir Airport, Sangir-Simbawa Island, Indonesia','country_id' => '97'),\narray('id' => '2418','name' => '(TBM) - Tumbang Samba Airport, Tumbang Samba-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '2419','name' => '(TMY) - Tiom Airport, Tiom-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '2420','name' => '(ZEG) - Senggo Airport, Senggo-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '2421','name' => '(UGU) - Bilogai-Sugapa Airport, Sugapa-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '2422','name' => '(IDN) - Indagen Airport, Indagen, Papua New Guinea','country_id' => '172'),\narray('id' => '2423','name' => '(CHE) - Reeroe Airport, Caherciveen, Ireland','country_id' => '98'),\narray('id' => '2424','name' => '(IMA) - Iamalele Airport, Iamalele, Fergusson Island, Papua New Guinea','country_id' => '172'),\narray('id' => '2425','name' => '(IMG) - Inhaminga Airport, Inhaminga, Mozambique','country_id' => '155'),\narray('id' => '2426','name' => '(VDY) - Vijayanagar Aerodrome (JSW), , India','country_id' => '101'),\narray('id' => '2427','name' => '(JGB) - Jagdalpur Airport, Jagdalpur, India','country_id' => '101'),\narray('id' => '2428','name' => '(NVY) - Neyveli Airport, Neyveli, India','country_id' => '101'),\narray('id' => '2429','name' => '(RJI) - Rajouri Airport, Rajouri, India','country_id' => '101'),\narray('id' => '2430','name' => '(TEI) - Tezu Airport, Tezu, India','country_id' => '101'),\narray('id' => '2431','name' => '(INE) - Chinde Airport, Chinde, Mozambique','country_id' => '155'),\narray('id' => '2432','name' => '(IOK) - Iokea Airport, Iokea, Papua New Guinea','country_id' => '172'),\narray('id' => '2433','name' => '(IOP) - Ioma Airport, Ioma, Papua New Guinea','country_id' => '172'),\narray('id' => '2434','name' => '(KHA) - Khaneh Airport, Khaneh, Iran','country_id' => '104'),\narray('id' => '2435','name' => '(GSM) - Gheshm Airport, Gheshm, Iran','country_id' => '104'),\narray('id' => '2436','name' => '(ITK) - Itokama Airport, Itokama, Papua New Guinea','country_id' => '172'),\narray('id' => '2437','name' => '(IVI) - Viveros Island Airport, Isla Viveros, Panama','country_id' => '169'),\narray('id' => '2438','name' => '(JGD) - Jiagedaqi Airport, Jiagedaqi, China','country_id' => '45'),\narray('id' => '2439','name' => '(JIC) - Jinchuan Airport, Jinchang, China','country_id' => '45'),\narray('id' => '2440','name' => '(JIQ) - Qianjiang Wulingshan Airport, Qianjiang, China','country_id' => '45'),\narray('id' => '2441','name' => '(JLA) - Quartz Creek Airport, Cooper Landing, United States','country_id' => '228'),\narray('id' => '2442','name' => '(JOP) - Josephstaal Airport, Josephstaal, Papua New Guinea','country_id' => '172'),\narray('id' => '2443','name' => '(JUH) - Jiuhuashan Airport, Chizhou, China','country_id' => '45'),\narray('id' => '2444','name' => '(AMK) - Animas Air Park, Durango, United States','country_id' => '228'),\narray('id' => '2445','name' => '(BDX) - Broadus Airport, Broadus, United States','country_id' => '228'),\narray('id' => '2446','name' => '(EUE) - Eureka Airport, Eureka, United States','country_id' => '228'),\narray('id' => '2447','name' => '(KPT) - Jackpot Airport/Hayden Field, Jackpot, United States','country_id' => '228'),\narray('id' => '2448','name' => '(RLA) - Rolla Downtown Airport, Rolla, United States','country_id' => '228'),\narray('id' => '2449','name' => '(FID) - Elizabeth Field, Fishers Island, United States','country_id' => '228'),\narray('id' => '2450','name' => '(HUD) - Humboldt Municipal Airport, Humboldt, United States','country_id' => '228'),\narray('id' => '2451','name' => '(TWD) - Jefferson County International Airport, Port Townsend, United States','country_id' => '228'),\narray('id' => '2452','name' => '(HCC) - Columbia County Airport, Hudson, United States','country_id' => '228'),\narray('id' => '2453','name' => '(AHD) - Ardmore Downtown Executive Airport, Ardmore, United States','country_id' => '228'),\narray('id' => '2454','name' => '(GCW) - Grand Canyon West Airport, Peach Springs, United States','country_id' => '228'),\narray('id' => '2455','name' => '(CKE) - Lampson Field, Lakeport, United States','country_id' => '228'),\narray('id' => '2456','name' => '(ROF) - Montague-Yreka Rohrer Field, Montague, United States','country_id' => '228'),\narray('id' => '2457','name' => '(CNE) - Fremont County Airport, CaAon City, United States','country_id' => '228'),\narray('id' => '2458','name' => '(COP) - Cooperstown-Westville Airport, Cooperstown, United States','country_id' => '228'),\narray('id' => '2459','name' => '(CIL) - Council Airport, Council, United States','country_id' => '228'),\narray('id' => '2460','name' => '(IRB) - Iraan Municipal Airport, Iraan, United States','country_id' => '228'),\narray('id' => '2461','name' => '(GNF) - Gansner Field, Quincy, United States','country_id' => '228'),\narray('id' => '2462','name' => '(CHZ) - Chiloquin State Airport, Chiloquin, United States','country_id' => '228'),\narray('id' => '2463','name' => '(LTW) - St. Mary\\'s County Regional Airport, Leonardtown, United States','country_id' => '228'),\narray('id' => '2464','name' => '(AHF) - Arapahoe Municipal Airport, Arapahoe, United States','country_id' => '228'),\narray('id' => '2465','name' => '(PCT) - Princeton Airport, Princeton/Rocky Hill, United States','country_id' => '228'),\narray('id' => '2466','name' => '(CTO) - Calverton Executive Airpark, Calverton, United States','country_id' => '228'),\narray('id' => '2467','name' => '(NRI) - Grand Lake Regional Airport, Afton, United States','country_id' => '228'),\narray('id' => '2468','name' => '(GTP) - Grants Pass Airport, Grants Pass, United States','country_id' => '228'),\narray('id' => '2469','name' => '(NLE) - Jerry Tyler Memorial Airport, Niles, United States','country_id' => '228'),\narray('id' => '2470','name' => '(GCD) - Grand Coulee Dam Airport, Electric City, United States','country_id' => '228'),\narray('id' => '2471','name' => '(VLE) - Valle Airport, Grand Canyon, United States','country_id' => '228'),\narray('id' => '2472','name' => '(FPY) - Perry-Foley Airport, Perry, United States','country_id' => '228'),\narray('id' => '2473','name' => '(NTJ) - Manti-Ephraim Airport, Manti, United States','country_id' => '228'),\narray('id' => '2474','name' => '(SBO) - Salina Gunnison Airport, Salina, United States','country_id' => '228'),\narray('id' => '2475','name' => '(JVI) - Central Jersey Regional Airport, Manville, United States','country_id' => '228'),\narray('id' => '2476','name' => '(UCE) - Eunice Airport, Eunice, United States','country_id' => '228'),\narray('id' => '2477','name' => '(GOL) - Gold Beach Municipal Airport, Gold Beach, United States','country_id' => '228'),\narray('id' => '2478','name' => '(KKT) - Kentland Municipal Airport, Kentland, United States','country_id' => '228'),\narray('id' => '2479','name' => '(FHB) - Fernandina Beach Municipal Airport, Fernandina Beach, United States','country_id' => '228'),\narray('id' => '2480','name' => '(PRW) - Prentice Airport, Prentice, United States','country_id' => '228'),\narray('id' => '2481','name' => '(EGP) - Maverick County Memorial International Airport, Eagle Pass, United States','country_id' => '228'),\narray('id' => '2482','name' => '(BLD) - Boulder City Municipal Airport, Boulder City, United States','country_id' => '228'),\narray('id' => '2483','name' => '(MFH) - Mesquite Airport, Mesquite, United States','country_id' => '228'),\narray('id' => '2484','name' => '(ECA) - Iosco County Airport, East Tawas, United States','country_id' => '228'),\narray('id' => '2485','name' => '(FMU) - Florence Municipal Airport, Florence, United States','country_id' => '228'),\narray('id' => '2486','name' => '(ROL) - Roosevelt Municipal Airport, Roosevelt, United States','country_id' => '228'),\narray('id' => '2487','name' => '(WPO) - North Fork Valley Airport, Paonia, United States','country_id' => '228'),\narray('id' => '2488','name' => '(ATE) - Antlers Municipal Airport, Antlers, United States','country_id' => '228'),\narray('id' => '2489','name' => '(QWG) - Wilgrove Air Park, Charlotte, United States','country_id' => '228'),\narray('id' => '2490','name' => '(ASQ) - Austin Airport, Austin, United States','country_id' => '228'),\narray('id' => '2491','name' => '(AAF) - Apalachicola Regional Airport, Apalachicola, United States','country_id' => '228'),\narray('id' => '2492','name' => '(ABE) - Lehigh Valley International Airport, Allentown, United States','country_id' => '228'),\narray('id' => '2493','name' => '(ABI) - Abilene Regional Airport, Abilene, United States','country_id' => '228'),\narray('id' => '2494','name' => '(ABQ) - Albuquerque International Sunport Airport, Albuquerque, United States','country_id' => '228'),\narray('id' => '2495','name' => '(ABR) - Aberdeen Regional Airport, Aberdeen, United States','country_id' => '228'),\narray('id' => '2496','name' => '(ABY) - Southwest Georgia Regional Airport, Albany, United States','country_id' => '228'),\narray('id' => '2497','name' => '(ACB) - Antrim County Airport, Bellaire, United States','country_id' => '228'),\narray('id' => '2498','name' => '(ACK) - Nantucket Memorial Airport, Nantucket, United States','country_id' => '228'),\narray('id' => '2499','name' => '(ACT) - Waco Regional Airport, Waco, United States','country_id' => '228'),\narray('id' => '2500','name' => '(ACV) - Arcata Airport, Arcata/Eureka, United States','country_id' => '228'),\narray('id' => '2501','name' => '(ACY) - Atlantic City International Airport, Atlantic City, United States','country_id' => '228'),\narray('id' => '2502','name' => '(ADG) - Lenawee County Airport, Adrian, United States','country_id' => '228'),\narray('id' => '2503','name' => '(ADT) - Ada Municipal Airport, Ada, United States','country_id' => '228'),\narray('id' => '2504','name' => '(ADM) - Ardmore Municipal Airport, Ardmore, United States','country_id' => '228'),\narray('id' => '2505','name' => '(ADS) - Addison Airport, Dallas, United States','country_id' => '228'),\narray('id' => '2506','name' => '(ADW) - Andrews Air Force Base, Camp Springs, United States','country_id' => '228'),\narray('id' => '2507','name' => '(AEL) - Albert Lea Municipal Airport, Albert Lea, United States','country_id' => '228'),\narray('id' => '2508','name' => '(AEX) - Alexandria International Airport, Alexandria, United States','country_id' => '228'),\narray('id' => '2509','name' => '(KAF) - Karato Airport, Karato, Papua New Guinea','country_id' => '172'),\narray('id' => '2510','name' => '(AFF) - USAF Academy Airfield, Colorado Springs, United States','country_id' => '228'),\narray('id' => '2511','name' => '(WSG) - Washington County Airport, Washington, United States','country_id' => '228'),\narray('id' => '2512','name' => '(AFN) - Jaffrey Airport Silver Ranch Airport, Jaffrey, United States','country_id' => '228'),\narray('id' => '2513','name' => '(AFO) - Afton Municipal Airport, Afton, United States','country_id' => '228'),\narray('id' => '2514','name' => '(AFW) - Fort Worth Alliance Airport, Fort Worth, United States','country_id' => '228'),\narray('id' => '2515','name' => '(AGC) - Allegheny County Airport, Pittsburgh, United States','country_id' => '228'),\narray('id' => '2516','name' => '(AGO) - Magnolia Municipal Airport, Magnolia, United States','country_id' => '228'),\narray('id' => '2517','name' => '(AGS) - Augusta Regional At Bush Field, Augusta, United States','country_id' => '228'),\narray('id' => '2518','name' => '(AHC) - Amedee Army Air Field, Herlong, United States','country_id' => '228'),\narray('id' => '2519','name' => '(AHH) - Amery Municipal Airport, Amery, United States','country_id' => '228'),\narray('id' => '2520','name' => '(AHN) - Athens Ben Epps Airport, Athens, United States','country_id' => '228'),\narray('id' => '2521','name' => '(AIA) - Alliance Municipal Airport, Alliance, United States','country_id' => '228'),\narray('id' => '2522','name' => '(AID) - Anderson Municipal Darlington Field, Anderson, United States','country_id' => '228'),\narray('id' => '2523','name' => '(AIK) - Aiken Municipal Airport, Aiken, United States','country_id' => '228'),\narray('id' => '2524','name' => '(AIO) - Atlantic Municipal Airport, Atlantic, United States','country_id' => '228'),\narray('id' => '2525','name' => '(AIV) - George Downer Airport, Aliceville, United States','country_id' => '228'),\narray('id' => '2526','name' => '(AIZ) - Lee C Fine Memorial Airport, Kaiser Lake Ozark, United States','country_id' => '228'),\narray('id' => '2527','name' => '(AKO) - Colorado Plains Regional Airport, Akron, United States','country_id' => '228'),\narray('id' => '2528','name' => '(AKC) - Akron Fulton International Airport, Akron, United States','country_id' => '228'),\narray('id' => '2529','name' => '(ALB) - Albany International Airport, Albany, United States','country_id' => '228'),\narray('id' => '2530','name' => '(ALI) - Alice International Airport, Alice, United States','country_id' => '228'),\narray('id' => '2531','name' => '(ALM) - Alamogordo White Sands Regional Airport, Alamogordo, United States','country_id' => '228'),\narray('id' => '2532','name' => '(ALN) - St Louis Regional Airport, Alton/St Louis, United States','country_id' => '228'),\narray('id' => '2533','name' => '(ALO) - Waterloo Regional Airport, Waterloo, United States','country_id' => '228'),\narray('id' => '2534','name' => '(ALS) - San Luis Valley Regional Bergman Field, Alamosa, United States','country_id' => '228'),\narray('id' => '2535','name' => '(ALW) - Walla Walla Regional Airport, Walla Walla, United States','country_id' => '228'),\narray('id' => '2536','name' => '(ALX) - Thomas C Russell Field, Alexander City, United States','country_id' => '228'),\narray('id' => '2537','name' => '(AMA) - Rick Husband Amarillo International Airport, Amarillo, United States','country_id' => '228'),\narray('id' => '2538','name' => '(AMN) - Gratiot Community Airport, Alma, United States','country_id' => '228'),\narray('id' => '2539','name' => '(AMW) - Ames Municipal Airport, Ames, United States','country_id' => '228'),\narray('id' => '2540','name' => '(ANB) - Anniston Metropolitan Airport, Anniston, United States','country_id' => '228'),\narray('id' => '2541','name' => '(AND) - Anderson Regional Airport, Anderson, United States','country_id' => '228'),\narray('id' => '2542','name' => '(SLT) - Harriet Alexander Field, Salida, United States','country_id' => '228'),\narray('id' => '2543','name' => '(ANP) - Lee Airport, Annapolis, United States','country_id' => '228'),\narray('id' => '2544','name' => '(ANQ) - Tri State Steuben County Airport, Angola, United States','country_id' => '228'),\narray('id' => '2545','name' => '(ANW) - Ainsworth Municipal Airport, Ainsworth, United States','country_id' => '228'),\narray('id' => '2546','name' => '(ANY) - Anthony Municipal Airport, Anthony, United States','country_id' => '228'),\narray('id' => '2547','name' => '(AOH) - Lima Allen County Airport, Lima, United States','country_id' => '228'),\narray('id' => '2548','name' => '(AOO) - Altoona Blair County Airport, Altoona, United States','country_id' => '228'),\narray('id' => '2549','name' => '(APA) - Centennial Airport, Denver, United States','country_id' => '228'),\narray('id' => '2550','name' => '(APC) - Napa County Airport, Napa, United States','country_id' => '228'),\narray('id' => '2551','name' => '(APF) - Naples Municipal Airport, Naples, United States','country_id' => '228'),\narray('id' => '2552','name' => '(APG) - Phillips Army Air Field, Aberdeen Proving Grounds(Aberdeen), United States','country_id' => '228'),\narray('id' => '2553','name' => '(APH) - A P Hill Aaf (Fort A P Hill) Airport, Fort A. P. Hill, United States','country_id' => '228'),\narray('id' => '2554','name' => '(APN) - Alpena County Regional Airport, Alpena, United States','country_id' => '228'),\narray('id' => '2555','name' => '(APT) - Marion County Brown Field, Jasper, United States','country_id' => '228'),\narray('id' => '2556','name' => '(APV) - Apple Valley Airport, Apple Valley, United States','country_id' => '228'),\narray('id' => '2557','name' => '(KAQ) - Kamulai Airport, Kamulai Mission, Papua New Guinea','country_id' => '172'),\narray('id' => '2558','name' => '(ARA) - Acadiana Regional Airport, New Iberia, United States','country_id' => '228'),\narray('id' => '2559','name' => '(ARB) - Ann Arbor Municipal Airport, Ann Arbor, United States','country_id' => '228'),\narray('id' => '2560','name' => '(ARG) - Walnut Ridge Regional Airport, Walnut Ridge, United States','country_id' => '228'),\narray('id' => '2561','name' => '(WHT) - Wharton Regional Airport, Wharton, United States','country_id' => '228'),\narray('id' => '2562','name' => '(AUZ) - Aurora Municipal Airport, Chicago/Aurora, United States','country_id' => '228'),\narray('id' => '2563','name' => '(ART) - Watertown International Airport, Watertown, United States','country_id' => '228'),\narray('id' => '2564','name' => '(ARV) - Lakeland-Noble F. Lee Memorial field, Minocqua-Woodruff, United States','country_id' => '228'),\narray('id' => '2565','name' => '(BFT) - Beaufort County Airport, Beaufort, United States','country_id' => '228'),\narray('id' => '2566','name' => '(ASE) - Aspen-Pitkin Co/Sardy Field, Aspen, United States','country_id' => '228'),\narray('id' => '2567','name' => '(SPZ) - Springdale Municipal Airport, Springdale, United States','country_id' => '228'),\narray('id' => '2568','name' => '(ASH) - Boire Field, Nashua, United States','country_id' => '228'),\narray('id' => '2569','name' => '(ASL) - Harrison County Airport, Marshall, United States','country_id' => '228'),\narray('id' => '2570','name' => '(ASN) - Talladega Municipal Airport, Talladega, United States','country_id' => '228'),\narray('id' => '2571','name' => '(AST) - Astoria Regional Airport, Astoria, United States','country_id' => '228'),\narray('id' => '2572','name' => '(ASX) - John F Kennedy Memorial Airport, Ashland, United States','country_id' => '228'),\narray('id' => '2573','name' => '(ASY) - Ashley Municipal Airport, Ashley, United States','country_id' => '228'),\narray('id' => '2574','name' => '(ATL) - Hartsfield Jackson Atlanta International Airport, Atlanta, United States','country_id' => '228'),\narray('id' => '2575','name' => '(ATS) - Artesia Municipal Airport, Artesia, United States','country_id' => '228'),\narray('id' => '2576','name' => '(ATW) - Appleton International Airport, Appleton, United States','country_id' => '228'),\narray('id' => '2577','name' => '(ATY) - Watertown Regional Airport, Watertown, United States','country_id' => '228'),\narray('id' => '2578','name' => '(AUG) - Augusta State Airport, Augusta, United States','country_id' => '228'),\narray('id' => '2579','name' => '(AUM) - Austin Municipal Airport, Austin, United States','country_id' => '228'),\narray('id' => '2580','name' => '(AUN) - Auburn Municipal Airport, Auburn, United States','country_id' => '228'),\narray('id' => '2581','name' => '(AUO) - Auburn Opelika Robert G. Pitts Airport, Auburn, United States','country_id' => '228'),\narray('id' => '2582','name' => '(AUS) - Austin Bergstrom International Airport, Austin, United States','country_id' => '228'),\narray('id' => '2583','name' => '(AUW) - Wausau Downtown Airport, Wausau, United States','country_id' => '228'),\narray('id' => '2584','name' => '(AVL) - Asheville Regional Airport, Asheville, United States','country_id' => '228'),\narray('id' => '2585','name' => '(AVO) - Avon Park Executive Airport, Avon Park, United States','country_id' => '228'),\narray('id' => '2586','name' => '(AVP) - Wilkes Barre Scranton International Airport, Wilkes-Barre/Scranton, United States','country_id' => '228'),\narray('id' => '2587','name' => '(AVW) - Marana Regional Airport, Tucson, United States','country_id' => '228'),\narray('id' => '2588','name' => '(AVX) - Catalina Airport, Avalon, United States','country_id' => '228'),\narray('id' => '2589','name' => '(AWM) - West Memphis Municipal Airport, West Memphis, United States','country_id' => '228'),\narray('id' => '2590','name' => '(AXG) - Algona Municipal Airport, Algona, United States','country_id' => '228'),\narray('id' => '2591','name' => '(AXN) - Chandler Field, Alexandria, United States','country_id' => '228'),\narray('id' => '2592','name' => '(AXS) - Altus Quartz Mountain Regional Airport, Altus, United States','country_id' => '228'),\narray('id' => '2593','name' => '(AXV) - Neil Armstrong Airport, Wapakoneta, United States','country_id' => '228'),\narray('id' => '2594','name' => '(AXX) - Angel Fire Airport, Angel Fire, United States','country_id' => '228'),\narray('id' => '2595','name' => '(AYS) - Waycross Ware County Airport, Waycross, United States','country_id' => '228'),\narray('id' => '2596','name' => '(TUH) - Arnold Air Force Base, Tullahoma, United States','country_id' => '228'),\narray('id' => '2597','name' => '(AZO) - Kalamazoo Battle Creek International Airport, Kalamazoo, United States','country_id' => '228'),\narray('id' => '2598','name' => '(BAB) - Beale Air Force Base, Marysville, United States','country_id' => '228'),\narray('id' => '2599','name' => '(BAD) - Barksdale Air Force Base, Bossier City, United States','country_id' => '228'),\narray('id' => '2600','name' => '(BAF) - Barnes Municipal Airport, Westfield/Springfield, United States','country_id' => '228'),\narray('id' => '2601','name' => '(CLU) - Columbus Municipal Airport, Columbus, United States','country_id' => '228'),\narray('id' => '2602','name' => '(BAM) - Battle Mountain Airport, Battle Mountain, United States','country_id' => '228'),\narray('id' => '2603','name' => '(BBB) - Benson Municipal Airport, Benson, United States','country_id' => '228'),\narray('id' => '2604','name' => '(BBD) - Curtis Field, Brady, United States','country_id' => '228'),\narray('id' => '2605','name' => '(BTN) - Marlboro County Jetport H.E. Avent Field, Bennettsville, United States','country_id' => '228'),\narray('id' => '2606','name' => '(BBW) - Broken Bow Municipal Airport, Broken Bow, United States','country_id' => '228'),\narray('id' => '2607','name' => '(BCB) - Virginia Tech Montgomery Executive Airport, Blacksburg, United States','country_id' => '228'),\narray('id' => '2608','name' => '(BCE) - Bryce Canyon Airport, Bryce Canyon, United States','country_id' => '228'),\narray('id' => '2609','name' => '(BCT) - Boca Raton Airport, Boca Raton, United States','country_id' => '228'),\narray('id' => '2610','name' => '(BDE) - Baudette International Airport, Baudette, United States','country_id' => '228'),\narray('id' => '2611','name' => '(BDG) - Blanding Municipal Airport, Blanding, United States','country_id' => '228'),\narray('id' => '2612','name' => '(BDL) - Bradley International Airport, Hartford, United States','country_id' => '228'),\narray('id' => '2613','name' => '(BDR) - Igor I Sikorsky Memorial Airport, Bridgeport, United States','country_id' => '228'),\narray('id' => '2614','name' => '(WBU) - Boulder Municipal Airport, Boulder, United States','country_id' => '228'),\narray('id' => '2615','name' => '(BEC) - Beech Factory Airport, Wichita, United States','country_id' => '228'),\narray('id' => '2616','name' => '(BED) - Laurence G Hanscom Field, Bedford, United States','country_id' => '228'),\narray('id' => '2617','name' => '(BEH) - Southwest Michigan Regional Airport, Benton Harbor, United States','country_id' => '228'),\narray('id' => '2618','name' => '(BFD) - Bradford Regional Airport, Bradford, United States','country_id' => '228'),\narray('id' => '2619','name' => '(BFF) - Western Neb. Rgnl/William B. Heilig Airport, Scottsbluff, United States','country_id' => '228'),\narray('id' => '2620','name' => '(BFI) - Boeing Field King County International Airport, Seattle, United States','country_id' => '228'),\narray('id' => '2621','name' => '(BFL) - Meadows Field, Bakersfield, United States','country_id' => '228'),\narray('id' => '2622','name' => '(BFM) - Mobile Downtown Airport, Mobile, United States','country_id' => '228'),\narray('id' => '2623','name' => '(BFR) - Virgil I Grissom Municipal Airport, Bedford, United States','country_id' => '228'),\narray('id' => '2624','name' => '(BGD) - Hutchinson County Airport, Borger, United States','country_id' => '228'),\narray('id' => '2625','name' => '(BGE) - Decatur County Industrial Air Park, Bainbridge, United States','country_id' => '228'),\narray('id' => '2626','name' => '(BGM) - Greater Binghamton/Edwin A Link field, Binghamton, United States','country_id' => '228'),\narray('id' => '2627','name' => '(BGR) - Bangor International Airport, Bangor, United States','country_id' => '228'),\narray('id' => '2628','name' => '(BHB) - Hancock County-Bar Harbor Airport, Bar Harbor, United States','country_id' => '228'),\narray('id' => '2629','name' => '(BHM) - Birmingham-Shuttlesworth International Airport, Birmingham, United States','country_id' => '228'),\narray('id' => '2630','name' => '(BID) - Block Island State Airport, Block Island, United States','country_id' => '228'),\narray('id' => '2631','name' => '(BIE) - Beatrice Municipal Airport, Beatrice, United States','country_id' => '228'),\narray('id' => '2632','name' => '(BIF) - Biggs Army Air Field (Fort Bliss), Fort Bliss/El Paso, United States','country_id' => '228'),\narray('id' => '2633','name' => '(BIH) - Eastern Sierra Regional Airport, Bishop, United States','country_id' => '228'),\narray('id' => '2634','name' => '(BIL) - Billings Logan International Airport, Billings, United States','country_id' => '228'),\narray('id' => '2635','name' => '(BIS) - Bismarck Municipal Airport, Bismarck, United States','country_id' => '228'),\narray('id' => '2636','name' => '(BIX) - Keesler Air Force Base, Biloxi, United States','country_id' => '228'),\narray('id' => '2637','name' => '(BJC) - Rocky Mountain Metropolitan Airport, Denver, United States','country_id' => '228'),\narray('id' => '2638','name' => '(BJI) - Bemidji Regional Airport, Bemidji, United States','country_id' => '228'),\narray('id' => '2639','name' => '(BJJ) - Wayne County Airport, Wooster, United States','country_id' => '228'),\narray('id' => '2640','name' => '(BKD) - Stephens County Airport, Breckenridge, United States','country_id' => '228'),\narray('id' => '2641','name' => '(BKE) - Baker City Municipal Airport, Baker City, United States','country_id' => '228'),\narray('id' => '2642','name' => '(BFK) - Buckley Air Force Base, Aurora, United States','country_id' => '228'),\narray('id' => '2643','name' => '(BKL) - Burke Lakefront Airport, Cleveland, United States','country_id' => '228'),\narray('id' => '2644','name' => '(BKT) - Allen C Perkinson Blackstone Army Air Field, Blackstone, United States','country_id' => '228'),\narray('id' => '2645','name' => '(BKW) - Raleigh County Memorial Airport, Beckley, United States','country_id' => '228'),\narray('id' => '2646','name' => '(BKX) - Brookings Regional Airport, Brookings, United States','country_id' => '228'),\narray('id' => '2647','name' => '(BLF) - Mercer County Airport, Bluefield, United States','country_id' => '228'),\narray('id' => '2648','name' => '(BLH) - Blythe Airport, Blythe, United States','country_id' => '228'),\narray('id' => '2649','name' => '(BLI) - Bellingham International Airport, Bellingham, United States','country_id' => '228'),\narray('id' => '2650','name' => '(BLM) - Monmouth Executive Airport, Belmar/Farmingdale, United States','country_id' => '228'),\narray('id' => '2651','name' => '(BLU) - Blue Canyon Nyack Airport, Emigrant Gap, United States','country_id' => '228'),\narray('id' => '2652','name' => '(BLV) - Scott AFB/Midamerica Airport, Belleville, United States','country_id' => '228'),\narray('id' => '2653','name' => '(KBM) - Kabwum, , Papua New Guinea','country_id' => '172'),\narray('id' => '2654','name' => '(BMC) - Brigham City Airport, Brigham City, United States','country_id' => '228'),\narray('id' => '2655','name' => '(BMG) - Monroe County Airport, Bloomington, United States','country_id' => '228'),\narray('id' => '2656','name' => '(BMI) - Central Illinois Regional Airport at Bloomington-Normal, Bloomington/Normal, United States','country_id' => '228'),\narray('id' => '2657','name' => '(BML) - Berlin Regional Airport, Berlin, United States','country_id' => '228'),\narray('id' => '2658','name' => '(BMT) - Beaumont Municipal Airport, Beaumont, United States','country_id' => '228'),\narray('id' => '2659','name' => '(BNA) - Nashville International Airport, Nashville, United States','country_id' => '228'),\narray('id' => '2660','name' => '(BNG) - Banning Municipal Airport, Banning, United States','country_id' => '228'),\narray('id' => '2661','name' => '(BNL) - Barnwell Regional Airport, Barnwell, United States','country_id' => '228'),\narray('id' => '2662','name' => '(BNO) - Burns Municipal Airport, Burns, United States','country_id' => '228'),\narray('id' => '2663','name' => '(BNW) - Boone Municipal Airport, Boone, United States','country_id' => '228'),\narray('id' => '2664','name' => '(BOI) - Boise Air Terminal/Gowen field, Boise, United States','country_id' => '228'),\narray('id' => '2665','name' => '(BOS) - General Edward Lawrence Logan International Airport, Boston, United States','country_id' => '228'),\narray('id' => '2666','name' => '(BOW) - Bartow Municipal Airport, Bartow, United States','country_id' => '228'),\narray('id' => '2667','name' => '(HCA) - Big Spring Mc Mahon-Wrinkle Airport, Big Spring, United States','country_id' => '228'),\narray('id' => '2668','name' => '(BPI) - Miley Memorial Field, Big Piney, United States','country_id' => '228'),\narray('id' => '2669','name' => '(WMH) - Ozark Regional Airport, Mountain Home, United States','country_id' => '228'),\narray('id' => '2670','name' => '(BWM) - Bowman Municipal Airport, Bowman, United States','country_id' => '228'),\narray('id' => '2671','name' => '(BPT) - Southeast Texas Regional Airport, Beaumont/Port Arthur, United States','country_id' => '228'),\narray('id' => '2672','name' => '(BQK) - Brunswick Golden Isles Airport, Brunswick, United States','country_id' => '228'),\narray('id' => '2673','name' => '(BRD) - Brainerd Lakes Regional Airport, Brainerd, United States','country_id' => '228'),\narray('id' => '2674','name' => '(BRL) - Southeast Iowa Regional Airport, Burlington, United States','country_id' => '228'),\narray('id' => '2675','name' => '(BRO) - Brownsville South Padre Island International Airport, Brownsville, United States','country_id' => '228'),\narray('id' => '2676','name' => '(BRY) - Samuels Field, Bardstown, United States','country_id' => '228'),\narray('id' => '2677','name' => '(BTF) - Skypark Airport, Bountiful, United States','country_id' => '228'),\narray('id' => '2678','name' => '(BTL) - W K Kellogg Airport, Battle Creek, United States','country_id' => '228'),\narray('id' => '2679','name' => '(BTM) - Bert Mooney Airport, Butte, United States','country_id' => '228'),\narray('id' => '2680','name' => '(TTO) - Britton Municipal Airport, Britton, United States','country_id' => '228'),\narray('id' => '2681','name' => '(BTP) - Butler County-K W Scholter Field, Butler, United States','country_id' => '228'),\narray('id' => '2682','name' => '(BTR) - Baton Rouge Metropolitan, Ryan Field, Baton Rouge, United States','country_id' => '228'),\narray('id' => '2683','name' => '(BTV) - Burlington International Airport, Burlington, United States','country_id' => '228'),\narray('id' => '2684','name' => '(BTY) - Beatty Airport, Beatty, United States','country_id' => '228'),\narray('id' => '2685','name' => '(BUB) - Cram Field, Burwell, United States','country_id' => '228'),\narray('id' => '2686','name' => '(BUF) - Buffalo Niagara International Airport, Buffalo, United States','country_id' => '228'),\narray('id' => '2687','name' => '(BUM) - Butler Memorial Airport, Butler, United States','country_id' => '228'),\narray('id' => '2688','name' => '(BUR) - Bob Hope Airport, Burbank, United States','country_id' => '228'),\narray('id' => '2689','name' => '(BFP) - Beaver County Airport, Beaver Falls, United States','country_id' => '228'),\narray('id' => '2690','name' => '(BVO) - Bartlesville Municipal Airport, Bartlesville, United States','country_id' => '228'),\narray('id' => '2691','name' => '(MVW) - Skagit Regional Airport, Burlington/Mount Vernon, United States','country_id' => '228'),\narray('id' => '2692','name' => '(BVX) - Batesville Regional Airport, Batesville, United States','country_id' => '228'),\narray('id' => '2693','name' => '(BVY) - Beverly Municipal Airport, Beverly, United States','country_id' => '228'),\narray('id' => '2694','name' => '(BWC) - Brawley Municipal Airport, Brawley, United States','country_id' => '228'),\narray('id' => '2695','name' => '(BWD) - Brownwood Regional Airport, Brownwood, United States','country_id' => '228'),\narray('id' => '2696','name' => '(BWG) - Bowling Green Warren County Regional Airport, Bowling Green, United States','country_id' => '228'),\narray('id' => '2697','name' => '(BWI) - Baltimore/Washington International Thurgood Marshall Airport, Baltimore, United States','country_id' => '228'),\narray('id' => '2698','name' => '(WAH) - Harry Stern Airport, Wahpeton, United States','country_id' => '228'),\narray('id' => '2699','name' => '(BXA) - George R Carr Memorial Air Field, Bogalusa, United States','country_id' => '228'),\narray('id' => '2700','name' => '(BXK) - Buckeye Municipal Airport, Buckeye, United States','country_id' => '228'),\narray('id' => '2701','name' => '(BYG) - Johnson County Airport, Buffalo, United States','country_id' => '228'),\narray('id' => '2702','name' => '(BYH) - Arkansas International Airport, Blytheville, United States','country_id' => '228'),\narray('id' => '2703','name' => '(BYI) - Burley Municipal Airport, Burley, United States','country_id' => '228'),\narray('id' => '2704','name' => '(BYS) - Bicycle Lake Army Air Field, Fort Irwin/Barstow, United States','country_id' => '228'),\narray('id' => '2705','name' => '(BBC) - Bay City Municipal Airport, Bay City, United States','country_id' => '228'),\narray('id' => '2706','name' => '(BZN) - Gallatin Field, Bozeman, United States','country_id' => '228'),\narray('id' => '2707','name' => '(XES) - Grand Geneva Resort Airport, Lake Geneva, United States','country_id' => '228'),\narray('id' => '2708','name' => '(PLY) - Plymouth Municipal Airport, Plymouth, United States','country_id' => '228'),\narray('id' => '2709','name' => '(CLG) - New Coalinga Municipal Airport, Coalinga, United States','country_id' => '228'),\narray('id' => '2710','name' => '(CAD) - Wexford County Airport, Cadillac, United States','country_id' => '228'),\narray('id' => '2711','name' => '(CAE) - Columbia Metropolitan Airport, Columbia, United States','country_id' => '228'),\narray('id' => '2712','name' => '(CIG) - Craig Moffat Airport, Craig, United States','country_id' => '228'),\narray('id' => '2713','name' => '(CAK) - Akron Canton Regional Airport, Akron, United States','country_id' => '228'),\narray('id' => '2714','name' => '(CAO) - Clayton Municipal Airpark, Clayton, United States','country_id' => '228'),\narray('id' => '2715','name' => '(CAR) - Caribou Municipal Airport, Caribou, United States','country_id' => '228'),\narray('id' => '2716','name' => '(CBE) - Greater Cumberland Regional Airport, Cumberland, United States','country_id' => '228'),\narray('id' => '2717','name' => '(CBF) - Council Bluffs Municipal Airport, Council Bluffs, United States','country_id' => '228'),\narray('id' => '2718','name' => '(CBK) - Shalz Field, Colby, United States','country_id' => '228'),\narray('id' => '2719','name' => '(CBM) - Columbus Air Force Base, Columbus, United States','country_id' => '228'),\narray('id' => '2720','name' => '(CCB) - Cable Airport, Upland, United States','country_id' => '228'),\narray('id' => '2721','name' => '(CCR) - Buchanan Field, Concord, United States','country_id' => '228'),\narray('id' => '2722','name' => '(CCY) - Northeast Iowa Regional Airport, Charles City, United States','country_id' => '228'),\narray('id' => '2723','name' => '(LLX) - Caledonia County Airport, Lyndonville, United States','country_id' => '228'),\narray('id' => '2724','name' => '(CDC) - Cedar City Regional Airport, Cedar City, United States','country_id' => '228'),\narray('id' => '2725','name' => '(CDH) - Harrell Field, Camden, United States','country_id' => '228'),\narray('id' => '2726','name' => '(CDN) - Woodward Field, Camden, United States','country_id' => '228'),\narray('id' => '2727','name' => '(CDR) - Chadron Municipal Airport, Chadron, United States','country_id' => '228'),\narray('id' => '2728','name' => '(CDS) - Childress Municipal Airport, Childress, United States','country_id' => '228'),\narray('id' => '2729','name' => '(CDW) - Essex County Airport, Caldwell, United States','country_id' => '228'),\narray('id' => '2730','name' => '(CEA) - Cessna Aircraft Field, Wichita, United States','country_id' => '228'),\narray('id' => '2731','name' => '(CEC) - Jack Mc Namara Field Airport, Crescent City, United States','country_id' => '228'),\narray('id' => '2732','name' => '(CEF) - Westover ARB/Metropolitan Airport, Springfield/Chicopee, United States','country_id' => '228'),\narray('id' => '2733','name' => '(CEU) - Oconee County Regional Airport, Clemson, United States','country_id' => '228'),\narray('id' => '2734','name' => '(CEV) - Mettel Field, Connersville, United States','country_id' => '228'),\narray('id' => '2735','name' => '(CEW) - Bob Sikes Airport, Crestview, United States','country_id' => '228'),\narray('id' => '2736','name' => '(CEY) - Kyle Oakley Field, Murray, United States','country_id' => '228'),\narray('id' => '2737','name' => '(CEZ) - Cortez Municipal Airport, Cortez, United States','country_id' => '228'),\narray('id' => '2738','name' => '(CFD) - Coulter Field, Bryan, United States','country_id' => '228'),\narray('id' => '2739','name' => '(TZC) - Tuscola Area Airport, Caro, United States','country_id' => '228'),\narray('id' => '2740','name' => '(CFT) - Greenlee County Airport, Clifton/Morenci, United States','country_id' => '228'),\narray('id' => '2741','name' => '(CFV) - Coffeyville Municipal Airport, Coffeyville, United States','country_id' => '228'),\narray('id' => '2742','name' => '(CGE) - Cambridge Dorchester Airport, Cambridge, United States','country_id' => '228'),\narray('id' => '2743','name' => '(CGF) - Cuyahoga County Airport, Cleveland, United States','country_id' => '228'),\narray('id' => '2744','name' => '(CGI) - Cape Girardeau Regional Airport, Cape Girardeau, United States','country_id' => '228'),\narray('id' => '2745','name' => '(CGS) - College Park Airport, College Park, United States','country_id' => '228'),\narray('id' => '2746','name' => '(CGZ) - Casa Grande Municipal Airport, Casa Grande, United States','country_id' => '228'),\narray('id' => '2747','name' => '(CHA) - Lovell Field, Chattanooga, United States','country_id' => '228'),\narray('id' => '2748','name' => '(CHK) - Chickasha Municipal Airport, Chickasha, United States','country_id' => '228'),\narray('id' => '2749','name' => '(CHO) - Charlottesville Albemarle Airport, Charlottesville, United States','country_id' => '228'),\narray('id' => '2750','name' => '(CHS) - Charleston Air Force Base-International Airport, Charleston, United States','country_id' => '228'),\narray('id' => '2751','name' => '(CIC) - Chico Municipal Airport, Chico, United States','country_id' => '228'),\narray('id' => '2752','name' => '(CID) - The Eastern Iowa Airport, Cedar Rapids, United States','country_id' => '228'),\narray('id' => '2753','name' => '(CIN) - Arthur N Neu Airport, Carroll, United States','country_id' => '228'),\narray('id' => '2754','name' => '(CIR) - Cairo Regional Airport, Cairo, United States','country_id' => '228'),\narray('id' => '2755','name' => '(CIU) - Chippewa County International Airport, Sault Ste Marie, United States','country_id' => '228'),\narray('id' => '2756','name' => '(CKA) - Kegelman AF Aux Field, Cherokee, United States','country_id' => '228'),\narray('id' => '2757','name' => '(CKB) - North Central West Virginia Airport, Clarksburg, United States','country_id' => '228'),\narray('id' => '2758','name' => '(GRM) - Grand Marais Cook County Airport, Grand Marais, United States','country_id' => '228'),\narray('id' => '2759','name' => '(CKM) - Fletcher Field, Clarksdale, United States','country_id' => '228'),\narray('id' => '2760','name' => '(CKN) - Crookston Municipal Kirkwood Field, Crookston, United States','country_id' => '228'),\narray('id' => '2761','name' => '(CKV) - Clarksvillea\"Montgomery County Regional Airport, Clarksville, United States','country_id' => '228'),\narray('id' => '2762','name' => '(KCL) - Chignik Lagoon Airport, Chignik Flats, United States','country_id' => '228'),\narray('id' => '2763','name' => '(CLE) - Cleveland Hopkins International Airport, Cleveland, United States','country_id' => '228'),\narray('id' => '2764','name' => '(CLI) - Clintonville Municipal Airport, Clintonville, United States','country_id' => '228'),\narray('id' => '2765','name' => '(CLK) - Clinton Regional Airport, Clinton, United States','country_id' => '228'),\narray('id' => '2766','name' => '(CLL) - Easterwood Field, College Station, United States','country_id' => '228'),\narray('id' => '2767','name' => '(CLM) - William R Fairchild International Airport, Port Angeles, United States','country_id' => '228'),\narray('id' => '2768','name' => '(CLR) - Cliff Hatfield Memorial Airport, Calipatria, United States','country_id' => '228'),\narray('id' => '2769','name' => '(CLS) - Chehalis Centralia Airport, Chehalis, United States','country_id' => '228'),\narray('id' => '2770','name' => '(CLT) - Charlotte Douglas International Airport, Charlotte, United States','country_id' => '228'),\narray('id' => '2771','name' => '(CLW) - Clearwater Air Park, Clearwater, United States','country_id' => '228'),\narray('id' => '2772','name' => '(CMH) - Port Columbus International Airport, Columbus, United States','country_id' => '228'),\narray('id' => '2773','name' => '(CMI) - University of Illinois Willard Airport, Champaign/Urbana, United States','country_id' => '228'),\narray('id' => '2774','name' => '(CMX) - Houghton County Memorial Airport, Hancock, United States','country_id' => '228'),\narray('id' => '2775','name' => '(CMY) - Sparta Fort Mc Coy Airport, Sparta, United States','country_id' => '228'),\narray('id' => '2776','name' => '(CNH) - Claremont Municipal Airport, Claremont, United States','country_id' => '228'),\narray('id' => '2777','name' => '(CNK) - Blosser Municipal Airport, Concordia, United States','country_id' => '228'),\narray('id' => '2778','name' => '(CNM) - Cavern City Air Terminal, Carlsbad, United States','country_id' => '228'),\narray('id' => '2779','name' => '(CNO) - Chino Airport, Chino, United States','country_id' => '228'),\narray('id' => '2780','name' => '(CNU) - Chanute Martin Johnson Airport, Chanute, United States','country_id' => '228'),\narray('id' => '2781','name' => '(CNW) - TSTC Waco Airport, Waco, United States','country_id' => '228'),\narray('id' => '2782','name' => '(CNY) - Canyonlands Field, Moab, United States','country_id' => '228'),\narray('id' => '2783','name' => '(COD) - Yellowstone Regional Airport, Cody, United States','country_id' => '228'),\narray('id' => '2784','name' => '(COE) - Coeur D\\'Alene - Pappy Boyington Field, Coeur d\\'Alene, United States','country_id' => '228'),\narray('id' => '2785','name' => '(COF) - Patrick Air Force Base, Cocoa Beach, United States','country_id' => '228'),\narray('id' => '2786','name' => '(COI) - Merritt Island Airport, Merritt Island, United States','country_id' => '228'),\narray('id' => '2787','name' => '(COM) - Coleman Municipal Airport, Coleman, United States','country_id' => '228'),\narray('id' => '2788','name' => '(CON) - Concord Municipal Airport, Concord, United States','country_id' => '228'),\narray('id' => '2789','name' => '(COS) - City of Colorado Springs Municipal Airport, Colorado Springs, United States','country_id' => '228'),\narray('id' => '2790','name' => '(COT) - Cotulla-La Salle County Airport, Cotulla, United States','country_id' => '228'),\narray('id' => '2791','name' => '(COU) - Columbia Regional Airport, Columbia, United States','country_id' => '228'),\narray('id' => '2792','name' => '(CPM) - Compton Woodley Airport, Compton, United States','country_id' => '228'),\narray('id' => '2793','name' => '(CPR) - Casper-Natrona County International Airport, Casper, United States','country_id' => '228'),\narray('id' => '2794','name' => '(CPS) - St Louis Downtown Airport, Cahokia/St Louis, United States','country_id' => '228'),\narray('id' => '2795','name' => '(HCW) - Cheraw Municipal Airport/Lynch Bellinger Field, Cheraw, United States','country_id' => '228'),\narray('id' => '2796','name' => '(KCR) - Colorado Creek Airport, Colorado Creek, United States','country_id' => '228'),\narray('id' => '2797','name' => '(CRE) - Grand Strand Airport, North Myrtle Beach, United States','country_id' => '228'),\narray('id' => '2798','name' => '(CRG) - Jacksonville Executive at Craig Airport, Jacksonville, United States','country_id' => '228'),\narray('id' => '2799','name' => '(CRO) - Corcoran Airport, Corcoran, United States','country_id' => '228'),\narray('id' => '2800','name' => '(CRP) - Corpus Christi International Airport, Corpus Christi, United States','country_id' => '228'),\narray('id' => '2801','name' => '(CLD) - Mc Clellan-Palomar Airport, Carlsbad, United States','country_id' => '228'),\narray('id' => '2802','name' => '(CRS) - C David Campbell Field Corsicana Municipal Airport, Corsicana, United States','country_id' => '228'),\narray('id' => '2803','name' => '(CRT) - Z M Jack Stell Field, Crossett, United States','country_id' => '228'),\narray('id' => '2804','name' => '(CRW) - Yeager Airport, Charleston, United States','country_id' => '228'),\narray('id' => '2805','name' => '(CRX) - Roscoe Turner Airport, Corinth, United States','country_id' => '228'),\narray('id' => '2806','name' => '(CSG) - Columbus Metropolitan Airport, Columbus, United States','country_id' => '228'),\narray('id' => '2807','name' => '(CSM) - Clinton Sherman Airport, Clinton, United States','country_id' => '228'),\narray('id' => '2808','name' => '(CSQ) - Creston Municipal Airport, Creston, United States','country_id' => '228'),\narray('id' => '2809','name' => '(CSV) - Crossville Memorial Whitson Field, Crossville, United States','country_id' => '228'),\narray('id' => '2810','name' => '(CTB) - Cut Bank International Airport, Cut Bank, United States','country_id' => '228'),\narray('id' => '2811','name' => '(CTY) - Cross City Airport, Cross City, United States','country_id' => '228'),\narray('id' => '2812','name' => '(CTZ) - Sampson County Airport, Clinton, United States','country_id' => '228'),\narray('id' => '2813','name' => '(CUB) - Jim Hamilton L.B. Owens Airport, Columbia, United States','country_id' => '228'),\narray('id' => '2814','name' => '(CUH) - Cushing Municipal Airport, Cushing, United States','country_id' => '228'),\narray('id' => '2815','name' => '(CVG) - Cincinnati Northern Kentucky International Airport, Cincinnati, United States','country_id' => '228'),\narray('id' => '2816','name' => '(CKK) - Sharp County Regional Airport, Ash Flat, United States','country_id' => '228'),\narray('id' => '2817','name' => '(CVN) - Clovis Municipal Airport, Clovis, United States','country_id' => '228'),\narray('id' => '2818','name' => '(CVO) - Corvallis Municipal Airport, Corvallis, United States','country_id' => '228'),\narray('id' => '2819','name' => '(CVS) - Cannon Air Force Base, Clovis, United States','country_id' => '228'),\narray('id' => '2820','name' => '(CWA) - Central Wisconsin Airport, Mosinee, United States','country_id' => '228'),\narray('id' => '2821','name' => '(KIP) - Kickapoo Downtown Airport, Wichita Falls, United States','country_id' => '228'),\narray('id' => '2822','name' => '(CWF) - Chennault International Airport, Lake Charles, United States','country_id' => '228'),\narray('id' => '2823','name' => '(CWI) - Clinton Municipal Airport, Clinton, United States','country_id' => '228'),\narray('id' => '2824','name' => '(CXL) - Calexico International Airport, Calexico, United States','country_id' => '228'),\narray('id' => '2825','name' => '(CXO) - Lone Star Executive Airport, Houston, United States','country_id' => '228'),\narray('id' => '2826','name' => '(CSN) - Carson Airport, Carson City, United States','country_id' => '228'),\narray('id' => '2827','name' => '(HAR) - Capital City Airport, Harrisburg, United States','country_id' => '228'),\narray('id' => '2828','name' => '(CYS) - Cheyenne Regional Jerry Olson Field, Cheyenne, United States','country_id' => '228'),\narray('id' => '2829','name' => '(CZT) - Dimmit County Airport, Carrizo Springs, United States','country_id' => '228'),\narray('id' => '2830','name' => '(VEX) - Tioga Municipal Airport, Tioga, United States','country_id' => '228'),\narray('id' => '2831','name' => '(DAA) - Davison Army Air Field, Fort Belvoir, United States','country_id' => '228'),\narray('id' => '2832','name' => '(DAB) - Daytona Beach International Airport, Daytona Beach, United States','country_id' => '228'),\narray('id' => '2833','name' => '(DAG) - Barstow Daggett Airport, Daggett, United States','country_id' => '228'),\narray('id' => '2834','name' => '(DAL) - Dallas Love Field, Dallas, United States','country_id' => '228'),\narray('id' => '2835','name' => '(DAN) - Danville Regional Airport, Danville, United States','country_id' => '228'),\narray('id' => '2836','name' => '(DAY) - James M Cox Dayton International Airport, Dayton, United States','country_id' => '228'),\narray('id' => '2837','name' => '(DBN) - W H \\'Bud\\' Barron Airport, Dublin, United States','country_id' => '228'),\narray('id' => '2838','name' => '(DBQ) - Dubuque Regional Airport, Dubuque, United States','country_id' => '228'),\narray('id' => '2839','name' => '(DCA) - Ronald Reagan Washington National Airport, Washington, United States','country_id' => '228'),\narray('id' => '2840','name' => '(DCU) - Pryor Field Regional Airport, Decatur, United States','country_id' => '228'),\narray('id' => '2841','name' => '(DDC) - Dodge City Regional Airport, Dodge City, United States','country_id' => '228'),\narray('id' => '2842','name' => '(DEC) - Decatur Airport, Decatur, United States','country_id' => '228'),\narray('id' => '2843','name' => '(DEH) - Decorah Municipal Airport, Decorah, United States','country_id' => '228'),\narray('id' => '2844','name' => '(DEN) - Denver International Airport, Denver, United States','country_id' => '228'),\narray('id' => '2845','name' => '(DET) - Coleman A. Young Municipal Airport, Detroit, United States','country_id' => '228'),\narray('id' => '2846','name' => '(DFI) - Defiance Memorial Airport, Defiance, United States','country_id' => '228'),\narray('id' => '2847','name' => '(DFW) - Dallas Fort Worth International Airport, Dallas-Fort Worth, United States','country_id' => '228'),\narray('id' => '2848','name' => '(DGL) - Douglas Municipal Airport, Douglas, United States','country_id' => '228'),\narray('id' => '2849','name' => '(DGW) - Converse County Airport, Douglas, United States','country_id' => '228'),\narray('id' => '2850','name' => '(DHN) - Dothan Regional Airport, Dothan, United States','country_id' => '228'),\narray('id' => '2851','name' => '(DHT) - Dalhart Municipal Airport, Dalhart, United States','country_id' => '228'),\narray('id' => '2852','name' => '(DIK) - Dickinson Theodore Roosevelt Regional Airport, Dickinson, United States','country_id' => '228'),\narray('id' => '2853','name' => '(DKK) - Chautauqua County-Dunkirk Airport, Dunkirk, United States','country_id' => '228'),\narray('id' => '2854','name' => '(DLL) - Dillon County Airport, Dillon, United States','country_id' => '228'),\narray('id' => '2855','name' => '(DLF) - Laughlin Air Force Base, Del Rio, United States','country_id' => '228'),\narray('id' => '2856','name' => '(DLH) - Duluth International Airport, Duluth, United States','country_id' => '228'),\narray('id' => '2857','name' => '(DLN) - Dillon Airport, Dillon, United States','country_id' => '228'),\narray('id' => '2858','name' => '(DLS) - Columbia Gorge Regional the Dalles Municipal Airport, The Dalles, United States','country_id' => '228'),\narray('id' => '2859','name' => '(DMA) - Davis Monthan Air Force Base, Tucson, United States','country_id' => '228'),\narray('id' => '2860','name' => '(DMN) - Deming Municipal Airport, Deming, United States','country_id' => '228'),\narray('id' => '2861','name' => '(DMO) - Sedalia Memorial Airport, Sedalia, United States','country_id' => '228'),\narray('id' => '2862','name' => '(DNL) - Daniel Field, Augusta, United States','country_id' => '228'),\narray('id' => '2863','name' => '(DNN) - Dalton Municipal Airport, Dalton, United States','country_id' => '228'),\narray('id' => '2864','name' => '(DNS) - Denison Municipal Airport, Denison, United States','country_id' => '228'),\narray('id' => '2865','name' => '(DNV) - Vermilion Regional Airport, Danville, United States','country_id' => '228'),\narray('id' => '2866','name' => '(DOV) - Dover Air Force Base, Dover, United States','country_id' => '228'),\narray('id' => '2867','name' => '(KDP) - Kandep Airport, Kandep, Papua New Guinea','country_id' => '172'),\narray('id' => '2868','name' => '(DPA) - Dupage Airport, Chicago/West Chicago, United States','country_id' => '228'),\narray('id' => '2869','name' => '(DPG) - Michael AAF (Dugway Proving Ground) Airport, Dugway Proving Ground, United States','country_id' => '228'),\narray('id' => '2870','name' => '(KDQ) - Kamberatoro Airport, Kamberatoro Mission, Papua New Guinea','country_id' => '172'),\narray('id' => '2871','name' => '(DRA) - Desert Rock Airport, Mercury, United States','country_id' => '228'),\narray('id' => '2872','name' => '(DRI) - Beauregard Regional Airport, De Ridder, United States','country_id' => '228'),\narray('id' => '2873','name' => '(DRE) - Drummond Island Airport, Drummond Island, United States','country_id' => '228'),\narray('id' => '2874','name' => '(DRO) - Durango La Plata County Airport, Durango, United States','country_id' => '228'),\narray('id' => '2875','name' => '(DRT) - Del Rio International Airport, Del Rio, United States','country_id' => '228'),\narray('id' => '2876','name' => '(KDS) - Kamaran Downs Airport, Kamaran Downs, Australia','country_id' => '12'),\narray('id' => '2877','name' => '(DSM) - Des Moines International Airport, Des Moines, United States','country_id' => '228'),\narray('id' => '2878','name' => '(DSV) - Dansville Municipal Airport, Dansville, United States','country_id' => '228'),\narray('id' => '2879','name' => '(DTA) - Delta Municipal Airport, Delta, United States','country_id' => '228'),\narray('id' => '2880','name' => '(DTL) - Detroit Lakes Airport - Wething Field, Detroit Lakes, United States','country_id' => '228'),\narray('id' => '2881','name' => '(DTN) - Shreveport Downtown Airport, Shreveport, United States','country_id' => '228'),\narray('id' => '2882','name' => '(DSI) - Destin Executive Airport, Destin, United States','country_id' => '228'),\narray('id' => '2883','name' => '(DTW) - Detroit Metropolitan Wayne County Airport, Detroit, United States','country_id' => '228'),\narray('id' => '2884','name' => '(DUA) - Eaker Field, Durant, United States','country_id' => '228'),\narray('id' => '2885','name' => '(DUC) - Halliburton Field, Duncan, United States','country_id' => '228'),\narray('id' => '2886','name' => '(DUG) - Bisbee Douglas International Airport, Douglas Bisbee, United States','country_id' => '228'),\narray('id' => '2887','name' => '(DUJ) - DuBois Regional Airport, Dubois, United States','country_id' => '228'),\narray('id' => '2888','name' => '(DVL) - Devils Lake Regional Airport, Devils Lake, United States','country_id' => '228'),\narray('id' => '2889','name' => '(DVN) - Davenport Municipal Airport, Davenport, United States','country_id' => '228'),\narray('id' => '2890','name' => '(NOT) - Marin County Airport - Gnoss Field, Novato, United States','country_id' => '228'),\narray('id' => '2891','name' => '(NSL) - Slayton Municipal Airport, Slayton, United States','country_id' => '228'),\narray('id' => '2892','name' => '(DVT) - Phoenix Deer Valley Airport, Phoenix, United States','country_id' => '228'),\narray('id' => '2893','name' => '(DWH) - David Wayne Hooks Memorial Airport, Houston, United States','country_id' => '228'),\narray('id' => '2894','name' => '(DXR) - Danbury Municipal Airport, Danbury, United States','country_id' => '228'),\narray('id' => '2895','name' => '(DYL) - Doylestown Airport, Doylestown, United States','country_id' => '228'),\narray('id' => '2896','name' => '(DYS) - Dyess Air Force Base, Abilene, United States','country_id' => '228'),\narray('id' => '2897','name' => '(JJM) - Mulika Lodge Airport, Meru-Kinna, Kenya','country_id' => '111'),\narray('id' => '2898','name' => '(VPG) - Vipingo Estate Airport, Vipingo Estate, Kenya','country_id' => '111'),\narray('id' => '2899','name' => '(KRV) - Kerio Valley Airport, Kimwarer, Kenya','country_id' => '111'),\narray('id' => '2900','name' => '(KIU) - Kiunga Airport, Kiunga, Kenya','country_id' => '111'),\narray('id' => '2901','name' => '(LBK) - Liboi Airport, Liboi, Kenya','country_id' => '111'),\narray('id' => '2902','name' => '(LBN) - Lake Baringo Airport, Lake Baringo, Kenya','country_id' => '111'),\narray('id' => '2903','name' => '(LKU) - Lake Rudolf Airport, Lake Rudolf, Kenya','country_id' => '111'),\narray('id' => '2904','name' => '(MRE) - Mara Lodges Airport, Mara Lodges, Kenya','country_id' => '111'),\narray('id' => '2905','name' => '(MUM) - Mumias Airport, Mumias, Kenya','country_id' => '111'),\narray('id' => '2906','name' => '(MIF) - Roy Hurd Memorial Airport, Monahans, United States','country_id' => '228'),\narray('id' => '2907','name' => '(CCG) - Crane County Airport, Crane, United States','country_id' => '228'),\narray('id' => '2908','name' => '(ESO) - Ohkay Owingeh Airport, Espanola, United States','country_id' => '228'),\narray('id' => '2909','name' => '(WTR) - Whiteriver Airport, Whiteriver, United States','country_id' => '228'),\narray('id' => '2910','name' => '(ALE) - Alpine Casparis Municipal Airport, Alpine, United States','country_id' => '228'),\narray('id' => '2911','name' => '(BGT) - Bagdad Airport, Bagdad, United States','country_id' => '228'),\narray('id' => '2912','name' => '(EAN) - Phifer Airfield, Wheatland, United States','country_id' => '228'),\narray('id' => '2913','name' => '(EAR) - Kearney Regional Airport, Kearney, United States','country_id' => '228'),\narray('id' => '2914','name' => '(EAT) - Pangborn Memorial Airport, Wenatchee, United States','country_id' => '228'),\narray('id' => '2915','name' => '(EAU) - Chippewa Valley Regional Airport, Eau Claire, United States','country_id' => '228'),\narray('id' => '2916','name' => '(KEB) - Nanwalek Airport, Nanwalek, United States','country_id' => '228'),\narray('id' => '2917','name' => '(EBS) - Webster City Municipal Airport, Webster City, United States','country_id' => '228'),\narray('id' => '2918','name' => '(ECG) - Elizabeth City Regional Airport & Coast Guard Air Station, Elizabeth City, United States','country_id' => '228'),\narray('id' => '2919','name' => '(ECP) - Northwest Florida Beaches International Airport, Panama City Beach, United States','country_id' => '228'),\narray('id' => '2920','name' => '(ECS) - Mondell Field, Newcastle, United States','country_id' => '228'),\narray('id' => '2921','name' => '(EDE) - Northeastern Regional Airport, Edenton, United States','country_id' => '228'),\narray('id' => '2922','name' => '(ETS) - Enterprise Municipal Airport, Enterprise, United States','country_id' => '228'),\narray('id' => '2923','name' => '(EDW) - Edwards Air Force Base, Edwards, United States','country_id' => '228'),\narray('id' => '2924','name' => '(EED) - Needles Airport, Needles, United States','country_id' => '228'),\narray('id' => '2925','name' => '(EEN) - Dillant Hopkins Airport, Keene, United States','country_id' => '228'),\narray('id' => '2926','name' => '(EFD) - Ellington Airport, Houston, United States','country_id' => '228'),\narray('id' => '2927','name' => '(EFK) - Newport State Airport, Newport, United States','country_id' => '228'),\narray('id' => '2928','name' => '(EFW) - Jefferson Municipal Airport, Jefferson, United States','country_id' => '228'),\narray('id' => '2929','name' => '(KEG) - Keglsugl Airport, Denglagu Mission, Papua New Guinea','country_id' => '172'),\narray('id' => '2930','name' => '(EGE) - Eagle County Regional Airport, Eagle, United States','country_id' => '228'),\narray('id' => '2931','name' => '(EGI) - Duke Field, Crestview, United States','country_id' => '228'),\narray('id' => '2932','name' => '(EGV) - Eagle River Union Airport, Eagle River, United States','country_id' => '228'),\narray('id' => '2933','name' => '(KEK) - Ekwok Airport, Ekwok, United States','country_id' => '228'),\narray('id' => '2934','name' => '(EKA) - Murray Field, Eureka, United States','country_id' => '228'),\narray('id' => '2935','name' => '(EKI) - Elkhart Municipal Airport, Elkhart, United States','country_id' => '228'),\narray('id' => '2936','name' => '(EKN) - Elkins-Randolph Co-Jennings Randolph Field, Elkins, United States','country_id' => '228'),\narray('id' => '2937','name' => '(EKO) - Elko Regional Airport, Elko, United States','country_id' => '228'),\narray('id' => '2938','name' => '(EKX) - Addington Field, Elizabethtown, United States','country_id' => '228'),\narray('id' => '2939','name' => '(ELA) - Eagle Lake Airport, Eagle Lake, United States','country_id' => '228'),\narray('id' => '2940','name' => '(ELD) - South Arkansas Regional At Goodwin Field, El Dorado, United States','country_id' => '228'),\narray('id' => '2941','name' => '(ELK) - Elk City Regional Business Airport, Elk City, United States','country_id' => '228'),\narray('id' => '2942','name' => '(ELM) - Elmira Corning Regional Airport, Elmira/Corning, United States','country_id' => '228'),\narray('id' => '2943','name' => '(ELN) - Bowers Field, Ellensburg, United States','country_id' => '228'),\narray('id' => '2944','name' => '(LYU) - Ely Municipal Airport, Ely, United States','country_id' => '228'),\narray('id' => '2945','name' => '(ELP) - El Paso International Airport, El Paso, United States','country_id' => '228'),\narray('id' => '2946','name' => '(ELY) - Ely Airport Yelland Field, Ely, United States','country_id' => '228'),\narray('id' => '2947','name' => '(ELZ) - Wellsville Municipal Arpt,Tarantine Field, Wellsville, United States','country_id' => '228'),\narray('id' => '2948','name' => '(EMM) - Kemmerer Municipal Airport, Kemmerer, United States','country_id' => '228'),\narray('id' => '2949','name' => '(EMP) - Emporia Municipal Airport, Emporia, United States','country_id' => '228'),\narray('id' => '2950','name' => '(EMT) - El Monte Airport, El Monte, United States','country_id' => '228'),\narray('id' => '2951','name' => '(END) - Vance Air Force Base, Enid, United States','country_id' => '228'),\narray('id' => '2952','name' => '(ENL) - Centralia Municipal Airport, Centralia, United States','country_id' => '228'),\narray('id' => '2953','name' => '(ENV) - Wendover Airport, Wendover, United States','country_id' => '228'),\narray('id' => '2954','name' => '(ENW) - Kenosha Regional Airport, Kenosha, United States','country_id' => '228'),\narray('id' => '2955','name' => '(EOK) - Keokuk Municipal Airport, Keokuk, United States','country_id' => '228'),\narray('id' => '2956','name' => '(EPH) - Ephrata Municipal Airport, Ephrata, United States','country_id' => '228'),\narray('id' => '2957','name' => '(EDK) - Captain Jack Thomas El Dorado Airport, El Dorado, United States','country_id' => '228'),\narray('id' => '2958','name' => '(ERI) - Erie International Tom Ridge Field, Erie, United States','country_id' => '228'),\narray('id' => '2959','name' => '(ERR) - Errol Airport, Errol, United States','country_id' => '228'),\narray('id' => '2960','name' => '(ERV) - Kerrville Municipal Louis Schreiner Field, Kerrville, United States','country_id' => '228'),\narray('id' => '2961','name' => '(ESC) - Delta County Airport, Escanaba, United States','country_id' => '228'),\narray('id' => '2962','name' => '(ESF) - Esler Regional Airport, Alexandria, United States','country_id' => '228'),\narray('id' => '2963','name' => '(ESN) - Easton Newnam Field, Easton, United States','country_id' => '228'),\narray('id' => '2964','name' => '(EST) - Estherville Municipal Airport, Estherville, United States','country_id' => '228'),\narray('id' => '2965','name' => '(ESW) - Easton State Airport, Easton, United States','country_id' => '228'),\narray('id' => '2966','name' => '(ETB) - West Bend Municipal Airport, West Bend, United States','country_id' => '228'),\narray('id' => '2967','name' => '(ETN) - Eastland Municipal Airport, Eastland, United States','country_id' => '228'),\narray('id' => '2968','name' => '(EUF) - Weedon Field, Eufaula, United States','country_id' => '228'),\narray('id' => '2969','name' => '(EUG) - Mahlon Sweet Field, Eugene, United States','country_id' => '228'),\narray('id' => '2970','name' => '(EVM) - Eveleth Virginia Municipal Airport, Eveleth, United States','country_id' => '228'),\narray('id' => '2971','name' => '(EVV) - Evansville Regional Airport, Evansville, United States','country_id' => '228'),\narray('id' => '2972','name' => '(EVW) - Evanston-Uinta County Airport-Burns Field, Evanston, United States','country_id' => '228'),\narray('id' => '2973','name' => '(EWB) - New Bedford Regional Airport, New Bedford, United States','country_id' => '228'),\narray('id' => '2974','name' => '(EWK) - Newton City-County Airport, Newton, United States','country_id' => '228'),\narray('id' => '2975','name' => '(EWN) - Coastal Carolina Regional Airport, New Bern, United States','country_id' => '228'),\narray('id' => '2976','name' => '(EWR) - Newark Liberty International Airport, Newark, United States','country_id' => '228'),\narray('id' => '2977','name' => '(KEX) - Kanabea Airport, Kanabea, Papua New Guinea','country_id' => '172'),\narray('id' => '2978','name' => '(EYW) - Key West International Airport, Key West, United States','country_id' => '228'),\narray('id' => '2979','name' => '(WIB) - Wilbarger County Airport, Vernon, United States','country_id' => '228'),\narray('id' => '2980','name' => '(RBK) - French Valley Airport, Murrieta/Temecula, United States','country_id' => '228'),\narray('id' => '2981','name' => '(FAF) - Felker Army Air Field, Fort Eustis, United States','country_id' => '228'),\narray('id' => '2982','name' => '(FAM) - Farmington Regional Airport, Farmington, United States','country_id' => '228'),\narray('id' => '2983','name' => '(FAR) - Hector International Airport, Fargo, United States','country_id' => '228'),\narray('id' => '2984','name' => '(FAT) - Fresno Yosemite International Airport, Fresno, United States','country_id' => '228'),\narray('id' => '2985','name' => '(FAY) - Fayetteville Regional Grannis Field, Fayetteville, United States','country_id' => '228'),\narray('id' => '2986','name' => '(FBG) - Simmons Army Air Field, Fort Bragg, United States','country_id' => '228'),\narray('id' => '2987','name' => '(FBL) - Faribault Municipal Airport, Faribault, United States','country_id' => '228'),\narray('id' => '2988','name' => '(FBR) - Fort Bridger Airport, Fort Bridger, United States','country_id' => '228'),\narray('id' => '2989','name' => '(FBY) - Fairbury Municipal Airport, Fairbury, United States','country_id' => '228'),\narray('id' => '2990','name' => '(FCH) - Fresno Chandler Executive Airport, Fresno, United States','country_id' => '228'),\narray('id' => '2991','name' => '(FCM) - Flying Cloud Airport, Minneapolis, United States','country_id' => '228'),\narray('id' => '2992','name' => '(FCS) - Butts AAF (Fort Carson) Air Field, Fort Carson, United States','country_id' => '228'),\narray('id' => '2993','name' => '(FCY) - Forrest City Municipal Airport, Forrest City, United States','country_id' => '228'),\narray('id' => '2994','name' => '(FDK) - Frederick Municipal Airport, Frederick, United States','country_id' => '228'),\narray('id' => '2995','name' => '(FDR) - Frederick Regional Airport, Frederick, United States','country_id' => '228'),\narray('id' => '2996','name' => '(FDY) - Findlay Airport, Findlay, United States','country_id' => '228'),\narray('id' => '2997','name' => '(FEP) - Albertus Airport, Freeport, United States','country_id' => '228'),\narray('id' => '2998','name' => '(FET) - Fremont Municipal Airport, Fremont, United States','country_id' => '228'),\narray('id' => '2999','name' => '(FFA) - First Flight Airport, Kill Devil Hills, United States','country_id' => '228'),\narray('id' => '3000','name' => '(FFL) - Fairfield Municipal Airport, Fairfield, United States','country_id' => '228'),\narray('id' => '3001','name' => '(FFM) - Fergus Falls Municipal Airport - Einar Mickelson Field, Fergus Falls, United States','country_id' => '228'),\narray('id' => '3002','name' => '(FFO) - Wright-Patterson Air Force Base, Dayton, United States','country_id' => '228'),\narray('id' => '3003','name' => '(FFT) - Capital City Airport, Frankfort, United States','country_id' => '228'),\narray('id' => '3004','name' => '(MSC) - Falcon Field, Mesa, United States','country_id' => '228'),\narray('id' => '3005','name' => '(FRD) - Friday Harbor Airport, Friday Harbor, United States','country_id' => '228'),\narray('id' => '3006','name' => '(FHU) - Sierra Vista Municipal Libby Army Air Field, Fort Huachuca Sierra Vista, United States','country_id' => '228'),\narray('id' => '3007','name' => '(FKL) - Venango Regional Airport, Franklin, United States','country_id' => '228'),\narray('id' => '3008','name' => '(FKN) - Franklin Municipal-John Beverly Rose Airport, Franklin, United States','country_id' => '228'),\narray('id' => '3009','name' => '(FLD) - Fond du Lac County Airport, Fond du Lac, United States','country_id' => '228'),\narray('id' => '3010','name' => '(FLG) - Flagstaff Pulliam Airport, Flagstaff, United States','country_id' => '228'),\narray('id' => '3011','name' => '(FLL) - Fort Lauderdale Hollywood International Airport, Fort Lauderdale, United States','country_id' => '228'),\narray('id' => '3012','name' => '(FLO) - Florence Regional Airport, Florence, United States','country_id' => '228'),\narray('id' => '3013','name' => '(FLP) - Marion County Regional Airport, Flippin, United States','country_id' => '228'),\narray('id' => '3014','name' => '(FLV) - Sherman Army Air Field, Fort Leavenworth, United States','country_id' => '228'),\narray('id' => '3015','name' => '(FLX) - Fallon Municipal Airport, Fallon, United States','country_id' => '228'),\narray('id' => '3016','name' => '(FME) - Tipton Airport, Fort Meade(Odenton), United States','country_id' => '228'),\narray('id' => '3017','name' => '(FMH) - Cape Cod Coast Guard Air Station, Falmouth, United States','country_id' => '228'),\narray('id' => '3018','name' => '(FMN) - Four Corners Regional Airport, Farmington, United States','country_id' => '228'),\narray('id' => '3019','name' => '(FMY) - Page Field, Fort Myers, United States','country_id' => '228'),\narray('id' => '3020','name' => '(FNL) - Fort Collins Loveland Municipal Airport, Fort Collins/Loveland, United States','country_id' => '228'),\narray('id' => '3021','name' => '(FNT) - Bishop International Airport, Flint, United States','country_id' => '228'),\narray('id' => '3022','name' => '(FOD) - Fort Dodge Regional Airport, Fort Dodge, United States','country_id' => '228'),\narray('id' => '3023','name' => '(FOE) - Topeka Regional Airport - Forbes Field, Topeka, United States','country_id' => '228'),\narray('id' => '3024','name' => '(FOK) - Francis S Gabreski Airport, Westhampton Beach, United States','country_id' => '228'),\narray('id' => '3025','name' => '(FIL) - Fillmore Municipal Airport, Fillmore, United States','country_id' => '228'),\narray('id' => '3026','name' => '(FPR) - St Lucie County International Airport, Fort Pierce, United States','country_id' => '228'),\narray('id' => '3027','name' => '(FRG) - Republic Airport, Farmingdale, United States','country_id' => '228'),\narray('id' => '3028','name' => '(FRH) - French Lick Municipal Airport, French Lick, United States','country_id' => '228'),\narray('id' => '3029','name' => '(FRI) - Marshall Army Air Field, Fort Riley(Junction City), United States','country_id' => '228'),\narray('id' => '3030','name' => '(FRM) - Fairmont Municipal Airport, Fairmont, United States','country_id' => '228'),\narray('id' => '3031','name' => '(FRR) - Front Royal Warren County Airport, Front Royal, United States','country_id' => '228'),\narray('id' => '3032','name' => '(FSD) - Joe Foss Field Airport, Sioux Falls, United States','country_id' => '228'),\narray('id' => '3033','name' => '(FSI) - Henry Post Army Air Field (Fort Sill), Fort Sill, United States','country_id' => '228'),\narray('id' => '3034','name' => '(FSK) - Fort Scott Municipal Airport, Fort Scott, United States','country_id' => '228'),\narray('id' => '3035','name' => '(FSM) - Fort Smith Regional Airport, Fort Smith, United States','country_id' => '228'),\narray('id' => '3036','name' => '(FST) - Fort Stockton Pecos County Airport, Fort Stockton, United States','country_id' => '228'),\narray('id' => '3037','name' => '(FSU) - Fort Sumner Municipal Airport, Fort Sumner, United States','country_id' => '228'),\narray('id' => '3038','name' => '(FMS) - Fort Madison Municipal Airport, Fort Madison, United States','country_id' => '228'),\narray('id' => '3039','name' => '(FTK) - Godman Army Air Field, Fort Knox, United States','country_id' => '228'),\narray('id' => '3040','name' => '(FTW) - Fort Worth Meacham International Airport, Fort Worth, United States','country_id' => '228'),\narray('id' => '3041','name' => '(FTY) - Fulton County Airport Brown Field, Atlanta, United States','country_id' => '228'),\narray('id' => '3042','name' => '(FUL) - Fullerton Municipal Airport, Fullerton, United States','country_id' => '228'),\narray('id' => '3043','name' => '(WFK) - Northern Aroostook Regional Airport, Frenchville, United States','country_id' => '228'),\narray('id' => '3044','name' => '(FWA) - Fort Wayne International Airport, Fort Wayne, United States','country_id' => '228'),\narray('id' => '3045','name' => '(FXE) - Fort Lauderdale Executive Airport, Fort Lauderdale, United States','country_id' => '228'),\narray('id' => '3046','name' => '(FXY) - Forest City Municipal Airport, Forest City, United States','country_id' => '228'),\narray('id' => '3047','name' => '(FYM) - Fayetteville Municipal Airport, Fayetteville, United States','country_id' => '228'),\narray('id' => '3048','name' => '(FYV) - Drake Field, Fayetteville, United States','country_id' => '228'),\narray('id' => '3049','name' => '(GAG) - Gage Airport, Gage, United States','country_id' => '228'),\narray('id' => '3050','name' => '(GAI) - Montgomery County Airpark, Gaithersburg, United States','country_id' => '228'),\narray('id' => '3051','name' => '(GBD) - Great Bend Municipal Airport, Great Bend, United States','country_id' => '228'),\narray('id' => '3052','name' => '(GBG) - Galesburg Municipal Airport, Galesburg, United States','country_id' => '228'),\narray('id' => '3053','name' => '(GBR) - Walter J. Koladza Airport, Great Barrington, United States','country_id' => '228'),\narray('id' => '3054','name' => '(GCC) - Gillette Campbell County Airport, Gillette, United States','country_id' => '228'),\narray('id' => '3055','name' => '(JDA) - Grant Co Regional/Ogilvie Field, John Day, United States','country_id' => '228'),\narray('id' => '3056','name' => '(GCK) - Garden City Regional Airport, Garden City, United States','country_id' => '228'),\narray('id' => '3057','name' => '(GCN) - Grand Canyon National Park Airport, Grand Canyon, United States','country_id' => '228'),\narray('id' => '3058','name' => '(GCY) - Greeneville-Greene County Municipal Airport, Greeneville, United States','country_id' => '228'),\narray('id' => '3059','name' => '(GDM) - Gardner Municipal Airport, Gardner, United States','country_id' => '228'),\narray('id' => '3060','name' => '(GDV) - Dawson Community Airport, Glendive, United States','country_id' => '228'),\narray('id' => '3061','name' => '(GDW) - Gladwin Zettel Memorial Airport, Gladwin, United States','country_id' => '228'),\narray('id' => '3062','name' => '(GED) - Sussex County Airport, Georgetown, United States','country_id' => '228'),\narray('id' => '3063','name' => '(GEG) - Spokane International Airport, Spokane, United States','country_id' => '228'),\narray('id' => '3064','name' => '(GEY) - South Big Horn County Airport, Greybull, United States','country_id' => '228'),\narray('id' => '3065','name' => '(GFK) - Grand Forks International Airport, Grand Forks, United States','country_id' => '228'),\narray('id' => '3066','name' => '(GFL) - Floyd Bennett Memorial Airport, Glens Falls, United States','country_id' => '228'),\narray('id' => '3067','name' => '(GGE) - Georgetown County Airport, Georgetown, United States','country_id' => '228'),\narray('id' => '3068','name' => '(GGG) - East Texas Regional Airport, Longview, United States','country_id' => '228'),\narray('id' => '3069','name' => '(GGW) - Wokal Field Glasgow International Airport, Glasgow, United States','country_id' => '228'),\narray('id' => '3070','name' => '(GHM) - Centerville Municipal Airport, Centerville, United States','country_id' => '228'),\narray('id' => '3071','name' => '(GIF) - Winter Haven Municipal Airport - Gilbert Field, Winter Haven, United States','country_id' => '228'),\narray('id' => '3072','name' => '(GJT) - Grand Junction Regional Airport, Grand Junction, United States','country_id' => '228'),\narray('id' => '3073','name' => '(MEJ) - Port Meadville Airport, Meadville, United States','country_id' => '228'),\narray('id' => '3074','name' => '(GKT) - Gatlinburg-Pigeon Forge Airport, Sevierville, United States','country_id' => '228'),\narray('id' => '3075','name' => '(GLD) - Renner Field-Goodland Municipal Airport, Goodland, United States','country_id' => '228'),\narray('id' => '3076','name' => '(GLE) - Gainesville Municipal Airport, Gainesville, United States','country_id' => '228'),\narray('id' => '3077','name' => '(GLH) - Mid Delta Regional Airport, Greenville, United States','country_id' => '228'),\narray('id' => '3078','name' => '(GLR) - Gaylord Regional Airport, Gaylord, United States','country_id' => '228'),\narray('id' => '3079','name' => '(GLS) - Scholes International At Galveston Airport, Galveston, United States','country_id' => '228'),\narray('id' => '3080','name' => '(GLW) - Glasgow Municipal Airport, Glasgow, United States','country_id' => '228'),\narray('id' => '3081','name' => '(GMU) - Greenville Downtown Airport, Greenville, United States','country_id' => '228'),\narray('id' => '3082','name' => '(GNG) - Gooding Municipal Airport, Gooding, United States','country_id' => '228'),\narray('id' => '3083','name' => '(GNT) - Grants-Milan Municipal Airport, Grants, United States','country_id' => '228'),\narray('id' => '3084','name' => '(GNV) - Gainesville Regional Airport, Gainesville, United States','country_id' => '228'),\narray('id' => '3085','name' => '(GOK) - Guthrie-Edmond Regional Airport, Guthrie, United States','country_id' => '228'),\narray('id' => '3086','name' => '(GON) - Groton New London Airport, Groton (New London), United States','country_id' => '228'),\narray('id' => '3087','name' => '(FCA) - Glacier Park International Airport, Kalispell, United States','country_id' => '228'),\narray('id' => '3088','name' => '(GPT) - Gulfport Biloxi International Airport, Gulfport, United States','country_id' => '228'),\narray('id' => '3089','name' => '(GPZ) - Grand Rapids Itasca Co-Gordon Newstrom field, Grand Rapids, United States','country_id' => '228'),\narray('id' => '3090','name' => '(GQQ) - Galion Municipal Airport, Galion, United States','country_id' => '228'),\narray('id' => '3091','name' => '(GRB) - Austin Straubel International Airport, Green Bay, United States','country_id' => '228'),\narray('id' => '3092','name' => '(GRD) - Greenwood County Airport, Greenwood, United States','country_id' => '228'),\narray('id' => '3093','name' => '(GRE) - Greenville Airport, Greenville, United States','country_id' => '228'),\narray('id' => '3094','name' => '(GRF) - Gray Army Air Field, Fort Lewis/Tacoma, United States','country_id' => '228'),\narray('id' => '3095','name' => '(GRI) - Central Nebraska Regional Airport, Grand Island, United States','country_id' => '228'),\narray('id' => '3096','name' => '(GRK) - Robert Gray Army Air Field Airport, Fort Hood/Killeen, United States','country_id' => '228'),\narray('id' => '3097','name' => '(GRN) - Gordon Municipal Airport, Gordon, United States','country_id' => '228'),\narray('id' => '3098','name' => '(GRR) - Gerald R. Ford International Airport, Grand Rapids, United States','country_id' => '228'),\narray('id' => '3099','name' => '(GSB) - Seymour Johnson Air Force Base, Goldsboro, United States','country_id' => '228'),\narray('id' => '3100','name' => '(GSH) - Goshen Municipal Airport, Goshen, United States','country_id' => '228'),\narray('id' => '3101','name' => '(GSO) - Piedmont Triad International Airport, Greensboro, United States','country_id' => '228'),\narray('id' => '3102','name' => '(GSP) - Greenville Spartanburg International Airport, Greenville, United States','country_id' => '228'),\narray('id' => '3103','name' => '(GTF) - Great Falls International Airport, Great Falls, United States','country_id' => '228'),\narray('id' => '3104','name' => '(GTG) - Grantsburg Municipal Airport, Grantsburg, United States','country_id' => '228'),\narray('id' => '3105','name' => '(GTR) - Golden Triangle Regional Airport, Columbus/W Point/Starkville, United States','country_id' => '228'),\narray('id' => '3106','name' => '(GUC) - Gunnison Crested Butte Regional Airport, Gunnison, United States','country_id' => '228'),\narray('id' => '3107','name' => '(GUP) - Gallup Municipal Airport, Gallup, United States','country_id' => '228'),\narray('id' => '3108','name' => '(GUS) - Grissom Air Reserve Base, Peru, United States','country_id' => '228'),\narray('id' => '3109','name' => '(GUY) - Guymon Municipal Airport, Guymon, United States','country_id' => '228'),\narray('id' => '3110','name' => '(GVL) - Lee Gilmer Memorial Airport, Gainesville, United States','country_id' => '228'),\narray('id' => '3111','name' => '(GVT) - Majors Airport, Greenville, United States','country_id' => '228'),\narray('id' => '3112','name' => '(KGW) - Kagi Airport, Kagi, Papua New Guinea','country_id' => '172'),\narray('id' => '3113','name' => '(GWO) - Greenwooda\"Leflore Airport, Greenwood, United States','country_id' => '228'),\narray('id' => '3114','name' => '(GWS) - Glenwood Springs Municipal Airport, Glenwood Springs, United States','country_id' => '228'),\narray('id' => '3115','name' => '(KGX) - Grayling Airport, Grayling, United States','country_id' => '228'),\narray('id' => '3116','name' => '(GXY) - Greeleya\"Weld County Airport, Greeley, United States','country_id' => '228'),\narray('id' => '3117','name' => '(GDC) - Donaldson Center Airport, Greenville, United States','country_id' => '228'),\narray('id' => '3118','name' => '(PNX) - North Texas Regional Airport/Perrin Field, Sherman/Denison, United States','country_id' => '228'),\narray('id' => '3119','name' => '(GYR) - Phoenix Goodyear Airport, Goodyear, United States','country_id' => '228'),\narray('id' => '3120','name' => '(GYY) - Gary Chicago International Airport, Gary, United States','country_id' => '228'),\narray('id' => '3121','name' => '(KGZ) - Glacier Creek Airport, Glacier Creek, United States','country_id' => '228'),\narray('id' => '3122','name' => '(HAB) - Marion County Rankin Fite Airport, Hamilton, United States','country_id' => '228'),\narray('id' => '3123','name' => '(HAF) - Half Moon Bay Airport, Half Moon Bay, United States','country_id' => '228'),\narray('id' => '3124','name' => '(HAI) - Three Rivers Municipal Dr Haines Airport, Three Rivers, United States','country_id' => '228'),\narray('id' => '3125','name' => '(HAO) - Butler Co Regional Airport - Hogan Field, Hamilton, United States','country_id' => '228'),\narray('id' => '3126','name' => '(HBG) - Hattiesburg Bobby L Chain Municipal Airport, Hattiesburg, United States','country_id' => '228'),\narray('id' => '3127','name' => '(HBR) - Hobart Regional Airport, Hobart, United States','country_id' => '228'),\narray('id' => '3128','name' => '(HDE) - Brewster Field, Holdrege, United States','country_id' => '228'),\narray('id' => '3129','name' => '(HDN) - Yampa Valley Airport, Hayden, United States','country_id' => '228'),\narray('id' => '3130','name' => '(HEE) - Thompson-Robbins Airport, Helena/West Helena, United States','country_id' => '228'),\narray('id' => '3131','name' => '(MNZ) - Manassas Regional Airport/Harry P. Davis Field, Manassas, United States','country_id' => '228'),\narray('id' => '3132','name' => '(HEZ) - Hardy-Anders Field / Natchez-Adams County Airport, Natchez, United States','country_id' => '228'),\narray('id' => '3133','name' => '(HFD) - Hartford Brainard Airport, Hartford, United States','country_id' => '228'),\narray('id' => '3134','name' => '(HFF) - Mackall Army Air Field, Camp Mackall, United States','country_id' => '228'),\narray('id' => '3135','name' => '(HGR) - Hagerstown Regional Richard A Henson Field, Hagerstown, United States','country_id' => '228'),\narray('id' => '3136','name' => '(HHR) - Jack Northrop Field Hawthorne Municipal Airport, Hawthorne, United States','country_id' => '228'),\narray('id' => '3137','name' => '(HUJ) - Stan Stamper Municipal Airport, Hugo, United States','country_id' => '228'),\narray('id' => '3138','name' => '(HIB) - Range Regional Airport, Hibbing, United States','country_id' => '228'),\narray('id' => '3139','name' => '(HIE) - Mount Washington Regional Airport, Whitefield, United States','country_id' => '228'),\narray('id' => '3140','name' => '(HIF) - Hill Air Force Base, Ogden, United States','country_id' => '228'),\narray('id' => '3141','name' => '(HII) - Lake Havasu City Airport, Lake Havasu City, United States','country_id' => '228'),\narray('id' => '3142','name' => '(HIO) - Portland Hillsboro Airport, Portland, United States','country_id' => '228'),\narray('id' => '3143','name' => '(HKA) - Blytheville Municipal Airport, Blytheville, United States','country_id' => '228'),\narray('id' => '3144','name' => '(HKS) - Hawkins Field, Jackson, United States','country_id' => '228'),\narray('id' => '3145','name' => '(HKY) - Hickory Regional Airport, Hickory, United States','country_id' => '228'),\narray('id' => '3146','name' => '(HLB) - Hillenbrand Industries Airport, Batesville, United States','country_id' => '228'),\narray('id' => '3147','name' => '(HLC) - Hill City Municipal Airport, Hill City, United States','country_id' => '228'),\narray('id' => '3148','name' => '(HLG) - Wheeling Ohio County Airport, Wheeling, United States','country_id' => '228'),\narray('id' => '3149','name' => '(HLM) - Park Township Airport, Holland, United States','country_id' => '228'),\narray('id' => '3150','name' => '(HLN) - Helena Regional Airport, Helena, United States','country_id' => '228'),\narray('id' => '3151','name' => '(HLR) - Hood Army Air Field, Fort Hood(Killeen), United States','country_id' => '228'),\narray('id' => '3152','name' => '(HMN) - Holloman Air Force Base, Alamogordo, United States','country_id' => '228'),\narray('id' => '3153','name' => '(HMT) - Hemet Ryan Airport, Hemet, United States','country_id' => '228'),\narray('id' => '3154','name' => '(HNB) - Huntingburg Airport, Huntingburg, United States','country_id' => '228'),\narray('id' => '3155','name' => '(HSH) - Henderson Executive Airport, Las Vegas, United States','country_id' => '228'),\narray('id' => '3156','name' => '(HOB) - Lea County Regional Airport, Hobbs, United States','country_id' => '228'),\narray('id' => '3157','name' => '(HON) - Huron Regional Airport, Huron, United States','country_id' => '228'),\narray('id' => '3158','name' => '(HOP) - Campbell AAF (Fort Campbell) Air Field, Fort Campbell/Hopkinsville, United States','country_id' => '228'),\narray('id' => '3159','name' => '(HOT) - Memorial Field, Hot Springs, United States','country_id' => '228'),\narray('id' => '3160','name' => '(HOU) - William P Hobby Airport, Houston, United States','country_id' => '228'),\narray('id' => '3161','name' => '(HPN) - Westchester County Airport, White Plains, United States','country_id' => '228'),\narray('id' => '3162','name' => '(HPT) - Hampton Municipal Airport, Hampton, United States','country_id' => '228'),\narray('id' => '3163','name' => '(HPY) - Baytown Airport, Baytown, United States','country_id' => '228'),\narray('id' => '3164','name' => '(HQM) - Bowerman Airport, Hoquiam, United States','country_id' => '228'),\narray('id' => '3165','name' => '(HES) - Hermiston Municipal Airport, Hermiston, United States','country_id' => '228'),\narray('id' => '3166','name' => '(HRL) - Valley International Airport, Harlingen, United States','country_id' => '228'),\narray('id' => '3167','name' => '(HRO) - Boone County Airport, Harrison, United States','country_id' => '228'),\narray('id' => '3168','name' => '(HSB) - Harrisburg-Raleigh Airport, Harrisburg, United States','country_id' => '228'),\narray('id' => '3169','name' => '(HNC) - Billy Mitchell Airport, Hatteras, United States','country_id' => '228'),\narray('id' => '3170','name' => '(HSI) - Hastings Municipal Airport, Hastings, United States','country_id' => '228'),\narray('id' => '3171','name' => '(HSP) - Ingalls Field, Hot Springs, United States','country_id' => '228'),\narray('id' => '3172','name' => '(HST) - Homestead ARB Airport, Homestead, United States','country_id' => '228'),\narray('id' => '3173','name' => '(HSV) - Huntsville International Carl T Jones Field, Huntsville, United States','country_id' => '228'),\narray('id' => '3174','name' => '(HTO) - East Hampton Airport, East Hampton, United States','country_id' => '228'),\narray('id' => '3175','name' => '(HTS) - Tri-State/Milton J. Ferguson Field, Huntington, United States','country_id' => '228'),\narray('id' => '3176','name' => '(HUA) - Redstone Army Air Field, Redstone Arsnl Huntsville, United States','country_id' => '228'),\narray('id' => '3177','name' => '(HUF) - Terre Haute International Hulman Field, Terre Haute, United States','country_id' => '228'),\narray('id' => '3178','name' => '(HUL) - Houlton International Airport, Houlton, United States','country_id' => '228'),\narray('id' => '3179','name' => '(HUM) - Houma Terrebonne Airport, Houma, United States','country_id' => '228'),\narray('id' => '3180','name' => '(HUT) - Hutchinson Municipal Airport, Hutchinson, United States','country_id' => '228'),\narray('id' => '3181','name' => '(HVE) - Hanksville Airport, Hanksville, United States','country_id' => '228'),\narray('id' => '3182','name' => '(HVN) - Tweed New Haven Airport, New Haven, United States','country_id' => '228'),\narray('id' => '3183','name' => '(HVR) - Havre City County Airport, Havre, United States','country_id' => '228'),\narray('id' => '3184','name' => '(HVS) - Hartsville Regional Airport, Hartsville, United States','country_id' => '228'),\narray('id' => '3185','name' => '(HWD) - Hayward Executive Airport, Hayward, United States','country_id' => '228'),\narray('id' => '3186','name' => '(HWO) - North Perry Airport, Hollywood, United States','country_id' => '228'),\narray('id' => '3187','name' => '(WSH) - Brookhaven Airport, Shirley, United States','country_id' => '228'),\narray('id' => '3188','name' => '(HHH) - Hilton Head Airport, Hilton Head Island, United States','country_id' => '228'),\narray('id' => '3189','name' => '(HYA) - Barnstable Municipal Boardman Polando Field, Hyannis, United States','country_id' => '228'),\narray('id' => '3190','name' => '(HYR) - Sawyer County Airport, Hayward, United States','country_id' => '228'),\narray('id' => '3191','name' => '(HYS) - Hays Regional Airport, Hays, United States','country_id' => '228'),\narray('id' => '3192','name' => '(HZL) - Hazleton Municipal Airport, Hazleton, United States','country_id' => '228'),\narray('id' => '3193','name' => '(JFN) - Northeast Ohio Regional Airport, Ashtabula, United States','country_id' => '228'),\narray('id' => '3194','name' => '(IAB) - Mc Connell Air Force Base, Wichita, United States','country_id' => '228'),\narray('id' => '3195','name' => '(IAD) - Washington Dulles International Airport, Washington, United States','country_id' => '228'),\narray('id' => '3196','name' => '(IAG) - Niagara Falls International Airport, Niagara Falls, United States','country_id' => '228'),\narray('id' => '3197','name' => '(IAH) - George Bush Intercontinental Houston Airport, Houston, United States','country_id' => '228'),\narray('id' => '3198','name' => '(ICL) - Schenck Field, Clarinda, United States','country_id' => '228'),\narray('id' => '3199','name' => '(ICT) - Wichita Mid Continent Airport, Wichita, United States','country_id' => '228'),\narray('id' => '3200','name' => '(IDA) - Idaho Falls Regional Airport, Idaho Falls, United States','country_id' => '228'),\narray('id' => '3201','name' => '(IDI) - Indiana County/Jimmy Stewart Fld/ Airport, Indiana, United States','country_id' => '228'),\narray('id' => '3202','name' => '(IDP) - Independence Municipal Airport, Independence, United States','country_id' => '228'),\narray('id' => '3203','name' => '(XPR) - Pine Ridge Airport, Pine Ridge, United States','country_id' => '228'),\narray('id' => '3204','name' => '(IFA) - Iowa Falls Municipal Airport, Iowa Falls, United States','country_id' => '228'),\narray('id' => '3205','name' => '(IFP) - Laughlin Bullhead International Airport, Bullhead City, United States','country_id' => '228'),\narray('id' => '3206','name' => '(IGM) - Kingman Airport, Kingman, United States','country_id' => '228'),\narray('id' => '3207','name' => '(IKK) - Greater Kankakee Airport, Kankakee, United States','country_id' => '228'),\narray('id' => '3208','name' => '(KIL) - Kilwa Airport, Kilwa, Congo (Kinshasa)','country_id' => '37'),\narray('id' => '3209','name' => '(ILE) - Skylark Field, Killeen, United States','country_id' => '228'),\narray('id' => '3210','name' => '(ILG) - New Castle Airport, Wilmington, United States','country_id' => '228'),\narray('id' => '3211','name' => '(ILM) - Wilmington International Airport, Wilmington, United States','country_id' => '228'),\narray('id' => '3212','name' => '(ILN) - Wilmington Airpark, Wilmington, United States','country_id' => '228'),\narray('id' => '3213','name' => '(IML) - Imperial Municipal Airport, Imperial, United States','country_id' => '228'),\narray('id' => '3214','name' => '(IMM) - Immokalee Regional Airport, Immokalee, United States','country_id' => '228'),\narray('id' => '3215','name' => '(MDN) - Madison Municipal Airport, Madison, United States','country_id' => '228'),\narray('id' => '3216','name' => '(IMT) - Ford Airport, Iron Mountain / Kingsford, United States','country_id' => '228'),\narray('id' => '3217','name' => '(IND) - Indianapolis International Airport, Indianapolis, United States','country_id' => '228'),\narray('id' => '3218','name' => '(INK) - Winkler County Airport, Wink, United States','country_id' => '228'),\narray('id' => '3219','name' => '(INL) - Falls International Airport, International Falls, United States','country_id' => '228'),\narray('id' => '3220','name' => '(INS) - Creech Air Force Base, Indian Springs, United States','country_id' => '228'),\narray('id' => '3221','name' => '(INT) - Smith Reynolds Airport, Winston Salem, United States','country_id' => '228'),\narray('id' => '3222','name' => '(INW) - Winslow Lindbergh Regional Airport, Winslow, United States','country_id' => '228'),\narray('id' => '3223','name' => '(IOW) - Iowa City Municipal Airport, Iowa City, United States','country_id' => '228'),\narray('id' => '3224','name' => '(IPL) - Imperial County Airport, Imperial, United States','country_id' => '228'),\narray('id' => '3225','name' => '(IPT) - Williamsport Regional Airport, Williamsport, United States','country_id' => '228'),\narray('id' => '3226','name' => '(KIQ) - Kira Airport, Kira, Papua New Guinea','country_id' => '172'),\narray('id' => '3227','name' => '(IRK) - Kirksville Regional Airport, Kirksville, United States','country_id' => '228'),\narray('id' => '3228','name' => '(IRS) - Kirsch Municipal Airport, Sturgis, United States','country_id' => '228'),\narray('id' => '3229','name' => '(ISM) - Kissimmee Gateway Airport, Orlando, United States','country_id' => '228'),\narray('id' => '3230','name' => '(ISN) - Sloulin Field International Airport, Williston, United States','country_id' => '228'),\narray('id' => '3231','name' => '(ISO) - Kinston Regional Jetport At Stallings Field, Kinston, United States','country_id' => '228'),\narray('id' => '3232','name' => '(ISP) - Long Island Mac Arthur Airport, Islip, United States','country_id' => '228'),\narray('id' => '3233','name' => '(ISQ) - Schoolcraft County Airport, Manistique, United States','country_id' => '228'),\narray('id' => '3234','name' => '(ISW) - Alexander Field South Wood County Airport, Wisconsin Rapids, United States','country_id' => '228'),\narray('id' => '3235','name' => '(ITH) - Ithaca Tompkins Regional Airport, Ithaca, United States','country_id' => '228'),\narray('id' => '3236','name' => '(AZA) - Phoenix-Mesa-Gateway Airport, Phoenix, United States','country_id' => '228'),\narray('id' => '3237','name' => '(IWD) - Gogebic Iron County Airport, Ironwood, United States','country_id' => '228'),\narray('id' => '3238','name' => '(ISS) - Wiscasset Airport, Wiscasset, United States','country_id' => '228'),\narray('id' => '3239','name' => '(IWS) - West Houston Airport, Houston, United States','country_id' => '228'),\narray('id' => '3240','name' => '(JCI) - New Century Aircenter Airport, Olathe, United States','country_id' => '228'),\narray('id' => '3241','name' => '(IYK) - Inyokern Airport, Inyokern, United States','country_id' => '228'),\narray('id' => '3242','name' => '(SQA) - Santa Ynez Airport, Santa Ynez, United States','country_id' => '228'),\narray('id' => '3243','name' => '(FRY) - Eastern Slopes Regional Airport, Fryeburg, United States','country_id' => '228'),\narray('id' => '3244','name' => '(JAC) - Jackson Hole Airport, Jackson, United States','country_id' => '228'),\narray('id' => '3245','name' => '(JAN) - Jackson-Medgar Wiley Evers International Airport, Jackson, United States','country_id' => '228'),\narray('id' => '3246','name' => '(JAS) - Jasper County Airport-Bell Field, Jasper, United States','country_id' => '228'),\narray('id' => '3247','name' => '(JAX) - Jacksonville International Airport, Jacksonville, United States','country_id' => '228'),\narray('id' => '3248','name' => '(JBR) - Jonesboro Municipal Airport, Jonesboro, United States','country_id' => '228'),\narray('id' => '3249','name' => '(JCT) - Kimble County Airport, Junction, United States','country_id' => '228'),\narray('id' => '3250','name' => '(JDN) - Jordan Airport, Jordan, United States','country_id' => '228'),\narray('id' => '3251','name' => '(JEF) - Jefferson City Memorial Airport, Jefferson City, United States','country_id' => '228'),\narray('id' => '3252','name' => '(JFK) - John F Kennedy International Airport, New York, United States','country_id' => '228'),\narray('id' => '3253','name' => '(JHW) - Chautauqua County-Jamestown Airport, Jamestown, United States','country_id' => '228'),\narray('id' => '3254','name' => '(GUF) - Jack Edwards Airport, Gulf Shores, United States','country_id' => '228'),\narray('id' => '3255','name' => '(JLN) - Joplin Regional Airport, Joplin, United States','country_id' => '228'),\narray('id' => '3256','name' => '(JMS) - Jamestown Regional Airport, Jamestown, United States','country_id' => '228'),\narray('id' => '3257','name' => '(JOT) - Joliet Regional Airport, Joliet, United States','country_id' => '228'),\narray('id' => '3258','name' => '(USA) - Concord Regional Airport, Concord, United States','country_id' => '228'),\narray('id' => '3259','name' => '(JKV) - Cherokee County Airport, Jacksonville, United States','country_id' => '228'),\narray('id' => '3260','name' => '(JST) - John Murtha Johnstown Cambria County Airport, Johnstown, United States','country_id' => '228'),\narray('id' => '3261','name' => '(JVL) - Southern Wisconsin Regional Airport, Janesville, United States','country_id' => '228'),\narray('id' => '3262','name' => '(JXN) - Jackson County Reynolds Field, Jackson, United States','country_id' => '228'),\narray('id' => '3263','name' => '(KIC) - Mesa Del Rey Airport, King City, United States','country_id' => '228'),\narray('id' => '3264','name' => '(KLS) - Southwest Washington Regional Airport, Kelso, United States','country_id' => '228'),\narray('id' => '3265','name' => '(KKU) - Ekuk Airport, Ekuk, United States','country_id' => '228'),\narray('id' => '3266','name' => '(DTH) - Furnace Creek Airport, Death Valley National Park, United States','country_id' => '228'),\narray('id' => '3267','name' => '(BXS) - Borrego Valley Airport, Borrego Springs, United States','country_id' => '228'),\narray('id' => '3268','name' => '(RBF) - Big Bear City Airport, Big Bear, United States','country_id' => '228'),\narray('id' => '3269','name' => '(TRH) - Trona Airport, Trona, United States','country_id' => '228'),\narray('id' => '3270','name' => '(LAA) - Lamar Municipal Airport, Lamar, United States','country_id' => '228'),\narray('id' => '3271','name' => '(LAF) - Purdue University Airport, Lafayette, United States','country_id' => '228'),\narray('id' => '3272','name' => '(LAL) - Lakeland Linder Regional Airport, Lakeland, United States','country_id' => '228'),\narray('id' => '3273','name' => '(LAM) - Los Alamos Airport, Los Alamos, United States','country_id' => '228'),\narray('id' => '3274','name' => '(LAN) - Capital City Airport, Lansing, United States','country_id' => '228'),\narray('id' => '3275','name' => '(LAR) - Laramie Regional Airport, Laramie, United States','country_id' => '228'),\narray('id' => '3276','name' => '(LAS) - McCarran International Airport, Las Vegas, United States','country_id' => '228'),\narray('id' => '3277','name' => '(LAW) - Lawton Fort Sill Regional Airport, Lawton, United States','country_id' => '228'),\narray('id' => '3278','name' => '(LAX) - Los Angeles International Airport, Los Angeles, United States','country_id' => '228'),\narray('id' => '3279','name' => '(LBB) - Lubbock Preston Smith International Airport, Lubbock, United States','country_id' => '228'),\narray('id' => '3280','name' => '(LBE) - Arnold Palmer Regional Airport, Latrobe, United States','country_id' => '228'),\narray('id' => '3281','name' => '(LBF) - North Platte Regional Airport Lee Bird Field, North Platte, United States','country_id' => '228'),\narray('id' => '3282','name' => '(LBL) - Liberal Mid-America Regional Airport, Liberal, United States','country_id' => '228'),\narray('id' => '3283','name' => '(LBT) - Lumberton Regional Airport, Lumberton, United States','country_id' => '228'),\narray('id' => '3284','name' => '(LJN) - Texas Gulf Coast Regional Airport, Angleton/Lake Jackson, United States','country_id' => '228'),\narray('id' => '3285','name' => '(LCH) - Lake Charles Regional Airport, Lake Charles, United States','country_id' => '228'),\narray('id' => '3286','name' => '(LCI) - Laconia Municipal Airport, Laconia, United States','country_id' => '228'),\narray('id' => '3287','name' => '(LCK) - Rickenbacker International Airport, Columbus, United States','country_id' => '228'),\narray('id' => '3288','name' => '(LCQ) - Lake City Gateway Airport, Lake City, United States','country_id' => '228'),\narray('id' => '3289','name' => '(LDJ) - Linden Airport, Linden, United States','country_id' => '228'),\narray('id' => '3290','name' => '(LDM) - Mason County Airport, Ludington, United States','country_id' => '228'),\narray('id' => '3291','name' => '(LEB) - Lebanon Municipal Airport, Lebanon, United States','country_id' => '228'),\narray('id' => '3292','name' => '(LEE) - Leesburg International Airport, Leesburg, United States','country_id' => '228'),\narray('id' => '3293','name' => '(LEM) - Lemmon Municipal Airport, Lemmon, United States','country_id' => '228'),\narray('id' => '3294','name' => '(LEW) - Auburn Lewiston Municipal Airport, Auburn/Lewiston, United States','country_id' => '228'),\narray('id' => '3295','name' => '(LEX) - Blue Grass Airport, Lexington, United States','country_id' => '228'),\narray('id' => '3296','name' => '(LFI) - Langley Air Force Base, Hampton, United States','country_id' => '228'),\narray('id' => '3297','name' => '(LFK) - Angelina County Airport, Lufkin, United States','country_id' => '228'),\narray('id' => '3298','name' => '(LFT) - Lafayette Regional Airport, Lafayette, United States','country_id' => '228'),\narray('id' => '3299','name' => '(LGA) - La Guardia Airport, New York, United States','country_id' => '228'),\narray('id' => '3300','name' => '(LGB) - Long Beach /Daugherty Field/ Airport, Long Beach, United States','country_id' => '228'),\narray('id' => '3301','name' => '(LGC) - Lagrange Callaway Airport, Lagrange, United States','country_id' => '228'),\narray('id' => '3302','name' => '(LGD) - La Grande/Union County Airport, La Grande, United States','country_id' => '228'),\narray('id' => '3303','name' => '(LGF) - Laguna Army Airfield, Yuma Proving Ground(Yuma), United States','country_id' => '228'),\narray('id' => '3304','name' => '(LGU) - Logan-Cache Airport, Logan, United States','country_id' => '228'),\narray('id' => '3305','name' => '(LHV) - William T. Piper Memorial Airport, Lock Haven, United States','country_id' => '228'),\narray('id' => '3306','name' => '(LIY) - Wright Aaf (Fort Stewart)/Midcoast Regional Airport, Fort Stewart(Hinesville), United States','country_id' => '228'),\narray('id' => '3307','name' => '(LFN) - Triangle North Executive Airport, Louisburg, United States','country_id' => '228'),\narray('id' => '3308','name' => '(LIC) - Limon Municipal Airport, Limon, United States','country_id' => '228'),\narray('id' => '3309','name' => '(LIT) - Bill & Hillary Clinton National Airport/Adams Field, Little Rock, United States','country_id' => '228'),\narray('id' => '3310','name' => '(LKP) - Lake Placid Airport, Lake Placid, United States','country_id' => '228'),\narray('id' => '3311','name' => '(LOW) - Louisa County Airport/Freeman Field, Louisa, United States','country_id' => '228'),\narray('id' => '3312','name' => '(LKV) - Lake County Airport, Lakeview, United States','country_id' => '228'),\narray('id' => '3313','name' => '(CHL) - Challis Airport, Challis, United States','country_id' => '228'),\narray('id' => '3314','name' => '(LMS) - Louisville Winston County Airport, Louisville, United States','country_id' => '228'),\narray('id' => '3315','name' => '(LMT) - Klamath Falls Airport, Klamath Falls, United States','country_id' => '228'),\narray('id' => '3316','name' => '(LNA) - Palm Beach County Park Airport, West Palm Beach, United States','country_id' => '228'),\narray('id' => '3317','name' => '(LND) - Hunt Field, Lander, United States','country_id' => '228'),\narray('id' => '3318','name' => '(LNK) - Lincoln Airport, Lincoln, United States','country_id' => '228'),\narray('id' => '3319','name' => '(LNN) - Willoughby Lost Nation Municipal Airport, Willoughby, United States','country_id' => '228'),\narray('id' => '3320','name' => '(LNP) - Lonesome Pine Airport, Wise, United States','country_id' => '228'),\narray('id' => '3321','name' => '(LNR) - Tri-County Regional Airport, Lone Rock, United States','country_id' => '228'),\narray('id' => '3322','name' => '(LNS) - Lancaster Airport, Lancaster, United States','country_id' => '228'),\narray('id' => '3323','name' => '(LOL) - Derby Field, Lovelock, United States','country_id' => '228'),\narray('id' => '3324','name' => '(BBX) - Wings Field, Philadelphia, United States','country_id' => '228'),\narray('id' => '3325','name' => '(LOT) - Lewis University Airport, Chicago/Romeoville, United States','country_id' => '228'),\narray('id' => '3326','name' => '(LOU) - Bowman Field, Louisville, United States','country_id' => '228'),\narray('id' => '3327','name' => '(LOZ) - London-Corbin Airport/Magee Field, London, United States','country_id' => '228'),\narray('id' => '3328','name' => '(LPC) - Lompoc Airport, Lompoc, United States','country_id' => '228'),\narray('id' => '3329','name' => '(LQK) - Pickens County Airport, Pickens, United States','country_id' => '228'),\narray('id' => '3330','name' => '(LRD) - Laredo International Airport, Laredo, United States','country_id' => '228'),\narray('id' => '3331','name' => '(LRF) - Little Rock Air Force Base, Jacksonville, United States','country_id' => '228'),\narray('id' => '3332','name' => '(LRJ) - Le Mars Municipal Airport, Le Mars, United States','country_id' => '228'),\narray('id' => '3333','name' => '(LRU) - Las Cruces International Airport, Las Cruces, United States','country_id' => '228'),\narray('id' => '3334','name' => '(LSB) - Lordsburg Municipal Airport, Lordsburg, United States','country_id' => '228'),\narray('id' => '3335','name' => '(LSE) - La Crosse Municipal Airport, La Crosse, United States','country_id' => '228'),\narray('id' => '3336','name' => '(LSF) - Lawson Army Air Field (Fort Benning), Fort Benning(Columbus), United States','country_id' => '228'),\narray('id' => '3337','name' => '(LSK) - Lusk Municipal Airport, Lusk, United States','country_id' => '228'),\narray('id' => '3338','name' => '(LSN) - Los Banos Municipal Airport, Los Banos, United States','country_id' => '228'),\narray('id' => '3339','name' => '(LSV) - Nellis Air Force Base, Las Vegas, United States','country_id' => '228'),\narray('id' => '3340','name' => '(LTS) - Altus Air Force Base, Altus, United States','country_id' => '228'),\narray('id' => '3341','name' => '(LUF) - Luke Air Force Base, Glendale, United States','country_id' => '228'),\narray('id' => '3342','name' => '(LUK) - Cincinnati Municipal Airport Lunken Field, Cincinnati, United States','country_id' => '228'),\narray('id' => '3343','name' => '(LUL) - Hesler Noble Field, Laurel, United States','country_id' => '228'),\narray('id' => '3344','name' => '(LVK) - Livermore Municipal Airport, Livermore, United States','country_id' => '228'),\narray('id' => '3345','name' => '(LVL) - Lawrenceville Brunswick Municipal Airport, Lawrenceville, United States','country_id' => '228'),\narray('id' => '3346','name' => '(LVM) - Mission Field, Livingston, United States','country_id' => '228'),\narray('id' => '3347','name' => '(LVS) - Las Vegas Municipal Airport, Las Vegas, United States','country_id' => '228'),\narray('id' => '3348','name' => '(LWB) - Greenbrier Valley Airport, Lewisburg, United States','country_id' => '228'),\narray('id' => '3349','name' => '(LWC) - Lawrence Municipal Airport, Lawrence, United States','country_id' => '228'),\narray('id' => '3350','name' => '(LWL) - Wells Municipal Airport/Harriet Field, Wells, United States','country_id' => '228'),\narray('id' => '3351','name' => '(LWM) - Lawrence Municipal Airport, Lawrence, United States','country_id' => '228'),\narray('id' => '3352','name' => '(LWS) - Lewiston Nez Perce County Airport, Lewiston, United States','country_id' => '228'),\narray('id' => '3353','name' => '(LWT) - Lewistown Municipal Airport, Lewistown, United States','country_id' => '228'),\narray('id' => '3354','name' => '(LWV) - Lawrenceville Vincennes International Airport, Lawrenceville, United States','country_id' => '228'),\narray('id' => '3355','name' => '(LXN) - Jim Kelly Field, Lexington, United States','country_id' => '228'),\narray('id' => '3356','name' => '(LXV) - Lake County Airport, Leadville, United States','country_id' => '228'),\narray('id' => '3357','name' => '(LYH) - Lynchburg Regional Preston Glenn Field, Lynchburg, United States','country_id' => '228'),\narray('id' => '3358','name' => '(LYO) - Lyons-Rice County Municipal Airport, Lyons, United States','country_id' => '228'),\narray('id' => '3359','name' => '(LZU) - Gwinnett County Briscoe Field, Lawrenceville, United States','country_id' => '228'),\narray('id' => '3360','name' => '(PCU) - Poplarville Pearl River County Airport, Poplarville, United States','country_id' => '228'),\narray('id' => '3361','name' => '(MLK) - Malta Airport, Malta, United States','country_id' => '228'),\narray('id' => '3362','name' => '(MAC) - Macon Downtown Airport, Macon, United States','country_id' => '228'),\narray('id' => '3363','name' => '(MAE) - Madera Municipal Airport, Madera, United States','country_id' => '228'),\narray('id' => '3364','name' => '(MAF) - Midland International Airport, Midland, United States','country_id' => '228'),\narray('id' => '3365','name' => '(MAN) - KMAN, Nampa, United States','country_id' => '228'),\narray('id' => '3366','name' => '(MAW) - Malden Regional Airport, Malden, United States','country_id' => '228'),\narray('id' => '3367','name' => '(KMB) - Koinambe Airport, Konambe, Papua New Guinea','country_id' => '172'),\narray('id' => '3368','name' => '(MBG) - Mobridge Municipal Airport, Mobridge, United States','country_id' => '228'),\narray('id' => '3369','name' => '(MBL) - Manistee Co Blacker Airport, Manistee, United States','country_id' => '228'),\narray('id' => '3370','name' => '(DXE) - Bruce Campbell Field, Madison, United States','country_id' => '228'),\narray('id' => '3371','name' => '(MBS) - MBS International Airport, Saginaw, United States','country_id' => '228'),\narray('id' => '3372','name' => '(MBY) - Omar N Bradley Airport, Moberly, United States','country_id' => '228'),\narray('id' => '3373','name' => '(MCB) - Mc Comb/Pike County Airport/John E Lewis Field, Mc Comb, United States','country_id' => '228'),\narray('id' => '3374','name' => '(MCC) - Mc Clellan Airfield, Sacramento, United States','country_id' => '228'),\narray('id' => '3375','name' => '(MCD) - Mackinac Island Airport, Mackinac Island, United States','country_id' => '228'),\narray('id' => '3376','name' => '(MCE) - Merced Regional Macready Field, Merced, United States','country_id' => '228'),\narray('id' => '3377','name' => '(MCF) - Mac Dill Air Force Base, Tampa, United States','country_id' => '228'),\narray('id' => '3378','name' => '(MCI) - Kansas City International Airport, Kansas City, United States','country_id' => '228'),\narray('id' => '3379','name' => '(MCK) - Mc Cook Ben Nelson Regional Airport, Mc Cook, United States','country_id' => '228'),\narray('id' => '3380','name' => '(MCN) - Middle Georgia Regional Airport, Macon, United States','country_id' => '228'),\narray('id' => '3381','name' => '(MCO) - Orlando International Airport, Orlando, United States','country_id' => '228'),\narray('id' => '3382','name' => '(MCW) - Mason City Municipal Airport, Mason City, United States','country_id' => '228'),\narray('id' => '3383','name' => '(MDD) - Midland Airpark, Midland, United States','country_id' => '228'),\narray('id' => '3384','name' => '(MDH) - Southern Illinois Airport, Carbondale/Murphysboro, United States','country_id' => '228'),\narray('id' => '3385','name' => '(XMD) - Madison Municipal Airport, Madison, United States','country_id' => '228'),\narray('id' => '3386','name' => '(MDT) - Harrisburg International Airport, Harrisburg, United States','country_id' => '228'),\narray('id' => '3387','name' => '(MDW) - Chicago Midway International Airport, Chicago, United States','country_id' => '228'),\narray('id' => '3388','name' => '(MDF) - Taylor County Airport, Medford, United States','country_id' => '228'),\narray('id' => '3389','name' => '(MEI) - Key Field, Meridian, United States','country_id' => '228'),\narray('id' => '3390','name' => '(MEM) - Memphis International Airport, Memphis, United States','country_id' => '228'),\narray('id' => '3391','name' => '(MER) - Castle Airport, Merced, United States','country_id' => '228'),\narray('id' => '3392','name' => '(MEV) - Minden-Tahoe Airport, Minden, United States','country_id' => '228'),\narray('id' => '3393','name' => '(KMF) - Kamina Airport, Hoieti, Papua New Guinea','country_id' => '172'),\narray('id' => '3394','name' => '(MFD) - Mansfield Lahm Regional Airport, Mansfield, United States','country_id' => '228'),\narray('id' => '3395','name' => '(MFE) - Mc Allen Miller International Airport, Mc Allen, United States','country_id' => '228'),\narray('id' => '3396','name' => '(MFI) - Marshfield Municipal Airport, Marshfield, United States','country_id' => '228'),\narray('id' => '3397','name' => '(MFR) - Rogue Valley International Medford Airport, Medford, United States','country_id' => '228'),\narray('id' => '3398','name' => '(MFV) - Accomack County Airport, Melfa, United States','country_id' => '228'),\narray('id' => '3399','name' => '(MGC) - Michigan City Municipal Airport, Michigan City, United States','country_id' => '228'),\narray('id' => '3400','name' => '(MGE) - Dobbins Air Reserve Base, Marietta, United States','country_id' => '228'),\narray('id' => '3401','name' => '(MGJ) - Orange County Airport, Montgomery, United States','country_id' => '228'),\narray('id' => '3402','name' => '(MGM) - Montgomery Regional (Dannelly Field) Airport, Montgomery, United States','country_id' => '228'),\narray('id' => '3403','name' => '(MGR) - Moultrie Municipal Airport, Moultrie, United States','country_id' => '228'),\narray('id' => '3404','name' => '(MGW) - Morgantown Municipal Walter L. Bill Hart Field, Morgantown, United States','country_id' => '228'),\narray('id' => '3405','name' => '(MGY) - Dayton-Wright Brothers Airport, Dayton, United States','country_id' => '228'),\narray('id' => '3406','name' => '(MHE) - Mitchell Municipal Airport, Mitchell, United States','country_id' => '228'),\narray('id' => '3407','name' => '(MHK) - Manhattan Regional Airport, Manhattan, United States','country_id' => '228'),\narray('id' => '3408','name' => '(MHL) - Marshall Memorial Municipal Airport, Marshall, United States','country_id' => '228'),\narray('id' => '3409','name' => '(MHR) - Sacramento Mather Airport, Sacramento, United States','country_id' => '228'),\narray('id' => '3410','name' => '(MHT) - Manchester Airport, Manchester, United States','country_id' => '228'),\narray('id' => '3411','name' => '(MHV) - Mojave Airport, Mojave, United States','country_id' => '228'),\narray('id' => '3412','name' => '(MIA) - Miami International Airport, Miami, United States','country_id' => '228'),\narray('id' => '3413','name' => '(MIE) - Delaware County Johnson Field, Muncie, United States','country_id' => '228'),\narray('id' => '3414','name' => '(MJX) - Ocean County Airport, Toms River, United States','country_id' => '228'),\narray('id' => '3415','name' => '(MKC) - Charles B. Wheeler Downtown Airport, Kansas City, United States','country_id' => '228'),\narray('id' => '3416','name' => '(MKE) - General Mitchell International Airport, Milwaukee, United States','country_id' => '228'),\narray('id' => '3417','name' => '(MKG) - Muskegon County Airport, Muskegon, United States','country_id' => '228'),\narray('id' => '3418','name' => '(MKL) - Mc Kellar Sipes Regional Airport, Jackson, United States','country_id' => '228'),\narray('id' => '3419','name' => '(MRK) - Marco Island Airport, Marco Island, United States','country_id' => '228'),\narray('id' => '3420','name' => '(MLB) - Melbourne International Airport, Melbourne, United States','country_id' => '228'),\narray('id' => '3421','name' => '(MLI) - Quad City International Airport, Moline, United States','country_id' => '228'),\narray('id' => '3422','name' => '(MLS) - Frank Wiley Field, Miles City, United States','country_id' => '228'),\narray('id' => '3423','name' => '(MLU) - Monroe Regional Airport, Monroe, United States','country_id' => '228'),\narray('id' => '3424','name' => '(KMM) - Kimaam Airport, Kimaam, Indonesia','country_id' => '97'),\narray('id' => '3425','name' => '(MMH) - Mammoth Yosemite Airport, Mammoth Lakes, United States','country_id' => '228'),\narray('id' => '3426','name' => '(MMI) - McMinn County Airport, Athens, United States','country_id' => '228'),\narray('id' => '3427','name' => '(MML) - Southwest Minnesota Regional Airport - Marshall/Ryan Field, Marshall, United States','country_id' => '228'),\narray('id' => '3428','name' => '(MMS) - Selfs Airport, Marks, United States','country_id' => '228'),\narray('id' => '3429','name' => '(MMT) - Mc Entire Joint National Guard Base, Eastover, United States','country_id' => '228'),\narray('id' => '3430','name' => '(MMU) - Morristown Municipal Airport, Morristown, United States','country_id' => '228'),\narray('id' => '3431','name' => '(MNN) - Marion Municipal Airport, Marion, United States','country_id' => '228'),\narray('id' => '3432','name' => '(MOB) - Mobile Regional Airport, Mobile, United States','country_id' => '228'),\narray('id' => '3433','name' => '(MOD) - Modesto City Co-Harry Sham Field, Modesto, United States','country_id' => '228'),\narray('id' => '3434','name' => '(MOT) - Minot International Airport, Minot, United States','country_id' => '228'),\narray('id' => '3435','name' => '(RMY) - Mariposa Yosemite Airport, Mariposa, United States','country_id' => '228'),\narray('id' => '3436','name' => '(MPV) - Edward F Knapp State Airport, Barre/Montpelier, United States','country_id' => '228'),\narray('id' => '3437','name' => '(MPZ) - Mount Pleasant Municipal Airport, Mount Pleasant, United States','country_id' => '228'),\narray('id' => '3438','name' => '(MQB) - Macomb Municipal Airport, Macomb, United States','country_id' => '228'),\narray('id' => '3439','name' => '(MEO) - Dare County Regional Airport, Manteo, United States','country_id' => '228'),\narray('id' => '3440','name' => '(CTH) - Chester County G O Carlson Airport, Coatesville, United States','country_id' => '228'),\narray('id' => '3441','name' => '(MQY) - Smyrna Airport, Smyrna, United States','country_id' => '228'),\narray('id' => '3442','name' => '(MRB) - Eastern WV Regional Airport/Shepherd Field, Martinsburg, United States','country_id' => '228'),\narray('id' => '3443','name' => '(MRC) - Maury County Airport, Columbia/Mount Pleasant, United States','country_id' => '228'),\narray('id' => '3444','name' => '(MRY) - Monterey Peninsula Airport, Monterey, United States','country_id' => '228'),\narray('id' => '3445','name' => '(MSL) - Northwest Alabama Regional Airport, Muscle Shoals, United States','country_id' => '228'),\narray('id' => '3446','name' => '(MSN) - Dane County Regional Truax Field, Madison, United States','country_id' => '228'),\narray('id' => '3447','name' => '(MSO) - Missoula International Airport, Missoula, United States','country_id' => '228'),\narray('id' => '3448','name' => '(MSP) - Minneapolis-St Paul International/Wold-Chamberlain Airport, Minneapolis, United States','country_id' => '228'),\narray('id' => '3449','name' => '(MSS) - Massena International Richards Field, Massena, United States','country_id' => '228'),\narray('id' => '3450','name' => '(MSY) - Louis Armstrong New Orleans International Airport, New Orleans, United States','country_id' => '228'),\narray('id' => '3451','name' => '(MTJ) - Montrose Regional Airport, Montrose, United States','country_id' => '228'),\narray('id' => '3452','name' => '(MUO) - Mountain Home Air Force Base, Mountain Home, United States','country_id' => '228'),\narray('id' => '3453','name' => '(MVC) - Monroe County Airport, Monroeville, United States','country_id' => '228'),\narray('id' => '3454','name' => '(MVL) - Morrisville Stowe State Airport, Morrisville, United States','country_id' => '228'),\narray('id' => '3455','name' => '(MVY) - Martha\\'s Vineyard Airport, Martha\\'s Vineyard, United States','country_id' => '228'),\narray('id' => '3456','name' => '(MWA) - Williamson County Regional Airport, Marion, United States','country_id' => '228'),\narray('id' => '3457','name' => '(MWH) - Grant County International Airport, Moses Lake, United States','country_id' => '228'),\narray('id' => '3458','name' => '(MWL) - Mineral Wells Airport, Mineral Wells, United States','country_id' => '228'),\narray('id' => '3459','name' => '(MYF) - Montgomery Field, San Diego, United States','country_id' => '228'),\narray('id' => '3460','name' => '(MYL) - McCall Municipal Airport, McCall, United States','country_id' => '228'),\narray('id' => '3461','name' => '(MYR) - Myrtle Beach International Airport, Myrtle Beach, United States','country_id' => '228'),\narray('id' => '3462','name' => '(MYV) - Yuba County Airport, Marysville, United States','country_id' => '228'),\narray('id' => '3463','name' => '(MZJ) - Pinal Airpark, Marana, United States','country_id' => '228'),\narray('id' => '3464','name' => '(MZZ) - Marion Municipal Airport, Marion, United States','country_id' => '228'),\narray('id' => '3465','name' => '(CTX) - Cortland County Chase Field, Cortland, United States','country_id' => '228'),\narray('id' => '3466','name' => '(SXY) - Sidney Municipal Airport, Sidney, United States','country_id' => '228'),\narray('id' => '3467','name' => '(ESP) - Stroudsburg Pocono Airport, East Stroudsburg, United States','country_id' => '228'),\narray('id' => '3468','name' => '(NBG) - New Orleans NAS JRB/Alvin Callender Field, New Orleans, United States','country_id' => '228'),\narray('id' => '3469','name' => '(NHX) - Naval Outlying Field Barin, Foley, United States','country_id' => '228'),\narray('id' => '3470','name' => '(DGN) - Dahlgren Naval Surface Warfare Center Airport, Dahlgren, United States','country_id' => '228'),\narray('id' => '3471','name' => '(NEL) - Lakehurst Maxfield Field Airport, Lakehurst, United States','country_id' => '228'),\narray('id' => '3472','name' => '(NEN) - Whitehouse Naval Outlying Field, Jacksonville, United States','country_id' => '228'),\narray('id' => '3473','name' => '(NEW) - Lakefront Airport, New Orleans, United States','country_id' => '228'),\narray('id' => '3474','name' => '(NFL) - Fallon Naval Air Station, Fallon, United States','country_id' => '228'),\narray('id' => '3475','name' => '(FWH) - NAS Fort Worth JRB/Carswell Field, Fort Worth, United States','country_id' => '228'),\narray('id' => '3476','name' => '(NHZ) - Brunswick Executive Airport, Brunswick, United States','country_id' => '228'),\narray('id' => '3477','name' => '(NKX) - Miramar Marine Corps Air Station - Mitscher Field, San Diego, United States','country_id' => '228'),\narray('id' => '3478','name' => '(NLC) - Lemoore Naval Air Station (Reeves Field) Airport, Lemoore, United States','country_id' => '228'),\narray('id' => '3479','name' => '(NPA) - Pensacola Naval Air Station/Forrest Sherman Field, Pensacola, United States','country_id' => '228'),\narray('id' => '3480','name' => '(NQA) - Millington Regional Jetport Airport, Millington, United States','country_id' => '228'),\narray('id' => '3481','name' => '(NQI) - Kingsville Naval Air Station, Kingsville, United States','country_id' => '228'),\narray('id' => '3482','name' => '(NQX) - Naval Air Station Key West/Boca Chica Field, Key West, United States','country_id' => '228'),\narray('id' => '3483','name' => '(NRB) - Naval Station Mayport (Admiral David L. Mcdonald Field), Mayport, United States','country_id' => '228'),\narray('id' => '3484','name' => '(NRS) - Naval Outlying Field Imperial Beach (Ream Field), Imperial Beach, United States','country_id' => '228'),\narray('id' => '3485','name' => '(NSE) - Whiting Field Naval Air Station - North, Milton, United States','country_id' => '228'),\narray('id' => '3486','name' => '(NTD) - Point Mugu Naval Air Station (Naval Base Ventura Co), Point Mugu, United States','country_id' => '228'),\narray('id' => '3487','name' => '(YUM) - Yuma MCAS/Yuma International Airport, Yuma, United States','country_id' => '228'),\narray('id' => '3488','name' => '(NZY) - North Island Naval Air Station-Halsey Field, San Diego, United States','country_id' => '228'),\narray('id' => '3489','name' => '(NVN) - Nervino Airport, Beckwourth, United States','country_id' => '228'),\narray('id' => '3490','name' => '(COA) - Columbia Airport, Columbia, United States','country_id' => '228'),\narray('id' => '3491','name' => '(ODC) - Oakdale Airport, Oakdale, United States','country_id' => '228'),\narray('id' => '3492','name' => '(EYR) - Yerington Municipal Airport, Yerington, United States','country_id' => '228'),\narray('id' => '3493','name' => '(OAJ) - Albert J Ellis Airport, Jacksonville, United States','country_id' => '228'),\narray('id' => '3494','name' => '(OAK) - Metropolitan Oakland International Airport, Oakland, United States','country_id' => '228'),\narray('id' => '3495','name' => '(OAR) - Marina Municipal Airport, Marina, United States','country_id' => '228'),\narray('id' => '3496','name' => '(OBE) - Okeechobee County Airport, Okeechobee, United States','country_id' => '228'),\narray('id' => '3497','name' => '(OCF) - Ocala International Airport - Jim Taylor Field, Ocala, United States','country_id' => '228'),\narray('id' => '3498','name' => '(OCH) - A L Mangham Jr. Regional Airport, Nacogdoches, United States','country_id' => '228'),\narray('id' => '3499','name' => '(OCW) - Warren Field, Washington, United States','country_id' => '228'),\narray('id' => '3500','name' => '(OEA) - O\\'Neal Airport, Vincennes, United States','country_id' => '228'),\narray('id' => '3501','name' => '(OEO) - L O Simenstad Municipal Airport, Osceola, United States','country_id' => '228'),\narray('id' => '3502','name' => '(OFF) - Offutt Air Force Base, Omaha, United States','country_id' => '228'),\narray('id' => '3503','name' => '(OFK) - Karl Stefan Memorial Airport, Norfolk, United States','country_id' => '228'),\narray('id' => '3504','name' => '(OGA) - Searle Field, Ogallala, United States','country_id' => '228'),\narray('id' => '3505','name' => '(OGB) - Orangeburg Municipal Airport, Orangeburg, United States','country_id' => '228'),\narray('id' => '3506','name' => '(OGD) - Ogden Hinckley Airport, Ogden, United States','country_id' => '228'),\narray('id' => '3507','name' => '(OGS) - Ogdensburg International Airport, Ogdensburg, United States','country_id' => '228'),\narray('id' => '3508','name' => '(OIC) - Lt Warren Eaton Airport, Norwich, United States','country_id' => '228'),\narray('id' => '3509','name' => '(OJC) - Johnson County Executive Airport, Olathe, United States','country_id' => '228'),\narray('id' => '3510','name' => '(OCN) - Oceanside Municipal Airport, Oceanside, United States','country_id' => '228'),\narray('id' => '3511','name' => '(OKC) - Will Rogers World Airport, Oklahoma City, United States','country_id' => '228'),\narray('id' => '3512','name' => '(ODW) - AJ Eisenberg Airport, Oak Harbor, United States','country_id' => '228'),\narray('id' => '3513','name' => '(OKK) - Kokomo Municipal Airport, Kokomo, United States','country_id' => '228'),\narray('id' => '3514','name' => '(OKM) - Okmulgee Regional Airport, Okmulgee, United States','country_id' => '228'),\narray('id' => '3515','name' => '(OKS) - Garden County Airport, Oshkosh, United States','country_id' => '228'),\narray('id' => '3516','name' => '(WGO) - Winchester Regional Airport, Winchester, United States','country_id' => '228'),\narray('id' => '3517','name' => '(OLD) - Dewitt Field,Old Town Municipal Airport, Old Town, United States','country_id' => '228'),\narray('id' => '3518','name' => '(OLF) - L M Clayton Airport, Wolf Point, United States','country_id' => '228'),\narray('id' => '3519','name' => '(OLM) - Olympia Regional Airport, Olympia, United States','country_id' => '228'),\narray('id' => '3520','name' => '(OLV) - Olive Branch Airport, Olive Branch, United States','country_id' => '228'),\narray('id' => '3521','name' => '(KOM) - Komo-Manda Airport, Komo, Papua New Guinea','country_id' => '172'),\narray('id' => '3522','name' => '(OMA) - Eppley Airfield, Omaha, United States','country_id' => '228'),\narray('id' => '3523','name' => '(OMK) - Omak Airport, Omak, United States','country_id' => '228'),\narray('id' => '3524','name' => '(ONO) - Ontario Municipal Airport, Ontario, United States','country_id' => '228'),\narray('id' => '3525','name' => '(ONT) - Ontario International Airport, Ontario, United States','country_id' => '228'),\narray('id' => '3526','name' => '(NCO) - Quonset State Airport, North Kingstown, United States','country_id' => '228'),\narray('id' => '3527','name' => '(KOR) - Kakoro(Koroko) Airstrip, Kakoro, Papua New Guinea','country_id' => '172'),\narray('id' => '3528','name' => '(ORD) - Chicago O\\'Hare International Airport, Chicago, United States','country_id' => '228'),\narray('id' => '3529','name' => '(ORF) - Norfolk International Airport, Norfolk, United States','country_id' => '228'),\narray('id' => '3530','name' => '(ORH) - Worcester Regional Airport, Worcester, United States','country_id' => '228'),\narray('id' => '3531','name' => '(ESD) - Orcas Island Airport, Eastsound, United States','country_id' => '228'),\narray('id' => '3532','name' => '(OSH) - Wittman Regional Airport, Oshkosh, United States','country_id' => '228'),\narray('id' => '3533','name' => '(OSU) - Ohio State University Airport, Columbus, United States','country_id' => '228'),\narray('id' => '3534','name' => '(OTH) - Southwest Oregon Regional Airport, North Bend, United States','country_id' => '228'),\narray('id' => '3535','name' => '(OTM) - Ottumwa Regional Airport, Ottumwa, United States','country_id' => '228'),\narray('id' => '3536','name' => '(OVE) - Oroville Municipal Airport, Oroville, United States','country_id' => '228'),\narray('id' => '3537','name' => '(OWA) - Owatonna Degner Regional Airport, Owatonna, United States','country_id' => '228'),\narray('id' => '3538','name' => '(OWB) - Owensboro Daviess County Airport, Owensboro, United States','country_id' => '228'),\narray('id' => '3539','name' => '(OWD) - Norwood Memorial Airport, Norwood, United States','country_id' => '228'),\narray('id' => '3540','name' => '(OWK) - Central Maine Airport of Norridgewock, Norridgewock, United States','country_id' => '228'),\narray('id' => '3541','name' => '(OCE) - Ocean City Municipal Airport, Ocean City, United States','country_id' => '228'),\narray('id' => '3542','name' => '(OXC) - Waterbury Oxford Airport, Oxford, United States','country_id' => '228'),\narray('id' => '3543','name' => '(OXD) - Miami University Airport, Oxford, United States','country_id' => '228'),\narray('id' => '3544','name' => '(OXR) - Oxnard Airport, Oxnard, United States','country_id' => '228'),\narray('id' => '3545','name' => '(STQ) - St Marys Municipal Airport, St Marys, United States','country_id' => '228'),\narray('id' => '3546','name' => '(OZA) - Ozona Municipal Airport, Ozona, United States','country_id' => '228'),\narray('id' => '3547','name' => '(OZR) - Cairns AAF (Fort Rucker) Air Field, Fort Rucker/Ozark, United States','country_id' => '228'),\narray('id' => '3548','name' => '(YJS) - Samjiyn Airport, Samjiyn, North Korea','country_id' => '117'),\narray('id' => '3549','name' => '(RGO) - Orang Airport, Chongjin, North Korea','country_id' => '117'),\narray('id' => '3550','name' => '(BSQ) - Bisbee Municipal Airport, Bisbee, United States','country_id' => '228'),\narray('id' => '3551','name' => '(PXL) - Polacca Airport, Polacca, United States','country_id' => '228'),\narray('id' => '3552','name' => '(GLB) - San Carlos Apache Airport, Globe, United States','country_id' => '228'),\narray('id' => '3553','name' => '(HBK) - Holbrook Municipal Airport, Holbrook, United States','country_id' => '228'),\narray('id' => '3554','name' => '(CWX) - Cochise County Airport, Willcox, United States','country_id' => '228'),\narray('id' => '3555','name' => '(PAE) - Snohomish County (Paine Field) Airport, Everett, United States','country_id' => '228'),\narray('id' => '3556','name' => '(PAH) - Barkley Regional Airport, Paducah, United States','country_id' => '228'),\narray('id' => '3557','name' => '(PAM) - Tyndall Air Force Base, Panama City, United States','country_id' => '228'),\narray('id' => '3558','name' => '(PJB) - Payson Airport, Payson, United States','country_id' => '228'),\narray('id' => '3559','name' => '(PAO) - Palo Alto Airport of Santa Clara County, Palo Alto, United States','country_id' => '228'),\narray('id' => '3560','name' => '(PBF) - Grider Field, Pine Bluff, United States','country_id' => '228'),\narray('id' => '3561','name' => '(PBG) - Plattsburgh International Airport, Plattsburgh, United States','country_id' => '228'),\narray('id' => '3562','name' => '(PBI) - Palm Beach International Airport, West Palm Beach, United States','country_id' => '228'),\narray('id' => '3563','name' => '(PVL) - Pike County-Hatcher Field, Pikeville, United States','country_id' => '228'),\narray('id' => '3564','name' => '(PCD) - Prairie Du Chien Municipal Airport, Prairie Du Chien, United States','country_id' => '228'),\narray('id' => '3565','name' => '(PDK) - DeKalb Peachtree Airport, Atlanta, United States','country_id' => '228'),\narray('id' => '3566','name' => '(PDT) - Eastern Oregon Regional At Pendleton Airport, Pendleton, United States','country_id' => '228'),\narray('id' => '3567','name' => '(PDX) - Portland International Airport, Portland, United States','country_id' => '228'),\narray('id' => '3568','name' => '(KPE) - Yapsiei Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '3569','name' => '(PEQ) - Pecos Municipal Airport, Pecos, United States','country_id' => '228'),\narray('id' => '3570','name' => '(PFN) - Panama City-Bay Co International Airport, Panama City, United States','country_id' => '228'),\narray('id' => '3571','name' => '(PGA) - Page Municipal Airport, Page, United States','country_id' => '228'),\narray('id' => '3572','name' => '(PGD) - Charlotte County Airport, Punta Gorda, United States','country_id' => '228'),\narray('id' => '3573','name' => '(PGR) - Kirk Field, Paragould, United States','country_id' => '228'),\narray('id' => '3574','name' => '(PGV) - Pitt Greenville Airport, Greenville, United States','country_id' => '228'),\narray('id' => '3575','name' => '(PHD) - Harry Clever Field, New Philadelphia, United States','country_id' => '228'),\narray('id' => '3576','name' => '(PHF) - Newport News Williamsburg International Airport, Newport News, United States','country_id' => '228'),\narray('id' => '3577','name' => '(ADR) - Robert F Swinnie Airport, Andrews, United States','country_id' => '228'),\narray('id' => '3578','name' => '(PHK) - Palm Beach County Glades Airport, Pahokee, United States','country_id' => '228'),\narray('id' => '3579','name' => '(PHL) - Philadelphia International Airport, Philadelphia, United States','country_id' => '228'),\narray('id' => '3580','name' => '(PHN) - St Clair County International Airport, Port Huron, United States','country_id' => '228'),\narray('id' => '3581','name' => '(PHP) - Philip Airport, Philip, United States','country_id' => '228'),\narray('id' => '3582','name' => '(PHT) - Henry County Airport, Paris, United States','country_id' => '228'),\narray('id' => '3583','name' => '(PHX) - Phoenix Sky Harbor International Airport, Phoenix, United States','country_id' => '228'),\narray('id' => '3584','name' => '(PIA) - General Wayne A. Downing Peoria International Airport, Peoria, United States','country_id' => '228'),\narray('id' => '3585','name' => '(PIB) - Hattiesburg Laurel Regional Airport, Hattiesburg/Laurel, United States','country_id' => '228'),\narray('id' => '3586','name' => '(PIE) - St Petersburg Clearwater International Airport, St Petersburg-Clearwater, United States','country_id' => '228'),\narray('id' => '3587','name' => '(PIH) - Pocatello Regional Airport, Pocatello, United States','country_id' => '228'),\narray('id' => '3588','name' => '(PIM) - Harris County Airport, Pine Mountain, United States','country_id' => '228'),\narray('id' => '3589','name' => '(PIR) - Pierre Regional Airport, Pierre, United States','country_id' => '228'),\narray('id' => '3590','name' => '(PIT) - Pittsburgh International Airport, Pittsburgh, United States','country_id' => '228'),\narray('id' => '3591','name' => '(PKB) - Mid Ohio Valley Regional Airport, Parkersburg, United States','country_id' => '228'),\narray('id' => '3592','name' => '(PKF) - Park Falls Municipal Airport, Park Falls, United States','country_id' => '228'),\narray('id' => '3593','name' => '(KPL) - Kapal Airport, Kapal, Papua New Guinea','country_id' => '172'),\narray('id' => '3594','name' => '(PLK) - M. Graham Clark Downtown Airport, Branson / Hollister, United States','country_id' => '228'),\narray('id' => '3595','name' => '(PLN) - Pellston Regional Airport of Emmet County Airport, Pellston, United States','country_id' => '228'),\narray('id' => '3596','name' => '(PLR) - St Clair County Airport, Pell City, United States','country_id' => '228'),\narray('id' => '3597','name' => '(PMB) - Pembina Municipal Airport, Pembina, United States','country_id' => '228'),\narray('id' => '3598','name' => '(PMD) - Palmdale Regional/USAF Plant 42 Airport, Palmdale, United States','country_id' => '228'),\narray('id' => '3599','name' => '(PMH) - Greater Portsmouth Regional Airport, Portsmouth, United States','country_id' => '228'),\narray('id' => '3600','name' => '(PPM) - Pompano Beach Airpark, Pompano Beach, United States','country_id' => '228'),\narray('id' => '3601','name' => '(PWY) - Ralph Wenz Field, Pinedale, United States','country_id' => '228'),\narray('id' => '3602','name' => '(PNC) - Ponca City Regional Airport, Ponca City, United States','country_id' => '228'),\narray('id' => '3603','name' => '(PNE) - Northeast Philadelphia Airport, Philadelphia, United States','country_id' => '228'),\narray('id' => '3604','name' => '(PNN) - Princeton Municipal Airport, Princeton, United States','country_id' => '228'),\narray('id' => '3605','name' => '(PNS) - Pensacola Regional Airport, Pensacola, United States','country_id' => '228'),\narray('id' => '3606','name' => '(POB) - Pope Field, Fayetteville, United States','country_id' => '228'),\narray('id' => '3607','name' => '(POC) - Brackett Field, La Verne, United States','country_id' => '228'),\narray('id' => '3608','name' => '(POE) - Polk Army Air Field, Fort Polk, United States','country_id' => '228'),\narray('id' => '3609','name' => '(POF) - Poplar Bluff Municipal Airport, Poplar Bluff, United States','country_id' => '228'),\narray('id' => '3610','name' => '(POU) - Dutchess County Airport, Poughkeepsie, United States','country_id' => '228'),\narray('id' => '3611','name' => '(POY) - Powell Municipal Airport, Powell, United States','country_id' => '228'),\narray('id' => '3612','name' => '(PPA) - Perry Lefors Field, Pampa, United States','country_id' => '228'),\narray('id' => '3613','name' => '(PPF) - Tri-City Airport, Parsons, United States','country_id' => '228'),\narray('id' => '3614','name' => '(LPO) - La Porte Municipal Airport, La Porte, United States','country_id' => '228'),\narray('id' => '3615','name' => '(PQI) - Northern Maine Regional Airport at Presque Isle, Presque Isle, United States','country_id' => '228'),\narray('id' => '3616','name' => '(PGL) - Trent Lott International Airport, Pascagoula, United States','country_id' => '228'),\narray('id' => '3617','name' => '(PRB) - Paso Robles Municipal Airport, Paso Robles, United States','country_id' => '228'),\narray('id' => '3618','name' => '(PRC) - Ernest A. Love Field, Prescott, United States','country_id' => '228'),\narray('id' => '3619','name' => '(PRO) - Perry Municipal Airport, Perry, United States','country_id' => '228'),\narray('id' => '3620','name' => '(PRX) - Cox Field, Paris, United States','country_id' => '228'),\narray('id' => '3621','name' => '(PSC) - Tri Cities Airport, Pasco, United States','country_id' => '228'),\narray('id' => '3622','name' => '(PSK) - New River Valley Airport, Dublin, United States','country_id' => '228'),\narray('id' => '3623','name' => '(PSM) - Portsmouth International at Pease Airport, Portsmouth, United States','country_id' => '228'),\narray('id' => '3624','name' => '(PSN) - Palestine Municipal Airport, Palestine, United States','country_id' => '228'),\narray('id' => '3625','name' => '(PGO) - Stevens Field, Pagosa Springs, United States','country_id' => '228'),\narray('id' => '3626','name' => '(PSP) - Palm Springs International Airport, Palm Springs, United States','country_id' => '228'),\narray('id' => '3627','name' => '(PSX) - Palacios Municipal Airport, Palacios, United States','country_id' => '228'),\narray('id' => '3628','name' => '(PTB) - Dinwiddie County Airport, Petersburg, United States','country_id' => '228'),\narray('id' => '3629','name' => '(PTK) - Oakland County International Airport, Pontiac, United States','country_id' => '228'),\narray('id' => '3630','name' => '(PTN) - Harry P Williams Memorial Airport, Patterson, United States','country_id' => '228'),\narray('id' => '3631','name' => '(PTT) - Pratt Regional Airport, Pratt, United States','country_id' => '228'),\narray('id' => '3632','name' => '(PTV) - Porterville Municipal Airport, Porterville, United States','country_id' => '228'),\narray('id' => '3633','name' => '(PUB) - Pueblo Memorial Airport, Pueblo, United States','country_id' => '228'),\narray('id' => '3634','name' => '(PUC) - Carbon County Regional/Buck Davis Field, Price, United States','country_id' => '228'),\narray('id' => '3635','name' => '(PUW) - Pullman Moscow Regional Airport, Pullman/Moscow,Id, United States','country_id' => '228'),\narray('id' => '3636','name' => '(PVC) - Provincetown Municipal Airport, Provincetown, United States','country_id' => '228'),\narray('id' => '3637','name' => '(PVD) - Theodore Francis Green State Airport, Providence, United States','country_id' => '228'),\narray('id' => '3638','name' => '(PVF) - Placerville Airport, Placerville, United States','country_id' => '228'),\narray('id' => '3639','name' => '(PVU) - Provo Municipal Airport, Provo, United States','country_id' => '228'),\narray('id' => '3640','name' => '(PVW) - Hale County Airport, Plainview, United States','country_id' => '228'),\narray('id' => '3641','name' => '(PWA) - Wiley Post Airport, Oklahoma City, United States','country_id' => '228'),\narray('id' => '3642','name' => '(PWD) - Sher-Wood Airport, Plentywood, United States','country_id' => '228'),\narray('id' => '3643','name' => '(PWK) - Chicago Executive Airport, Chicago/Prospect Heights/Wheeling, United States','country_id' => '228'),\narray('id' => '3644','name' => '(PWM) - Portland International Jetport Airport, Portland, United States','country_id' => '228'),\narray('id' => '3645','name' => '(PWT) - Bremerton National Airport, Bremerton, United States','country_id' => '228'),\narray('id' => '3646','name' => '(KQL) - Kol Airport, Kol, Papua New Guinea','country_id' => '172'),\narray('id' => '3647','name' => '(RAC) - John H Batten Airport, Racine, United States','country_id' => '228'),\narray('id' => '3648','name' => '(RAL) - Riverside Municipal Airport, Riverside, United States','country_id' => '228'),\narray('id' => '3649','name' => '(RAP) - Rapid City Regional Airport, Rapid City, United States','country_id' => '228'),\narray('id' => '3650','name' => '(RBD) - Dallas Executive Airport, Dallas, United States','country_id' => '228'),\narray('id' => '3651','name' => '(RBG) - Roseburg Regional Airport, Roseburg, United States','country_id' => '228'),\narray('id' => '3652','name' => '(RBL) - Red Bluff Municipal Airport, Red Bluff, United States','country_id' => '228'),\narray('id' => '3653','name' => '(RBW) - Lowcountry Regional Airport, Walterboro, United States','country_id' => '228'),\narray('id' => '3654','name' => '(RCA) - Ellsworth Air Force Base, Rapid City, United States','country_id' => '228'),\narray('id' => '3655','name' => '(RCK) - H H Coffield Regional Airport, Rockdale, United States','country_id' => '228'),\narray('id' => '3656','name' => '(RCR) - Fulton County Airport, Rochester, United States','country_id' => '228'),\narray('id' => '3657','name' => '(RCT) - Nartron Field, Reed City, United States','country_id' => '228'),\narray('id' => '3658','name' => '(RDD) - Redding Municipal Airport, Redding, United States','country_id' => '228'),\narray('id' => '3659','name' => '(RDG) - Reading Regional Carl A Spaatz Field, Reading, United States','country_id' => '228'),\narray('id' => '3660','name' => '(RDM) - Roberts Field, Redmond, United States','country_id' => '228'),\narray('id' => '3661','name' => '(RDR) - Grand Forks Air Force Base, Grand Forks, United States','country_id' => '228'),\narray('id' => '3662','name' => '(RDU) - Raleigh Durham International Airport, Raleigh/Durham, United States','country_id' => '228'),\narray('id' => '3663','name' => '(REO) - Rome State Airport, Rome, United States','country_id' => '228'),\narray('id' => '3664','name' => '(RFD) - Chicago Rockford International Airport, Chicago/Rockford, United States','country_id' => '228'),\narray('id' => '3665','name' => '(RHI) - Rhinelander Oneida County Airport, Rhinelander, United States','country_id' => '228'),\narray('id' => '3666','name' => '(RHV) - Reid-Hillview Airport of Santa Clara County, San Jose, United States','country_id' => '228'),\narray('id' => '3667','name' => '(RIC) - Richmond International Airport, Richmond, United States','country_id' => '228'),\narray('id' => '3668','name' => '(RIW) - Riverton Regional Airport, Riverton, United States','country_id' => '228'),\narray('id' => '3669','name' => '(KRJ) - Karawari Airstrip, Amboin, Papua New Guinea','country_id' => '172'),\narray('id' => '3670','name' => '(RKD) - Knox County Regional Airport, Rockland, United States','country_id' => '228'),\narray('id' => '3671','name' => '(RKP) - Aransas County Airport, Rockport, United States','country_id' => '228'),\narray('id' => '3672','name' => '(RKS) - Rock Springs Sweetwater County Airport, Rock Springs, United States','country_id' => '228'),\narray('id' => '3673','name' => '(RKW) - Rockwood Municipal Airport, Rockwood, United States','country_id' => '228'),\narray('id' => '3674','name' => '(RME) - Griffiss International Airport, Rome, United States','country_id' => '228'),\narray('id' => '3675','name' => '(RMG) - Richard B Russell Airport, Rome, United States','country_id' => '228'),\narray('id' => '3676','name' => '(RNC) - Warren County Memorial Airport, Mc Minnville, United States','country_id' => '228'),\narray('id' => '3677','name' => '(RND) - Randolph Air Force Base, Universal City, United States','country_id' => '228'),\narray('id' => '3678','name' => '(RNO) - Reno Tahoe International Airport, Reno, United States','country_id' => '228'),\narray('id' => '3679','name' => '(RNT) - Renton Municipal Airport, Renton, United States','country_id' => '228'),\narray('id' => '3680','name' => '(ROA) - Roanokea\"Blacksburg Regional Airport, Roanoke, United States','country_id' => '228'),\narray('id' => '3681','name' => '(ROC) - Greater Rochester International Airport, Rochester, United States','country_id' => '228'),\narray('id' => '3682','name' => '(ROG) - Rogers Municipal Airport-Carter Field, Rogers, United States','country_id' => '228'),\narray('id' => '3683','name' => '(ROW) - Roswell International Air Center Airport, Roswell, United States','country_id' => '228'),\narray('id' => '3684','name' => '(ROX) - Roseau Municipal Rudy Billberg Field, Roseau, United States','country_id' => '228'),\narray('id' => '3685','name' => '(RIE) - hln, Rice Lake, United States','country_id' => '228'),\narray('id' => '3686','name' => '(RPX) - Roundup Airport, Roundup, United States','country_id' => '228'),\narray('id' => '3687','name' => '(WBR) - Roben Hood Airport, Big Rapids, United States','country_id' => '228'),\narray('id' => '3688','name' => '(RQO) - El Reno Regional Airport, El Reno, United States','country_id' => '228'),\narray('id' => '3689','name' => '(RRL) - Merrill Municipal Airport, Merrill, United States','country_id' => '228'),\narray('id' => '3690','name' => '(RRT) - Warroad International Memorial Airport, Warroad, United States','country_id' => '228'),\narray('id' => '3691','name' => '(RSL) - Russell Municipal Airport, Russell, United States','country_id' => '228'),\narray('id' => '3692','name' => '(RSN) - Ruston Regional Airport, Ruston, United States','country_id' => '228'),\narray('id' => '3693','name' => '(RST) - Rochester International Airport, Rochester, United States','country_id' => '228'),\narray('id' => '3694','name' => '(RSW) - Southwest Florida International Airport, Fort Myers, United States','country_id' => '228'),\narray('id' => '3695','name' => '(RTN) - Raton Municipal-Crews Field, Raton, United States','country_id' => '228'),\narray('id' => '3696','name' => '(KRU) - Kerau Airport, Gunim, Papua New Guinea','country_id' => '172'),\narray('id' => '3697','name' => '(SRW) - Rowan County Airport, Salisbury, United States','country_id' => '228'),\narray('id' => '3698','name' => '(RUT) - Rutland - Southern Vermont Regional Airport, Rutland, United States','country_id' => '228'),\narray('id' => '3699','name' => '(RED) - Mifflin County Airport, Reedsville, United States','country_id' => '228'),\narray('id' => '3700','name' => '(RVS) - Richard Lloyd Jones Jr Airport, Tulsa, United States','country_id' => '228'),\narray('id' => '3701','name' => '(RWF) - Redwood Falls Municipal Airport, Redwood Falls, United States','country_id' => '228'),\narray('id' => '3702','name' => '(RWI) - Rocky Mount Wilson Regional Airport, Rocky Mount, United States','country_id' => '228'),\narray('id' => '3703','name' => '(RWL) - Rawlins Municipal Airport/Harvey Field, Rawlins, United States','country_id' => '228'),\narray('id' => '3704','name' => '(RXE) - Rexburg Madison County Airport, Rexburg, United States','country_id' => '228'),\narray('id' => '3705','name' => '(RNZ) - Jasper County Airport, Rensselaer, United States','country_id' => '228'),\narray('id' => '3706','name' => '(AHM) - Ashland Municipal Sumner Parker Field, Ashland, United States','country_id' => '228'),\narray('id' => '3707','name' => '(BDY) - Bandon State Airport, Bandon, United States','country_id' => '228'),\narray('id' => '3708','name' => '(SUO) - Sunriver Airport, Sunriver, United States','country_id' => '228'),\narray('id' => '3709','name' => '(MDJ) - Madras Municipal Airport, Madras, United States','country_id' => '228'),\narray('id' => '3710','name' => '(PRZ) - Prineville Airport, Prineville, United States','country_id' => '228'),\narray('id' => '3711','name' => '(IDH) - Idaho County Airport, Grangeville, United States','country_id' => '228'),\narray('id' => '3712','name' => '(VSK) - Vista Field, Kennewick, United States','country_id' => '228'),\narray('id' => '3713','name' => '(SAC) - Sacramento Executive Airport, Sacramento, United States','country_id' => '228'),\narray('id' => '3714','name' => '(SAD) - Safford Regional Airport, Safford, United States','country_id' => '228'),\narray('id' => '3715','name' => '(SAF) - Santa Fe Municipal Airport, Santa Fe, United States','country_id' => '228'),\narray('id' => '3716','name' => '(SAN) - San Diego International Airport, San Diego, United States','country_id' => '228'),\narray('id' => '3717','name' => '(SAR) - Sparta Community Hunter Field, Sparta, United States','country_id' => '228'),\narray('id' => '3718','name' => '(SAT) - San Antonio International Airport, San Antonio, United States','country_id' => '228'),\narray('id' => '3719','name' => '(SAV) - Savannah Hilton Head International Airport, Savannah, United States','country_id' => '228'),\narray('id' => '3720','name' => '(MQT) - Sawyer International Airport, Marquette, United States','country_id' => '228'),\narray('id' => '3721','name' => '(SBA) - Santa Barbara Municipal Airport, Santa Barbara, United States','country_id' => '228'),\narray('id' => '3722','name' => '(SBD) - San Bernardino International Airport, San Bernardino, United States','country_id' => '228'),\narray('id' => '3723','name' => '(SBM) - Sheboygan County Memorial Airport, Sheboygan, United States','country_id' => '228'),\narray('id' => '3724','name' => '(SBN) - South Bend Regional Airport, South Bend, United States','country_id' => '228'),\narray('id' => '3725','name' => '(SBP) - San Luis County Regional Airport, San Luis Obispo, United States','country_id' => '228'),\narray('id' => '3726','name' => '(SBS) - Steamboat Springs Bob Adams Field, Steamboat Springs, United States','country_id' => '228'),\narray('id' => '3727','name' => '(SBX) - Shelby Airport, Shelby, United States','country_id' => '228'),\narray('id' => '3728','name' => '(SBY) - Salisbury Ocean City Wicomico Regional Airport, Salisbury, United States','country_id' => '228'),\narray('id' => '3729','name' => '(SCB) - Scribner State Airport, Scribner, United States','country_id' => '228'),\narray('id' => '3730','name' => '(SCH) - Schenectady County Airport, Schenectady, United States','country_id' => '228'),\narray('id' => '3731','name' => '(SCK) - Stockton Metropolitan Airport, Stockton, United States','country_id' => '228'),\narray('id' => '3732','name' => '(SDF) - Louisville International Standiford Field, Louisville, United States','country_id' => '228'),\narray('id' => '3733','name' => '(SCF) - Scottsdale Airport, Scottsdale, United States','country_id' => '228'),\narray('id' => '3734','name' => '(SDM) - Brown Field Municipal Airport, San Diego, United States','country_id' => '228'),\narray('id' => '3735','name' => '(SDY) - Sidney Richland Municipal Airport, Sidney, United States','country_id' => '228'),\narray('id' => '3736','name' => '(SEA) - Seattle Tacoma International Airport, Seattle, United States','country_id' => '228'),\narray('id' => '3737','name' => '(SEE) - Gillespie Field, San Diego/El Cajon, United States','country_id' => '228'),\narray('id' => '3738','name' => '(SEF) - Sebring Regional Airport, Sebring, United States','country_id' => '228'),\narray('id' => '3739','name' => '(SEG) - Penn Valley Airport, Selinsgrove, United States','country_id' => '228'),\narray('id' => '3740','name' => '(SEM) - Craig Field, Selma, United States','country_id' => '228'),\narray('id' => '3741','name' => '(SEP) - Stephenville Clark Regional Airport, Stephenville, United States','country_id' => '228'),\narray('id' => '3742','name' => '(SER) - Freeman Municipal Airport, Seymour, United States','country_id' => '228'),\narray('id' => '3743','name' => '(SDX) - Sedona Airport, Sedona, United States','country_id' => '228'),\narray('id' => '3744','name' => '(SFB) - Orlando Sanford International Airport, Orlando, United States','country_id' => '228'),\narray('id' => '3745','name' => '(SFF) - Felts Field, Spokane, United States','country_id' => '228'),\narray('id' => '3746','name' => '(SFM) - Sanford Seacoast Regional Airport, Sanford, United States','country_id' => '228'),\narray('id' => '3747','name' => '(SFO) - San Francisco International Airport, San Francisco, United States','country_id' => '228'),\narray('id' => '3748','name' => '(SFZ) - North Central State Airport, Pawtucket, United States','country_id' => '228'),\narray('id' => '3749','name' => '(SGF) - Springfield Branson National Airport, Springfield, United States','country_id' => '228'),\narray('id' => '3750','name' => '(SGH) - Springfield-Beckley Municipal Airport, Springfield, United States','country_id' => '228'),\narray('id' => '3751','name' => '(UST) - Northeast Florida Regional Airport, St Augustine, United States','country_id' => '228'),\narray('id' => '3752','name' => '(SGR) - Sugar Land Regional Airport, Houston, United States','country_id' => '228'),\narray('id' => '3753','name' => '(SGT) - Stuttgart Municipal Airport, Stuttgart, United States','country_id' => '228'),\narray('id' => '3754','name' => '(SGU) - St George Municipal Airport, St George, United States','country_id' => '228'),\narray('id' => '3755','name' => '(SHD) - Shenandoah Valley Regional Airport, Staunton/Waynesboro/Harrisonburg, United States','country_id' => '228'),\narray('id' => '3756','name' => '(SHN) - Sanderson Field, Shelton, United States','country_id' => '228'),\narray('id' => '3757','name' => '(SHR) - Sheridan County Airport, Sheridan, United States','country_id' => '228'),\narray('id' => '3758','name' => '(SHV) - Shreveport Regional Airport, Shreveport, United States','country_id' => '228'),\narray('id' => '3759','name' => '(SIK) - Sikeston Memorial Municipal Airport, Sikeston, United States','country_id' => '228'),\narray('id' => '3760','name' => '(SIV) - Sullivan County Airport, Monticello, United States','country_id' => '228'),\narray('id' => '3761','name' => '(SJC) - Norman Y. Mineta San Jose International Airport, San Jose, United States','country_id' => '228'),\narray('id' => '3762','name' => '(SJN) - St Johns Industrial Air Park, St Johns, United States','country_id' => '228'),\narray('id' => '3763','name' => '(SJT) - San Angelo Regional Mathis Field, San Angelo, United States','country_id' => '228'),\narray('id' => '3764','name' => '(SKA) - Fairchild Air Force Base, Spokane, United States','country_id' => '228'),\narray('id' => '3765','name' => '(SKF) - Lackland Air Force Base, San Antonio, United States','country_id' => '228'),\narray('id' => '3766','name' => '(TSM) - Taos Regional Airport, Taos, United States','country_id' => '228'),\narray('id' => '3767','name' => '(SLB) - Storm Lake Municipal Airport, Storm Lake, United States','country_id' => '228'),\narray('id' => '3768','name' => '(SLC) - Salt Lake City International Airport, Salt Lake City, United States','country_id' => '228'),\narray('id' => '3769','name' => '(SLE) - Salem Municipal Airport/McNary Field, Salem, United States','country_id' => '228'),\narray('id' => '3770','name' => '(SLG) - Smith Field, Siloam Springs, United States','country_id' => '228'),\narray('id' => '3771','name' => '(SLK) - Adirondack Regional Airport, Saranac Lake, United States','country_id' => '228'),\narray('id' => '3772','name' => '(SLN) - Salina Municipal Airport, Salina, United States','country_id' => '228'),\narray('id' => '3773','name' => '(SLO) - Salem Leckrone Airport, Salem, United States','country_id' => '228'),\narray('id' => '3774','name' => '(SLR) - Sulphur Springs Municipal Airport, Sulphur Springs, United States','country_id' => '228'),\narray('id' => '3775','name' => '(SMD) - Smith Field, Fort Wayne, United States','country_id' => '228'),\narray('id' => '3776','name' => '(SME) - Lake Cumberland Regional Airport, Somerset, United States','country_id' => '228'),\narray('id' => '3777','name' => '(SMF) - Sacramento International Airport, Sacramento, United States','country_id' => '228'),\narray('id' => '3778','name' => '(SMN) - Lemhi County Airport, Salmon, United States','country_id' => '228'),\narray('id' => '3779','name' => '(SMO) - Santa Monica Municipal Airport, Santa Monica, United States','country_id' => '228'),\narray('id' => '3780','name' => '(SUM) - Sumter Airport, Sumter, United States','country_id' => '228'),\narray('id' => '3781','name' => '(SMX) - Santa Maria Pub/Capt G Allan Hancock Field, Santa Maria, United States','country_id' => '228'),\narray('id' => '3782','name' => '(SNA) - John Wayne Airport-Orange County Airport, Santa Ana, United States','country_id' => '228'),\narray('id' => '3783','name' => '(SNK) - Winston Field, Snyder, United States','country_id' => '228'),\narray('id' => '3784','name' => '(SNL) - Shawnee Regional Airport, Shawnee, United States','country_id' => '228'),\narray('id' => '3785','name' => '(SNS) - Salinas Municipal Airport, Salinas, United States','country_id' => '228'),\narray('id' => '3786','name' => '(SNY) - Sidney Municipal-Lloyd W Carr Field, Sidney, United States','country_id' => '228'),\narray('id' => '3787','name' => '(SOP) - Moore County Airport, Pinehurst/Southern Pines, United States','country_id' => '228'),\narray('id' => '3788','name' => '(SOW) - Show Low Regional Airport, Show Low, United States','country_id' => '228'),\narray('id' => '3789','name' => '(KSP) - Kosipe Airport, Kosipe Mission, Papua New Guinea','country_id' => '172'),\narray('id' => '3790','name' => '(SPA) - Spartanburg Downtown Memorial Airport, Spartanburg, United States','country_id' => '228'),\narray('id' => '3791','name' => '(SPF) - Black Hills Airport-Clyde Ice Field, Spearfish, United States','country_id' => '228'),\narray('id' => '3792','name' => '(SPI) - Abraham Lincoln Capital Airport, Springfield, United States','country_id' => '228'),\narray('id' => '3793','name' => '(SPS) - Sheppard Air Force Base-Wichita Falls Municipal Airport, Wichita Falls, United States','country_id' => '228'),\narray('id' => '3794','name' => '(SPW) - Spencer Municipal Airport, Spencer, United States','country_id' => '228'),\narray('id' => '3795','name' => '(SQI) - Whiteside County Airport-Joseph H Bittorf Field, Sterling/Rockfalls, United States','country_id' => '228'),\narray('id' => '3796','name' => '(SQL) - San Carlos Airport, San Carlos, United States','country_id' => '228'),\narray('id' => '3797','name' => '(SRQ) - Sarasota Bradenton International Airport, Sarasota/Bradenton, United States','country_id' => '228'),\narray('id' => '3798','name' => '(RUI) - Sierra Blanca Regional Airport, Ruidoso, United States','country_id' => '228'),\narray('id' => '3799','name' => '(SSC) - Shaw Air Force Base, Sumter, United States','country_id' => '228'),\narray('id' => '3800','name' => '(SSF) - Stinson Municipal Airport, San Antonio, United States','country_id' => '228'),\narray('id' => '3801','name' => '(SSI) - Malcolm McKinnon Airport, Brunswick, United States','country_id' => '228'),\narray('id' => '3802','name' => '(STC) - St Cloud Regional Airport, St Cloud, United States','country_id' => '228'),\narray('id' => '3803','name' => '(STE) - Stevens Point Municipal Airport, Stevens Point, United States','country_id' => '228'),\narray('id' => '3804','name' => '(STJ) - Rosecrans Memorial Airport, St Joseph, United States','country_id' => '228'),\narray('id' => '3805','name' => '(STK) - Sterling Municipal Airport, Sterling, United States','country_id' => '228'),\narray('id' => '3806','name' => '(STL) - Lambert St Louis International Airport, St Louis, United States','country_id' => '228'),\narray('id' => '3807','name' => '(STP) - St Paul Downtown Holman Field, St Paul, United States','country_id' => '228'),\narray('id' => '3808','name' => '(STS) - Charles M. Schulz Sonoma County Airport, Santa Rosa, United States','country_id' => '228'),\narray('id' => '3809','name' => '(SUA) - Witham Field, Stuart, United States','country_id' => '228'),\narray('id' => '3810','name' => '(SUD) - Stroud Municipal Airport, Stroud, United States','country_id' => '228'),\narray('id' => '3811','name' => '(SUE) - Door County Cherryland Airport, Sturgeon Bay, United States','country_id' => '228'),\narray('id' => '3812','name' => '(SUN) - Friedman Memorial Airport, Hailey, United States','country_id' => '228'),\narray('id' => '3813','name' => '(SUS) - Spirit of St Louis Airport, St Louis, United States','country_id' => '228'),\narray('id' => '3814','name' => '(SUU) - Travis Air Force Base, Fairfield, United States','country_id' => '228'),\narray('id' => '3815','name' => '(SUW) - Richard I Bong Airport, Superior, United States','country_id' => '228'),\narray('id' => '3816','name' => '(SUX) - Sioux Gateway Col. Bud Day Field, Sioux City, United States','country_id' => '228'),\narray('id' => '3817','name' => '(SVC) - Grant County Airport, Silver City, United States','country_id' => '228'),\narray('id' => '3818','name' => '(SVE) - Susanville Municipal Airport, Susanville, United States','country_id' => '228'),\narray('id' => '3819','name' => '(SVH) - Statesville Regional Airport, Statesville, United States','country_id' => '228'),\narray('id' => '3820','name' => '(SVN) - Hunter Army Air Field, Savannah, United States','country_id' => '228'),\narray('id' => '3821','name' => '(SWF) - Stewart International Airport, Newburgh, United States','country_id' => '228'),\narray('id' => '3822','name' => '(SWO) - Stillwater Regional Airport, Stillwater, United States','country_id' => '228'),\narray('id' => '3823','name' => '(SWW) - Avenger Field, Sweetwater, United States','country_id' => '228'),\narray('id' => '3824','name' => '(SYI) - Bomar Field Shelbyville Municipal Airport, Shelbyville, United States','country_id' => '228'),\narray('id' => '3825','name' => '(SYR) - Syracuse Hancock International Airport, Syracuse, United States','country_id' => '228'),\narray('id' => '3826','name' => '(SYV) - Sylvester Airport, Sylvester, United States','country_id' => '228'),\narray('id' => '3827','name' => '(SZL) - Whiteman Air Force Base, Knob Noster, United States','country_id' => '228'),\narray('id' => '3828','name' => '(TBC) - Tuba City Airport, Tuba City, United States','country_id' => '228'),\narray('id' => '3829','name' => '(TAD) - Perry Stokes Airport, Trinidad, United States','country_id' => '228'),\narray('id' => '3830','name' => '(TBN) - Waynesville-St. Robert Regional Forney field, Fort Leonard Wood, United States','country_id' => '228'),\narray('id' => '3831','name' => '(TBR) - Statesboro Bulloch County Airport, Statesboro, United States','country_id' => '228'),\narray('id' => '3832','name' => '(KTC) - Katiola Airport, Katiola, Ivoire Coast','country_id' => '41'),\narray('id' => '3833','name' => '(TCC) - Tucumcari Municipal Airport, Tucumcari, United States','country_id' => '228'),\narray('id' => '3834','name' => '(TCL) - Tuscaloosa Regional Airport, Tuscaloosa, United States','country_id' => '228'),\narray('id' => '3835','name' => '(TCM) - McChord Air Force Base, Tacoma, United States','country_id' => '228'),\narray('id' => '3836','name' => '(TCS) - Truth Or Consequences Municipal Airport, Truth Or Consequences, United States','country_id' => '228'),\narray('id' => '3837','name' => '(TDO) - Ed Carlson Memorial Field South Lewis County Airport, Toledo, United States','country_id' => '228'),\narray('id' => '3838','name' => '(TDW) - Tradewind Airport, Amarillo, United States','country_id' => '228'),\narray('id' => '3839','name' => '(TDZ) - Toledo Executive Airport, Toledo, United States','country_id' => '228'),\narray('id' => '3840','name' => '(TEB) - Teterboro Airport, Teterboro, United States','country_id' => '228'),\narray('id' => '3841','name' => '(TEX) - Telluride Regional Airport, Telluride, United States','country_id' => '228'),\narray('id' => '3842','name' => '(THA) - Tullahoma Regional Arpt/Wm Northern Field, Tullahoma, United States','country_id' => '228'),\narray('id' => '3843','name' => '(THM) - Thompson Falls Airport, Thompson Falls, United States','country_id' => '228'),\narray('id' => '3844','name' => '(THP) - Hot Springs Co Thermopolis Municipal Airport, Thermopolis, United States','country_id' => '228'),\narray('id' => '3845','name' => '(THV) - York Airport, York, United States','country_id' => '228'),\narray('id' => '3846','name' => '(TIK) - Tinker Air Force Base, Oklahoma City, United States','country_id' => '228'),\narray('id' => '3847','name' => '(TIW) - Tacoma Narrows Airport, Tacoma, United States','country_id' => '228'),\narray('id' => '3848','name' => '(TIX) - Space Coast Regional Airport, Titusville, United States','country_id' => '228'),\narray('id' => '3849','name' => '(KNT) - Kennett Memorial Airport, Kennett, United States','country_id' => '228'),\narray('id' => '3850','name' => '(TLH) - Tallahassee Regional Airport, Tallahassee, United States','country_id' => '228'),\narray('id' => '3851','name' => '(TLR) - Mefford Field, Tulare, United States','country_id' => '228'),\narray('id' => '3852','name' => '(TMA) - Henry Tift Myers Airport, Tifton, United States','country_id' => '228'),\narray('id' => '3853','name' => '(TMB) - Kendall-Tamiami Executive Airport, Miami, United States','country_id' => '228'),\narray('id' => '3854','name' => '(OTK) - Tillamook Airport, Tillamook, United States','country_id' => '228'),\narray('id' => '3855','name' => '(TNP) - Twentynine Palms Airport, Twentynine Palms, United States','country_id' => '228'),\narray('id' => '3856','name' => '(TNT) - Dade Collier Training and Transition Airport, Miami, United States','country_id' => '228'),\narray('id' => '3857','name' => '(TNU) - Newton Municipal Airport, Newton, United States','country_id' => '228'),\narray('id' => '3858','name' => '(XSD) - Tonopah Test Range Airport, Tonopah, United States','country_id' => '228'),\narray('id' => '3859','name' => '(TOA) - Zamperini Field, Torrance, United States','country_id' => '228'),\narray('id' => '3860','name' => '(TOC) - Toccoa Airport - R.G. Letourneau Field, Toccoa, United States','country_id' => '228'),\narray('id' => '3861','name' => '(TOI) - Troy Municipal Airport, Troy, United States','country_id' => '228'),\narray('id' => '3862','name' => '(TOL) - Toledo Express Airport, Toledo, United States','country_id' => '228'),\narray('id' => '3863','name' => '(TOP) - Philip Billard Municipal Airport, Topeka, United States','country_id' => '228'),\narray('id' => '3864','name' => '(TOR) - Torrington Municipal Airport, Torrington, United States','country_id' => '228'),\narray('id' => '3865','name' => '(TPA) - Tampa International Airport, Tampa, United States','country_id' => '228'),\narray('id' => '3866','name' => '(TPF) - Peter O Knight Airport, Tampa, United States','country_id' => '228'),\narray('id' => '3867','name' => '(TPH) - Tonopah Airport, Tonopah, United States','country_id' => '228'),\narray('id' => '3868','name' => '(TPL) - Draughon Miller Central Texas Regional Airport, Temple, United States','country_id' => '228'),\narray('id' => '3869','name' => '(TRI) - Tri Cities Regional Tn Va Airport, Bristol/Johnson/Kingsport, United States','country_id' => '228'),\narray('id' => '3870','name' => '(TKF) - Truckee Tahoe Airport, Truckee, United States','country_id' => '228'),\narray('id' => '3871','name' => '(TRL) - Terrell Municipal Airport, Terrell, United States','country_id' => '228'),\narray('id' => '3872','name' => '(TRM) - Jacqueline Cochran Regional Airport, Palm Springs, United States','country_id' => '228'),\narray('id' => '3873','name' => '(TSP) - Tehachapi Municipal Airport, Tehachapi, United States','country_id' => '228'),\narray('id' => '3874','name' => '(TTD) - Portland Troutdale Airport, Portland, United States','country_id' => '228'),\narray('id' => '3875','name' => '(TTN) - Trenton Mercer Airport, Trenton, United States','country_id' => '228'),\narray('id' => '3876','name' => '(TUL) - Tulsa International Airport, Tulsa, United States','country_id' => '228'),\narray('id' => '3877','name' => '(TUP) - Tupelo Regional Airport, Tupelo, United States','country_id' => '228'),\narray('id' => '3878','name' => '(TUS) - Tucson International Airport, Tucson, United States','country_id' => '228'),\narray('id' => '3879','name' => '(TVC) - Cherry Capital Airport, Traverse City, United States','country_id' => '228'),\narray('id' => '3880','name' => '(TVF) - Thief River Falls Regional Airport, Thief River Falls, United States','country_id' => '228'),\narray('id' => '3881','name' => '(TVI) - Thomasville Regional Airport, Thomasville, United States','country_id' => '228'),\narray('id' => '3882','name' => '(TVL) - Lake Tahoe Airport, South Lake Tahoe, United States','country_id' => '228'),\narray('id' => '3883','name' => '(TWF) - Joslin Field Magic Valley Regional Airport, Twin Falls, United States','country_id' => '228'),\narray('id' => '3884','name' => '(TXK) - Texarkana Regional Webb Field, Texarkana, United States','country_id' => '228'),\narray('id' => '3885','name' => '(TYZ) - Taylor Airport, Taylor, United States','country_id' => '228'),\narray('id' => '3886','name' => '(TYR) - Tyler Pounds Regional Airport, Tyler, United States','country_id' => '228'),\narray('id' => '3887','name' => '(TYS) - McGhee Tyson Airport, Knoxville, United States','country_id' => '228'),\narray('id' => '3888','name' => '(BFG) - Bullfrog Basin Airport, Glen Canyon Natl Rec Area, United States','country_id' => '228'),\narray('id' => '3889','name' => '(NPH) - Nephi Municipal Airport, Nephi, United States','country_id' => '228'),\narray('id' => '3890','name' => '(RVR) - Green River Municipal Airport, Green River, United States','country_id' => '228'),\narray('id' => '3891','name' => '(PNU) - Panguitch Municipal Airport, Panguitch, United States','country_id' => '228'),\narray('id' => '3892','name' => '(ICS) - Cascade Airport, Cascade, United States','country_id' => '228'),\narray('id' => '3893','name' => '(UBS) - Columbus Lowndes County Airport, Columbus, United States','country_id' => '228'),\narray('id' => '3894','name' => '(UCY) - Everett-Stewart Regional Airport, Union City, United States','country_id' => '228'),\narray('id' => '3895','name' => '(UDD) - Bermuda Dunes Airport, Palm Springs, United States','country_id' => '228'),\narray('id' => '3896','name' => '(UES) - Waukesha County Airport, Waukesha, United States','country_id' => '228'),\narray('id' => '3897','name' => '(UGN) - Waukegan National Airport, Chicago/Waukegan, United States','country_id' => '228'),\narray('id' => '3898','name' => '(UIL) - Quillayute Airport, Quillayute, United States','country_id' => '228'),\narray('id' => '3899','name' => '(UIN) - Quincy Regional Baldwin Field, Quincy, United States','country_id' => '228'),\narray('id' => '3900','name' => '(IKB) - Wilkes County Airport, North Wilkesboro, United States','country_id' => '228'),\narray('id' => '3901','name' => '(UKI) - Ukiah Municipal Airport, Ukiah, United States','country_id' => '228'),\narray('id' => '3902','name' => '(UKT) - Quakertown Airport, Quakertown, United States','country_id' => '228'),\narray('id' => '3903','name' => '(ULM) - New Ulm Municipal Airport, New Ulm, United States','country_id' => '228'),\narray('id' => '3904','name' => '(ATO) - Ohio University Snyder Field, Athens/Albany, United States','country_id' => '228'),\narray('id' => '3905','name' => '(UNU) - Dodge County Airport, Juneau, United States','country_id' => '228'),\narray('id' => '3906','name' => '(SCE) - University Park Airport, State College, United States','country_id' => '228'),\narray('id' => '3907','name' => '(UOS) - Franklin County Airport, Sewanee, United States','country_id' => '228'),\narray('id' => '3908','name' => '(UOX) - University Oxford Airport, Oxford, United States','country_id' => '228'),\narray('id' => '3909','name' => '(KUP) - Kupiano Airport, Kupiano, Papua New Guinea','country_id' => '172'),\narray('id' => '3910','name' => '(UTM) - Tunica Municipal Airport, Tunica, United States','country_id' => '228'),\narray('id' => '3911','name' => '(HTV) - Huntsville Regional Airport, Huntsville, United States','country_id' => '228'),\narray('id' => '3912','name' => '(NPT) - Newport State Airport, Newport, United States','country_id' => '228'),\narray('id' => '3913','name' => '(UVA) - Garner Field, Uvalde, United States','country_id' => '228'),\narray('id' => '3914','name' => '(KUX) - Kuyol Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '3915','name' => '(RKH) - Rock Hill - York County Airport, Rock Hill, United States','country_id' => '228'),\narray('id' => '3916','name' => '(VAD) - Moody Air Force Base, Valdosta, United States','country_id' => '228'),\narray('id' => '3917','name' => '(LLY) - South Jersey Regional Airport, Mount Holly, United States','country_id' => '228'),\narray('id' => '3918','name' => '(VBG) - Vandenberg Air Force Base, Lompoc, United States','country_id' => '228'),\narray('id' => '3919','name' => '(VCT) - Victoria Regional Airport, Victoria, United States','country_id' => '228'),\narray('id' => '3920','name' => '(VCV) - Southern California Logistics Airport, Victorville, United States','country_id' => '228'),\narray('id' => '3921','name' => '(VDI) - Vidalia Regional Airport, Vidalia, United States','country_id' => '228'),\narray('id' => '3922','name' => '(KVE) - Kitava Airport, Kitava Island, Papua New Guinea','country_id' => '172'),\narray('id' => '3923','name' => '(VEL) - Vernal Regional Airport, Vernal, United States','country_id' => '228'),\narray('id' => '3924','name' => '(VGT) - North Las Vegas Airport, Las Vegas, United States','country_id' => '228'),\narray('id' => '3925','name' => '(VHN) - Culberson County Airport, Van Horn, United States','country_id' => '228'),\narray('id' => '3926','name' => '(VIH) - Rolla National Airport, Rolla/Vichy, United States','country_id' => '228'),\narray('id' => '3927','name' => '(VIS) - Visalia Municipal Airport, Visalia, United States','country_id' => '228'),\narray('id' => '3928','name' => '(VJI) - Virginia Highlands Airport, Abingdon, United States','country_id' => '228'),\narray('id' => '3929','name' => '(VKS) - Vicksburg Municipal Airport, Vicksburg, United States','country_id' => '228'),\narray('id' => '3930','name' => '(VLA) - Vandalia Municipal Airport, Vandalia, United States','country_id' => '228'),\narray('id' => '3931','name' => '(VLD) - Valdosta Regional Airport, Valdosta, United States','country_id' => '228'),\narray('id' => '3932','name' => '(VNC) - Venice Municipal Airport, Venice, United States','country_id' => '228'),\narray('id' => '3933','name' => '(VNY) - Van Nuys Airport, Van Nuys, United States','country_id' => '228'),\narray('id' => '3934','name' => '(VOK) - Volk Field, Camp Douglas, United States','country_id' => '228'),\narray('id' => '3935','name' => '(VPS) - Eglin Air Force Base, Valparaiso, United States','country_id' => '228'),\narray('id' => '3936','name' => '(VPZ) - Porter County Municipal Airport, Valparaiso, United States','country_id' => '228'),\narray('id' => '3937','name' => '(VQQ) - Cecil Airport, Jacksonville, United States','country_id' => '228'),\narray('id' => '3938','name' => '(VRB) - Vero Beach Municipal Airport, Vero Beach, United States','country_id' => '228'),\narray('id' => '3939','name' => '(VSF) - Hartness State (Springfield) Airport, Springfield, United States','country_id' => '228'),\narray('id' => '3940','name' => '(VTN) - Miller Field, Valentine, United States','country_id' => '228'),\narray('id' => '3941','name' => '(VYS) - Illinois Valley Regional Airport-Walter A Duncan Field, Peru, United States','country_id' => '228'),\narray('id' => '3942','name' => '(GTY) - Gettysburg Regional Airport, Gettysburg, United States','country_id' => '228'),\narray('id' => '3943','name' => '(SQV) - Sequim Valley Airport, Sequim, United States','country_id' => '228'),\narray('id' => '3944','name' => '(PGC) - Grant County Airport, Petersburg, United States','country_id' => '228'),\narray('id' => '3945','name' => '(WAL) - Wallops Flight Facility Airport, Wallops Island, United States','country_id' => '228'),\narray('id' => '3946','name' => '(WAY) - Greene County Airport, Waynesburg, United States','country_id' => '228'),\narray('id' => '3947','name' => '(WBW) - Wilkes Barre Wyoming Valley Airport, Wilkes-Barre, United States','country_id' => '228'),\narray('id' => '3948','name' => '(WDG) - Enid Woodring Regional Airport, Enid, United States','country_id' => '228'),\narray('id' => '3949','name' => '(WDR) - Barrow County Airport, Winder, United States','country_id' => '228'),\narray('id' => '3950','name' => '(WHP) - Whiteman Airport, Los Angeles, United States','country_id' => '228'),\narray('id' => '3951','name' => '(WJF) - General WM J Fox Airfield, Lancaster, United States','country_id' => '228'),\narray('id' => '3952','name' => '(WLD) - Strother Field, Winfield/Arkansas City, United States','country_id' => '228'),\narray('id' => '3953','name' => '(WLW) - Willows Glenn County Airport, Willows, United States','country_id' => '228'),\narray('id' => '3954','name' => '(WMC) - Winnemucca Municipal Airport, Winnemucca, United States','country_id' => '228'),\narray('id' => '3955','name' => '(WRB) - Robins Air Force Base, Warner Robins, United States','country_id' => '228'),\narray('id' => '3956','name' => '(WRI) - Mc Guire Air Force Base, Wrightstown, United States','country_id' => '228'),\narray('id' => '3957','name' => '(WRL) - Worland Municipal Airport, Worland, United States','country_id' => '228'),\narray('id' => '3958','name' => '(WSD) - Condron Army Air Field, White Sands, United States','country_id' => '228'),\narray('id' => '3959','name' => '(WST) - Westerly State Airport, Westerly, United States','country_id' => '228'),\narray('id' => '3960','name' => '(WVI) - Watsonville Municipal Airport, Watsonville, United States','country_id' => '228'),\narray('id' => '3961','name' => '(WVL) - Waterville Robert Lafleur Airport, Waterville, United States','country_id' => '228'),\narray('id' => '3962','name' => '(WWD) - Cape May County Airport, Wildwood, United States','country_id' => '228'),\narray('id' => '3963','name' => '(WWR) - West Woodward Airport, Woodward, United States','country_id' => '228'),\narray('id' => '3964','name' => '(KWY) - Kiwayu Airport, Kiwayu, Kenya','country_id' => '111'),\narray('id' => '3965','name' => '(WYS) - Yellowstone Airport, West Yellowstone, United States','country_id' => '228'),\narray('id' => '3966','name' => '(KYO) - Tampa North Aero Park Airport, Tampa, United States','country_id' => '228'),\narray('id' => '3967','name' => '(XNA) - Northwest Arkansas Regional Airport, Fayetteville/Springdale, United States','country_id' => '228'),\narray('id' => '3968','name' => '(YIP) - Willow Run Airport, Detroit, United States','country_id' => '228'),\narray('id' => '3969','name' => '(YKM) - Yakima Air Terminal McAllister Field, Yakima, United States','country_id' => '228'),\narray('id' => '3970','name' => '(YKN) - Chan Gurney Municipal Airport, Yankton, United States','country_id' => '228'),\narray('id' => '3971','name' => '(YNG) - Youngstown Warren Regional Airport, Youngstown/Warren, United States','country_id' => '228'),\narray('id' => '3972','name' => '(DZN) - Dzhezkazgan Airport, Dzhezkazgan, Kazakhstan','country_id' => '121'),\narray('id' => '3973','name' => '(TDK) - Taldykorgan Airport, Taldy Kurgan, Kazakhstan','country_id' => '121'),\narray('id' => '3974','name' => '(ATX) - Atbasar Airport, Atbasar, Kazakhstan','country_id' => '121'),\narray('id' => '3975','name' => '(KZF) - Kaintiba Airport, Kaintiba, Papua New Guinea','country_id' => '172'),\narray('id' => '3976','name' => '(ZPH) - Zephyrhills Municipal Airport, Zephyrhills, United States','country_id' => '228'),\narray('id' => '3977','name' => '(KZR) - Zafer Airport, KAtahya, Turkey','country_id' => '220'),\narray('id' => '3978','name' => '(ZZV) - Zanesville Municipal Airport, Zanesville, United States','country_id' => '228'),\narray('id' => '3979','name' => '(LAC) - Layang-Layang Airport, Spratley Islands, Malaysia','country_id' => '154'),\narray('id' => '3980','name' => '(TIA) - Tirana International Airport Mother Teresa, Tirana, Albania','country_id' => '5'),\narray('id' => '3981','name' => '(BOJ) - Burgas Airport, Burgas, Bulgaria','country_id' => '20'),\narray('id' => '3982','name' => '(GOZ) - Gorna Oryahovitsa Airport, Gorna Oryahovitsa, Bulgaria','country_id' => '20'),\narray('id' => '3983','name' => '(LBM) - Luabo Airport, Luabo, Mozambique','country_id' => '155'),\narray('id' => '3984','name' => '(PDV) - Plovdiv International Airport, Plovdiv, Bulgaria','country_id' => '20'),\narray('id' => '3985','name' => '(PVN) - Dolna Mitropoliya Air Base, Dolna Mitropoliya, Bulgaria','country_id' => '20'),\narray('id' => '3986','name' => '(SOF) - Sofia Airport, Sofia, Bulgaria','country_id' => '20'),\narray('id' => '3987','name' => '(SLS) - Silistra Polkovnik Lambrinovo Airfield, Silistra, Bulgaria','country_id' => '20'),\narray('id' => '3988','name' => '(SZR) - Stara Zagora Airport, Stara Zagora, Bulgaria','country_id' => '20'),\narray('id' => '3989','name' => '(TGV) - Bukhovtsi Airfield, Targovishte, Bulgaria','country_id' => '20'),\narray('id' => '3990','name' => '(VID) - Vidin Smurdan Airfield, Vidin, Bulgaria','country_id' => '20'),\narray('id' => '3991','name' => '(VAR) - Varna Airport, Varna, Bulgaria','country_id' => '20'),\narray('id' => '3992','name' => '(ECN) - Ercan International Airport, Nicosia, Cyprus','country_id' => '52'),\narray('id' => '3993','name' => '(LCA) - Larnaca International Airport, Larnarca, Cyprus','country_id' => '52'),\narray('id' => '3994','name' => '(LCP) - Loncopue Airport, Loncopue, Argentina','country_id' => '9'),\narray('id' => '3995','name' => '(PFO) - Paphos International Airport, Paphos, Cyprus','country_id' => '52'),\narray('id' => '3996','name' => '(AKT) - RAF Akrotiri, Akrotiri, United Kingdom','country_id' => '74'),\narray('id' => '3997','name' => '(DBV) - Dubrovnik Airport, Dubrovnik, Croatia','country_id' => '94'),\narray('id' => '3998','name' => '(LSZ) - Loinj Island Airport, Loinj, Croatia','country_id' => '94'),\narray('id' => '3999','name' => '(OSI) - Osijek Airport, Osijek, Croatia','country_id' => '94'),\narray('id' => '4000','name' => '(PUY) - Pula Airport, Pula, Croatia','country_id' => '94'),\narray('id' => '4001','name' => '(RJK) - Rijeka Airport, Rijeka, Croatia','country_id' => '94'),\narray('id' => '4002','name' => '(BWK) - Bol Airport, BraA Island, Croatia','country_id' => '94'),\narray('id' => '4003','name' => '(SPU) - Split Airport, Split, Croatia','country_id' => '94'),\narray('id' => '4004','name' => '(LDW) - Lansdowne Airport, Lansdowne Station, Australia','country_id' => '12'),\narray('id' => '4005','name' => '(ZAG) - Zagreb Airport, Zagreb, Croatia','country_id' => '94'),\narray('id' => '4006','name' => '(ZAD) - Zemunik Airport, Zadar, Croatia','country_id' => '94'),\narray('id' => '4007','name' => '(ABC) - Albacete-Los Llanos Airport, Albacete, Spain','country_id' => '65'),\narray('id' => '4008','name' => '(ALC) - Alicante International Airport, Alicante, Spain','country_id' => '65'),\narray('id' => '4009','name' => '(LEI) - AlmerAa International Airport, AlmerAa, Spain','country_id' => '65'),\narray('id' => '4010','name' => '(OVD) - Asturias Airport, RanAn, Spain','country_id' => '65'),\narray('id' => '4011','name' => '(ODB) - CArdoba Airport, CArdoba, Spain','country_id' => '65'),\narray('id' => '4012','name' => '(BIO) - Bilbao Airport, Bilbao, Spain','country_id' => '65'),\narray('id' => '4013','name' => '(RGS) - Burgos Airport, Burgos, Spain','country_id' => '65'),\narray('id' => '4014','name' => '(BCN) - Barcelona International Airport, Barcelona, Spain','country_id' => '65'),\narray('id' => '4015','name' => '(BJZ) - Badajoz Airport, Badajoz, Spain','country_id' => '65'),\narray('id' => '4016','name' => '(LCG) - A CoruAa Airport, Culleredo, Spain','country_id' => '65'),\narray('id' => '4017','name' => '(ECV) - Cuatro Vientos Airport, Madrid, Spain','country_id' => '65'),\narray('id' => '4018','name' => '(ILD) - Lleida-Alguaire Airport, Lleida, Spain','country_id' => '65'),\narray('id' => '4019','name' => '(CDT) - CastellAn-Costa Azahar Airport, CastellAn de la Plana, Spain','country_id' => '65'),\narray('id' => '4020','name' => '(GRO) - Girona Airport, Girona, Spain','country_id' => '65'),\narray('id' => '4021','name' => '(GRX) - Federico Garcia Lorca Airport, Granada, Spain','country_id' => '65'),\narray('id' => '4022','name' => '(HSK) - Huesca/Pirineos Airport, Monflorite/AlcalA del Obispo, Spain','country_id' => '65'),\narray('id' => '4023','name' => '(IBZ) - Ibiza Airport, Ibiza, Spain','country_id' => '65'),\narray('id' => '4024','name' => '(XRY) - Jerez Airport, Jerez de la Forntera, Spain','country_id' => '65'),\narray('id' => '4025','name' => '(MJV) - San Javier Airport, San Javier, Spain','country_id' => '65'),\narray('id' => '4026','name' => '(QSA) - Sabadell Airport, Sabadell, Spain','country_id' => '65'),\narray('id' => '4027','name' => '(LEN) - Leon Airport, LeAn, Spain','country_id' => '65'),\narray('id' => '4028','name' => '(RJL) - LogroAo-Agoncillo Airport, LogroAo, Spain','country_id' => '65'),\narray('id' => '4029','name' => '(MAD) - Adolfo SuArez Madrida\"Barajas Airport, Madrid, Spain','country_id' => '65'),\narray('id' => '4030','name' => '(HEV) - MafA - GibraleAn Airport, GibraleAn, Spain','country_id' => '65'),\narray('id' => '4031','name' => '(AGP) - MAlaga Airport, MAlaga, Spain','country_id' => '65'),\narray('id' => '4032','name' => '(MAH) - Menorca Airport, Menorca Island, Spain','country_id' => '65'),\narray('id' => '4033','name' => '(OZP) - Moron Air Base, MorAn, Spain','country_id' => '65'),\narray('id' => '4034','name' => '(LEO) - Lekoni Airport, Lekoni, Gabon','country_id' => '73'),\narray('id' => '4035','name' => '(PMI) - Palma De Mallorca Airport, Palma De Mallorca, Spain','country_id' => '65'),\narray('id' => '4036','name' => '(PNA) - Pamplona Airport, Pamplona, Spain','country_id' => '65'),\narray('id' => '4037','name' => '(REU) - Reus Air Base, Reus, Spain','country_id' => '65'),\narray('id' => '4038','name' => '(ROZ) - Rota Naval Station Airport, Rota, Spain','country_id' => '65'),\narray('id' => '4039','name' => '(SLM) - Salamanca Airport, Salamanca, Spain','country_id' => '65'),\narray('id' => '4040','name' => '(EAS) - San Sebastian Airport, Hondarribia, Spain','country_id' => '65'),\narray('id' => '4041','name' => '(SCQ) - Santiago de Compostela Airport, Santiago de Compostela, Spain','country_id' => '65'),\narray('id' => '4042','name' => '(LEU) - Pirineus - la Seu d\\'Urgel Airport, La Seu d\\'Urgell Pyrenees and Andorra, Spain','country_id' => '65'),\narray('id' => '4043','name' => '(TEV) - Teruel Airport, Teruel, Spain','country_id' => '65'),\narray('id' => '4044','name' => '(TOJ) - TorrejAn Airport, Madrid, Spain','country_id' => '65'),\narray('id' => '4045','name' => '(VLC) - Valencia Airport, Valencia, Spain','country_id' => '65'),\narray('id' => '4046','name' => '(VLL) - Valladolid Airport, Valladolid, Spain','country_id' => '65'),\narray('id' => '4047','name' => '(VIT) - Vitoria/Foronda Airport, Alava, Spain','country_id' => '65'),\narray('id' => '4048','name' => '(VGO) - Vigo Airport, Vigo, Spain','country_id' => '65'),\narray('id' => '4049','name' => '(SDR) - Santander Airport, Santander, Spain','country_id' => '65'),\narray('id' => '4050','name' => '(ZAZ) - Zaragoza Air Base, Zaragoza, Spain','country_id' => '65'),\narray('id' => '4051','name' => '(SVQ) - Sevilla Airport, Sevilla, Spain','country_id' => '65'),\narray('id' => '4052','name' => '(DPE) - St Aubin Airport, Dieppe, France','country_id' => '72'),\narray('id' => '4053','name' => '(CQF) - Calais-Dunkerque Airport, Calais/Dunkerque, France','country_id' => '72'),\narray('id' => '4054','name' => '(XCP) - CompiAgne Margny Airport, Calais-Dunkerque, France','country_id' => '72'),\narray('id' => '4055','name' => '(XLN) - Laon - Chambry Airport, Calais-Dunkerque, France','country_id' => '72'),\narray('id' => '4056','name' => '(XSJ) - PAronne-Saint-Quentin Airport, PAronne/Saint-Quentin, France','country_id' => '72'),\narray('id' => '4057','name' => '(XDK) - Dunkerque les Moeres Airport, Calais-Dunkerque, France','country_id' => '72'),\narray('id' => '4058','name' => '(BYF) - Albert-Bray Airport, Albert/Bray, France','country_id' => '72'),\narray('id' => '4059','name' => '(LTQ) - Le Touquet-CAte d\\'Opale Airport, Le Touquet-Paris-Plage, France','country_id' => '72'),\narray('id' => '4060','name' => '(XVS) - Valenciennes-Denain Airport, Valenciennes/Denain, France','country_id' => '72'),\narray('id' => '4061','name' => '(QAM) - Amiens-Glisy Airport, Amiens/Glisy, France','country_id' => '72'),\narray('id' => '4062','name' => '(AGF) - Agen-La Garenne Airport, Agen/La Garenne, France','country_id' => '72'),\narray('id' => '4063','name' => '(BOD) - Bordeaux-MArignac Airport, Bordeaux/MArignac, France','country_id' => '72'),\narray('id' => '4064','name' => '(EGC) - Bergerac-RoumaniAre Airport, Bergerac/RoumaniAre, France','country_id' => '72'),\narray('id' => '4065','name' => '(CNG) - Cognac-ChAteaubernard (BA 709) Air Base, Cognac/ChAteaubernard, France','country_id' => '72'),\narray('id' => '4066','name' => '(LRH) - La Rochelle-Ale de RA Airport, La Rochelle/Ale de RA, France','country_id' => '72'),\narray('id' => '4067','name' => '(PIS) - Poitiers-Biard Airport, Poitiers/Biard, France','country_id' => '72'),\narray('id' => '4068','name' => '(MCU) - MontluAon-GuAret Airport, MontluAon/GuAret, France','country_id' => '72'),\narray('id' => '4069','name' => '(LIG) - Limoges Airport, Limoges/Bellegarde, France','country_id' => '72'),\narray('id' => '4070','name' => '(XMJ) - Mont-de-Marsan (BA 118) Air Base, Mont-de-Marsan, France','country_id' => '72'),\narray('id' => '4071','name' => '(NIT) - Niort-SouchA Airport, Niort/SouchA, France','country_id' => '72'),\narray('id' => '4072','name' => '(TLS) - Toulouse-Blagnac Airport, Toulouse/Blagnac, France','country_id' => '72'),\narray('id' => '4073','name' => '(PUF) - Pau PyrAnAes Airport, Pau/PyrAnAes (Uzein), France','country_id' => '72'),\narray('id' => '4074','name' => '(LDE) - Tarbes-Lourdes-PyrAnAes Airport, Tarbes/Lourdes/PyrAnAes, France','country_id' => '72'),\narray('id' => '4075','name' => '(ANG) - AngoulAame-Brie-Champniers Airport, AngoulAame/Brie/Champniers, France','country_id' => '72'),\narray('id' => '4076','name' => '(PGX) - PArigueux-Bassillac Airport, PArigueux/Bassillac, France','country_id' => '72'),\narray('id' => '4077','name' => '(XDA) - Dax Seyresse Airport, Perigueux, France','country_id' => '72'),\narray('id' => '4078','name' => '(BIQ) - Biarritz-Anglet-Bayonne Airport, Biarritz/Anglet/Bayonne, France','country_id' => '72'),\narray('id' => '4079','name' => '(XCX) - ChAtellerault Airport, Biarritz, France','country_id' => '72'),\narray('id' => '4080','name' => '(ZAO) - Cahors-Lalbenque Airport, Cahors/Lalbenque, France','country_id' => '72'),\narray('id' => '4081','name' => '(XGT) - GuAret St Laurent Airport, Cahors, France','country_id' => '72'),\narray('id' => '4082','name' => '(XAC) - Arcachon-La Teste-de-Buch Airport, Arcachon/La Teste-de-Buch, France','country_id' => '72'),\narray('id' => '4083','name' => '(LBI) - Albi-Le SAquestre Airport, Albi/Le SAquestre, France','country_id' => '72'),\narray('id' => '4084','name' => '(DCM) - Castres-Mazamet Airport, Castres/Mazamet, France','country_id' => '72'),\narray('id' => '4085','name' => '(RDZ) - Rodez-Marcillac Airport, Rodez/Marcillac, France','country_id' => '72'),\narray('id' => '4086','name' => '(RYN) - Royan-MAdis Airport, Royan/MAdis, France','country_id' => '72'),\narray('id' => '4087','name' => '(XMW) - Montauban Airport, Montauban, France','country_id' => '72'),\narray('id' => '4088','name' => '(XLR) - Libourne-Artigues-de-Lussac Airport, Libourne/Artigues-de-Lussac, France','country_id' => '72'),\narray('id' => '4089','name' => '(RCO) - Rochefort-Saint-Agnant (BA 721) Airport, Rochefort/Saint-Agnant, France','country_id' => '72'),\narray('id' => '4090','name' => '(XSL) - Sarlat Domme Airport, Rochefort, France','country_id' => '72'),\narray('id' => '4091','name' => '(XTB) - Tarbes LaloubAre Airport, Rochefort, France','country_id' => '72'),\narray('id' => '4092','name' => '(IDY) - Ale d\\'Yeu Airport, Ale d\\'Yeu, France','country_id' => '72'),\narray('id' => '4093','name' => '(XVZ) - Vierzon MAreau Airport, Guiscriff, France','country_id' => '72'),\narray('id' => '4094','name' => '(CMR) - Colmar-Houssen Airport, Colmar/Houssen, France','country_id' => '72'),\narray('id' => '4095','name' => '(XBV) - Beaune-Challanges Airport, Beaune/Challanges, France','country_id' => '72'),\narray('id' => '4096','name' => '(DLE) - Dole-Tavaux Airport, Dole/Tavaux, France','country_id' => '72'),\narray('id' => '4097','name' => '(XVN) - Verdun-Le Rozelier Airport, Verdun/Le Rozelier, France','country_id' => '72'),\narray('id' => '4098','name' => '(XVI) - Vienne Reventin Airport, Verdun, France','country_id' => '72'),\narray('id' => '4099','name' => '(MVV) - MegAve Airport, Verdun, France','country_id' => '72'),\narray('id' => '4100','name' => '(OBS) - Aubenas-ArdAche MAridional Airport, Aubenas/ArdAche MAridional, France','country_id' => '72'),\narray('id' => '4101','name' => '(LPY) - Le Puy-Loudes Airport, Le Puy/Loudes, France','country_id' => '72'),\narray('id' => '4102','name' => '(AHZ) - L\\'alpe D\\'huez Airport, Bourg, France','country_id' => '72'),\narray('id' => '4103','name' => '(XCW) - Chaumont-Semoutiers Airport, Chaumont/Semoutiers, France','country_id' => '72'),\narray('id' => '4104','name' => '(ETZ) - Metz-Nancy-Lorraine Airport, Metz / Nancy, France','country_id' => '72'),\narray('id' => '4105','name' => '(ANE) - Angers-Loire Airport, Angers/MarcA, France','country_id' => '72'),\narray('id' => '4106','name' => '(XAV) - Albertville Airport, Angers, France','country_id' => '72'),\narray('id' => '4107','name' => '(BIA) - Bastia-Poretta Airport, Bastia/Poretta, France','country_id' => '72'),\narray('id' => '4108','name' => '(CLY) - Calvi-Sainte-Catherine Airport, Calvi/Sainte-Catherine, France','country_id' => '72'),\narray('id' => '4109','name' => '(FSC) - Figari Sud-Corse Airport, Figari Sud-Corse, France','country_id' => '72'),\narray('id' => '4110','name' => '(AJA) - Ajaccio-NapolAon Bonaparte Airport, Ajaccio/NapolAon Bonaparte, France','country_id' => '72'),\narray('id' => '4111','name' => '(PRP) - Propriano Airport, Propriano, France','country_id' => '72'),\narray('id' => '4112','name' => '(SOZ) - Solenzara (BA 126) Air Base, Solenzara, France','country_id' => '72'),\narray('id' => '4113','name' => '(MFX) - MAribel Airport, Ajaccio, France','country_id' => '72'),\narray('id' => '4114','name' => '(AUF) - Auxerre-Branches Airport, Auxerre/Branches, France','country_id' => '72'),\narray('id' => '4115','name' => '(CMF) - ChambAry-Savoie Airport, ChambAry/Aix-les-Bains, France','country_id' => '72'),\narray('id' => '4116','name' => '(CFE) - Clermont-Ferrand Auvergne Airport, Clermont-Ferrand/Auvergne, France','country_id' => '72'),\narray('id' => '4117','name' => '(BOU) - Bourges Airport, Bourges, France','country_id' => '72'),\narray('id' => '4118','name' => '(QNJ) - Annemasse Airport, Annemasse, France','country_id' => '72'),\narray('id' => '4119','name' => '(CVF) - Courchevel Airport, Courcheval, France','country_id' => '72'),\narray('id' => '4120','name' => '(LYS) - Lyon Saint-ExupAry Airport, Lyon, France','country_id' => '72'),\narray('id' => '4121','name' => '(QNX) - MAcon-Charnay Airport, MAcon/Charnay, France','country_id' => '72'),\narray('id' => '4122','name' => '(SYT) - Saint-Yan Airport, Saint-Yan, France','country_id' => '72'),\narray('id' => '4123','name' => '(RNE) - Roanne-Renaison Airport, Roanne/Renaison, France','country_id' => '72'),\narray('id' => '4124','name' => '(NCY) - Annecy-Haute-Savoie-Mont Blanc Airport, Annecy/Meythet, France','country_id' => '72'),\narray('id' => '4125','name' => '(XMK) - MontAlimar - AncAne Airport, Annecy, France','country_id' => '72'),\narray('id' => '4126','name' => '(GNB) - Grenoble-IsAre Airport, Grenoble/Saint-Geoirs, France','country_id' => '72'),\narray('id' => '4127','name' => '(MCU) - MontluAon-DomArat Airport, MontluAon/DomArat, France','country_id' => '72'),\narray('id' => '4128','name' => '(VAF) - Valence-Chabeuil Airport, Valence/Chabeuil, France','country_id' => '72'),\narray('id' => '4129','name' => '(VHY) - Vichy-Charmeil Airport, Vichy/Charmeil, France','country_id' => '72'),\narray('id' => '4130','name' => '(AUR) - Aurillac Airport, Aurillac, France','country_id' => '72'),\narray('id' => '4131','name' => '(CHR) - ChAteauroux-DAols \"Marcel Dassault\" Airport, ChAteauroux/DAols, France','country_id' => '72'),\narray('id' => '4132','name' => '(LYN) - Lyon-Bron Airport, Lyon/Bron, France','country_id' => '72'),\narray('id' => '4133','name' => '(CEQ) - Cannes-Mandelieu Airport, Cannes/Mandelieu, France','country_id' => '72'),\narray('id' => '4134','name' => '(EBU) - Saint-Atienne-BouthAon Airport, Saint-Atienne/BouthAon, France','country_id' => '72'),\narray('id' => '4135','name' => '(QIE) - Istres Le TubA/Istres Air Base (BA 125) Airport, Istres/Le TubA, France','country_id' => '72'),\narray('id' => '4136','name' => '(CCF) - Carcassonne Airport, Carcassonne/Salvaza, France','country_id' => '72'),\narray('id' => '4137','name' => '(MRS) - Marseille Provence Airport, Marseille, France','country_id' => '72'),\narray('id' => '4138','name' => '(NCE) - Nice-CAte d\\'Azur Airport, Nice, France','country_id' => '72'),\narray('id' => '4139','name' => '(XOG) - Orange-Caritat (BA 115) Air Base, Orange/Caritat, France','country_id' => '72'),\narray('id' => '4140','name' => '(PGF) - Perpignan-Rivesaltes (LlabanAre) Airport, Perpignan/Rivesaltes, France','country_id' => '72'),\narray('id' => '4141','name' => '(CTT) - Le Castellet Airport, Le Castellet, France','country_id' => '72'),\narray('id' => '4142','name' => '(BAE) - Barcelonnette - Saint-Pons Airport, Le Castellet, France','country_id' => '72'),\narray('id' => '4143','name' => '(XAS) - AlAs-Deaux Airport, AlAs/Deaux, France','country_id' => '72'),\narray('id' => '4144','name' => '(MPL) - Montpellier-MAditerranAe Airport, Montpellier/MAditerranAe, France','country_id' => '72'),\narray('id' => '4145','name' => '(BZR) - BAziers-Vias Airport, BAziers/Vias, France','country_id' => '72'),\narray('id' => '4146','name' => '(AVN) - Avignon-Caumont Airport, Avignon/Caumont, France','country_id' => '72'),\narray('id' => '4147','name' => '(GAT) - Gap - Tallard Airport, Avignon, France','country_id' => '72'),\narray('id' => '4148','name' => '(MEN) - Mende-Brenoux Airport, Mende/BrAnoux, France','country_id' => '72'),\narray('id' => '4149','name' => '(SCP) - Mont-Dauphin - St-CrApin Airport, Mende, France','country_id' => '72'),\narray('id' => '4150','name' => '(BVA) - Paris Beauvais TillA Airport, Beauvais/TillA, France','country_id' => '72'),\narray('id' => '4151','name' => '(XSU) - Saumur-Saint-Florent Airport, Saumur/Saint-Florent, France','country_id' => '72'),\narray('id' => '4152','name' => '(EVX) - Avreux-Fauville (BA 105) Air Base, Avreux/Fauville, France','country_id' => '72'),\narray('id' => '4153','name' => '(XAN) - AlenAon Valframbert Airport, Evreux, France','country_id' => '72'),\narray('id' => '4154','name' => '(LEH) - Le Havre Octeville Airport, Le Havre/Octeville, France','country_id' => '72'),\narray('id' => '4155','name' => '(XAB) - Abbeville, Abbeville, France','country_id' => '72'),\narray('id' => '4156','name' => '(ORE) - OrlAans-Bricy (BA 123) Air Base, OrlAans/Bricy, France','country_id' => '72'),\narray('id' => '4157','name' => '(XCR) - ChAlons-Vatry Air Base, ChAlons/Vatry, France','country_id' => '72'),\narray('id' => '4158','name' => '(LSO) - Les Sables-d\\'Olonne Talmont Airport, Les Sables-d\\'Olonne, France','country_id' => '72'),\narray('id' => '4159','name' => '(URO) - Rouen Airport, Rouen/VallAe de Seine, France','country_id' => '72'),\narray('id' => '4160','name' => '(XBQ) - Blois-Le Breuil Airport, Blois/Le Breuil, France','country_id' => '72'),\narray('id' => '4161','name' => '(QTJ) - Chartres a\" MAtropole Airport, Chartres / Champhol, France','country_id' => '72'),\narray('id' => '4162','name' => '(TUF) - Tours-Val-de-Loire Airport, Tours/Val de Loire (Loire Valley), France','country_id' => '72'),\narray('id' => '4163','name' => '(CET) - Cholet Le Pontreau Airport, Cholet/Le Pontreau, France','country_id' => '72'),\narray('id' => '4164','name' => '(LVA) - Laval-Entrammes Airport, Laval/Entrammes, France','country_id' => '72'),\narray('id' => '4165','name' => '(LBG) - Paris-Le Bourget Airport, Paris, France','country_id' => '72'),\narray('id' => '4166','name' => '(CSF) - Creil Air Base, Creil, France','country_id' => '72'),\narray('id' => '4167','name' => '(XBX) - Bernay a\" St Martin Airport, Creil, France','country_id' => '72'),\narray('id' => '4168','name' => '(CDG) - Charles de Gaulle International Airport, Paris, France','country_id' => '72'),\narray('id' => '4169','name' => '(TNF) - Toussus-le-Noble Airport, Toussus-le-Noble, France','country_id' => '72'),\narray('id' => '4170','name' => '(ORY) - Paris-Orly Airport, Paris, France','country_id' => '72'),\narray('id' => '4171','name' => '(POX) - Pontoise - Cormeilles-en-Vexin Airport, Cormeilles-en-Vexin, France','country_id' => '72'),\narray('id' => '4172','name' => '(VIY) - Villacoublay-VAlizy (BA 107) Air Base, Villacoublay/VAlizy, France','country_id' => '72'),\narray('id' => '4173','name' => '(LFQ) - Linfen Qiaoli Airport, Linfen, China','country_id' => '45'),\narray('id' => '4174','name' => '(QYR) - Troyes-Barberey Airport, Troyes/Barberey, France','country_id' => '72'),\narray('id' => '4175','name' => '(NVS) - Nevers-Fourchambault Airport, Nevers/Fourchambault, France','country_id' => '72'),\narray('id' => '4176','name' => '(XCB) - Cambrai-Apinoy (BA 103) Air Base, Cambrai/Apinoy, France','country_id' => '72'),\narray('id' => '4177','name' => '(XME) - Maubeuge-Alesmes Airport, Maubeuge/Alesmes, France','country_id' => '72'),\narray('id' => '4178','name' => '(GBQ) - BesanAon-La VAze Airport, BesanAon/La VAze, France','country_id' => '72'),\narray('id' => '4179','name' => '(LIL) - Lille-Lesquin Airport, Lille/Lesquin, France','country_id' => '72'),\narray('id' => '4180','name' => '(HZB) - Merville-Calonne Airport, Merville/Calonne, France','country_id' => '72'),\narray('id' => '4181','name' => '(XCZ) - Charleville-MAziAres Airport, Charleville-MAziAres, France','country_id' => '72'),\narray('id' => '4182','name' => '(XVO) - Vesoul-Frotey Airport, Vesoul/Frotey, France','country_id' => '72'),\narray('id' => '4183','name' => '(BES) - Brest Bretagne Airport, Brest/Guipavas, France','country_id' => '72'),\narray('id' => '4184','name' => '(CER) - Cherbourg-Maupertus Airport, Cherbourg/Maupertus, France','country_id' => '72'),\narray('id' => '4185','name' => '(DNR) - Dinard-Pleurtuit-Saint-Malo Airport, Dinard/Pleurtuit/Saint-Malo, France','country_id' => '72'),\narray('id' => '4186','name' => '(LBY) - La Baule-Escoublac Airport, La Baule-Escoublac, France','country_id' => '72'),\narray('id' => '4187','name' => '(GFR) - Granville Airport, Granville, France','country_id' => '72'),\narray('id' => '4188','name' => '(DOL) - Deauville-Saint-Gatien Airport, Deauville, France','country_id' => '72'),\narray('id' => '4189','name' => '(LRT) - Lorient South Brittany (Bretagne Sud) Airport, Lorient/Lann/BihouA, France','country_id' => '72'),\narray('id' => '4190','name' => '(EDM) - La Roche-sur-Yon Airport, La Roche-sur-Yon/Les Ajoncs, France','country_id' => '72'),\narray('id' => '4191','name' => '(LDV) - Landivisiau Air Base, Landivisiau, France','country_id' => '72'),\narray('id' => '4192','name' => '(CFR) - Caen-Carpiquet Airport, Caen/Carpiquet, France','country_id' => '72'),\narray('id' => '4193','name' => '(LME) - Le Mans-Arnage Airport, Le Mans/Arnage, France','country_id' => '72'),\narray('id' => '4194','name' => '(RNS) - Rennes-Saint-Jacques Airport, Rennes/Saint-Jacques, France','country_id' => '72'),\narray('id' => '4195','name' => '(LAI) - Lannion-CAte de Granit Airport, Lannion, France','country_id' => '72'),\narray('id' => '4196','name' => '(UIP) - Quimper-Cornouaille Airport, Quimper/Pluguffan, France','country_id' => '72'),\narray('id' => '4197','name' => '(NTE) - Nantes Atlantique Airport, Nantes, France','country_id' => '72'),\narray('id' => '4198','name' => '(SBK) - Saint-Brieuc-Armor Airport, Saint-Brieuc/Armor, France','country_id' => '72'),\narray('id' => '4199','name' => '(MXN) - Morlaix-Ploujean Airport, Morlaix/Ploujean, France','country_id' => '72'),\narray('id' => '4200','name' => '(VNE) - Vannes-Meucon Airport, Vannes/Meucon, France','country_id' => '72'),\narray('id' => '4201','name' => '(SNR) - Saint-Nazaire-Montoir Airport, Saint-Nazaire/Montoir, France','country_id' => '72'),\narray('id' => '4202','name' => '(BSL) - EuroAirport Basel-Mulhouse-Freiburg Airport, BAle/Mulhouse, France','country_id' => '72'),\narray('id' => '4203','name' => '(DIJ) - Dijon-Bourgogne Airport, Dijon/Longvic, France','country_id' => '72'),\narray('id' => '4204','name' => '(MZM) - Metz-Frescaty (BA 128) Air Base, Metz/Frescaty, France','country_id' => '72'),\narray('id' => '4205','name' => '(EPL) - Apinal-Mirecourt Airport, Apinal/Mirecourt, France','country_id' => '72'),\narray('id' => '4206','name' => '(XMF) - MontbAliard-Courcelles Airport, MontbAliard/Courcelles, France','country_id' => '72'),\narray('id' => '4207','name' => '(ENC) - Nancy-Essey Airport, Nancy/Essey, France','country_id' => '72'),\narray('id' => '4208','name' => '(RHE) - Reims-Champagne (BA 112) Airport, Reims/Champagne, France','country_id' => '72'),\narray('id' => '4209','name' => '(SXB) - Strasbourg Airport, Strasbourg, France','country_id' => '72'),\narray('id' => '4210','name' => '(VTL) - Vittel Champ De Course Airport, Luxeuil, France','country_id' => '72'),\narray('id' => '4211','name' => '(TLN) - Toulon-HyAres Airport, Toulon/HyAres/Le Palyvestre, France','country_id' => '72'),\narray('id' => '4212','name' => '(FNI) - NAmes-Arles-Camargue Airport, NAmes/Garons, France','country_id' => '72'),\narray('id' => '4213','name' => '(LTT) - La MAle Airport, La MAle, France','country_id' => '72'),\narray('id' => '4214','name' => '(MQC) - Miquelon Airport, Miquelon, Saint Pierre and Miquelon','country_id' => '176'),\narray('id' => '4215','name' => '(FSP) - St Pierre Airport, Saint-Pierre, Saint Pierre and Miquelon','country_id' => '176'),\narray('id' => '4216','name' => '(PYR) - Andravida Airport, Andravida, Greece','country_id' => '86'),\narray('id' => '4217','name' => '(AXD) - Dimokritos Airport, Alexandroupolis, Greece','country_id' => '86'),\narray('id' => '4218','name' => '(HEW) - Athen Helenikon Airport, Athens, Greece','country_id' => '86'),\narray('id' => '4219','name' => '(ATH) - Eleftherios Venizelos International Airport, Athens, Greece','country_id' => '86'),\narray('id' => '4220','name' => '(VOL) - Nea Anchialos Airport, Nea Anchialos, Greece','country_id' => '86'),\narray('id' => '4221','name' => '(LGE) - Mulan Airport, Lake Gregory, Australia','country_id' => '12'),\narray('id' => '4222','name' => '(JKH) - Chios Island National Airport, Chios Island, Greece','country_id' => '86'),\narray('id' => '4223','name' => '(PKH) - Porto Cheli Airport, Porto Cheli, Greece','country_id' => '86'),\narray('id' => '4224','name' => '(JIK) - Ikaria Airport, Ikaria Island, Greece','country_id' => '86'),\narray('id' => '4225','name' => '(IOA) - Ioannina Airport, Ioannina, Greece','country_id' => '86'),\narray('id' => '4226','name' => '(HER) - Heraklion International Nikos Kazantzakis Airport, Heraklion, Greece','country_id' => '86'),\narray('id' => '4227','name' => '(KSO) - Kastoria National Airport, Kastoria, Greece','country_id' => '86'),\narray('id' => '4228','name' => '(KIT) - Kithira Airport, Kithira Island, Greece','country_id' => '86'),\narray('id' => '4229','name' => '(EFL) - Kefallinia Airport, Kefallinia Island, Greece','country_id' => '86'),\narray('id' => '4230','name' => '(KZS) - Kastelorizo Airport, Kastelorizo Island, Greece','country_id' => '86'),\narray('id' => '4231','name' => '(KLX) - Kalamata Airport, Kalamata, Greece','country_id' => '86'),\narray('id' => '4232','name' => '(KGS) - Kos Airport, Kos Island, Greece','country_id' => '86'),\narray('id' => '4233','name' => '(AOK) - Karpathos Airport, Karpathos Island, Greece','country_id' => '86'),\narray('id' => '4234','name' => '(CFU) - Ioannis Kapodistrias International Airport, Kerkyra Island, Greece','country_id' => '86'),\narray('id' => '4235','name' => '(KSJ) - Kasos Airport, Kasos Island, Greece','country_id' => '86'),\narray('id' => '4236','name' => '(KVA) - Alexander the Great International Airport, Kavala, Greece','country_id' => '86'),\narray('id' => '4237','name' => '(JKL) - Kalymnos Airport, Kalymnos Island, Greece','country_id' => '86'),\narray('id' => '4238','name' => '(KZI) - Filippos Airport, Kozani, Greece','country_id' => '86'),\narray('id' => '4239','name' => '(LRS) - Leros Airport, Leros Island, Greece','country_id' => '86'),\narray('id' => '4240','name' => '(LXS) - Limnos Airport, Limnos Island, Greece','country_id' => '86'),\narray('id' => '4241','name' => '(LRA) - Larisa Airport, Larisa, Greece','country_id' => '86'),\narray('id' => '4242','name' => '(JMK) - Mikonos Airport, Mykonos Island, Greece','country_id' => '86'),\narray('id' => '4243','name' => '(MLO) - Milos Airport, Milos Island, Greece','country_id' => '86'),\narray('id' => '4244','name' => '(MJT) - Mytilene International Airport, Mytilene, Greece','country_id' => '86'),\narray('id' => '4245','name' => '(LGN) - Linga Linga Airport, Linga Linga, Papua New Guinea','country_id' => '172'),\narray('id' => '4246','name' => '(JNX) - Naxos Airport, Naxos Island, Greece','country_id' => '86'),\narray('id' => '4247','name' => '(PAS) - Paros Airport, Paros Island, Greece','country_id' => '86'),\narray('id' => '4248','name' => '(JTY) - Astypalaia Airport, Astypalaia Island, Greece','country_id' => '86'),\narray('id' => '4249','name' => '(PVK) - Aktion National Airport, Preveza/Lefkada, Greece','country_id' => '86'),\narray('id' => '4250','name' => '(RHO) - Diagoras Airport, Rodes Island, Greece','country_id' => '86'),\narray('id' => '4251','name' => '(GPA) - Araxos Airport, Patras, Greece','country_id' => '86'),\narray('id' => '4252','name' => '(CHQ) - Chania International Airport, Souda, Greece','country_id' => '86'),\narray('id' => '4253','name' => '(JSI) - Skiathos Island National Airport, Skiathos, Greece','country_id' => '86'),\narray('id' => '4254','name' => '(SMI) - Samos Airport, Samos Island, Greece','country_id' => '86'),\narray('id' => '4255','name' => '(JSY) - Syros Airport, Syros Island, Greece','country_id' => '86'),\narray('id' => '4256','name' => '(SPJ) - Sparti Airport, Sparti, Greece','country_id' => '86'),\narray('id' => '4257','name' => '(JTR) - Santorini Airport, Santorini Island, Greece','country_id' => '86'),\narray('id' => '4258','name' => '(JSH) - Sitia Airport, Crete Island, Greece','country_id' => '86'),\narray('id' => '4259','name' => '(SKU) - Skiros Airport, Skiros Island, Greece','country_id' => '86'),\narray('id' => '4260','name' => '(SKG) - Thessaloniki Macedonia International Airport, Thessaloniki, Greece','country_id' => '86'),\narray('id' => '4261','name' => '(ZTH) - Dionysios Solomos Airport, Zakynthos Island, Greece','country_id' => '86'),\narray('id' => '4262','name' => '(BUD) - Budapest Ferenc Liszt International Airport, Budapest, Hungary','country_id' => '96'),\narray('id' => '4263','name' => '(DEB) - Debrecen International Airport, Debrecen, Hungary','country_id' => '96'),\narray('id' => '4264','name' => '(MCQ) - Miskolc Airport, Miskolc, Hungary','country_id' => '96'),\narray('id' => '4265','name' => '(PEV) - PAcs-PogAny Airport, PAcs-PogAny, Hungary','country_id' => '96'),\narray('id' => '4266','name' => '(QGY) - Gy\\'r-PAr International Airport, Gy\\'r, Hungary','country_id' => '96'),\narray('id' => '4267','name' => '(SOB) - SArmellAk International Airport, SArmellAk, Hungary','country_id' => '96'),\narray('id' => '4268','name' => '(TZR) - TaszAr Air Base, TaszAr, Hungary','country_id' => '96'),\narray('id' => '4269','name' => '(QZD) - Szeged Glider Airport, Szeged, Hungary','country_id' => '96'),\narray('id' => '4270','name' => '(QAQ) - L\\'Aquilaa\"Preturo Airport, L\\'Aquila, Italy','country_id' => '106'),\narray('id' => '4271','name' => '(CRV) - Crotone Airport, Crotone, Italy','country_id' => '106'),\narray('id' => '4272','name' => '(BRI) - Bari Karol Wojty\\'a Airport, Bari, Italy','country_id' => '106'),\narray('id' => '4273','name' => '(FOG) - Foggia \"Gino Lisa\" Airport, Foggia, Italy','country_id' => '106'),\narray('id' => '4274','name' => '(TAR) - Taranto-Grottaglie \"Marcello Arlotta\" Airport, Grottaglie, Italy','country_id' => '106'),\narray('id' => '4275','name' => '(LCC) - Lecce Galatina Air Base, , Italy','country_id' => '106'),\narray('id' => '4276','name' => '(PSR) - Pescara International Airport, Pescara, Italy','country_id' => '106'),\narray('id' => '4277','name' => '(BDS) - Brindisi a\" Salento Airport, Brindisi, Italy','country_id' => '106'),\narray('id' => '4278','name' => '(SUF) - Lamezia Terme Airport, Lamezia Terme (CZ), Italy','country_id' => '106'),\narray('id' => '4279','name' => '(CIY) - Comiso Airport, Comiso, Italy','country_id' => '106'),\narray('id' => '4280','name' => '(CTA) - Catania-Fontanarossa Airport, Catania, Italy','country_id' => '106'),\narray('id' => '4281','name' => '(LMP) - Lampedusa Airport, Lampedusa, Italy','country_id' => '106'),\narray('id' => '4282','name' => '(PNL) - Pantelleria Airport, Pantelleria, Italy','country_id' => '106'),\narray('id' => '4283','name' => '(PMO) - Falconea\"Borsellino Airport, Palermo, Italy','country_id' => '106'),\narray('id' => '4284','name' => '(REG) - Reggio Calabria Airport, Reggio Calabria, Italy','country_id' => '106'),\narray('id' => '4285','name' => '(TPS) - Vincenzo Florio Airport Trapani-Birgi, Trapani, Italy','country_id' => '106'),\narray('id' => '4286','name' => '(NSY) - Sigonella Airport, , Italy','country_id' => '106'),\narray('id' => '4287','name' => '(BLX) - Belluno Airport, Belluno, Italy','country_id' => '106'),\narray('id' => '4288','name' => '(RAN) - Ravenna Airport, Ravenna, Italy','country_id' => '106'),\narray('id' => '4289','name' => '(ZIA) - Trento-Mattarello Airport, Trento, Italy','country_id' => '106'),\narray('id' => '4290','name' => '(AHO) - Alghero-Fertilia Airport, Alghero, Italy','country_id' => '106'),\narray('id' => '4291','name' => '(DCI) - Decimomannu Air Base, Decimomannu, Italy','country_id' => '106'),\narray('id' => '4292','name' => '(CAG) - Cagliari Elmas Airport, Cagliari, Italy','country_id' => '106'),\narray('id' => '4293','name' => '(OLB) - Olbia Costa Smeralda Airport, Olbia, Italy','country_id' => '106'),\narray('id' => '4294','name' => '(FNU) - Oristano-Fenosu Airport, Oristano, Italy','country_id' => '106'),\narray('id' => '4295','name' => '(TTB) - TortolA Airport, Arbatax, Italy','country_id' => '106'),\narray('id' => '4296','name' => '(QVA) - Varese-Venegono Airport, Varese, Italy','country_id' => '106'),\narray('id' => '4297','name' => '(QMM) - Massa Cinquale Airport, Marina Di Massa (MS), Italy','country_id' => '106'),\narray('id' => '4298','name' => '(MXP) - Malpensa International Airport, Milan, Italy','country_id' => '106'),\narray('id' => '4299','name' => '(BGY) - Il Caravaggio International Airport, Bergamo, Italy','country_id' => '106'),\narray('id' => '4300','name' => '(TRN) - Turin Airport, Torino, Italy','country_id' => '106'),\narray('id' => '4301','name' => '(ALL) - Villanova D\\'Albenga International Airport, Albenga, Italy','country_id' => '106'),\narray('id' => '4302','name' => '(GOA) - Genoa Cristoforo Colombo Airport, Genova, Italy','country_id' => '106'),\narray('id' => '4303','name' => '(LIN) - Linate Airport, Milan, Italy','country_id' => '106'),\narray('id' => '4304','name' => '(PMF) - Parma Airport, Parma, Italy','country_id' => '106'),\narray('id' => '4305','name' => '(QPZ) - Piacenza San Damiano Air Base, Piacenza, Italy','country_id' => '106'),\narray('id' => '4306','name' => '(AOT) - Aosta Airport, Aosta, Italy','country_id' => '106'),\narray('id' => '4307','name' => '(CUF) - Cuneo International Airport, Cuneo, Italy','country_id' => '106'),\narray('id' => '4308','name' => '(AVB) - Aviano Air Base, Aviano, Italy','country_id' => '106'),\narray('id' => '4309','name' => '(BZO) - Bolzano Airport, Bolzano, Italy','country_id' => '106'),\narray('id' => '4310','name' => '(UDN) - Udine-Campoformido Air Base, Udine, Italy','country_id' => '106'),\narray('id' => '4311','name' => '(BLQ) - Bologna Guglielmo Marconi Airport, Bologna, Italy','country_id' => '106'),\narray('id' => '4312','name' => '(TSF) - Treviso-Sant\\'Angelo Airport, Treviso, Italy','country_id' => '106'),\narray('id' => '4313','name' => '(FRL) - ForlA Airport, ForlA (FC), Italy','country_id' => '106'),\narray('id' => '4314','name' => '(VBS) - Brescia Airport, Montichiari, Italy','country_id' => '106'),\narray('id' => '4315','name' => '(TRS) - Triestea\"Friuli Venezia Giulia Airport, Trieste, Italy','country_id' => '106'),\narray('id' => '4316','name' => '(RMI) - Federico Fellini International Airport, Rimini, Italy','country_id' => '106'),\narray('id' => '4317','name' => '(QPA) - Padova Airport, Padova, Italy','country_id' => '106'),\narray('id' => '4318','name' => '(VRN) - Verona Villafranca Airport, Verona, Italy','country_id' => '106'),\narray('id' => '4319','name' => '(AOI) - Ancona Falconara Airport, Ancona, Italy','country_id' => '106'),\narray('id' => '4320','name' => '(VCE) - Venice Marco Polo Airport, Venice, Italy','country_id' => '106'),\narray('id' => '4321','name' => '(QZO) - Arezzo Airport, Arezzo, Italy','country_id' => '106'),\narray('id' => '4322','name' => '(LCV) - Lucca-Tassignano Airport, Lucca, Italy','country_id' => '106'),\narray('id' => '4323','name' => '(QRT) - Rieti Airport, Rieti, Italy','country_id' => '106'),\narray('id' => '4324','name' => '(SAY) - Siena-Ampugnano Airport, Siena, Italy','country_id' => '106'),\narray('id' => '4325','name' => '(QLP) - Sarzana-Luni Air Base, Sarzana (SP), Italy','country_id' => '106'),\narray('id' => '4326','name' => '(CIA) - Ciampinoa\"G. B. Pastine International Airport, Roma, Italy','country_id' => '106'),\narray('id' => '4327','name' => '(QLY) - Pratica Di Mare Air Base, Pomezia, Italy','country_id' => '106'),\narray('id' => '4328','name' => '(FCO) - Leonardo da Vincia\"Fiumicino Airport, Rome, Italy','country_id' => '106'),\narray('id' => '4329','name' => '(QFR) - Frosinone Military Airport, Frosinone, Italy','country_id' => '106'),\narray('id' => '4330','name' => '(QSR) - Salerno Costa d\\'Amalfi Airport, Salerno, Italy','country_id' => '106'),\narray('id' => '4331','name' => '(EBA) - Marina Di Campo Airport, Marina Di Campo, Italy','country_id' => '106'),\narray('id' => '4332','name' => '(QLT) - Latina Airport, Latina, Italy','country_id' => '106'),\narray('id' => '4333','name' => '(NAP) - Naples International Airport, NApoli, Italy','country_id' => '106'),\narray('id' => '4334','name' => '(PSA) - Pisa International Airport, Pisa, Italy','country_id' => '106'),\narray('id' => '4335','name' => '(FLR) - Peretola Airport, Firenze, Italy','country_id' => '106'),\narray('id' => '4336','name' => '(GRS) - Grosseto Air Base, Grosetto, Italy','country_id' => '106'),\narray('id' => '4337','name' => '(PEG) - Perugia San Francesco d\\'Assisi a\" Umbria International Airport, Perugia, Italy','country_id' => '106'),\narray('id' => '4338','name' => '(LJU) - Ljubljana Joe PuAnik Airport, Ljubljana, Slovenia','country_id' => '196'),\narray('id' => '4339','name' => '(MBX) - Maribor Airport, , Slovenia','country_id' => '196'),\narray('id' => '4340','name' => '(POW) - Portoroz Airport, Portoroz, Slovenia','country_id' => '196'),\narray('id' => '4341','name' => '(LKC) - Lekana Airport, Lekana, Congo (Brazzaville)','country_id' => '39'),\narray('id' => '4342','name' => '(UHE) - Kunovice Airport, UherskA HraditA\\', Czechia','country_id' => '53'),\narray('id' => '4343','name' => '(KLV) - Karlovy Vary International Airport, Karlovy Vary, Czechia','country_id' => '53'),\narray('id' => '4344','name' => '(MKA) - MariAnskA LAznA\\' Airport, MariAnskA LAznA\\', Czechia','country_id' => '53'),\narray('id' => '4345','name' => '(OSR) - Ostrava Leos JanAAek Airport, Ostrava, Czechia','country_id' => '53'),\narray('id' => '4346','name' => '(OLO) - Olomouc-NeedAn Airport, Olomouc, Czechia','country_id' => '53'),\narray('id' => '4347','name' => '(PED) - Pardubice Airport, Pardubice, Czechia','country_id' => '53'),\narray('id' => '4348','name' => '(PRV) - Perov Air Base, Perov, Czechia','country_id' => '53'),\narray('id' => '4349','name' => '(PRG) - VAclav Havel Airport Prague, Prague, Czechia','country_id' => '53'),\narray('id' => '4350','name' => '(BRQ) - Brno-Tuany Airport, Brno, Czechia','country_id' => '53'),\narray('id' => '4351','name' => '(VOD) - Vodochody Airport, Vodochoky, Czechia','country_id' => '53'),\narray('id' => '4352','name' => '(ZBE) - Zabreh Ostrava Airport, Zabreh, Czechia','country_id' => '53'),\narray('id' => '4353','name' => '(TLV) - Ben Gurion International Airport, Tel Aviv, Israel','country_id' => '99'),\narray('id' => '4354','name' => '(BEV) - Beersheba (Teyman) Airport, Beersheba, Israel','country_id' => '99'),\narray('id' => '4355','name' => '(ETH) - Eilat Airport, Eilat, Israel','country_id' => '99'),\narray('id' => '4356','name' => '(EIY) - Ein Yahav Airfield, Sapir, Israel','country_id' => '99'),\narray('id' => '4357','name' => '(LLH) - Reginaldo Hammer Airport, La Lima, Honduras','country_id' => '93'),\narray('id' => '4358','name' => '(HFA) - Haifa International Airport, Haifa, Israel','country_id' => '99'),\narray('id' => '4359','name' => '(RPN) - Ben Ya\\'akov Airport, Rosh Pina, Israel','country_id' => '99'),\narray('id' => '4360','name' => '(KSW) - Kiryat Shmona Airport, Kiryat Shmona, Israel','country_id' => '99'),\narray('id' => '4361','name' => '(LLL) - Lissadell Airport, Lissadell Station, Australia','country_id' => '12'),\narray('id' => '4362','name' => '(MTZ) - Bar Yehuda Airfield, Masada, Israel','country_id' => '99'),\narray('id' => '4363','name' => '(VTM) - Nevatim Air Base, Beersheba, Israel','country_id' => '99'),\narray('id' => '4364','name' => '(VDA) - Ovda International Airport, Eilat, Israel','country_id' => '99'),\narray('id' => '4365','name' => '(MIP) - Ramon Air Base, Beersheba, Israel','country_id' => '99'),\narray('id' => '4366','name' => '(SDV) - Sde Dov Airport, Tel Aviv, Israel','country_id' => '99'),\narray('id' => '4367','name' => '(YOT) - Yotvata Airfield, Yotvata, Israel','country_id' => '99'),\narray('id' => '4368','name' => '(YOT) - Yotvata Airfield, Yotvata, Israel','country_id' => '99'),\narray('id' => '4369','name' => '(LMC) - La Macarena Airport, La Macarena, Colombia','country_id' => '46'),\narray('id' => '4370','name' => '(MLA) - Malta International Airport, Luqa, Malta','country_id' => '149'),\narray('id' => '4371','name' => '(LMZ) - Palma Airport, Palma, Mozambique','country_id' => '155'),\narray('id' => '4372','name' => '(LNC) - Lengbati Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '4373','name' => '(LNF) - Munbil Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '4374','name' => '(LNM) - Langimar Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '4375','name' => '(HOH) - Hohenems-Dornbirn Airport, Hohenems / Dornbirn, Austria','country_id' => '11'),\narray('id' => '4376','name' => '(LOM) - Francisco Primo de Verdad y Ramos Airport, Lagos de Moreno, Mexico','country_id' => '153'),\narray('id' => '4377','name' => '(GRZ) - Graz Airport, Graz, Austria','country_id' => '11'),\narray('id' => '4378','name' => '(INN) - Innsbruck Airport, Innsbruck, Austria','country_id' => '11'),\narray('id' => '4379','name' => '(KLU) - Klagenfurt Airport, Klagenfurt am WArthersee, Austria','country_id' => '11'),\narray('id' => '4380','name' => '(LNZ) - Linz Airport, Linz, Austria','country_id' => '11'),\narray('id' => '4381','name' => '(SZG) - Salzburg Airport, Salzburg, Austria','country_id' => '11'),\narray('id' => '4382','name' => '(VIE) - Vienna International Airport, Vienna, Austria','country_id' => '11'),\narray('id' => '4383','name' => '(AVR) - Alverca Airport, Vila Franca de Xira, Portugal','country_id' => '180'),\narray('id' => '4384','name' => '(SMA) - Santa Maria Airport, Vila do Porto, Portugal','country_id' => '180'),\narray('id' => '4385','name' => '(BGC) - BraganAa Airport, BraganAa, Portugal','country_id' => '180'),\narray('id' => '4386','name' => '(BYJ) - Beja International Airport, Beja, Portugal','country_id' => '180'),\narray('id' => '4387','name' => '(BGZ) - Braga Municipal Aerodrome, Braga, Portugal','country_id' => '180'),\narray('id' => '4388','name' => '(CHV) - Chaves Airport, Chaves, Portugal','country_id' => '180'),\narray('id' => '4389','name' => '(CBP) - Coimbra Airport, , Portugal','country_id' => '180'),\narray('id' => '4390','name' => '(CVU) - Corvo Airport, Corvo, Portugal','country_id' => '180'),\narray('id' => '4391','name' => '(FLW) - Flores Airport, Santa Cruz das Flores, Portugal','country_id' => '180'),\narray('id' => '4392','name' => '(FAO) - Faro Airport, Faro, Portugal','country_id' => '180'),\narray('id' => '4393','name' => '(GRW) - Graciosa Airport, Santa Cruz da Graciosa, Portugal','country_id' => '180'),\narray('id' => '4394','name' => '(HOR) - Horta Airport, Horta, Portugal','country_id' => '180'),\narray('id' => '4395','name' => '(TER) - Lajes Field, Lajes, Portugal','country_id' => '180'),\narray('id' => '4396','name' => '(FNC) - Madeira Airport, Funchal, Portugal','country_id' => '180'),\narray('id' => '4397','name' => '(PDL) - JoAo Paulo II Airport, Ponta Delgada, Portugal','country_id' => '180'),\narray('id' => '4398','name' => '(PIX) - Pico Airport, Pico Island, Portugal','country_id' => '180'),\narray('id' => '4399','name' => '(PRM) - PortimAo Airport, PortimAo, Portugal','country_id' => '180'),\narray('id' => '4400','name' => '(OPO) - Francisco de SA Carneiro Airport, Porto, Portugal','country_id' => '180'),\narray('id' => '4401','name' => '(PXO) - Porto Santo Airport, Vila Baleira, Portugal','country_id' => '180'),\narray('id' => '4402','name' => '(LIS) - Lisbon Portela Airport, Lisbon, Portugal','country_id' => '180'),\narray('id' => '4403','name' => '(SIE) - Sines Airport, , Portugal','country_id' => '180'),\narray('id' => '4404','name' => '(SJZ) - SAo Jorge Airport, Velas, Portugal','country_id' => '180'),\narray('id' => '4405','name' => '(VRL) - Vila Real Airport, , Portugal','country_id' => '180'),\narray('id' => '4406','name' => '(VSE) - Viseu Airport, , Portugal','country_id' => '180'),\narray('id' => '4407','name' => '(BNX) - Banja Luka International Airport, Banja Luka, Bosnia and Herzegovina','country_id' => '15'),\narray('id' => '4408','name' => '(OMO) - Mostar International Airport, Mostar, Bosnia and Herzegovina','country_id' => '15'),\narray('id' => '4409','name' => '(SJJ) - Sarajevo International Airport, Sarajevo, Bosnia and Herzegovina','country_id' => '15'),\narray('id' => '4410','name' => '(TZL) - Tuzla International Airport, Tuzla, Bosnia and Herzegovina','country_id' => '15'),\narray('id' => '4411','name' => '(ARW) - Arad International Airport, Arad, Romania','country_id' => '185'),\narray('id' => '4412','name' => '(BCM) - BacAu Airport, BacAu, Romania','country_id' => '185'),\narray('id' => '4413','name' => '(BAY) - Tautii Magheraus Airport, Baia Mare, Romania','country_id' => '185'),\narray('id' => '4414','name' => '(BBU) - BAneasa International Airport, Bucharest, Romania','country_id' => '185'),\narray('id' => '4415','name' => '(CND) - Mihail KogAlniceanu International Airport, Constana, Romania','country_id' => '185'),\narray('id' => '4416','name' => '(CLJ) - Cluj-Napoca International Airport, Cluj-Napoca, Romania','country_id' => '185'),\narray('id' => '4417','name' => '(CSB) - Caransebe Airport, Caransebe, Romania','country_id' => '185'),\narray('id' => '4418','name' => '(CRA) - Craiova Airport, Craiova, Romania','country_id' => '185'),\narray('id' => '4419','name' => '(IAS) - Iai Airport, Iai, Romania','country_id' => '185'),\narray('id' => '4420','name' => '(OMR) - Oradea International Airport, Oradea, Romania','country_id' => '185'),\narray('id' => '4421','name' => '(OTP) - Henri CoandA International Airport, Bucharest, Romania','country_id' => '185'),\narray('id' => '4422','name' => '(SBZ) - Sibiu International Airport, Sibiu, Romania','country_id' => '185'),\narray('id' => '4423','name' => '(SUJ) - Satu Mare Airport, Satu Mare, Romania','country_id' => '185'),\narray('id' => '4424','name' => '(SCV) - Suceava Stefan cel Mare Airport, Suceava, Romania','country_id' => '185'),\narray('id' => '4425','name' => '(TCE) - Tulcea Airport, Tulcea, Romania','country_id' => '185'),\narray('id' => '4426','name' => '(TGM) - Transilvania TArgu Mure International Airport, TArgu Mure, Romania','country_id' => '185'),\narray('id' => '4427','name' => '(TSR) - Timioara Traian Vuia Airport, Timioara, Romania','country_id' => '185'),\narray('id' => '4428','name' => '(GVA) - Geneva Cointrin International Airport, Geneva, Switzerland','country_id' => '40'),\narray('id' => '4429','name' => '(QLS) - Lausanne-BlAcherette Airport, Lausanne, Switzerland','country_id' => '40'),\narray('id' => '4430','name' => '(QNC) - Neuchatel Airport, , Switzerland','country_id' => '40'),\narray('id' => '4431','name' => '(SIR) - Sion Airport, Sion, Switzerland','country_id' => '40'),\narray('id' => '4432','name' => '(EML) - Emmen Air Base, , Switzerland','country_id' => '40'),\narray('id' => '4433','name' => '(LUG) - Lugano Airport, Lugano, Switzerland','country_id' => '40'),\narray('id' => '4434','name' => '(BRN) - Bern Belp Airport, Bern, Switzerland','country_id' => '40'),\narray('id' => '4435','name' => '(BXO) - Buochs Airport, Buochs, Switzerland','country_id' => '40'),\narray('id' => '4436','name' => '(ZHI) - Grenchen Airport, , Switzerland','country_id' => '40'),\narray('id' => '4437','name' => '(ZRH) - ZArich Airport, Zurich, Switzerland','country_id' => '40'),\narray('id' => '4438','name' => '(ZJI) - Locarno Airport, Locarno, Switzerland','country_id' => '40'),\narray('id' => '4439','name' => '(ACH) - St Gallen Altenrhein Airport, Altenrhein, Switzerland','country_id' => '40'),\narray('id' => '4440','name' => '(SMV) - Samedan Airport, , Switzerland','country_id' => '40'),\narray('id' => '4441','name' => '(GKD) - Imroz Airport, GAkAeada, Turkey','country_id' => '220'),\narray('id' => '4442','name' => '(ESB) - EsenboAa International Airport, Ankara, Turkey','country_id' => '220'),\narray('id' => '4443','name' => '(ANK) - Etimesgut Air Base, Ankara, Turkey','country_id' => '220'),\narray('id' => '4444','name' => '(ADA) - Adana Airport, Adana, Turkey','country_id' => '220'),\narray('id' => '4445','name' => '(UAB) - Ancirlik Air Base, Adana, Turkey','country_id' => '220'),\narray('id' => '4446','name' => '(AFY) - Afyon Airport, Afyonkarahisar, Turkey','country_id' => '220'),\narray('id' => '4447','name' => '(AYT) - Antalya International Airport, Antalya, Turkey','country_id' => '220'),\narray('id' => '4448','name' => '(GZT) - Gaziantep International Airport, Gaziantep, Turkey','country_id' => '220'),\narray('id' => '4449','name' => '(KFS) - Kastamonu Airport, Kastamonu, Turkey','country_id' => '220'),\narray('id' => '4450','name' => '(KYA) - Konya Airport, Konya, Turkey','country_id' => '220'),\narray('id' => '4451','name' => '(MLX) - Malatya Tulga Airport, Malatya, Turkey','country_id' => '220'),\narray('id' => '4452','name' => '(MZH) - Amasya Merzifon Airport, Amasya, Turkey','country_id' => '220'),\narray('id' => '4453','name' => '(SSX) - Samsun Samair Airport, Samsun, Turkey','country_id' => '220'),\narray('id' => '4454','name' => '(VAS) - Sivas Nuri DemiraA Airport, Sivas, Turkey','country_id' => '220'),\narray('id' => '4455','name' => '(ONQ) - Zonguldak Airport, Zonguldak, Turkey','country_id' => '220'),\narray('id' => '4456','name' => '(MLX) - Malatya ErhaA Airport, Malatya, Turkey','country_id' => '220'),\narray('id' => '4457','name' => '(ASR) - Kayseri Erkilet Airport, Kayseri, Turkey','country_id' => '220'),\narray('id' => '4458','name' => '(TJK) - Tokat Airport, Tokat, Turkey','country_id' => '220'),\narray('id' => '4459','name' => '(DNZ) - Aardak Airport, Denizli, Turkey','country_id' => '220'),\narray('id' => '4460','name' => '(NAV) - Nevehir Kapadokya Airport, Nevehir, Turkey','country_id' => '220'),\narray('id' => '4461','name' => '(IST) - AtatArk International Airport, Istanbul, Turkey','country_id' => '220'),\narray('id' => '4462','name' => '(CII) - AAldAr Airport, AydAn, Turkey','country_id' => '220'),\narray('id' => '4463','name' => '(BTZ) - Bursa Airport, Bursa, Turkey','country_id' => '220'),\narray('id' => '4464','name' => '(BZI) - BalAkesir Merkez Airport, , Turkey','country_id' => '220'),\narray('id' => '4465','name' => '(BDM) - BandArma Airport, , Turkey','country_id' => '220'),\narray('id' => '4466','name' => '(CKZ) - Aanakkale Airport, Aanakkale, Turkey','country_id' => '220'),\narray('id' => '4467','name' => '(ESK) - Eskiehir Air Base, , Turkey','country_id' => '220'),\narray('id' => '4468','name' => '(ADB) - Adnan Menderes International Airport, Azmir, Turkey','country_id' => '220'),\narray('id' => '4469','name' => '(IGL) - AiAli Airport, , Turkey','country_id' => '220'),\narray('id' => '4470','name' => '(USQ) - Uak Airport, Uak, Turkey','country_id' => '220'),\narray('id' => '4471','name' => '(KCO) - Cengiz Topel Airport, , Turkey','country_id' => '220'),\narray('id' => '4472','name' => '(YEI) - Bursa Yeniehir Airport, Bursa, Turkey','country_id' => '220'),\narray('id' => '4473','name' => '(DLM) - Dalaman International Airport, Dalaman, Turkey','country_id' => '220'),\narray('id' => '4474','name' => '(TEQ) - TekirdaA Aorlu Airport, Aorlu, Turkey','country_id' => '220'),\narray('id' => '4475','name' => '(BXN) - ImsAk Airport, , Turkey','country_id' => '220'),\narray('id' => '4476','name' => '(AOE) - Anadolu Airport, Eskiehir, Turkey','country_id' => '220'),\narray('id' => '4477','name' => '(EZS) - ElazAA Airport, ElazAA, Turkey','country_id' => '220'),\narray('id' => '4478','name' => '(DIY) - Diyarbakir Airport, Diyarbakir, Turkey','country_id' => '220'),\narray('id' => '4479','name' => '(ERC) - Erzincan Airport, Erzincan, Turkey','country_id' => '220'),\narray('id' => '4480','name' => '(ERZ) - Erzurum International Airport, Erzurum, Turkey','country_id' => '220'),\narray('id' => '4481','name' => '(KSY) - Kars Airport, Kars, Turkey','country_id' => '220'),\narray('id' => '4482','name' => '(TZX) - Trabzon International Airport, Trabzon, Turkey','country_id' => '220'),\narray('id' => '4483','name' => '(SFQ) - anlAurfa Airport, anlAurfa, Turkey','country_id' => '220'),\narray('id' => '4484','name' => '(VAN) - Van Ferit Melen Airport, Van, Turkey','country_id' => '220'),\narray('id' => '4485','name' => '(BAL) - Batman Airport, Batman, Turkey','country_id' => '220'),\narray('id' => '4486','name' => '(MSR) - Mu Airport, Mu, Turkey','country_id' => '220'),\narray('id' => '4487','name' => '(SXZ) - Siirt Airport, Siirt, Turkey','country_id' => '220'),\narray('id' => '4488','name' => '(NOP) - Sinop Airport, Sinop, Turkey','country_id' => '220'),\narray('id' => '4489','name' => '(KCM) - Kahramanmara Airport, Kahramanmara, Turkey','country_id' => '220'),\narray('id' => '4490','name' => '(AJI) - AArA Airport, , Turkey','country_id' => '220'),\narray('id' => '4491','name' => '(ADF) - AdAyaman Airport, AdAyaman, Turkey','country_id' => '220'),\narray('id' => '4492','name' => '(MQM) - Mardin Airport, Mardin, Turkey','country_id' => '220'),\narray('id' => '4493','name' => '(GNY) - anlAurfa GAP Airport, anlAurfa, Turkey','country_id' => '220'),\narray('id' => '4494','name' => '(NKT) - Arnak erafettin ElAi Airport, Arnak, Turkey','country_id' => '220'),\narray('id' => '4495','name' => '(YKO) - Hakkari YAksekova Airport, Hakkari, Turkey','country_id' => '220'),\narray('id' => '4496','name' => '(HTY) - Hatay Airport, Hatay, Turkey','country_id' => '220'),\narray('id' => '4497','name' => '(LTF) - Leitre Airport, Leitre, Papua New Guinea','country_id' => '172'),\narray('id' => '4498','name' => '(ISE) - SAleyman Demirel International Airport, Isparta, Turkey','country_id' => '220'),\narray('id' => '4499','name' => '(EDO) - BalAkesir KArfez Airport, Edremit, Turkey','country_id' => '220'),\narray('id' => '4500','name' => '(BJV) - Milas Bodrum International Airport, Bodrum, Turkey','country_id' => '220'),\narray('id' => '4501','name' => '(SZF) - Samsun Aaramba Airport, Samsun, Turkey','country_id' => '220'),\narray('id' => '4502','name' => '(SAW) - Sabiha GAkAen International Airport, Istanbul, Turkey','country_id' => '220'),\narray('id' => '4503','name' => '(GZP) - Gazipaa Airport, Gazipaa, Turkey','country_id' => '220'),\narray('id' => '4504','name' => '(LTN) - Luton, , United Kingdom','country_id' => '74'),\narray('id' => '4505','name' => '(BZY) - Balti International Airport, Strymba, Moldova','country_id' => '135'),\narray('id' => '4506','name' => '(KIV) - ChiinAu International Airport, ChiinAu, Moldova','country_id' => '135'),\narray('id' => '4507','name' => '(LUZ) - Lublin Airport, Lublin, Poland','country_id' => '175'),\narray('id' => '4508','name' => '(LWA) - Lebak Rural Airport, Lebak, Philippines','country_id' => '173'),\narray('id' => '4509','name' => '(OHD) - Ohrid St. Paul the Apostle Airport, Ohrid, Macedonia','country_id' => '140'),\narray('id' => '4510','name' => '(SKP) - Skopje Alexander the Great Airport, Skopje, Macedonia','country_id' => '140'),\narray('id' => '4511','name' => '(GIB) - Gibraltar Airport, Gibraltar, Gibraltar','country_id' => '80'),\narray('id' => '4512','name' => '(BCQ) - Brak Airport, Brak, Libya','country_id' => '132'),\narray('id' => '4513','name' => '(DNF) - Martubah Airport, Derna, Libya','country_id' => '132'),\narray('id' => '4514','name' => '(MRA) - Misratah Airport, Misratah, Libya','country_id' => '132'),\narray('id' => '4515','name' => '(QUB) - Ubari Airport, Ubari, Libya','country_id' => '132'),\narray('id' => '4516','name' => '(UZC) - Ponikve Airport, Uice, Serbia','country_id' => '186'),\narray('id' => '4517','name' => '(BEG) - Belgrade Nikola Tesla Airport, Belgrade, Serbia','country_id' => '186'),\narray('id' => '4518','name' => '(IVG) - Berane Airport, Berane, Montenegro','country_id' => '136'),\narray('id' => '4519','name' => '(BJY) - Batajnica Air Base, Batajnica, Serbia','country_id' => '186'),\narray('id' => '4520','name' => '(INI) - Nis Airport, Nis, Serbia','country_id' => '186'),\narray('id' => '4521','name' => '(QND) - Cenej Airport, Novi Sad, Serbia','country_id' => '186'),\narray('id' => '4522','name' => '(QBG) - PanAevo Airfield, PanAevo, Serbia','country_id' => '186'),\narray('id' => '4523','name' => '(TGD) - Podgorica Airport, Podgorica, Montenegro','country_id' => '136'),\narray('id' => '4524','name' => '(JBT) - Batlava-Donja Penduha Airfield, Batlava, Kosovo','country_id' => '240'),\narray('id' => '4525','name' => '(TIV) - Tivat Airport, Tivat, Montenegro','country_id' => '136'),\narray('id' => '4526','name' => '(QWV) - Divci Airport, Valjevo, Serbia','country_id' => '186'),\narray('id' => '4527','name' => '(ZRE) - Zrenjanin Airport, Zrenjanin, Serbia','country_id' => '186'),\narray('id' => '4528','name' => '(BTS) - M. R. tefAnik Airport, Bratislava, Slovakia','country_id' => '197'),\narray('id' => '4529','name' => '(KSC) - Koice Airport, Koice, Slovakia','country_id' => '197'),\narray('id' => '4530','name' => '(LUE) - LuAenec Airport, LuAenec, Slovakia','country_id' => '197'),\narray('id' => '4531','name' => '(PZY) - Pieany Airport, Pieany, Slovakia','country_id' => '197'),\narray('id' => '4532','name' => '(POV) - Preov Air Base, Preov, Slovakia','country_id' => '197'),\narray('id' => '4533','name' => '(SLD) - SliaA Airport, SliaA, Slovakia','country_id' => '197'),\narray('id' => '4534','name' => '(TAT) - Poprad-Tatry Airport, Poprad, Slovakia','country_id' => '197'),\narray('id' => '4535','name' => '(ILZ) - ilina Airport, ilina, Slovakia','country_id' => '197'),\narray('id' => '4536','name' => '(DRU) - Drummond Airport, Drummond, United States','country_id' => '228'),\narray('id' => '4537','name' => '(GLN) - Goulimime Airport, Goulimime, Morocco','country_id' => '133'),\narray('id' => '4538','name' => '(UWA) - Ware Airport, Ware, United States','country_id' => '228'),\narray('id' => '4539','name' => '(MAP) - Mamai Airport, Mamai, Papua New Guinea','country_id' => '172'),\narray('id' => '4540','name' => '(GDT) - JAGS McCartney International Airport, Cockburn Town, Turks and Caicos Islands','country_id' => '209'),\narray('id' => '4541','name' => '(MDS) - Middle Caicos Airport, Middle Caicos, Turks and Caicos Islands','country_id' => '209'),\narray('id' => '4542','name' => '(NCA) - North Caicos Airport, , Turks and Caicos Islands','country_id' => '209'),\narray('id' => '4543','name' => '(PIC) - Pine Cay Airport, Pine Cay, Turks and Caicos Islands','country_id' => '209'),\narray('id' => '4544','name' => '(PLS) - Providenciales Airport, Providenciales Island, Turks and Caicos Islands','country_id' => '209'),\narray('id' => '4545','name' => '(XSC) - South Caicos Airport, , Turks and Caicos Islands','country_id' => '209'),\narray('id' => '4546','name' => '(SLX) - Salt Cay Airport, Salt Cay, Turks and Caicos Islands','country_id' => '209'),\narray('id' => '4547','name' => '(BRX) - Maria Montez International Airport, Barahona, Dominican Republic','country_id' => '58'),\narray('id' => '4548','name' => '(CBJ) - Cabo Rojo Airport, Cabo Rojo, Dominican Republic','country_id' => '58'),\narray('id' => '4549','name' => '(AZS) - SamanA El Catey International Airport, Samana, Dominican Republic','country_id' => '58'),\narray('id' => '4550','name' => '(COZ) - Constanza - ExpediciAn 14 de Junio National Airport, Costanza, Dominican Republic','country_id' => '58'),\narray('id' => '4551','name' => '(JBQ) - La Isabela International Airport, La Isabela, Dominican Republic','country_id' => '58'),\narray('id' => '4552','name' => '(LRM) - Casa De Campo International Airport, La Romana, Dominican Republic','country_id' => '58'),\narray('id' => '4553','name' => '(PUJ) - Punta Cana International Airport, Punta Cana, Dominican Republic','country_id' => '58'),\narray('id' => '4554','name' => '(EPS) - Samana El Portillo Airport, Samana, Dominican Republic','country_id' => '58'),\narray('id' => '4555','name' => '(POP) - Gregorio Luperon International Airport, Puerto Plata, Dominican Republic','country_id' => '58'),\narray('id' => '4556','name' => '(MDR) - Medfra Airport, Medfra, United States','country_id' => '228'),\narray('id' => '4557','name' => '(SNX) - Sabana de Mar Airport, Sabana de Mar, Dominican Republic','country_id' => '58'),\narray('id' => '4558','name' => '(SDQ) - Las AmAricas International Airport, Santo Domingo, Dominican Republic','country_id' => '58'),\narray('id' => '4559','name' => '(STI) - Cibao International Airport, Santiago, Dominican Republic','country_id' => '58'),\narray('id' => '4560','name' => '(MDV) - MAdouneu Airport, MAdouneu, Gabon, Equatorial Guinea','country_id' => '85'),\narray('id' => '4561','name' => '(LIZ) - Loring International Airport, Limestone, United States','country_id' => '228'),\narray('id' => '4562','name' => '(MEF) - Melfi Airport, Melfi, Chad','country_id' => '210'),\narray('id' => '4563','name' => '(OHB) - Ambohibary Airport, Moramanga, Madagascar','country_id' => '138'),\narray('id' => '4564','name' => '(DOA) - Doany Airport, Doany, Madagascar','country_id' => '138'),\narray('id' => '4565','name' => '(CBV) - Coban Airport, Coban, Guatemala','country_id' => '88'),\narray('id' => '4566','name' => '(CMM) - Carmelita Airport, Carmelita, Guatemala','country_id' => '88'),\narray('id' => '4567','name' => '(CTF) - Coatepeque Airport, Coatepeque, Guatemala','country_id' => '88'),\narray('id' => '4568','name' => '(GUA) - La Aurora Airport, Guatemala City, Guatemala','country_id' => '88'),\narray('id' => '4569','name' => '(HUG) - Huehuetenango Airport, Huehuetenango, Guatemala','country_id' => '88'),\narray('id' => '4570','name' => '(MCR) - Melchor de Mencos Airport, Melchor de Mencos, Guatemala','country_id' => '88'),\narray('id' => '4571','name' => '(MGP) - Manga Airport, Manga Mission, Papua New Guinea','country_id' => '172'),\narray('id' => '4572','name' => '(PBR) - Puerto Barrios Airport, Puerto Barrios, Guatemala','country_id' => '88'),\narray('id' => '4573','name' => '(PON) - PoptAon Airport, PoptAon, Guatemala','country_id' => '88'),\narray('id' => '4574','name' => '(AQB) - Santa Cruz del Quiche Airport, Santa Cruz del Quiche, Guatemala','country_id' => '88'),\narray('id' => '4575','name' => '(AAZ) - Quezaltenango Airport, Quezaltenango, Guatemala','country_id' => '88'),\narray('id' => '4576','name' => '(RUV) - Rubelsanto Airport, Rubelsanto, Guatemala','country_id' => '88'),\narray('id' => '4577','name' => '(LCF) - Las Vegas Airport, Rio Dulce, Guatemala','country_id' => '88'),\narray('id' => '4578','name' => '(RER) - Retalhuleu Airport, Retalhuleu, Guatemala','country_id' => '88'),\narray('id' => '4579','name' => '(GSJ) - San JosA Airport, Puerto San JosA, Guatemala','country_id' => '88'),\narray('id' => '4580','name' => '(FRS) - Mundo Maya International Airport, San Benito, Guatemala','country_id' => '88'),\narray('id' => '4581','name' => '(AIM) - Ailuk Airport, Ailuk Island, Marshall Islands','country_id' => '139'),\narray('id' => '4582','name' => '(AUL) - Aur Island Airport, Aur Atoll, Marshall Islands','country_id' => '139'),\narray('id' => '4583','name' => '(BII) - Enyu Airfield, Bikini Atoll, Marshall Islands','country_id' => '139'),\narray('id' => '4584','name' => '(EBN) - Ebadon Airport, Ebadon Island, Marshall Islands','country_id' => '139'),\narray('id' => '4585','name' => '(JAT) - Jabot Airport, Ailinglapalap Atoll, Marshall Islands','country_id' => '139'),\narray('id' => '4586','name' => '(JEJ) - Jeh Airport, Ailinglapalap Atoll, Marshall Islands','country_id' => '139'),\narray('id' => '4587','name' => '(KBT) - Kaben Airport, Kaben, Marshall Islands','country_id' => '139'),\narray('id' => '4588','name' => '(LIK) - Likiep Airport, Likiep Island, Marshall Islands','country_id' => '139'),\narray('id' => '4589','name' => '(LML) - Lae Island Airport, Lae Island, Marshall Islands','country_id' => '139'),\narray('id' => '4590','name' => '(MAV) - Maloelap Island Airport, Maloelap Island, Marshall Islands','country_id' => '139'),\narray('id' => '4591','name' => '(MJB) - Mejit Atoll Airport, Mejit Atoll, Marshall Islands','country_id' => '139'),\narray('id' => '4592','name' => '(MJE) - Majkin Airport, Majkin, Marshall Islands','country_id' => '139'),\narray('id' => '4593','name' => '(NDK) - Namorik Atoll Airport, Namorik Atoll, Marshall Islands','country_id' => '139'),\narray('id' => '4594','name' => '(RNP) - Rongelap Island Airport, Rongelap Island, Marshall Islands','country_id' => '139'),\narray('id' => '4595','name' => '(TIC) - Tinak Airport, Arno Atoll, Marshall Islands','country_id' => '139'),\narray('id' => '4596','name' => '(UIT) - Jaluit Airport, Jabor Jaluit Atoll, Marshall Islands','country_id' => '139'),\narray('id' => '4597','name' => '(WJA) - Woja Airport, Woja, Marshall Islands','country_id' => '139'),\narray('id' => '4598','name' => '(WTE) - Wotje Atoll Airport, Wotje Atoll, Marshall Islands','country_id' => '139'),\narray('id' => '4599','name' => '(WTO) - Wotho Island Airport, Wotho Island, Marshall Islands','country_id' => '139'),\narray('id' => '4600','name' => '(AHS) - Ahuas Airport, Ahuas, Honduras','country_id' => '93'),\narray('id' => '4601','name' => '(BHG) - Brus Laguna Airport, Brus Laguna, Honduras','country_id' => '93'),\narray('id' => '4602','name' => '(CAA) - Catacamas Airport, Catacamas, Honduras','country_id' => '93'),\narray('id' => '4603','name' => '(LUI) - Carta Airport, La UniAn, Honduras','country_id' => '93'),\narray('id' => '4604','name' => '(CYL) - Coyoles Airport, Coyoles, Honduras','country_id' => '93'),\narray('id' => '4605','name' => '(CDD) - Cauquira Airport, Cauquira, Honduras','country_id' => '93'),\narray('id' => '4606','name' => '(OAN) - El ArrayAn Airport, Olanchito, Honduras','country_id' => '93'),\narray('id' => '4607','name' => '(GAC) - Celaque Airport, Gracias, Honduras','country_id' => '93'),\narray('id' => '4608','name' => '(IRN) - Iriona Airport, Iriona, Honduras','country_id' => '93'),\narray('id' => '4609','name' => '(GUO) - Jicalapa Airport, Jicalapa, Honduras','country_id' => '93'),\narray('id' => '4610','name' => '(JUT) - Jutigalpa airport, Jutigalpa, Honduras','country_id' => '93'),\narray('id' => '4611','name' => '(LCE) - Goloson International Airport, La Ceiba, Honduras','country_id' => '93'),\narray('id' => '4612','name' => '(LEZ) - La Esperanza Airport, La Esperanza, Honduras','country_id' => '93'),\narray('id' => '4613','name' => '(SAP) - RamAn Villeda Morales International Airport, La Mesa, Honduras','country_id' => '93'),\narray('id' => '4614','name' => '(MHN) - Hooker County Airport, Mullen, United States','country_id' => '228'),\narray('id' => '4615','name' => '(GJA) - La Laguna Airport, Guanaja, Honduras','country_id' => '93'),\narray('id' => '4616','name' => '(PCH) - Palacios Airport, Palacios, Honduras','country_id' => '93'),\narray('id' => '4617','name' => '(PEU) - Puerto Lempira Airport, Puerto Lempira, Honduras','country_id' => '93'),\narray('id' => '4618','name' => '(RTB) - Juan Manuel Galvez International Airport, Roatan Island, Honduras','country_id' => '93'),\narray('id' => '4619','name' => '(RUY) - CopAn Ruinas Airport, CopAn Ruinas, Honduras','country_id' => '93'),\narray('id' => '4620','name' => '(XPL) - Coronel Enrique Soto Cano Air Base, Comayagua, Honduras','country_id' => '93'),\narray('id' => '4621','name' => '(TEA) - Tela Airport, Tela, Honduras','country_id' => '93'),\narray('id' => '4622','name' => '(TGU) - ToncontAn International Airport, Tegucigalpa, Honduras','country_id' => '93'),\narray('id' => '4623','name' => '(TJI) - Trujillo Airport, Trujillo, Honduras','country_id' => '93'),\narray('id' => '4624','name' => '(SCD) - Sulaco Airport, Sulaco, Honduras','country_id' => '93'),\narray('id' => '4625','name' => '(UII) - Utila Airport, Utila Island, Honduras','country_id' => '93'),\narray('id' => '4626','name' => '(MHY) - Morehead Airport, Morehead, Papua New Guinea','country_id' => '172'),\narray('id' => '4627','name' => '(ORO) - Yoro Airport, Yoro, Honduras','country_id' => '93'),\narray('id' => '4628','name' => '(MIZ) - Mainoru Airstrip, Mainoru, Australia','country_id' => '12'),\narray('id' => '4629','name' => '(MJJ) - Moki Airport, Moki, Papua New Guinea','country_id' => '172'),\narray('id' => '4630','name' => '(MJS) - Maganja da Costa Airport, Maganja, Mozambique','country_id' => '155'),\narray('id' => '4631','name' => '(OCJ) - Boscobel Aerodrome, Ocho Rios, Jamaica','country_id' => '108'),\narray('id' => '4632','name' => '(KIN) - Norman Manley International Airport, Kingston, Jamaica','country_id' => '108'),\narray('id' => '4633','name' => '(MBJ) - Sangster International Airport, Montego Bay, Jamaica','country_id' => '108'),\narray('id' => '4634','name' => '(POT) - Ken Jones Airport, Ken Jones, Jamaica','country_id' => '108'),\narray('id' => '4635','name' => '(MKN) - Malekolon Airport, Babase Island, Papua New Guinea','country_id' => '172'),\narray('id' => '4636','name' => '(NEG) - Negril Airport, Negril, Jamaica','country_id' => '108'),\narray('id' => '4637','name' => '(KTP) - Tinson Pen Airport, Tinson Pen, Jamaica','country_id' => '108'),\narray('id' => '4638','name' => '(MIJ) - Mili Island Airport, Mili Island, Marshall Islands','country_id' => '139'),\narray('id' => '4639','name' => '(MLQ) - Malalaua Airport, Malalaua, Papua New Guinea','country_id' => '172'),\narray('id' => '4640','name' => '(HEB) - Hinthada Airport, Hinthada, Burma','country_id' => '142'),\narray('id' => '4641','name' => '(TZM) - Cupul Airport, Tizimin, Mexico','country_id' => '153'),\narray('id' => '4642','name' => '(ACA) - General Juan N Alvarez International Airport, Acapulco, Mexico','country_id' => '153'),\narray('id' => '4643','name' => '(NTR) - Del Norte International Airport, , Mexico','country_id' => '153'),\narray('id' => '4644','name' => '(AGU) - JesAos TerAn Paredo International Airport, Aguascalientes, Mexico','country_id' => '153'),\narray('id' => '4645','name' => '(HUX) - BahAas de Huatulco International Airport, Huatulco, Mexico','country_id' => '153'),\narray('id' => '4646','name' => '(CNA) - Cananea Airport, , Mexico','country_id' => '153'),\narray('id' => '4647','name' => '(CVJ) - General Mariano Matamoros Airport, , Mexico','country_id' => '153'),\narray('id' => '4648','name' => '(ACN) - Ciudad AcuAa New International Airport, Ciudad AcuAa, Mexico','country_id' => '153'),\narray('id' => '4649','name' => '(CME) - Ciudad del Carmen International Airport, Ciudad del Carmen, Mexico','country_id' => '153'),\narray('id' => '4650','name' => '(NCG) - Nuevo Casas Grandes Airport, , Mexico','country_id' => '153'),\narray('id' => '4651','name' => '(CUL) - Bachigualato Federal International Airport, CuliacAn, Mexico','country_id' => '153'),\narray('id' => '4652','name' => '(CTM) - Chetumal International Airport, Chetumal, Mexico','country_id' => '153'),\narray('id' => '4653','name' => '(CEN) - Ciudad ObregAn International Airport, Ciudad ObregAn, Mexico','country_id' => '153'),\narray('id' => '4654','name' => '(CJT) - Comitan Airport, , Mexico','country_id' => '153'),\narray('id' => '4655','name' => '(CPE) - Ingeniero Alberto AcuAa Ongay International Airport, Campeche, Mexico','country_id' => '153'),\narray('id' => '4656','name' => '(CJS) - Abraham GonzAlez International Airport, Ciudad JuArez, Mexico','country_id' => '153'),\narray('id' => '4657','name' => '(CZA) - Chichen Itza International Airport, Chichen Itza, Mexico','country_id' => '153'),\narray('id' => '4658','name' => '(CUU) - General Roberto Fierro Villalobos International Airport, Chihuahua, Mexico','country_id' => '153'),\narray('id' => '4659','name' => '(CVM) - General Pedro Jose Mendez International Airport, Ciudad Victoria, Mexico','country_id' => '153'),\narray('id' => '4660','name' => '(CYW) - Captain Rogelio Castillo National Airport, Celaya, Mexico','country_id' => '153'),\narray('id' => '4661','name' => '(CZM) - Cozumel International Airport, Cozumel, Mexico','country_id' => '153'),\narray('id' => '4662','name' => '(CUA) - Ciudad ConstituciAn Airport, Ciudad ConstituciAn, Mexico','country_id' => '153'),\narray('id' => '4663','name' => '(MMC) - Ciudad Mante National Airport, Ciudad Mante, Mexico','country_id' => '153'),\narray('id' => '4664','name' => '(DGO) - General Guadalupe Victoria International Airport, Durango, Mexico','country_id' => '153'),\narray('id' => '4665','name' => '(TPQ) - Amado Nervo National Airport, Tepic, Mexico','country_id' => '153'),\narray('id' => '4666','name' => '(ESE) - Ensenada Airport, , Mexico','country_id' => '153'),\narray('id' => '4667','name' => '(GDL) - Don Miguel Hidalgo Y Costilla International Airport, Guadalajara, Mexico','country_id' => '153'),\narray('id' => '4668','name' => '(GYM) - General JosA MarAa YAAez International Airport, Guaymas, Mexico','country_id' => '153'),\narray('id' => '4669','name' => '(GUB) - Guerrero Negro Airport, Guerrero Negro, Mexico','country_id' => '153'),\narray('id' => '4670','name' => '(TCN) - Tehuacan Airport, , Mexico','country_id' => '153'),\narray('id' => '4671','name' => '(HMO) - General Ignacio P. Garcia International Airport, Hermosillo, Mexico','country_id' => '153'),\narray('id' => '4672','name' => '(CLQ) - Licenciado Miguel de la Madrid Airport, Colima, Mexico','country_id' => '153'),\narray('id' => '4673','name' => '(ISJ) - Isla Mujeres Airport, , Mexico','country_id' => '153'),\narray('id' => '4674','name' => '(SLW) - Plan De Guadalupe International Airport, Saltillo, Mexico','country_id' => '153'),\narray('id' => '4675','name' => '(IZT) - Ixtepec Airport, , Mexico','country_id' => '153'),\narray('id' => '4676','name' => '(JAL) - El Lencero Airport, Xalapa, Mexico','country_id' => '153'),\narray('id' => '4677','name' => '(AZP) - Atizapan De Zaragoza Airport, , Mexico','country_id' => '153'),\narray('id' => '4678','name' => '(LZC) - LAzaro CArdenas Airport, LAzaro CArdenas, Mexico','country_id' => '153'),\narray('id' => '4679','name' => '(LMM) - Valle del Fuerte International Airport, Los Mochis, Mexico','country_id' => '153'),\narray('id' => '4680','name' => '(BJX) - Del BajAo International Airport, Silao, Mexico','country_id' => '153'),\narray('id' => '4681','name' => '(LAP) - Manuel MArquez de LeAn International Airport, La Paz, Mexico','country_id' => '153'),\narray('id' => '4682','name' => '(LTO) - Loreto International Airport, Loreto, Mexico','country_id' => '153'),\narray('id' => '4683','name' => '(MAM) - General Servando Canales International Airport, Matamoros, Mexico','country_id' => '153'),\narray('id' => '4684','name' => '(MID) - Licenciado Manuel Crescencio Rejon Int Airport, MArida, Mexico','country_id' => '153'),\narray('id' => '4685','name' => '(MUG) - Mulege Airport, Mulege, Mexico','country_id' => '153'),\narray('id' => '4686','name' => '(MXL) - General Rodolfo SAnchez Taboada International Airport, Mexicali, Mexico','country_id' => '153'),\narray('id' => '4687','name' => '(MLM) - General Francisco J. Mujica International Airport, Morelia, Mexico','country_id' => '153'),\narray('id' => '4688','name' => '(MTT) - MinatitlAn/Coatzacoalcos National Airport, MinatitlAn, Mexico','country_id' => '153'),\narray('id' => '4689','name' => '(LOV) - Monclova International Airport, , Mexico','country_id' => '153'),\narray('id' => '4690','name' => '(MEX) - Licenciado Benito Juarez International Airport, Mexico City, Mexico','country_id' => '153'),\narray('id' => '4691','name' => '(MTY) - General Mariano Escobedo International Airport, Monterrey, Mexico','country_id' => '153'),\narray('id' => '4692','name' => '(MZT) - General Rafael Buelna International Airport, MazatlAn, Mexico','country_id' => '153'),\narray('id' => '4693','name' => '(NOG) - Nogales International Airport, , Mexico','country_id' => '153'),\narray('id' => '4694','name' => '(NLD) - QuetzalcAatl International Airport, Nuevo Laredo, Mexico','country_id' => '153'),\narray('id' => '4695','name' => '(OAX) - XoxocotlAn International Airport, Oaxaca, Mexico','country_id' => '153'),\narray('id' => '4696','name' => '(PAZ) - El TajAn National Airport, Poza Rica, Mexico','country_id' => '153'),\narray('id' => '4697','name' => '(PBC) - Hermanos SerdAn International Airport, Puebla, Mexico','country_id' => '153'),\narray('id' => '4698','name' => '(PDS) - Piedras Negras International Airport, , Mexico','country_id' => '153'),\narray('id' => '4699','name' => '(PCO) - Punta Colorada Airport, La Ribera, Mexico','country_id' => '153'),\narray('id' => '4700','name' => '(UPN) - Licenciado y General Ignacio Lopez Rayon Airport, , Mexico','country_id' => '153'),\narray('id' => '4701','name' => '(PQM) - Palenque International Airport, , Mexico','country_id' => '153'),\narray('id' => '4702','name' => '(PVR) - Licenciado Gustavo DAaz Ordaz International Airport, Puerto Vallarta, Mexico','country_id' => '153'),\narray('id' => '4703','name' => '(PXM) - Puerto Escondido International Airport, Puerto Escondido, Mexico','country_id' => '153'),\narray('id' => '4704','name' => '(QRO) - QuerAtaro Intercontinental Airport, QuerAtaro, Mexico','country_id' => '153'),\narray('id' => '4705','name' => '(REX) - General Lucio Blanco International Airport, Reynosa, Mexico','country_id' => '153'),\narray('id' => '4706','name' => '(SJD) - Los Cabos International Airport, San JosA del Cabo, Mexico','country_id' => '153'),\narray('id' => '4707','name' => '(SFH) - San Felipe International Airport, Mexicali, Mexico','country_id' => '153'),\narray('id' => '4708','name' => '(NLU) - Santa Lucia Air Force Base, Reyes Acozac, Mexico','country_id' => '153'),\narray('id' => '4709','name' => '(SLP) - Ponciano Arriaga International Airport, San Luis PotosA, Mexico','country_id' => '153'),\narray('id' => '4710','name' => '(TRC) - Francisco Sarabia International Airport, TorreAn, Mexico','country_id' => '153'),\narray('id' => '4711','name' => '(TGZ) - Angel Albino Corzo International Airport, Tuxtla GutiArrez, Mexico','country_id' => '153'),\narray('id' => '4712','name' => '(TIJ) - General Abelardo L. RodrAguez International Airport, Tijuana, Mexico','country_id' => '153'),\narray('id' => '4713','name' => '(TAM) - General Francisco Javier Mina International Airport, Tampico, Mexico','country_id' => '153'),\narray('id' => '4714','name' => '(TSL) - Tamuin Airport, , Mexico','country_id' => '153'),\narray('id' => '4715','name' => '(TLC) - Licenciado Adolfo Lopez Mateos International Airport, Toluca, Mexico','country_id' => '153'),\narray('id' => '4716','name' => '(TAP) - Tapachula International Airport, Tapachula, Mexico','country_id' => '153'),\narray('id' => '4717','name' => '(CUN) - CancAon International Airport, CancAon, Mexico','country_id' => '153'),\narray('id' => '4718','name' => '(MMV) - Mal Airport, Mal Island, Papua New Guinea','country_id' => '172'),\narray('id' => '4719','name' => '(VSA) - Carlos Rovirosa PArez International Airport, Villahermosa, Mexico','country_id' => '153'),\narray('id' => '4720','name' => '(VER) - General Heriberto Jara International Airport, Veracruz, Mexico','country_id' => '153'),\narray('id' => '4721','name' => '(ZCL) - General Leobardo C. Ruiz International Airport, Zacatecas, Mexico','country_id' => '153'),\narray('id' => '4722','name' => '(ZIH) - Ixtapa Zihuatanejo International Airport, Ixtapa, Mexico','country_id' => '153'),\narray('id' => '4723','name' => '(ZMM) - Zamora Airport, , Mexico','country_id' => '153'),\narray('id' => '4724','name' => '(ZLO) - Playa De Oro International Airport, Manzanillo, Mexico','country_id' => '153'),\narray('id' => '4725','name' => '(MXW) - Mandalgobi Airport, Mandalgobi, Mongolia','country_id' => '143'),\narray('id' => '4726','name' => '(ULG) - A-lgii Airport, A-lgii, Mongolia','country_id' => '143'),\narray('id' => '4727','name' => '(BEF) - Bluefields Airport, Bluefileds, Nicaragua','country_id' => '161'),\narray('id' => '4728','name' => '(BZA) - San Pedro Airport, Bonanza, Nicaragua','country_id' => '161'),\narray('id' => '4729','name' => '(ECI) - Costa Esmeralda Airport, Tola, Nicaragua','country_id' => '161'),\narray('id' => '4730','name' => '(RNI) - Corn Island, Corn Island, Nicaragua','country_id' => '161'),\narray('id' => '4731','name' => '(MGA) - Augusto C. Sandino (Managua) International Airport, Managua, Nicaragua','country_id' => '161'),\narray('id' => '4732','name' => '(NVG) - Nueva Guinea Airport, Nueva Guinea, Nicaragua','country_id' => '161'),\narray('id' => '4733','name' => '(PUZ) - Puerto Cabezas Airport, Puerto Cabezas, Nicaragua','country_id' => '161'),\narray('id' => '4734','name' => '(RFS) - Rosita Airport, La Rosita, Nicaragua','country_id' => '161'),\narray('id' => '4735','name' => '(NCR) - San Carlos, San Carlos, Nicaragua','country_id' => '161'),\narray('id' => '4736','name' => '(SIU) - Siuna, Siuna, Nicaragua','country_id' => '161'),\narray('id' => '4737','name' => '(WSP) - Waspam Airport, Waspam, Nicaragua','country_id' => '161'),\narray('id' => '4738','name' => '(PDM) - Capt Justiniano Montenegro Airport, Pedasi, Panama','country_id' => '169'),\narray('id' => '4739','name' => '(BOC) - Bocas Del Toro International Airport, Isla ColAn, Panama','country_id' => '169'),\narray('id' => '4740','name' => '(CTD) - Alonso Valderrama Airport, ChitrA, Panama','country_id' => '169'),\narray('id' => '4741','name' => '(CHX) - Cap Manuel NiAo International Airport, Changuinola, Panama','country_id' => '169'),\narray('id' => '4742','name' => '(DAV) - Enrique Malek International Airport, David, Panama','country_id' => '169'),\narray('id' => '4743','name' => '(ONX) - Enrique Adolfo Jimenez Airport, ColAn, Panama','country_id' => '169'),\narray('id' => '4744','name' => '(MPG) - Makini Airport, Makini, Papua New Guinea','country_id' => '172'),\narray('id' => '4745','name' => '(BLB) - Panama Pacific International Airport, PanamA City, Panama','country_id' => '169'),\narray('id' => '4746','name' => '(MPI) - Mamitupo Airport, Mamitupo, Panama','country_id' => '169'),\narray('id' => '4747','name' => '(JQE) - JaquA Airport, JaquA, Panama','country_id' => '169'),\narray('id' => '4748','name' => '(PLP) - Captain Ramon Xatruch Airport, La Palma, Panama','country_id' => '169'),\narray('id' => '4749','name' => '(PAC) - Marcos A. Gelabert International Airport, Albrook, Panama','country_id' => '169'),\narray('id' => '4750','name' => '(PUE) - Puerto Obaldia Airport, Puerto Obaldia, Panama','country_id' => '169'),\narray('id' => '4751','name' => '(RIH) - Scarlett Martinez International Airport, RAo Hato, Panama','country_id' => '169'),\narray('id' => '4752','name' => '(SYP) - Ruben Cantu Airport, Santiago, Panama','country_id' => '169'),\narray('id' => '4753','name' => '(PTY) - Tocumen International Airport, Tocumen, Panama','country_id' => '169'),\narray('id' => '4754','name' => '(MPU) - Mapua(Mabua) Airport, Tatau Island, Papua New Guinea','country_id' => '172'),\narray('id' => '4755','name' => '(PVE) - El Porvenir Airport, El Porvenir, Panama','country_id' => '169'),\narray('id' => '4756','name' => '(NBL) - San Blas Airport, Wannukandi, Panama','country_id' => '169'),\narray('id' => '4757','name' => '(MPX) - Miyanmin Airport, Miyanmin, Papua New Guinea','country_id' => '172'),\narray('id' => '4758','name' => '(MQO) - Malam Airport, Malam, Papua New Guinea','country_id' => '172'),\narray('id' => '4759','name' => '(FON) - Arenal Airport, La Fortuna/San Carlos, Costa Rica','country_id' => '47'),\narray('id' => '4760','name' => '(TTQ) - Aerotortuguero Airport, Roxana, Costa Rica','country_id' => '47'),\narray('id' => '4761','name' => '(BAI) - Buenos Aires Airport, Punta Arenas, Costa Rica','country_id' => '47'),\narray('id' => '4762','name' => '(BCL) - Barra del Colorado Airport, Pococi, Costa Rica','country_id' => '47'),\narray('id' => '4763','name' => '(OTR) - Coto 47 Airport, Corredores, Costa Rica','country_id' => '47'),\narray('id' => '4764','name' => '(JAP) - Chacarita Airport, Puntarenas, Costa Rica','country_id' => '47'),\narray('id' => '4765','name' => '(PLD) - Playa Samara/Carrillo Airport, Carrillo, Costa Rica','country_id' => '47'),\narray('id' => '4766','name' => '(DRK) - Drake Bay Airport, Puntarenas, Costa Rica','country_id' => '47'),\narray('id' => '4767','name' => '(FMG) - Flamingo Airport, Brasilito, Costa Rica','country_id' => '47'),\narray('id' => '4768','name' => '(GLF) - Golfito Airport, Golfito, Costa Rica','country_id' => '47'),\narray('id' => '4769','name' => '(GPL) - Guapiles Airport, Pococi, Costa Rica','country_id' => '47'),\narray('id' => '4770','name' => '(PBP) - Islita Airport, Nandayure, Costa Rica','country_id' => '47'),\narray('id' => '4771','name' => '(LIR) - Daniel Oduber Quiros International Airport, Liberia, Costa Rica','country_id' => '47'),\narray('id' => '4772','name' => '(LSL) - Los Chiles Airport, Los Chiles, Costa Rica','country_id' => '47'),\narray('id' => '4773','name' => '(LIO) - Limon International Airport, Puerto Limon, Costa Rica','country_id' => '47'),\narray('id' => '4774','name' => '(CSC) - Mojica Airport, CaAas, Costa Rica','country_id' => '47'),\narray('id' => '4775','name' => '(NCT) - Guanacaste Airport, Nicoya/Guanacate, Costa Rica','country_id' => '47'),\narray('id' => '4776','name' => '(NOB) - Nosara Airport, Nicoya, Costa Rica','country_id' => '47'),\narray('id' => '4777','name' => '(SJO) - Juan Santamaria International Airport, San Jose, Costa Rica','country_id' => '47'),\narray('id' => '4778','name' => '(PJM) - Puerto Jimenez Airport, Puerto Jimenez, Costa Rica','country_id' => '47'),\narray('id' => '4779','name' => '(PMZ) - Palmar Sur Airport, Palmar Sur, Costa Rica','country_id' => '47'),\narray('id' => '4780','name' => '(SYQ) - Tobias Bolanos International Airport, San Jose, Costa Rica','country_id' => '47'),\narray('id' => '4781','name' => '(XQP) - Quepos Managua Airport, Quepos, Costa Rica','country_id' => '47'),\narray('id' => '4782','name' => '(RFR) - Rio Frio / Progreso Airport, Rio Frio / Progreso, Costa Rica','country_id' => '47'),\narray('id' => '4783','name' => '(PLD) - Playa Samara Airport, Playa Samara, Costa Rica','country_id' => '47'),\narray('id' => '4784','name' => '(TOO) - San Vito De Java Airport, Coto Brus, Costa Rica','country_id' => '47'),\narray('id' => '4785','name' => '(TNO) - Tamarindo Airport, Tamarindo, Costa Rica','country_id' => '47'),\narray('id' => '4786','name' => '(TMU) - Tambor Airport, Nicoya, Costa Rica','country_id' => '47'),\narray('id' => '4787','name' => '(UPL) - Upala Airport, Upala, Costa Rica','country_id' => '47'),\narray('id' => '4788','name' => '(SAL) - El Salvador International Airport, Santa Clara, El Salvador','country_id' => '205'),\narray('id' => '4789','name' => '(CYA) - Les Cayes Airport, Les Cayes, Haiti','country_id' => '95'),\narray('id' => '4790','name' => '(CAP) - Cap Haitien International Airport, Cap Haitien, Haiti','country_id' => '95'),\narray('id' => '4791','name' => '(MTX) - Metro Field, Fairbanks, United States','country_id' => '228'),\narray('id' => '4792','name' => '(JAK) - Jacmel Airport, Jacmel, Haiti','country_id' => '95'),\narray('id' => '4793','name' => '(JEE) - JArAmie Airport, Jeremie, Haiti','country_id' => '95'),\narray('id' => '4794','name' => '(PAP) - Toussaint Louverture International Airport, Port-au-Prince, Haiti','country_id' => '95'),\narray('id' => '4795','name' => '(PAX) - Port-de-Paix Airport, Port-de-Paix, Haiti','country_id' => '95'),\narray('id' => '4796','name' => '(MTU) - Montepuez Airport, Montepuez, Mozambique','country_id' => '155'),\narray('id' => '4797','name' => '(BCA) - Gustavo Rizo Airport, Baracoa, Cuba','country_id' => '48'),\narray('id' => '4798','name' => '(BWW) - Las Brujas Airport, Cayo Santa Maria, Cuba','country_id' => '48'),\narray('id' => '4799','name' => '(BYM) - Carlos Manuel de Cespedes Airport, Bayamo, Cuba','country_id' => '48'),\narray('id' => '4800','name' => '(AVI) - Maximo Gomez Airport, Ciego de Avila, Cuba','country_id' => '48'),\narray('id' => '4801','name' => '(CCC) - Jardines Del Rey Airport, Cayo Coco, Cuba','country_id' => '48'),\narray('id' => '4802','name' => '(CFG) - Jaime Gonzalez Airport, Cienfuegos, Cuba','country_id' => '48'),\narray('id' => '4803','name' => '(CYO) - Vilo AcuAa International Airport, Cayo Largo del Sur, Cuba','country_id' => '48'),\narray('id' => '4804','name' => '(CMW) - Ignacio Agramonte International Airport, Camaguey, Cuba','country_id' => '48'),\narray('id' => '4805','name' => '(QCO) - ColAn Airport, ColAn, Cuba','country_id' => '48'),\narray('id' => '4806','name' => '(SCU) - Antonio Maceo International Airport, Santiago, Cuba','country_id' => '48'),\narray('id' => '4807','name' => '(NBW) - Leeward Point Field, Guantanamo Bay Naval Station, Cuba','country_id' => '48'),\narray('id' => '4808','name' => '(GAO) - Mariana Grajales Airport, GuantAnamo, Cuba','country_id' => '48'),\narray('id' => '4809','name' => '(HAV) - JosA MartA International Airport, Havana, Cuba','country_id' => '48'),\narray('id' => '4810','name' => '(HOG) - Frank Pais International Airport, Holguin, Cuba','country_id' => '48'),\narray('id' => '4811','name' => '(VRO) - Kawama Airport, Matanzas, Cuba','country_id' => '48'),\narray('id' => '4812','name' => '(LCL) - La Coloma Airport, Pinar del Rio, Cuba','country_id' => '48'),\narray('id' => '4813','name' => '(UMA) - Punta de Maisi Airport, Maisi, Cuba','country_id' => '48'),\narray('id' => '4814','name' => '(MJG) - Mayajigua Airport, Mayajigua, Cuba','country_id' => '48'),\narray('id' => '4815','name' => '(MOA) - Orestes Acosta Airport, Moa, Cuba','country_id' => '48'),\narray('id' => '4816','name' => '(MZO) - Sierra Maestra Airport, Manzanillo, Cuba','country_id' => '48'),\narray('id' => '4817','name' => '(QSN) - San Nicolas De Bari Airport, San NicolAs, Cuba','country_id' => '48'),\narray('id' => '4818','name' => '(ICR) - Nicaro Airport, Nicaro, Cuba','country_id' => '48'),\narray('id' => '4819','name' => '(GER) - Rafael Cabrera Airport, Nueva Gerona, Cuba','country_id' => '48'),\narray('id' => '4820','name' => '(UPB) - Playa Baracoa Airport, Havana, Cuba','country_id' => '48'),\narray('id' => '4821','name' => '(QPD) - Pinar Del Rio Airport, Pinar del Rio, Cuba','country_id' => '48'),\narray('id' => '4822','name' => '(SNU) - Abel Santamaria Airport, Santa Clara, Cuba','country_id' => '48'),\narray('id' => '4823','name' => '(SNJ) - San Julian Air Base, Pinar Del Rio, Cuba','country_id' => '48'),\narray('id' => '4824','name' => '(SZJ) - Siguanea Airport, Isla de la Juventud, Cuba','country_id' => '48'),\narray('id' => '4825','name' => '(USS) - Sancti Spiritus Airport, Sancti Spiritus, Cuba','country_id' => '48'),\narray('id' => '4826','name' => '(TND) - Alberto Delgado Airport, Trinidad, Cuba','country_id' => '48'),\narray('id' => '4827','name' => '(VRA) - Juan Gualberto Gomez International Airport, Varadero, Cuba','country_id' => '48'),\narray('id' => '4828','name' => '(VTU) - Hermanos Ameijeiras Airport, Las Tunas, Cuba','country_id' => '48'),\narray('id' => '4829','name' => '(CYB) - Gerrard Smith International Airport, Cayman Brac, Cayman Islands','country_id' => '120'),\narray('id' => '4830','name' => '(LYB) - Edward Bodden Airfield, Little Cayman, Cayman Islands','country_id' => '120'),\narray('id' => '4831','name' => '(GCM) - Owen Roberts International Airport, Georgetown, Cayman Islands','country_id' => '120'),\narray('id' => '4832','name' => '(MWR) - Motswari Airport, Motswari Private Game Reserve, South Africa','country_id' => '243'),\narray('id' => '4833','name' => '(AJS) - Abreojos Airport, Abreojos, Mexico','country_id' => '153'),\narray('id' => '4834','name' => '(AZG) - Pablo L. Sidar Airport, ApatzingAn, Mexico','country_id' => '153'),\narray('id' => '4835','name' => '(NVJ) - Navojoa Airport, Navojoa, Mexico','country_id' => '153'),\narray('id' => '4836','name' => '(PCM) - Playa del Carmen Airport, Solidaridad, Mexico','country_id' => '153'),\narray('id' => '4837','name' => '(PCV) - Punta Chivato Airport, Punta Chivato, Mexico','country_id' => '153'),\narray('id' => '4838','name' => '(SCX) - Salina Cruz Naval Air Station, Salina Cruz, Mexico','country_id' => '153'),\narray('id' => '4839','name' => '(SGM) - San Ignacio Airport, San Ignacio, Mexico','country_id' => '153'),\narray('id' => '4840','name' => '(TUY) - Tulum Naval Air Station, Tulum, Mexico','country_id' => '153'),\narray('id' => '4841','name' => '(UAC) - San Luis RAo Colorado Airport, San Luis RAo Colorado, Mexico','country_id' => '153'),\narray('id' => '4842','name' => '(XAL) - Alamos Airport, Alamos, Mexico','country_id' => '153'),\narray('id' => '4843','name' => '(MXK) - Mindik Airport, Mindik, Papua New Guinea','country_id' => '172'),\narray('id' => '4844','name' => '(MXR) - Moussoro Airport, Moussoro, Chad','country_id' => '210'),\narray('id' => '4845','name' => '(GTK) - Sungei Tekai Airport, Sungei Tekai, Malaysia','country_id' => '154'),\narray('id' => '4846','name' => '(LBP) - Long Banga Airport, Long Banga, Malaysia','country_id' => '154'),\narray('id' => '4847','name' => '(LLM) - Long Lama Airport, Long Lama, Malaysia','country_id' => '154'),\narray('id' => '4848','name' => '(MZS) - Mostyn Airport, Mostyn, Malaysia','country_id' => '154'),\narray('id' => '4849','name' => '(SPT) - Sipitang Airport, Sipitang, Malaysia','country_id' => '154'),\narray('id' => '4850','name' => '(MAY) - Clarence A. Bain Airport, Mangrove Cay, Bahamas','country_id' => '30'),\narray('id' => '4851','name' => '(ASD) - Andros Town Airport, , Bahamas','country_id' => '30'),\narray('id' => '4852','name' => '(COX) - Congo Town Airport, Andros, Bahamas','country_id' => '30'),\narray('id' => '4853','name' => '(MHH) - Marsh Harbour International Airport, Marsh Harbour, Bahamas','country_id' => '30'),\narray('id' => '4854','name' => '(SAQ) - San Andros Airport, Andros Island, Bahamas','country_id' => '30'),\narray('id' => '4855','name' => '(AXP) - Spring Point Airport, Spring Point, Bahamas','country_id' => '30'),\narray('id' => '4856','name' => '(TCB) - Treasure Cay Airport, Treasure Cay, Bahamas','country_id' => '30'),\narray('id' => '4857','name' => '(WKR) - Abaco I Walker C Airport, , Bahamas','country_id' => '30'),\narray('id' => '4858','name' => '(CCZ) - Chub Cay Airport, , Bahamas','country_id' => '30'),\narray('id' => '4859','name' => '(GHC) - Great Harbour Cay Airport, , Bahamas','country_id' => '30'),\narray('id' => '4860','name' => '(BIM) - South Bimini Airport, South Bimini, Bahamas','country_id' => '30'),\narray('id' => '4861','name' => '(ATC) - Arthur\\'s Town Airport, Arthur\\'s Town, Bahamas','country_id' => '30'),\narray('id' => '4862','name' => '(CAT) - New Bight Airport, Cat Island, Bahamas','country_id' => '30'),\narray('id' => '4863','name' => '(CXY) - Cat Cay Airport, Cat Cay, Bahamas','country_id' => '30'),\narray('id' => '4864','name' => '(CRI) - Colonel Hill Airport, Colonel Hill, Bahamas','country_id' => '30'),\narray('id' => '4865','name' => '(PWN) - Pitts Town Airport, Pitts Town, Bahamas','country_id' => '30'),\narray('id' => '4866','name' => '(GGT) - Exuma International Airport, George Town, Bahamas','country_id' => '30'),\narray('id' => '4867','name' => '(ELH) - North Eleuthera Airport, North Eleuthera, Bahamas','country_id' => '30'),\narray('id' => '4868','name' => '(GHB) - Governor\\'s Harbour Airport, Governor\\'s Harbour, Bahamas','country_id' => '30'),\narray('id' => '4869','name' => '(NMC) - Normans Cay Airport, , Bahamas','country_id' => '30'),\narray('id' => '4870','name' => '(RSD) - Rock Sound Airport, Rock Sound, Bahamas','country_id' => '30'),\narray('id' => '4871','name' => '(TYM) - Staniel Cay Airport, , Bahamas','country_id' => '30'),\narray('id' => '4872','name' => '(FPO) - Grand Bahama International Airport, Freeport, Bahamas','country_id' => '30'),\narray('id' => '4873','name' => '(GBI) - Auxiliary Airfield, Grand Bahama, Bahamas','country_id' => '30'),\narray('id' => '4874','name' => '(WTD) - West End Airport, West End, Bahamas','country_id' => '30'),\narray('id' => '4875','name' => '(IGA) - Inagua Airport, Matthew Town, Bahamas','country_id' => '30'),\narray('id' => '4876','name' => '(MYK) - May Creek Airport, May Creek, United States','country_id' => '228'),\narray('id' => '4877','name' => '(LGI) - Deadman\\'s Cay Airport, Deadman\\'s Cay, Bahamas','country_id' => '30'),\narray('id' => '4878','name' => '(SML) - Stella Maris Airport, Stella Maris, Bahamas','country_id' => '30'),\narray('id' => '4879','name' => '(MYG) - Mayaguana Airport, Mayaguana, Bahamas','country_id' => '30'),\narray('id' => '4880','name' => '(NAS) - Lynden Pindling International Airport, Nassau, Bahamas','country_id' => '30'),\narray('id' => '4881','name' => '(PID) - Nassau Paradise Island Airport, Nassau, Bahamas','country_id' => '30'),\narray('id' => '4882','name' => '(DCT) - Duncan Town Airport, , Bahamas','country_id' => '30'),\narray('id' => '4883','name' => '(RCY) - Rum Cay Airport, , Bahamas','country_id' => '30'),\narray('id' => '4884','name' => '(MYS) - Moyale Airport, Moyale, Ethiopia','country_id' => '66'),\narray('id' => '4885','name' => '(ZSA) - San Salvador Airport, San Salvador, Bahamas','country_id' => '30'),\narray('id' => '4886','name' => '(MYX) - Menyamya Airport, Menyamya, Papua New Guinea','country_id' => '172'),\narray('id' => '4887','name' => '(NTC) - Paradise Island Airport, Santa Carolina, Mozambique','country_id' => '155'),\narray('id' => '4888','name' => '(IBO) - Ibo Airport, Ibo, Mozambique','country_id' => '155'),\narray('id' => '4889','name' => '(TGS) - ChokwA Airport, ChokwA, Mozambique','country_id' => '155'),\narray('id' => '4890','name' => '(BZE) - Philip S. W. Goldson International Airport, Belize City, Belize','country_id' => '34'),\narray('id' => '4891','name' => '(MZE) - Manatee Airport, , Belize','country_id' => '34'),\narray('id' => '4892','name' => '(IMI) - Ine Airport, Arno Atoll, Marshall Islands','country_id' => '139'),\narray('id' => '4893','name' => '(BQI) - Bagani Airport, Bagani, Namibia','country_id' => '156'),\narray('id' => '4894','name' => '(NBS) - Changbaishan Airport, Baishan, China','country_id' => '45'),\narray('id' => '4895','name' => '(AIT) - Aitutaki Airport, Aitutaki, Cook Islands','country_id' => '42'),\narray('id' => '4896','name' => '(AIU) - Enua Airport, Atiu Island, Cook Islands','country_id' => '42'),\narray('id' => '4897','name' => '(MGS) - Mangaia Island Airport, Mangaia Island, Cook Islands','country_id' => '42'),\narray('id' => '4898','name' => '(MHX) - Manihiki Island Airport, Manihiki Island, Cook Islands','country_id' => '42'),\narray('id' => '4899','name' => '(MUK) - Mauke Airport, Mauke Island, Cook Islands','country_id' => '42'),\narray('id' => '4900','name' => '(MOI) - Mitiaro Island Airport, Mitiaro Island, Cook Islands','country_id' => '42'),\narray('id' => '4901','name' => '(PZK) - Pukapuka Island Airport, Pukapuka Atoll, Cook Islands','country_id' => '42'),\narray('id' => '4902','name' => '(PYE) - Tongareva Airport, Penrhyn Island, Cook Islands','country_id' => '42'),\narray('id' => '4903','name' => '(RAR) - Rarotonga International Airport, Avarua, Cook Islands','country_id' => '42'),\narray('id' => '4904','name' => '(NDI) - Namudi Airport, Namudi, Papua New Guinea','country_id' => '172'),\narray('id' => '4905','name' => '(NDN) - Nadunumu Airport, Nadunumu, Papua New Guinea','country_id' => '172'),\narray('id' => '4906','name' => '(EPG) - Browns Airport, Weeping Water, United States','country_id' => '228'),\narray('id' => '4907','name' => '(ICI) - Cicia Airport, Cicia, Fiji','country_id' => '68'),\narray('id' => '4908','name' => '(BFJ) - Ba Airport, , Fiji','country_id' => '68'),\narray('id' => '4909','name' => '(NAN) - Nadi International Airport, Nadi, Fiji','country_id' => '68'),\narray('id' => '4910','name' => '(PTF) - Malolo Lailai Island Airport, Malolo Lailai Island, Fiji','country_id' => '68'),\narray('id' => '4911','name' => '(RBI) - Rabi Island Airport, Rabi Island, Fiji','country_id' => '68'),\narray('id' => '4912','name' => '(KDV) - Vunisea Airport, Vunisea, Fiji','country_id' => '68'),\narray('id' => '4913','name' => '(MNF) - Mana Island Airport, Mana Island, Fiji','country_id' => '68'),\narray('id' => '4914','name' => '(MFJ) - Moala Airport, Moala, Fiji','country_id' => '68'),\narray('id' => '4915','name' => '(SUV) - Nausori International Airport, Nausori, Fiji','country_id' => '68'),\narray('id' => '4916','name' => '(LEV) - Levuka Airfield, Bureta, Fiji','country_id' => '68'),\narray('id' => '4917','name' => '(NGI) - Ngau Airport, Ngau, Fiji','country_id' => '68'),\narray('id' => '4918','name' => '(LUC) - Laucala Island Airport, Laucala Island, Fiji','country_id' => '68'),\narray('id' => '4919','name' => '(LKB) - Lakeba Island Airport, Lakeba Island, Fiji','country_id' => '68'),\narray('id' => '4920','name' => '(LBS) - Labasa Airport, , Fiji','country_id' => '68'),\narray('id' => '4921','name' => '(TVU) - Matei Airport, Matei, Fiji','country_id' => '68'),\narray('id' => '4922','name' => '(KXF) - Koro Island Airport, Koro Island, Fiji','country_id' => '68'),\narray('id' => '4923','name' => '(RTA) - Rotuma Airport, Rotuma, Fiji','country_id' => '68'),\narray('id' => '4924','name' => '(SVU) - Savusavu Airport, Savusavu, Fiji','country_id' => '68'),\narray('id' => '4925','name' => '(VAU) - Vatukoula Airport, Vatukoula, Fiji','country_id' => '68'),\narray('id' => '4926','name' => '(KAY) - Wakaya Island Airport, Wakaya Island, Fiji','country_id' => '68'),\narray('id' => '4927','name' => '(ONU) - Ono-i-Lau Airport, Ono-i-Lau, Fiji','country_id' => '68'),\narray('id' => '4928','name' => '(YAS) - Yasawa Island Airport, Yasawa Island, Fiji','country_id' => '68'),\narray('id' => '4929','name' => '(EUA) - Kaufana Airport, Eua Island, Tonga','country_id' => '219'),\narray('id' => '4930','name' => '(TBU) - Fua\\'amotu International Airport, Nuku\\'alofa, Tonga','country_id' => '219'),\narray('id' => '4931','name' => '(HPA) - Lifuka Island Airport, Lifuka, Tonga','country_id' => '219'),\narray('id' => '4932','name' => '(NFO) - Mata\\'aho Airport, Angaha, Niuafo\\'ou Island, Tonga','country_id' => '219'),\narray('id' => '4933','name' => '(NTT) - Kuini Lavenia Airport, Niuatoputapu, Tonga','country_id' => '219'),\narray('id' => '4934','name' => '(VAV) - Vava\\'u International Airport, Vava\\'u Island, Tonga','country_id' => '219'),\narray('id' => '4935','name' => '(VBV) - Vanua Balavu Airport, Vanua Balavu, Fiji','country_id' => '68'),\narray('id' => '4936','name' => '(VTF) - Vatulele Airport, Vatulele, Fiji','country_id' => '68'),\narray('id' => '4937','name' => '(GMO) - Gombe Lawanti International Airport, Gombe, Nigeria','country_id' => '160'),\narray('id' => '4938','name' => '(PHG) - Port Harcourt City Airport, Port Harcourt, Nigeria','country_id' => '160'),\narray('id' => '4939','name' => '(BCU) - Bauchi Airport, Bauchi, Nigeria','country_id' => '160'),\narray('id' => '4940','name' => '(QRW) - Warri Airport, Warri, Nigeria','country_id' => '160'),\narray('id' => '4941','name' => '(ABF) - Abaiang Airport, Abaiang, Kiribati','country_id' => '114'),\narray('id' => '4942','name' => '(BEZ) - Beru Airport, Beru, Kiribati','country_id' => '114'),\narray('id' => '4943','name' => '(FUN) - Funafuti International Airport, Funafuti, Tuvalu','country_id' => '222'),\narray('id' => '4944','name' => '(KUC) - Kuria Airport, Kuria, Kiribati','country_id' => '114'),\narray('id' => '4945','name' => '(MNK) - Maiana Airport, Maiana, Kiribati','country_id' => '114'),\narray('id' => '4946','name' => '(MZK) - Marakei Airport, Marakei, Kiribati','country_id' => '114'),\narray('id' => '4947','name' => '(MTK) - Makin Island Airport, Makin Island, Kiribati','country_id' => '114'),\narray('id' => '4948','name' => '(NIG) - Nikunau Airport, Nikunau, Kiribati','country_id' => '114'),\narray('id' => '4949','name' => '(OOT) - Onotoa Airport, Onotoa, Kiribati','country_id' => '114'),\narray('id' => '4950','name' => '(TRW) - Bonriki International Airport, Tarawa, Kiribati','country_id' => '114'),\narray('id' => '4951','name' => '(AEA) - Abemama Atoll Airport, Abemama Atoll, Kiribati','country_id' => '114'),\narray('id' => '4952','name' => '(TBF) - Tabiteuea North Airport, , Kiribati','country_id' => '114'),\narray('id' => '4953','name' => '(TMN) - Tamana Island Airport, Tamana Island, Kiribati','country_id' => '114'),\narray('id' => '4954','name' => '(NON) - Nonouti Airport, Nonouti, Kiribati','country_id' => '114'),\narray('id' => '4955','name' => '(AIS) - Arorae Island Airport, Arorae Island, Kiribati','country_id' => '114'),\narray('id' => '4956','name' => '(TSU) - Tabiteuea South Airport, Tabiteuea South, Kiribati','country_id' => '114'),\narray('id' => '4957','name' => '(BBG) - Butaritari Atoll Airport, Butaritari Atoll, Kiribati','country_id' => '114'),\narray('id' => '4958','name' => '(AAK) - Buariki Airport, Buariki, Kiribati','country_id' => '114'),\narray('id' => '4959','name' => '(IUE) - Niue International Airport, Alofi, Niue','country_id' => '166'),\narray('id' => '4960','name' => '(NKD) - Sinak Airport, Sinak, Indonesia','country_id' => '97'),\narray('id' => '4961','name' => '(NLH) - Ninglang Luguhu Airport, Ninglang, China','country_id' => '45'),\narray('id' => '4962','name' => '(FUT) - Pointe Vele Airport, Futuna Island, Wallis and Futuna','country_id' => '238'),\narray('id' => '4963','name' => '(WLS) - Hihifo Airport, Wallis Island, Wallis and Futuna','country_id' => '238'),\narray('id' => '4964','name' => '(HBB) - Industrial Airpark, Hobbs, United States','country_id' => '228'),\narray('id' => '4965','name' => '(NND) - Nangade Airport, Nangade, Mozambique','country_id' => '155'),\narray('id' => '4966','name' => '(NOM) - Nomad River Airport, Nomad River, Papua New Guinea','country_id' => '172'),\narray('id' => '4967','name' => '(NOO) - Naoro Airport, Naoro Vilage, Papua New Guinea','country_id' => '172'),\narray('id' => '4968','name' => '(MWP) - Mountain Airport, Mountain, Nepal','country_id' => '164'),\narray('id' => '4969','name' => '(NPG) - Nipa Airport, Nipa, Papua New Guinea','country_id' => '172'),\narray('id' => '4970','name' => '(NRY) - Newry Airport, Newry, Australia','country_id' => '12'),\narray('id' => '4971','name' => '(OFU) - Ofu Village Airport, Ofu Village, American Samoa','country_id' => '10'),\narray('id' => '4972','name' => '(AAU) - Asau Airport, Asau, Samoa','country_id' => '239'),\narray('id' => '4973','name' => '(APW) - Faleolo International Airport, Apia, Samoa','country_id' => '239'),\narray('id' => '4974','name' => '(FGI) - Fagali\\'i Airport, Apia, Samoa','country_id' => '239'),\narray('id' => '4975','name' => '(FTI) - Fitiuta Airport, Fitiuta Village, American Samoa','country_id' => '10'),\narray('id' => '4976','name' => '(MXS) - Maota Airport, Maota, Samoa','country_id' => '239'),\narray('id' => '4977','name' => '(PPG) - Pago Pago International Airport, Pago Pago, American Samoa','country_id' => '10'),\narray('id' => '4978','name' => '(PPT) - Faa\\'a International Airport, Papeete, French Polynesia','country_id' => '171'),\narray('id' => '4979','name' => '(RMT) - Rimatara Airport, Rimatara Island, French Polynesia','country_id' => '171'),\narray('id' => '4980','name' => '(RUR) - Rurutu Airport, , French Polynesia','country_id' => '171'),\narray('id' => '4981','name' => '(TUB) - Tubuai Airport, , French Polynesia','country_id' => '171'),\narray('id' => '4982','name' => '(RVV) - Raivavae Airport, , French Polynesia','country_id' => '171'),\narray('id' => '4983','name' => '(AAA) - Anaa Airport, , French Polynesia','country_id' => '171'),\narray('id' => '4984','name' => '(FGU) - Fangatau Airport, , French Polynesia','country_id' => '171'),\narray('id' => '4985','name' => '(TIH) - Tikehau Airport, , French Polynesia','country_id' => '171'),\narray('id' => '4986','name' => '(APK) - Apataki Airport, Apataki, French Polynesia','country_id' => '171'),\narray('id' => '4987','name' => '(REA) - Reao Airport, , French Polynesia','country_id' => '171'),\narray('id' => '4988','name' => '(FAV) - Fakarava Airport, , French Polynesia','country_id' => '171'),\narray('id' => '4989','name' => '(HHZ) - Hikueru Atoll Airport, Hikueru Atoll, French Polynesia','country_id' => '171'),\narray('id' => '4990','name' => '(XMH) - Manihi Airport, , French Polynesia','country_id' => '171'),\narray('id' => '4991','name' => '(GMR) - Totegegie Airport, , French Polynesia','country_id' => '171'),\narray('id' => '4992','name' => '(KKR) - Kaukura Airport, , French Polynesia','country_id' => '171'),\narray('id' => '4993','name' => '(MKP) - Makemo Airport, , French Polynesia','country_id' => '171'),\narray('id' => '4994','name' => '(NAU) - Napuka Island Airport, Napuka Island, French Polynesia','country_id' => '171'),\narray('id' => '4995','name' => '(TKV) - Tatakoto Airport, Tatakoto, French Polynesia','country_id' => '171'),\narray('id' => '4996','name' => '(PKP) - Puka Puka Airport, , French Polynesia','country_id' => '171'),\narray('id' => '4997','name' => '(PUK) - Pukarua Airport, Pukarua, French Polynesia','country_id' => '171'),\narray('id' => '4998','name' => '(TKP) - Takapoto Airport, , French Polynesia','country_id' => '171'),\narray('id' => '4999','name' => '(AXR) - Arutua Airport, , French Polynesia','country_id' => '171'),\narray('id' => '5000','name' => '(MVT) - Mataiva Airport, , French Polynesia','country_id' => '171'),\narray('id' => '5001','name' => '(NUK) - Nukutavake Airport, Nukutavake, French Polynesia','country_id' => '171'),\narray('id' => '5002','name' => '(ZTA) - Tureia Airport, , French Polynesia','country_id' => '171'),\narray('id' => '5003','name' => '(AHE) - Ahe Airport, Ahe Atoll, French Polynesia','country_id' => '171'),\narray('id' => '5004','name' => '(KHZ) - Kauehi Airport, Kauehi, French Polynesia','country_id' => '171'),\narray('id' => '5005','name' => '(FAC) - Faaite Airport, , French Polynesia','country_id' => '171'),\narray('id' => '5006','name' => '(FHZ) - Fakahina Airport, Fakahina, French Polynesia','country_id' => '171'),\narray('id' => '5007','name' => '(RKA) - Aratika Nord Airport, , French Polynesia','country_id' => '171'),\narray('id' => '5008','name' => '(TJN) - Takume Airport, Takume, French Polynesia','country_id' => '171'),\narray('id' => '5009','name' => '(NIU) - Naiu Airport, Naiu Atoll, French Polynesia','country_id' => '171'),\narray('id' => '5010','name' => '(RRR) - Raroia Airport, , French Polynesia','country_id' => '171'),\narray('id' => '5011','name' => '(TKX) - Takaroa Airport, , French Polynesia','country_id' => '171'),\narray('id' => '5012','name' => '(KXU) - Katiu Airport, Katiu, French Polynesia','country_id' => '171'),\narray('id' => '5013','name' => '(NKP) - Nukutepipi Airport, Nukutepipi, French Polynesia','country_id' => '171'),\narray('id' => '5014','name' => '(NHV) - Nuku Hiva Airport, , French Polynesia','country_id' => '171'),\narray('id' => '5015','name' => '(AUQ) - Hiva Oa-Atuona Airport, Hiva Oa Island, French Polynesia','country_id' => '171'),\narray('id' => '5016','name' => '(UAP) - Ua Pou Airport, Ua Pou, French Polynesia','country_id' => '171'),\narray('id' => '5017','name' => '(UAH) - Ua Huka Airport, Ua Huka, French Polynesia','country_id' => '171'),\narray('id' => '5018','name' => '(BOB) - Bora Bora Airport, Motu Mute, French Polynesia','country_id' => '171'),\narray('id' => '5019','name' => '(TTI) - Tetiaroa Airport, Tetiaroa, French Polynesia','country_id' => '171'),\narray('id' => '5020','name' => '(RGI) - Rangiroa Airport, , French Polynesia','country_id' => '171'),\narray('id' => '5021','name' => '(HUH) - Huahine-Fare Airport, Fare, French Polynesia','country_id' => '171'),\narray('id' => '5022','name' => '(MOZ) - Moorea Airport, , French Polynesia','country_id' => '171'),\narray('id' => '5023','name' => '(HOI) - Hao Airport, , French Polynesia','country_id' => '171'),\narray('id' => '5024','name' => '(MAU) - Maupiti Airport, , French Polynesia','country_id' => '171'),\narray('id' => '5025','name' => '(RFP) - Raiatea Airport, Uturoa, French Polynesia','country_id' => '171'),\narray('id' => '5026','name' => '(TPX) - Tupai Airport, Tupai Atoll, French Polynesia','country_id' => '171'),\narray('id' => '5027','name' => '(UOA) - Mururoa Atoll Airport, Mururoa Atoll, French Polynesia','country_id' => '171'),\narray('id' => '5028','name' => '(VHZ) - Vahitahi Airport, Vahitahi, French Polynesia','country_id' => '171'),\narray('id' => '5029','name' => '(NUG) - Nuguria Airstrip, Nuguria Island, Papua New Guinea','country_id' => '172'),\narray('id' => '5030','name' => '(UCC) - Yucca Airstrip, Mercury, United States','country_id' => '228'),\narray('id' => '5031','name' => '(MTV) - Mota Lava Airport, Ablow, Vanuatu','country_id' => '237'),\narray('id' => '5032','name' => '(SLH) - Sola Airport, Sola, Vanuatu','country_id' => '237'),\narray('id' => '5033','name' => '(TOH) - Torres Airstrip, Loh/Linua, Vanuatu','country_id' => '237'),\narray('id' => '5034','name' => '(EAE) - Siwo Airport, Emae Island, Vanuatu','country_id' => '237'),\narray('id' => '5035','name' => '(CCV) - Craig Cove Airport, Craig Cove, Vanuatu','country_id' => '237'),\narray('id' => '5036','name' => '(LOD) - Longana Airport, Longana, Vanuatu','country_id' => '237'),\narray('id' => '5037','name' => '(SSR) - Sara Airport, Pentecost Island, Vanuatu','country_id' => '237'),\narray('id' => '5038','name' => '(PBJ) - Tavie Airport, Paama Island, Vanuatu','country_id' => '237'),\narray('id' => '5039','name' => '(LPM) - Lamap Airport, Lamap, Vanuatu','country_id' => '237'),\narray('id' => '5040','name' => '(LNB) - Lamen Bay Airport, Lamen Bay, Vanuatu','country_id' => '237'),\narray('id' => '5041','name' => '(MWF) - Maewo-Naone Airport, Maewo Island, Vanuatu','country_id' => '237'),\narray('id' => '5042','name' => '(LNE) - Lonorore Airport, Lonorore, Vanuatu','country_id' => '237'),\narray('id' => '5043','name' => '(NUS) - Norsup Airport, Norsup, Vanuatu','country_id' => '237'),\narray('id' => '5044','name' => '(ZGU) - Gaua Island Airport, Gaua Island, Vanuatu','country_id' => '237'),\narray('id' => '5045','name' => '(RCL) - Redcliffe Airport, Redcliffe, Vanuatu','country_id' => '237'),\narray('id' => '5046','name' => '(SON) - Santo Pekoa International Airport, Luganville, Vanuatu','country_id' => '237'),\narray('id' => '5047','name' => '(TGH) - Tongoa Airport, Tongoa Island, Vanuatu','country_id' => '237'),\narray('id' => '5048','name' => '(ULB) - UlAi Airport, Ambryn Island, Vanuatu','country_id' => '237'),\narray('id' => '5049','name' => '(VLS) - Valesdir Airport, Epi Island, Vanuatu','country_id' => '237'),\narray('id' => '5050','name' => '(WLH) - Walaha Airport, Walaha, Vanuatu','country_id' => '237'),\narray('id' => '5051','name' => '(SWJ) - Southwest Bay Airport, Malekula Island, Vanuatu','country_id' => '237'),\narray('id' => '5052','name' => '(OLJ) - North West Santo Airport, Olpoi, Vanuatu','country_id' => '237'),\narray('id' => '5053','name' => '(AUY) - Aneityum Airport, Anatom Island, Vanuatu','country_id' => '237'),\narray('id' => '5054','name' => '(AWD) - Aniwa Airport, Aniwa, Vanuatu','country_id' => '237'),\narray('id' => '5055','name' => '(DLY) - Dillon\\'s Bay Airport, Dillon\\'s Bay, Vanuatu','country_id' => '237'),\narray('id' => '5056','name' => '(FTA) - Futuna Airport, Futuna Island, Vanuatu','country_id' => '237'),\narray('id' => '5057','name' => '(IPA) - Ipota Airport, Ipota, Vanuatu','country_id' => '237'),\narray('id' => '5058','name' => '(UIQ) - Quion Hill Airport, Quion Hill, Vanuatu','country_id' => '237'),\narray('id' => '5059','name' => '(VLI) - Bauerfield International Airport, Port Vila, Vanuatu','country_id' => '237'),\narray('id' => '5060','name' => '(TAH) - Tanna Airport, , Vanuatu','country_id' => '237'),\narray('id' => '5061','name' => '(NWT) - Nowata Airport, Nowata, Papua New Guinea','country_id' => '172'),\narray('id' => '5062','name' => '(TGJ) - Tiga Airport, Tiga, New Caledonia','country_id' => '157'),\narray('id' => '5063','name' => '(BMY) - Ale Art - Waala Airport, Waala, New Caledonia','country_id' => '157'),\narray('id' => '5064','name' => '(KNQ) - KonA Airport, KonA, New Caledonia','country_id' => '157'),\narray('id' => '5065','name' => '(ILP) - Ale des Pins Airport, Ale des Pins, New Caledonia','country_id' => '157'),\narray('id' => '5066','name' => '(HLU) - Nesson Airport, Houailou, New Caledonia','country_id' => '157'),\narray('id' => '5067','name' => '(KOC) - Koumac Airport, Koumac, New Caledonia','country_id' => '157'),\narray('id' => '5068','name' => '(LIF) - Lifou Airport, Lifou, New Caledonia','country_id' => '157'),\narray('id' => '5069','name' => '(GEA) - NoumAa Magenta Airport, NoumAa, New Caledonia','country_id' => '157'),\narray('id' => '5070','name' => '(IOU) - Edmond CanA Airport, Ale Ouen, New Caledonia','country_id' => '157'),\narray('id' => '5071','name' => '(PUV) - Poum Airport, Poum, New Caledonia','country_id' => '157'),\narray('id' => '5072','name' => '(PDC) - Mueo Airport, Mueo, New Caledonia','country_id' => '157'),\narray('id' => '5073','name' => '(MEE) - MarA Airport, MarA, New Caledonia','country_id' => '157'),\narray('id' => '5074','name' => '(TOU) - Touho Airport, Touho, New Caledonia','country_id' => '157'),\narray('id' => '5075','name' => '(UVE) - OuvAa Airport, OuvAa, New Caledonia','country_id' => '157'),\narray('id' => '5076','name' => '(NOU) - La Tontouta International Airport, NoumAa, New Caledonia','country_id' => '157'),\narray('id' => '5077','name' => '(AKL) - Auckland International Airport, Auckland, New Zealand','country_id' => '167'),\narray('id' => '5078','name' => '(TUO) - Taupo Airport, Taupo, New Zealand','country_id' => '167'),\narray('id' => '5079','name' => '(AMZ) - Ardmore Airport, Manurewa, New Zealand','country_id' => '167'),\narray('id' => '5080','name' => '(ASG) - Ashburton Aerodrome, , New Zealand','country_id' => '167'),\narray('id' => '5081','name' => '(CHC) - Christchurch International Airport, Christchurch, New Zealand','country_id' => '167'),\narray('id' => '5082','name' => '(CHT) - Chatham Islands-Tuuta Airport, Waitangi, New Zealand','country_id' => '167'),\narray('id' => '5083','name' => '(CMV) - Coromandel Aerodrome, , New Zealand','country_id' => '167'),\narray('id' => '5084','name' => '(DGR) - Dargaville Aerodrome, , New Zealand','country_id' => '167'),\narray('id' => '5085','name' => '(DUD) - Dunedin Airport, Dunedin, New Zealand','country_id' => '167'),\narray('id' => '5086','name' => '(WHO) - Franz Josef Aerodrome, , New Zealand','country_id' => '167'),\narray('id' => '5087','name' => '(GBZ) - Great Barrier Aerodrome, Claris, New Zealand','country_id' => '167'),\narray('id' => '5088','name' => '(GMN) - Greymouth Airport, , New Zealand','country_id' => '167'),\narray('id' => '5089','name' => '(GIS) - Gisborne Airport, Gisborne, New Zealand','country_id' => '167'),\narray('id' => '5090','name' => '(GTN) - Glentanner Airport, Glentanner Station, New Zealand','country_id' => '167'),\narray('id' => '5091','name' => '(HKK) - Hokitika Airfield, , New Zealand','country_id' => '167'),\narray('id' => '5092','name' => '(HLZ) - Hamilton International Airport, Hamilton, New Zealand','country_id' => '167'),\narray('id' => '5093','name' => '(WIK) - Waiheke Reeve Airport, , New Zealand','country_id' => '167'),\narray('id' => '5094','name' => '(KBZ) - Kaikoura Airport, , New Zealand','country_id' => '167'),\narray('id' => '5095','name' => '(KKE) - Kerikeri Airport, Kerikeri, New Zealand','country_id' => '167'),\narray('id' => '5096','name' => '(KKO) - Kaikohe Airport, , New Zealand','country_id' => '167'),\narray('id' => '5097','name' => '(KAT) - Kaitaia Airport, Kaitaia, New Zealand','country_id' => '167'),\narray('id' => '5098','name' => '(ALR) - Alexandra Airport, Alexandra, New Zealand','country_id' => '167'),\narray('id' => '5099','name' => '(MTA) - Matamata Glider Airport, , New Zealand','country_id' => '167'),\narray('id' => '5100','name' => '(MON) - Mount Cook Airport, , New Zealand','country_id' => '167'),\narray('id' => '5101','name' => '(MFN) - Milford Sound Airport, , New Zealand','country_id' => '167'),\narray('id' => '5102','name' => '(MZP) - Motueka Airport, , New Zealand','country_id' => '167'),\narray('id' => '5103','name' => '(TEU) - Manapouri Airport, , New Zealand','country_id' => '167'),\narray('id' => '5104','name' => '(MRO) - Hood Airport, Masterton, New Zealand','country_id' => '167'),\narray('id' => '5105','name' => '(NPL) - New Plymouth Airport, New Plymouth, New Zealand','country_id' => '167'),\narray('id' => '5106','name' => '(NPE) - Napier Airport, , New Zealand','country_id' => '167'),\narray('id' => '5107','name' => '(NSN) - Nelson Airport, Nelson, New Zealand','country_id' => '167'),\narray('id' => '5108','name' => '(IVC) - Invercargill Airport, Invercargill, New Zealand','country_id' => '167'),\narray('id' => '5109','name' => '(OHA) - RNZAF Base Ohakea, , New Zealand','country_id' => '167'),\narray('id' => '5110','name' => '(OAM) - Oamaru Airport, , New Zealand','country_id' => '167'),\narray('id' => '5111','name' => '(PMR) - Palmerston North Airport, , New Zealand','country_id' => '167'),\narray('id' => '5112','name' => '(PCN) - Picton Aerodrome, Koromiko, New Zealand','country_id' => '167'),\narray('id' => '5113','name' => '(PPQ) - Paraparaumu Airport, , New Zealand','country_id' => '167'),\narray('id' => '5114','name' => '(ZQN) - Queenstown International Airport, Queenstown, New Zealand','country_id' => '167'),\narray('id' => '5115','name' => '(RAG) - Raglan Airfield, , New Zealand','country_id' => '167'),\narray('id' => '5116','name' => '(SZS) - Ryans Creek Aerodrome, Oban, New Zealand','country_id' => '167'),\narray('id' => '5117','name' => '(ROT) - Rotorua Regional Airport, Rotorua, New Zealand','country_id' => '167'),\narray('id' => '5118','name' => '(TRG) - Tauranga Airport, Tauranga, New Zealand','country_id' => '167'),\narray('id' => '5119','name' => '(TMZ) - Thames Aerodrome, , New Zealand','country_id' => '167'),\narray('id' => '5120','name' => '(KTF) - Takaka Airport, , New Zealand','country_id' => '167'),\narray('id' => '5121','name' => '(TKZ) - Tokoroa Airfield, Tokoroa, New Zealand','country_id' => '167'),\narray('id' => '5122','name' => '(THH) - Taharoa Aerodrome, Taharoa, New Zealand','country_id' => '167'),\narray('id' => '5123','name' => '(TIU) - Timaru Airport, , New Zealand','country_id' => '167'),\narray('id' => '5124','name' => '(TWZ) - Pukaki Airport, Twitzel, New Zealand','country_id' => '167'),\narray('id' => '5125','name' => '(BHE) - Woodbourne Airport, Blenheim, New Zealand','country_id' => '167'),\narray('id' => '5126','name' => '(WKA) - Wanaka Airport, , New Zealand','country_id' => '167'),\narray('id' => '5127','name' => '(WHK) - Whakatane Airport, , New Zealand','country_id' => '167'),\narray('id' => '5128','name' => '(WLG) - Wellington International Airport, Wellington, New Zealand','country_id' => '167'),\narray('id' => '5129','name' => '(WIR) - Wairoa Airport, Wairoa, New Zealand','country_id' => '167'),\narray('id' => '5130','name' => '(WRE) - Whangarei Airport, , New Zealand','country_id' => '167'),\narray('id' => '5131','name' => '(WSZ) - Westport Airport, , New Zealand','country_id' => '167'),\narray('id' => '5132','name' => '(WTZ) - Whitianga Airport, , New Zealand','country_id' => '167'),\narray('id' => '5133','name' => '(WAG) - Wanganui Airport, Wanganui, New Zealand','country_id' => '167'),\narray('id' => '5134','name' => '(NLN) - Kneeland Airport, Eureka, United States','country_id' => '228'),\narray('id' => '5135','name' => '(BZF) - Benton Field, Redding, United States','country_id' => '228'),\narray('id' => '5136','name' => '(OAA) - Shank Air Base, , Afghanistan','country_id' => '2'),\narray('id' => '5137','name' => '(BIN) - Bamiyan Airport, Bamiyan, Afghanistan','country_id' => '2'),\narray('id' => '5138','name' => '(BST) - Bost Airport, Bost, Afghanistan','country_id' => '2'),\narray('id' => '5139','name' => '(CCN) - Chakcharan Airport, Chakcharan, Afghanistan','country_id' => '2'),\narray('id' => '5140','name' => '(SBF) - Sardeh Band Airport, Sardeh Band, Afghanistan','country_id' => '2'),\narray('id' => '5141','name' => '(DAZ) - Darwaz Airport, Darwaz, Afghanistan','country_id' => '2'),\narray('id' => '5142','name' => '(FAH) - Farah Airport, Farah, Afghanistan','country_id' => '2'),\narray('id' => '5143','name' => '(FBD) - Fayzabad Airport, Fayzabad, Afghanistan','country_id' => '2'),\narray('id' => '5144','name' => '(GZI) - Ghazni Airport, Ghazni, Afghanistan','country_id' => '2'),\narray('id' => '5145','name' => '(KWH) - Khwahan Airport, Khwahan, Afghanistan','country_id' => '2'),\narray('id' => '5146','name' => '(HEA) - Herat Airport, , Afghanistan','country_id' => '2'),\narray('id' => '5147','name' => '(OAI) - Bagram Air Base, Bagram, Afghanistan','country_id' => '2'),\narray('id' => '5148','name' => '(JAA) - Jalalabad Airport, , Afghanistan','country_id' => '2'),\narray('id' => '5149','name' => '(GRG) - Gardez Airport, Gardez, Afghanistan','country_id' => '2'),\narray('id' => '5150','name' => '(KBL) - Kabul International Airport, Kabul, Afghanistan','country_id' => '2'),\narray('id' => '5151','name' => '(KDH) - Kandahar Airport, , Afghanistan','country_id' => '2'),\narray('id' => '5152','name' => '(KHT) - Khost Airport, Khost, Afghanistan','country_id' => '2'),\narray('id' => '5153','name' => '(MMZ) - Maimana Airport, , Afghanistan','country_id' => '2'),\narray('id' => '5154','name' => '(MZR) - Mazar I Sharif Airport, , Afghanistan','country_id' => '2'),\narray('id' => '5155','name' => '(URN) - Urgun Airport, Urgun, Afghanistan','country_id' => '2'),\narray('id' => '5156','name' => '(LQN) - Qala-I-Naw Airport, Qala-I-Naw, Afghanistan','country_id' => '2'),\narray('id' => '5157','name' => '(OAS) - Sharana Airstrip, Sharana, Afghanistan','country_id' => '2'),\narray('id' => '5158','name' => '(OAH) - Shindand Airport, , Afghanistan','country_id' => '2'),\narray('id' => '5159','name' => '(SGA) - Sheghnan Airport, Sheghnan, Afghanistan','country_id' => '2'),\narray('id' => '5160','name' => '(TII) - Tarin Kowt Airport, Tarin Kowt, Afghanistan','country_id' => '2'),\narray('id' => '5161','name' => '(TQN) - Talolqan Airport, Taloqan, Afghanistan','country_id' => '2'),\narray('id' => '5162','name' => '(UND) - Konduz Airport, , Afghanistan','country_id' => '2'),\narray('id' => '5163','name' => '(OAZ) - Camp Bastion Airport, , Afghanistan','country_id' => '2'),\narray('id' => '5164','name' => '(ZAJ) - Zaranj Airport, Zaranj, Afghanistan','country_id' => '2'),\narray('id' => '5165','name' => '(BAH) - Bahrain International Airport, Manama, Bahrain','country_id' => '21'),\narray('id' => '5166','name' => '(OCS) - Corisco International Airport, Corisco Island, Equatorial Guinea','country_id' => '85'),\narray('id' => '5167','name' => '(AHB) - Abha Regional Airport, Abha, Saudi Arabia','country_id' => '189'),\narray('id' => '5168','name' => '(HOF) - Al Ahsa Airport, , Saudi Arabia','country_id' => '189'),\narray('id' => '5169','name' => '(ABT) - Al Baha Airport, , Saudi Arabia','country_id' => '189'),\narray('id' => '5170','name' => '(BHH) - Bisha Airport, , Saudi Arabia','country_id' => '189'),\narray('id' => '5171','name' => '(DMM) - King Fahd International Airport, Ad Dammam, Saudi Arabia','country_id' => '189'),\narray('id' => '5172','name' => '(DHA) - King Abdulaziz Air Base, , Saudi Arabia','country_id' => '189'),\narray('id' => '5173','name' => '(DWD) - Dawadmi Domestic Airport, Dawadmi, Saudi Arabia','country_id' => '189'),\narray('id' => '5174','name' => '(GIZ) - Jizan Regional Airport, Jizan, Saudi Arabia','country_id' => '189'),\narray('id' => '5175','name' => '(ELQ) - Gassim Airport, , Saudi Arabia','country_id' => '189'),\narray('id' => '5176','name' => '(URY) - Gurayat Domestic Airport, Gurayat, Saudi Arabia','country_id' => '189'),\narray('id' => '5177','name' => '(HAS) - Ha\\'il Airport, Ha\"il, Saudi Arabia','country_id' => '189'),\narray('id' => '5178','name' => '(QJB) - Jubail Airport, Jubail, Saudi Arabia','country_id' => '189'),\narray('id' => '5179','name' => '(JED) - King Abdulaziz International Airport, Jeddah, Saudi Arabia','country_id' => '189'),\narray('id' => '5180','name' => '(KMC) - King Khaled Military City Airport, King Khaled Military City, Saudi Arabia','country_id' => '189'),\narray('id' => '5181','name' => '(KMX) - King Khaled Air Base, , Saudi Arabia','country_id' => '189'),\narray('id' => '5182','name' => '(MED) - Prince Mohammad Bin Abdulaziz Airport, Medina, Saudi Arabia','country_id' => '189'),\narray('id' => '5183','name' => '(EAM) - Nejran Airport, , Saudi Arabia','country_id' => '189'),\narray('id' => '5184','name' => '(AQI) - Al Qaisumah/Hafr Al Batin Airport, Qaisumah, Saudi Arabia','country_id' => '189'),\narray('id' => '5185','name' => '(AKH) - Prince Sultan Air Base, , Saudi Arabia','country_id' => '189'),\narray('id' => '5186','name' => '(RAH) - Rafha Domestic Airport, Rafha, Saudi Arabia','country_id' => '189'),\narray('id' => '5187','name' => '(RUH) - King Khaled International Airport, Riyadh, Saudi Arabia','country_id' => '189'),\narray('id' => '5188','name' => '(RAE) - Arar Domestic Airport, Arar, Saudi Arabia','country_id' => '189'),\narray('id' => '5189','name' => '(XXN) - Riyadh Air Base, Riyadh, Saudi Arabia','country_id' => '189'),\narray('id' => '5190','name' => '(SHW) - Sharurah Airport, , Saudi Arabia','country_id' => '189'),\narray('id' => '5191','name' => '(AJF) - Al-Jawf Domestic Airport, Al-Jawf, Saudi Arabia','country_id' => '189'),\narray('id' => '5192','name' => '(SLF) - Sulayel Airport, , Saudi Arabia','country_id' => '189'),\narray('id' => '5193','name' => '(TUU) - Tabuk Airport, Tabuk, Saudi Arabia','country_id' => '189'),\narray('id' => '5194','name' => '(TIF) - Taaif Regional Airport, Taaif, Saudi Arabia','country_id' => '189'),\narray('id' => '5195','name' => '(TUI) - Turaif Domestic Airport, Turaif, Saudi Arabia','country_id' => '189'),\narray('id' => '5196','name' => '(WAE) - Wadi Al Dawasir Airport, , Saudi Arabia','country_id' => '189'),\narray('id' => '5197','name' => '(EJH) - Al Wajh Domestic Airport, Al Wajh, Saudi Arabia','country_id' => '189'),\narray('id' => '5198','name' => '(YNB) - Prince Abdulmohsin Bin Abdulaziz Airport, Yanbu, Saudi Arabia','country_id' => '189'),\narray('id' => '5199','name' => '(ZUL) - Zilfi Airport, Zilfi, Saudi Arabia','country_id' => '189'),\narray('id' => '5200','name' => '(OGE) - Ogeranang Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '5201','name' => '(OGM) - Ogubsucum Airport, Ustupo, Panama','country_id' => '169'),\narray('id' => '5202','name' => '(ABD) - Abadan Airport, Abadan, Iran','country_id' => '104'),\narray('id' => '5203','name' => '(DEF) - Dezful Airport, , Iran','country_id' => '104'),\narray('id' => '5204','name' => '(AKW) - Aghajari Airport, Aghajari,, Iran','country_id' => '104'),\narray('id' => '5205','name' => '(GCH) - Gachsaran Airport, Gachsaran, Iran','country_id' => '104'),\narray('id' => '5206','name' => '(OMI) - Omidiyeh Airport, Omidiyeh, Iran','country_id' => '104'),\narray('id' => '5207','name' => '(MRX) - Mahshahr Airport, , Iran','country_id' => '104'),\narray('id' => '5208','name' => '(AWZ) - Ahwaz Airport, Ahwaz, Iran','country_id' => '104'),\narray('id' => '5209','name' => '(AEU) - Abumusa Island Airport, , Iran','country_id' => '104'),\narray('id' => '5210','name' => '(BUZ) - Bushehr Airport, Bushehr, Iran','country_id' => '104'),\narray('id' => '5211','name' => '(KNR) - Jam Airport, Kangan, Iran','country_id' => '104'),\narray('id' => '5212','name' => '(KIH) - Kish International Airport, Kish Island, Iran','country_id' => '104'),\narray('id' => '5213','name' => '(BDH) - Bandar Lengeh Airport, Bandar Lengeh, Iran','country_id' => '104'),\narray('id' => '5214','name' => '(PGU) - Persian Gulf International Airport, Asalouyeh, Iran','country_id' => '104'),\narray('id' => '5215','name' => '(KHK) - Khark Island Airport, , Iran','country_id' => '104'),\narray('id' => '5216','name' => '(SXI) - Sirri Island Airport, , Iran','country_id' => '104'),\narray('id' => '5217','name' => '(LVP) - Lavan Island Airport, , Iran','country_id' => '104'),\narray('id' => '5218','name' => '(KSH) - Shahid Ashrafi Esfahani Airport, Kermanshah, Iran','country_id' => '104'),\narray('id' => '5219','name' => '(IIL) - Ilam Airport, Ilam, Iran','country_id' => '104'),\narray('id' => '5220','name' => '(KHD) - Khoram Abad Airport, , Iran','country_id' => '104'),\narray('id' => '5221','name' => '(SDG) - Sanandaj Airport, , Iran','country_id' => '104'),\narray('id' => '5222','name' => '(IFH) - Hesa Airport, Hesa, Iran','country_id' => '104'),\narray('id' => '5223','name' => '(IFN) - Esfahan Shahid Beheshti International Airport, Isfahan, Iran','country_id' => '104'),\narray('id' => '5224','name' => '(CQD) - Shahrekord Airport, Shahrekord, Iran','country_id' => '104'),\narray('id' => '5225','name' => '(RAS) - Sardar-e-Jangal Airport, Rasht, Iran','country_id' => '104'),\narray('id' => '5226','name' => '(HDM) - Hamadan Airport, Hamadan, Iran','country_id' => '104'),\narray('id' => '5227','name' => '(AJK) - Arak Airport, Araak, Iran','country_id' => '104'),\narray('id' => '5228','name' => '(IKA) - Imam Khomeini International Airport, Tehran, Iran','country_id' => '104'),\narray('id' => '5229','name' => '(THR) - Mehrabad International Airport, Tehran, Iran','country_id' => '104'),\narray('id' => '5230','name' => '(PYK) - Payam International Airport, Karaj, Iran','country_id' => '104'),\narray('id' => '5231','name' => '(BND) - Bandar Abbas International Airport, Bandar Abbas, Iran','country_id' => '104'),\narray('id' => '5232','name' => '(JYR) - Jiroft Airport, Jiroft, Iran','country_id' => '104'),\narray('id' => '5233','name' => '(KER) - Kerman Airport, Kerman, Iran','country_id' => '104'),\narray('id' => '5234','name' => '(BXR) - Bam Airport, , Iran','country_id' => '104'),\narray('id' => '5235','name' => '(HDR) - Havadarya Airport, Havadarya, Iran','country_id' => '104'),\narray('id' => '5236','name' => '(RJN) - Rafsanjan Airport, , Iran','country_id' => '104'),\narray('id' => '5237','name' => '(SYJ) - Sirjan Airport, , Iran','country_id' => '104'),\narray('id' => '5238','name' => '(XBJ) - Birjand Airport, Birjand, Iran','country_id' => '104'),\narray('id' => '5239','name' => '(CKT) - Sarakhs Airport, Sarakhs, Iran','country_id' => '104'),\narray('id' => '5240','name' => '(RUD) - Shahroud Airport, , Iran','country_id' => '104'),\narray('id' => '5241','name' => '(MHD) - Mashhad International Airport, Mashhad, Iran','country_id' => '104'),\narray('id' => '5242','name' => '(BJB) - Bojnord Airport, Bojnord, Iran','country_id' => '104'),\narray('id' => '5243','name' => '(AFZ) - Sabzevar National Airport, Sabzevar, Iran','country_id' => '104'),\narray('id' => '5244','name' => '(TCX) - Tabas Airport, Tabas, Iran','country_id' => '104'),\narray('id' => '5245','name' => '(KLM) - Kalaleh Airport, Kalaleh, Iran','country_id' => '104'),\narray('id' => '5246','name' => '(GBT) - Gorgan Airport, Gorgan, Iran','country_id' => '104'),\narray('id' => '5247','name' => '(BSM) - Bishe Kola Air Base, Amol, Iran','country_id' => '104'),\narray('id' => '5248','name' => '(NSH) - Noshahr Airport, , Iran','country_id' => '104'),\narray('id' => '5249','name' => '(RZR) - Ramsar Airport, , Iran','country_id' => '104'),\narray('id' => '5250','name' => '(SRY) - Dasht-e Naz Airport, Sari, Iran','country_id' => '104'),\narray('id' => '5251','name' => '(FAZ) - Fasa Airport, Fasa, Iran','country_id' => '104'),\narray('id' => '5252','name' => '(JAR) - Jahrom Airport, Jahrom, Iran','country_id' => '104'),\narray('id' => '5253','name' => '(LRR) - Lar Airport, Lar, Iran','country_id' => '104'),\narray('id' => '5254','name' => '(LFM) - Lamerd Airport, Lamerd, Iran','country_id' => '104'),\narray('id' => '5255','name' => '(SYZ) - Shiraz Shahid Dastghaib International Airport, Shiraz, Iran','country_id' => '104'),\narray('id' => '5256','name' => '(YES) - Yasouj Airport, Yasouj, Iran','country_id' => '104'),\narray('id' => '5257','name' => '(KHY) - Khoy Airport, Khoy, Iran','country_id' => '104'),\narray('id' => '5258','name' => '(ADU) - Ardabil Airport, Ardabil, Iran','country_id' => '104'),\narray('id' => '5259','name' => '(ACP) - Sahand Airport, Maragheh, Iran','country_id' => '104'),\narray('id' => '5260','name' => '(PFQ) - Parsabade Moghan Airport, Parsabad, Iran','country_id' => '104'),\narray('id' => '5261','name' => '(OMH) - Urmia Airport, Urmia, Iran','country_id' => '104'),\narray('id' => '5262','name' => '(TBZ) - Tabriz International Airport, Tabriz, Iran','country_id' => '104'),\narray('id' => '5263','name' => '(JWN) - Zanjan Airport, Zanjan, Iran','country_id' => '104'),\narray('id' => '5264','name' => '(AZD) - Shahid Sadooghi Airport, Yazd, Iran','country_id' => '104'),\narray('id' => '5265','name' => '(ACZ) - Zabol Airport, , Iran','country_id' => '104'),\narray('id' => '5266','name' => '(ZBR) - Konarak Airport, Chabahar, Iran','country_id' => '104'),\narray('id' => '5267','name' => '(ZAH) - Zahedan International Airport, Zahedan, Iran','country_id' => '104'),\narray('id' => '5268','name' => '(IHR) - Iran Shahr Airport, Iranshahr, Iran','country_id' => '104'),\narray('id' => '5269','name' => '(AMM) - Queen Alia International Airport, Amman, Jordan','country_id' => '109'),\narray('id' => '5270','name' => '(ADJ) - Amman-Marka International Airport, Amman, Jordan','country_id' => '109'),\narray('id' => '5271','name' => '(AQJ) - Aqaba King Hussein International Airport, Aqaba, Jordan','country_id' => '109'),\narray('id' => '5272','name' => '(OMF) - King Hussein Air College, Mafraq, Jordan','country_id' => '109'),\narray('id' => '5273','name' => '(XIJ) - Ahmed Al Jaber Air Base, Ahmed Al Jaber AB, Kuwait','country_id' => '119'),\narray('id' => '5274','name' => '(KWI) - Kuwait International Airport, Kuwait City, Kuwait','country_id' => '119'),\narray('id' => '5275','name' => '(OKV) - Okao Airport, Okao, Papua New Guinea','country_id' => '172'),\narray('id' => '5276','name' => '(BEY) - Beirut Rafic Hariri International Airport, Beirut, Lebanon','country_id' => '123'),\narray('id' => '5277','name' => '(KYE) - Rene Mouawad Air Base, Tripoli, Lebanon','country_id' => '123'),\narray('id' => '5278','name' => '(OLQ) - Olsobip Airport, Olsobip, Papua New Guinea','country_id' => '172'),\narray('id' => '5279','name' => '(BYB) - Dibba Airport, Dibba Al-Baya, Oman','country_id' => '168'),\narray('id' => '5280','name' => '(AOM) - Adam Airport, Adam, Oman','country_id' => '168'),\narray('id' => '5281','name' => '(JNJ) - Duqm Jaaluni Airport, Duqm, Oman','country_id' => '168'),\narray('id' => '5282','name' => '(MNH) - Rustaq Airport, Al Masna\\'ah, Oman','country_id' => '168'),\narray('id' => '5283','name' => '(AUH) - Abu Dhabi International Airport, Abu Dhabi, United Arab Emirates','country_id' => '1'),\narray('id' => '5284','name' => '(AZI) - Bateen Airport, , United Arab Emirates','country_id' => '1'),\narray('id' => '5285','name' => '(AAN) - Al Ain International Airport, Al Ain, United Arab Emirates','country_id' => '1'),\narray('id' => '5286','name' => '(DHF) - Al Dhafra Air Base, , United Arab Emirates','country_id' => '1'),\narray('id' => '5287','name' => '(XSB) - Sir Bani Yas Airport, , United Arab Emirates','country_id' => '1'),\narray('id' => '5288','name' => '(DXB) - Dubai International Airport, Dubai, United Arab Emirates','country_id' => '1'),\narray('id' => '5289','name' => '(NHD) - Al Minhad Air Base, Dubai, United Arab Emirates','country_id' => '1'),\narray('id' => '5290','name' => '(DWC) - Al Maktoum International Airport, Jebel Ali, United Arab Emirates','country_id' => '1'),\narray('id' => '5291','name' => '(FJR) - Fujairah International Airport, , United Arab Emirates','country_id' => '1'),\narray('id' => '5292','name' => '(OMN) - Osmanabad Airport, Osmanabad, India','country_id' => '101'),\narray('id' => '5293','name' => '(RKT) - Ras Al Khaimah International Airport, Ras Al Khaimah, United Arab Emirates','country_id' => '1'),\narray('id' => '5294','name' => '(SHJ) - Sharjah International Airport, Sharjah, United Arab Emirates','country_id' => '1'),\narray('id' => '5295','name' => '(OMY) - Preah Vinhear Airport, Tbeng Meanchey, Cambodia','country_id' => '113'),\narray('id' => '5296','name' => '(ONB) - Ononge Airport, Onange Mission, Papua New Guinea','country_id' => '172'),\narray('id' => '5297','name' => '(RMB) - Buraimi Airport, Buraimi, Oman','country_id' => '168'),\narray('id' => '5298','name' => '(FAU) - Fahud Airport, Fahud, Oman','country_id' => '168'),\narray('id' => '5299','name' => '(RNM) - Qarn Alam Airport, Ghaba, Oman','country_id' => '168'),\narray('id' => '5300','name' => '(JNJ) - Ja\\'Aluni Airport, Duqm, Oman','country_id' => '168'),\narray('id' => '5301','name' => '(KHS) - Khasab Air Base, Khasab, Oman','country_id' => '168'),\narray('id' => '5302','name' => '(LKW) - Lekhwair Airport, , Oman','country_id' => '168'),\narray('id' => '5303','name' => '(MSH) - Masirah Air Base, Masirah, Oman','country_id' => '168'),\narray('id' => '5304','name' => '(MCT) - Muscat International Airport, Muscat, Oman','country_id' => '168'),\narray('id' => '5305','name' => '(OMM) - Marmul Airport, Marmul, Oman','country_id' => '168'),\narray('id' => '5306','name' => '(SLL) - Salalah Airport, Salalah, Oman','country_id' => '168'),\narray('id' => '5307','name' => '(SUH) - Sur Airport, Sur, Oman','country_id' => '168'),\narray('id' => '5308','name' => '(TTH) - Thumrait Air Base, Thumrait, Oman','country_id' => '168'),\narray('id' => '5309','name' => '(DDU) - Dadu West Airport, Dadu, Pakistan','country_id' => '174'),\narray('id' => '5310','name' => '(AAW) - Abbottabad Airport, Abbottabad, Pakistan','country_id' => '174'),\narray('id' => '5311','name' => '(BHW) - Bhagatanwala Airport, Bhagatanwala, Pakistan','country_id' => '174'),\narray('id' => '5312','name' => '(BNP) - Bannu Airport, Bannu, Pakistan','country_id' => '174'),\narray('id' => '5313','name' => '(WGB) - Bahawalnagar Airport, Bahawalnagar, Pakistan','country_id' => '174'),\narray('id' => '5314','name' => '(BHV) - Bahawalpur Airport, Bahawalpur, Pakistan','country_id' => '174'),\narray('id' => '5315','name' => '(CJL) - Chitral Airport, Chitral, Pakistan','country_id' => '174'),\narray('id' => '5316','name' => '(CHB) - Chilas Airport, Chilas, Pakistan','country_id' => '174'),\narray('id' => '5317','name' => '(DBA) - Dalbandin Airport, Dalbandin, Pakistan','country_id' => '174'),\narray('id' => '5318','name' => '(DDU) - Dadu Airport, Dadu, Pakistan','country_id' => '174'),\narray('id' => '5319','name' => '(DEA) - Dera Ghazi Khan Airport, Dera Ghazi Khan, Pakistan','country_id' => '174'),\narray('id' => '5320','name' => '(DSK) - Dera Ismael Khan Airport, Dera Ismael Khan, Pakistan','country_id' => '174'),\narray('id' => '5321','name' => '(LYP) - Faisalabad International Airport, Faisalabad, Pakistan','country_id' => '174'),\narray('id' => '5322','name' => '(GWD) - Gwadar International Airport, Gwadar, Pakistan','country_id' => '174'),\narray('id' => '5323','name' => '(GIL) - Gilgit Airport, Gilgit, Pakistan','country_id' => '174'),\narray('id' => '5324','name' => '(JAG) - Shahbaz Air Base, Jacobabad, Pakistan','country_id' => '174'),\narray('id' => '5325','name' => '(JIW) - Jiwani Airport, Jiwani, Pakistan','country_id' => '174'),\narray('id' => '5326','name' => '(KHI) - Jinnah International Airport, Karachi, Pakistan','country_id' => '174'),\narray('id' => '5327','name' => '(HDD) - Hyderabad Airport, Hyderabad, Pakistan','country_id' => '174'),\narray('id' => '5328','name' => '(KDD) - Khuzdar Airport, Khuzdar, Pakistan','country_id' => '174'),\narray('id' => '5329','name' => '(KBH) - Kalat Airport, Kalat, Pakistan','country_id' => '174'),\narray('id' => '5330','name' => '(OHT) - Kohat Airport, Kohat, Pakistan','country_id' => '174'),\narray('id' => '5331','name' => '(LHE) - Alama Iqbal International Airport, Lahore, Pakistan','country_id' => '174'),\narray('id' => '5332','name' => '(LRG) - Loralai Airport, Loralai, Pakistan','country_id' => '174'),\narray('id' => '5333','name' => '(XJM) - Mangla Airport, Mangla, Pakistan','country_id' => '174'),\narray('id' => '5334','name' => '(MFG) - Muzaffarabad Airport, Muzaffarabad, Pakistan','country_id' => '174'),\narray('id' => '5335','name' => '(MWD) - Mianwali Air Base, Mianwali, Pakistan','country_id' => '174'),\narray('id' => '5336','name' => '(MJD) - Moenjodaro Airport, Moenjodaro, Pakistan','country_id' => '174'),\narray('id' => '5337','name' => '(MPD) - Mirpur Khas Air Base, Mirpur Khas, Pakistan','country_id' => '174'),\narray('id' => '5338','name' => '(MPD) - Sindhri Tharparkar Airport, Sindhri, Pakistan','country_id' => '174'),\narray('id' => '5339','name' => '(ATG) - Minhas Air Base, Kamra, Pakistan','country_id' => '174'),\narray('id' => '5340','name' => '(MUX) - Multan International Airport, Multan, Pakistan','country_id' => '174'),\narray('id' => '5341','name' => '(WNS) - Nawabshah Airport, Nawabash, Pakistan','country_id' => '174'),\narray('id' => '5342','name' => '(NHS) - Nushki Airport, Nushki, Pakistan','country_id' => '174'),\narray('id' => '5343','name' => '(ORW) - Ormara Airport, Ormara Raik, Pakistan','country_id' => '174'),\narray('id' => '5344','name' => '(PAJ) - Parachinar Airport, Parachinar, Pakistan','country_id' => '174'),\narray('id' => '5345','name' => '(PJG) - Panjgur Airport, Panjgur, Pakistan','country_id' => '174'),\narray('id' => '5346','name' => '(PSI) - Pasni Airport, Pasni, Pakistan','country_id' => '174'),\narray('id' => '5347','name' => '(PEW) - Peshawar International Airport, Peshawar, Pakistan','country_id' => '174'),\narray('id' => '5348','name' => '(UET) - Quetta International Airport, Quetta, Pakistan','country_id' => '174'),\narray('id' => '5349','name' => '(RYK) - Shaikh Zaid Airport, Rahim Yar Khan, Pakistan','country_id' => '174'),\narray('id' => '5350','name' => '(ISB) - Benazir Bhutto International Airport, Islamabad, Pakistan','country_id' => '174'),\narray('id' => '5351','name' => '(RAZ) - Rawalakot Airport, Rawalakot, Pakistan','country_id' => '174'),\narray('id' => '5352','name' => '(SBQ) - Sibi Airport, Sibi, Pakistan','country_id' => '174'),\narray('id' => '5353','name' => '(KDU) - Skardu Airport, Skardu, Pakistan','country_id' => '174'),\narray('id' => '5354','name' => '(SKZ) - Sukkur Airport, Mirpur Khas, Pakistan','country_id' => '174'),\narray('id' => '5355','name' => '(SYW) - Sehwan Sharif Airport, Sehwan Sharif, Pakistan','country_id' => '174'),\narray('id' => '5356','name' => '(SGI) - Mushaf Air Base, Sargodha, Pakistan','country_id' => '174'),\narray('id' => '5357','name' => '(SDT) - Saidu Sharif Airport, Saidu Sharif, Pakistan','country_id' => '174'),\narray('id' => '5358','name' => '(SKT) - Sialkot Airport, Sialkot, Pakistan','country_id' => '174'),\narray('id' => '5359','name' => '(SUL) - Sui Airport, Sui, Pakistan','country_id' => '174'),\narray('id' => '5360','name' => '(SWN) - Sahiwal Airport, Sahiwal, Pakistan','country_id' => '174'),\narray('id' => '5361','name' => '(TLB) - Tarbela Dam Airport, Tarbela, Pakistan','country_id' => '174'),\narray('id' => '5362','name' => '(BDN) - Talhar Airport, Badin, Pakistan','country_id' => '174'),\narray('id' => '5363','name' => '(TFT) - Taftan Airport, Taftan, Pakistan','country_id' => '174'),\narray('id' => '5364','name' => '(TUK) - Turbat International Airport, Turbat, Pakistan','country_id' => '174'),\narray('id' => '5365','name' => '(WAF) - Wana Airport, Waana, Pakistan','country_id' => '174'),\narray('id' => '5366','name' => '(PZH) - Zhob Airport, Fort Sandeman, Pakistan','country_id' => '174'),\narray('id' => '5367','name' => '(IQA) - Al Asad Air Base, HA\"t, Iraq','country_id' => '103'),\narray('id' => '5368','name' => '(TQD) - Al Taqaddum Air Base, Al Habbaniyah, Iraq','country_id' => '103'),\narray('id' => '5369','name' => '(BMN) - Bamarni Airport, Bamarni, Iraq','country_id' => '103'),\narray('id' => '5370','name' => '(XQC) - Joint Base Balad, Balad, Iraq','country_id' => '103'),\narray('id' => '5371','name' => '(BGW) - Baghdad International Airport, Baghdad, Iraq','country_id' => '103'),\narray('id' => '5372','name' => '(OSB) - Mosul International Airport, Mosul, Iraq','country_id' => '103'),\narray('id' => '5373','name' => '(EBL) - Erbil International Airport, Arbil, Iraq','country_id' => '103'),\narray('id' => '5374','name' => '(KIK) - Kirkuk Air Base, Kirkuk, Iraq','country_id' => '103'),\narray('id' => '5375','name' => '(BSR) - Basrah International Airport, Basrah, Iraq','country_id' => '103'),\narray('id' => '5376','name' => '(NJF) - Al Najaf International Airport, Najaf, Iraq','country_id' => '103'),\narray('id' => '5377','name' => '(RQW) - Qayyarah West Airport, Qayyarah, Iraq','country_id' => '103'),\narray('id' => '5378','name' => '(ISU) - Sulaymaniyah International Airport, Sulaymaniyah, Iraq','country_id' => '103'),\narray('id' => '5379','name' => '(ALP) - Aleppo International Airport, Aleppo, Syria','country_id' => '207'),\narray('id' => '5380','name' => '(DAM) - Damascus International Airport, Damascus, Syria','country_id' => '207'),\narray('id' => '5381','name' => '(DEZ) - Deir ez-Zor Airport, Deir ez-Zor, Syria','country_id' => '207'),\narray('id' => '5382','name' => '(OSE) - Omora Airport, Omora, Papua New Guinea','country_id' => '172'),\narray('id' => '5383','name' => '(OSG) - Ossima Airport, Ossima, Papua New Guinea','country_id' => '172'),\narray('id' => '5384','name' => '(KAC) - Kamishly Airport, Kamishly, Syria','country_id' => '207'),\narray('id' => '5385','name' => '(LTK) - Bassel Al-Assad International Airport, Latakia, Syria','country_id' => '207'),\narray('id' => '5386','name' => '(PMS) - Palmyra Airport, Tadmur, Syria','country_id' => '207'),\narray('id' => '5387','name' => '(XJD) - Al Udeid Air Base, Ar Rayyan, Qatar','country_id' => '183'),\narray('id' => '5388','name' => '(OTT) - Andre Maggi Airport, CotriguaAu, Brazil','country_id' => '29'),\narray('id' => '5389','name' => '(OUM) - Oum Hadjer Airport, Oum Hadjer, Chad','country_id' => '210'),\narray('id' => '5390','name' => '(OXO) - Orientos Airport, Orientos, Australia','country_id' => '12'),\narray('id' => '5391','name' => '(ADE) - Aden International Airport, Aden, Yemen','country_id' => '241'),\narray('id' => '5392','name' => '(EAB) - Abbse Airport, Abbse, Yemen','country_id' => '241'),\narray('id' => '5393','name' => '(AXK) - Ataq Airport, , Yemen','country_id' => '241'),\narray('id' => '5394','name' => '(BYD) - Al-Bayda Airport, Al-Bayda, Yemen','country_id' => '241'),\narray('id' => '5395','name' => '(BHN) - Beihan Airport, , Yemen','country_id' => '241'),\narray('id' => '5396','name' => '(BUK) - Al-Bough Airport, Al-Bough, Yemen','country_id' => '241'),\narray('id' => '5397','name' => '(AAY) - Al Ghaidah International Airport, , Yemen','country_id' => '241'),\narray('id' => '5398','name' => '(HOD) - Hodeidah International Airport, Hodeida, Yemen','country_id' => '241'),\narray('id' => '5399','name' => '(KAM) - Kamaran Airport, Kamaran, Yemen','country_id' => '241'),\narray('id' => '5400','name' => '(MYN) - Mareb Airport, Mareb, Yemen','country_id' => '241'),\narray('id' => '5401','name' => '(UKR) - Mukeiras Airport, Mukayras, Yemen','country_id' => '241'),\narray('id' => '5402','name' => '(IHN) - Qishn Airport, Qishn, Yemen','country_id' => '241'),\narray('id' => '5403','name' => '(RIY) - Mukalla International Airport, Riyan, Yemen','country_id' => '241'),\narray('id' => '5404','name' => '(SYE) - Sadah Airport, Sadah, Yemen','country_id' => '241'),\narray('id' => '5405','name' => '(SAH) - Sana\\'a International Airport, Sana\\'a, Yemen','country_id' => '241'),\narray('id' => '5406','name' => '(SCT) - Socotra International Airport, Socotra Islands, Yemen','country_id' => '241'),\narray('id' => '5407','name' => '(GXF) - Sayun International Airport, Sayun, Yemen','country_id' => '241'),\narray('id' => '5408','name' => '(TAI) - Ta\\'izz International Airport, Ta\\'izz, Yemen','country_id' => '241'),\narray('id' => '5409','name' => '(ACU) - Achutupo Airport, Achutupo, Panama','country_id' => '169'),\narray('id' => '5410','name' => '(AIL) - Alligandi Airport, Alligandi, Panama','country_id' => '169'),\narray('id' => '5411','name' => '(CTE) - Carti Airport, Carti, Panama','country_id' => '169'),\narray('id' => '5412','name' => '(MPP) - Mulatupo Airport, Mulatupo, Panama','country_id' => '169'),\narray('id' => '5413','name' => '(PYC) - PlayAn Chico Airport, PlayAn Chico, Panama','country_id' => '169'),\narray('id' => '5414','name' => '(RIZ) - RAo AzAocar Airport, RAo AzAocar, Panama','country_id' => '169'),\narray('id' => '5415','name' => '(NMG) - San Miguel Airport, Isla del Rey, Panama','country_id' => '169'),\narray('id' => '5416','name' => '(PYV) - Yaviza Airport, Yaviza, Panama','country_id' => '169'),\narray('id' => '5417','name' => '(BFQ) - Bahia PiAa Airport, Bahia PiAa, Panama','country_id' => '169'),\narray('id' => '5418','name' => '(ELE) - EL Real Airport, El Real de Santa MarAa, Panama','country_id' => '169'),\narray('id' => '5419','name' => '(OTD) - Contadora Airport, Contadora Island, Panama','country_id' => '169'),\narray('id' => '5420','name' => '(SAX) - Sambu Airport, Boca de SAbalo, Panama','country_id' => '169'),\narray('id' => '5421','name' => '(AKB) - Atka Airport, Atka, United States','country_id' => '228'),\narray('id' => '5422','name' => '(PML) - Port Moller Airport, Cold Bay, United States','country_id' => '228'),\narray('id' => '5423','name' => '(PAQ) - Palmer Municipal Airport, Palmer, United States','country_id' => '228'),\narray('id' => '5424','name' => '(BTI) - Barter Island LRRS Airport, Barter Island Lrrs, United States','country_id' => '228'),\narray('id' => '5425','name' => '(BET) - Bethel Airport, Bethel, United States','country_id' => '228'),\narray('id' => '5426','name' => '(BVU) - Beluga Airport, Beluga, United States','country_id' => '228'),\narray('id' => '5427','name' => '(BIG) - Allen Army Airfield, Delta Junction Ft Greely, United States','country_id' => '228'),\narray('id' => '5428','name' => '(BKC) - Buckland Airport, Buckland, United States','country_id' => '228'),\narray('id' => '5429','name' => '(BMX) - Big Mountain Airport, Big Mountain, United States','country_id' => '228'),\narray('id' => '5430','name' => '(BRW) - Wiley Post Will Rogers Memorial Airport, Barrow, United States','country_id' => '228'),\narray('id' => '5431','name' => '(BTT) - Bettles Airport, Bettles, United States','country_id' => '228'),\narray('id' => '5432','name' => '(CDB) - Cold Bay Airport, Cold Bay, United States','country_id' => '228'),\narray('id' => '5433','name' => '(CEM) - Central Airport, Central, United States','country_id' => '228'),\narray('id' => '5434','name' => '(CIK) - Chalkyitsik Airport, Chalkyitsik, United States','country_id' => '228'),\narray('id' => '5435','name' => '(CYF) - Chefornak Airport, Chefornak, United States','country_id' => '228'),\narray('id' => '5436','name' => '(SCM) - Scammon Bay Airport, Scammon Bay, United States','country_id' => '228'),\narray('id' => '5437','name' => '(IRC) - Circle City /New/ Airport, Circle, United States','country_id' => '228'),\narray('id' => '5438','name' => '(CDV) - Merle K (Mudhole) Smith Airport, Cordova, United States','country_id' => '228'),\narray('id' => '5439','name' => '(CXF) - Coldfoot Airport, Coldfoot, United States','country_id' => '228'),\narray('id' => '5440','name' => '(CYT) - Yakataga Airport, Yakataga, United States','country_id' => '228'),\narray('id' => '5441','name' => '(CZF) - Cape Romanzof LRRS Airport, Cape Romanzof, United States','country_id' => '228'),\narray('id' => '5442','name' => '(DRG) - Deering Airport, Deering, United States','country_id' => '228'),\narray('id' => '5443','name' => '(RDB) - Red Dog Airport, Red Dog, United States','country_id' => '228'),\narray('id' => '5444','name' => '(ADK) - Adak Airport, Adak Island, United States','country_id' => '228'),\narray('id' => '5445','name' => '(DLG) - Dillingham Airport, Dillingham, United States','country_id' => '228'),\narray('id' => '5446','name' => '(MLL) - Marshall Don Hunter Sr Airport, Marshall, United States','country_id' => '228'),\narray('id' => '5447','name' => '(ADQ) - Kodiak Airport, Kodiak, United States','country_id' => '228'),\narray('id' => '5448','name' => '(DUT) - Unalaska Airport, Unalaska, United States','country_id' => '228'),\narray('id' => '5449','name' => '(KKH) - Kongiganak Airport, Kongiganak, United States','country_id' => '228'),\narray('id' => '5450','name' => '(EDF) - Elmendorf Air Force Base, Anchorage, United States','country_id' => '228'),\narray('id' => '5451','name' => '(EEK) - Eek Airport, Eek, United States','country_id' => '228'),\narray('id' => '5452','name' => '(EAA) - Eagle Airport, Eagle, United States','country_id' => '228'),\narray('id' => '5453','name' => '(EHM) - Cape Newenham LRRS Airport, Cape Newenham, United States','country_id' => '228'),\narray('id' => '5454','name' => '(EIL) - Eielson Air Force Base, Fairbanks, United States','country_id' => '228'),\narray('id' => '5455','name' => '(EMK) - Emmonak Airport, Emmonak, United States','country_id' => '228'),\narray('id' => '5456','name' => '(ENA) - Kenai Municipal Airport, Kenai, United States','country_id' => '228'),\narray('id' => '5457','name' => '(WWT) - Newtok Airport, Newtok, United States','country_id' => '228'),\narray('id' => '5458','name' => '(FAI) - Fairbanks International Airport, Fairbanks, United States','country_id' => '228'),\narray('id' => '5459','name' => '(FBK) - Ladd AAF Airfield, Fairbanks/Ft Wainwright, United States','country_id' => '228'),\narray('id' => '5460','name' => '(ABL) - Ambler Airport, Ambler, United States','country_id' => '228'),\narray('id' => '5461','name' => '(FMC) - Five Mile Airport, Five Mile, United States','country_id' => '228'),\narray('id' => '5462','name' => '(FWL) - Farewell Airport, Farewell, United States','country_id' => '228'),\narray('id' => '5463','name' => '(GAL) - Edward G. Pitka Sr Airport, Galena, United States','country_id' => '228'),\narray('id' => '5464','name' => '(GBH) - Galbraith Lake Airport, Galbraith Lake, United States','country_id' => '228'),\narray('id' => '5465','name' => '(SHG) - Shungnak Airport, Shungnak, United States','country_id' => '228'),\narray('id' => '5466','name' => '(GKN) - Gulkana Airport, Gulkana, United States','country_id' => '228'),\narray('id' => '5467','name' => '(GLV) - Golovin Airport, Golovin, United States','country_id' => '228'),\narray('id' => '5468','name' => '(GAM) - Gambell Airport, Gambell, United States','country_id' => '228'),\narray('id' => '5469','name' => '(BGQ) - Big Lake Airport, Big Lake, United States','country_id' => '228'),\narray('id' => '5470','name' => '(GST) - Gustavus Airport, Gustavus, United States','country_id' => '228'),\narray('id' => '5471','name' => '(NME) - Nightmute Airport, Nightmute, United States','country_id' => '228'),\narray('id' => '5472','name' => '(SGY) - Skagway Airport, Skagway, United States','country_id' => '228'),\narray('id' => '5473','name' => '(HCR) - Holy Cross Airport, Holy Cross, United States','country_id' => '228'),\narray('id' => '5474','name' => '(HSL) - Huslia Airport, Huslia, United States','country_id' => '228'),\narray('id' => '5475','name' => '(HNS) - Haines Airport, Haines, United States','country_id' => '228'),\narray('id' => '5476','name' => '(HOM) - Homer Airport, Homer, United States','country_id' => '228'),\narray('id' => '5477','name' => '(HPB) - Hooper Bay Airport, Hooper Bay, United States','country_id' => '228'),\narray('id' => '5478','name' => '(HUS) - Hughes Airport, Hughes, United States','country_id' => '228'),\narray('id' => '5479','name' => '(SHX) - Shageluk Airport, Shageluk, United States','country_id' => '228'),\narray('id' => '5480','name' => '(IGG) - Igiugig Airport, Igiugig, United States','country_id' => '228'),\narray('id' => '5481','name' => '(EGX) - Egegik Airport, Egegik, United States','country_id' => '228'),\narray('id' => '5482','name' => '(IAN) - Bob Baker Memorial Airport, Kiana, United States','country_id' => '228'),\narray('id' => '5483','name' => '(ILI) - Iliamna Airport, Iliamna, United States','country_id' => '228'),\narray('id' => '5484','name' => '(UTO) - Indian Mountain LRRS Airport, Utopia Creek, United States','country_id' => '228'),\narray('id' => '5485','name' => '(MCL) - McKinley National Park Airport, McKinley Park, United States','country_id' => '228'),\narray('id' => '5486','name' => '(WAA) - Wales Airport, Wales, United States','country_id' => '228'),\narray('id' => '5487','name' => '(JNU) - Juneau International Airport, Juneau, United States','country_id' => '228'),\narray('id' => '5488','name' => '(KGK) - Koliganek Airport, Koliganek, United States','country_id' => '228'),\narray('id' => '5489','name' => '(KDK) - Kodiak Municipal Airport, Kodiak, United States','country_id' => '228'),\narray('id' => '5490','name' => '(KFP) - False Pass Airport, False Pass, United States','country_id' => '228'),\narray('id' => '5491','name' => '(AKK) - Akhiok Airport, Akhiok, United States','country_id' => '228'),\narray('id' => '5492','name' => '(KPN) - Kipnuk Airport, Kipnuk, United States','country_id' => '228'),\narray('id' => '5493','name' => '(KKA) - Koyuk Alfred Adams Airport, Koyuk, United States','country_id' => '228'),\narray('id' => '5494','name' => '(LKK) - Kulik Lake Airport, Kulik Lake, United States','country_id' => '228'),\narray('id' => '5495','name' => '(AKN) - King Salmon Airport, King Salmon, United States','country_id' => '228'),\narray('id' => '5496','name' => '(IKO) - Nikolski Air Station, Nikolski, United States','country_id' => '228'),\narray('id' => '5497','name' => '(AKP) - Anaktuvuk Pass Airport, Anaktuvuk Pass, United States','country_id' => '228'),\narray('id' => '5498','name' => '(KTN) - Ketchikan International Airport, Ketchikan, United States','country_id' => '228'),\narray('id' => '5499','name' => '(UUK) - Ugnu-Kuparuk Airport, Kuparuk, United States','country_id' => '228'),\narray('id' => '5500','name' => '(KAL) - Kaltag Airport, Kaltag, United States','country_id' => '228'),\narray('id' => '5501','name' => '(KLW) - Klawock Airport, Klawock, United States','country_id' => '228'),\narray('id' => '5502','name' => '(KYK) - Karluk Airport, Karluk, United States','country_id' => '228'),\narray('id' => '5503','name' => '(KLN) - Larsen Bay Airport, Larsen Bay, United States','country_id' => '228'),\narray('id' => '5504','name' => '(KLG) - Kalskag Airport, Kalskag, United States','country_id' => '228'),\narray('id' => '5505','name' => '(DQH) - Alpine Airstrip, Deadhorse, United States','country_id' => '228'),\narray('id' => '5506','name' => '(WCR) - Chandalar Lake Airport, Chandalar Lake, United States','country_id' => '228'),\narray('id' => '5507','name' => '(LUR) - Cape Lisburne LRRS Airport, Cape Lisburne, United States','country_id' => '228'),\narray('id' => '5508','name' => '(KMO) - Manokotak Airport, Manokotak, United States','country_id' => '228'),\narray('id' => '5509','name' => '(MCG) - McGrath Airport, McGrath, United States','country_id' => '228'),\narray('id' => '5510','name' => '(MDO) - Middleton Island Airport, Middleton Island, United States','country_id' => '228'),\narray('id' => '5511','name' => '(SMK) - St Michael Airport, St Michael, United States','country_id' => '228'),\narray('id' => '5512','name' => '(MLY) - Manley Hot Springs Airport, Manley Hot Springs, United States','country_id' => '228'),\narray('id' => '5513','name' => '(MOU) - Mountain Village Airport, Mountain Village, United States','country_id' => '228'),\narray('id' => '5514','name' => '(MRI) - Merrill Field, Anchorage, United States','country_id' => '228'),\narray('id' => '5515','name' => '(MXY) - Mc Carthy Airport, Mccarthy, United States','country_id' => '228'),\narray('id' => '5516','name' => '(MYU) - Mekoryuk Airport, Mekoryuk, United States','country_id' => '228'),\narray('id' => '5517','name' => '(WNA) - Napakiak Airport, Napakiak, United States','country_id' => '228'),\narray('id' => '5518','name' => '(ANC) - Ted Stevens Anchorage International Airport, Anchorage, United States','country_id' => '228'),\narray('id' => '5519','name' => '(ANI) - Aniak Airport, Aniak, United States','country_id' => '228'),\narray('id' => '5520','name' => '(ENN) - Nenana Municipal Airport, Nenana, United States','country_id' => '228'),\narray('id' => '5521','name' => '(NNL) - Nondalton Airport, Nondalton, United States','country_id' => '228'),\narray('id' => '5522','name' => '(ANN) - Annette Island Airport, Annette, United States','country_id' => '228'),\narray('id' => '5523','name' => '(ANV) - Anvik Airport, Anvik, United States','country_id' => '228'),\narray('id' => '5524','name' => '(KNW) - New Stuyahok Airport, New Stuyahok, United States','country_id' => '228'),\narray('id' => '5525','name' => '(OBU) - Kobuk Airport, Kobuk, United States','country_id' => '228'),\narray('id' => '5526','name' => '(PCA) - Portage Creek Airport, Portage Creek, United States','country_id' => '228'),\narray('id' => '5527','name' => '(HNH) - Hoonah Airport, Hoonah, United States','country_id' => '228'),\narray('id' => '5528','name' => '(OME) - Nome Airport, Nome, United States','country_id' => '228'),\narray('id' => '5529','name' => '(OOK) - Toksook Bay Airport, Toksook Bay, United States','country_id' => '228'),\narray('id' => '5530','name' => '(ORT) - Northway Airport, Northway, United States','country_id' => '228'),\narray('id' => '5531','name' => '(OTZ) - Ralph Wien Memorial Airport, Kotzebue, United States','country_id' => '228'),\narray('id' => '5532','name' => '(NLG) - Nelson Lagoon Airport, Nelson Lagoon, United States','country_id' => '228'),\narray('id' => '5533','name' => '(STG) - St George Airport, St George, United States','country_id' => '228'),\narray('id' => '5534','name' => '(KPC) - Port Clarence Coast Guard Station, Port Clarence, United States','country_id' => '228'),\narray('id' => '5535','name' => '(KPV) - Perryville Airport, Perryville, United States','country_id' => '228'),\narray('id' => '5536','name' => '(PSG) - Petersburg James A Johnson Airport, Petersburg, United States','country_id' => '228'),\narray('id' => '5537','name' => '(PTH) - Port Heiden Airport, Port Heiden, United States','country_id' => '228'),\narray('id' => '5538','name' => '(PKA) - Napaskiak Airport, Napaskiak, United States','country_id' => '228'),\narray('id' => '5539','name' => '(PTU) - Platinum Airport, Platinum, United States','country_id' => '228'),\narray('id' => '5540','name' => '(PIP) - Pilot Point Airport, Pilot Point, United States','country_id' => '228'),\narray('id' => '5541','name' => '(PHO) - Point Hope Airport, Point Hope, United States','country_id' => '228'),\narray('id' => '5542','name' => '(PPC) - Prospect Creek Airport, Prospect Creek, United States','country_id' => '228'),\narray('id' => '5543','name' => '(KWN) - Quinhagak Airport, Quinhagak, United States','country_id' => '228'),\narray('id' => '5544','name' => '(NUI) - Nuiqsut Airport, Nuiqsut, United States','country_id' => '228'),\narray('id' => '5545','name' => '(ARC) - Arctic Village Airport, Arctic Village, United States','country_id' => '228'),\narray('id' => '5546','name' => '(RSH) - Russian Mission Airport, Russian Mission, United States','country_id' => '228'),\narray('id' => '5547','name' => '(RBY) - Ruby Airport, Ruby, United States','country_id' => '228'),\narray('id' => '5548','name' => '(SVA) - Savoonga Airport, Savoonga, United States','country_id' => '228'),\narray('id' => '5549','name' => '(SCC) - Deadhorse Airport, Deadhorse, United States','country_id' => '228'),\narray('id' => '5550','name' => '(SDP) - Sand Point Airport, Sand Point, United States','country_id' => '228'),\narray('id' => '5551','name' => '(SHH) - Shishmaref Airport, Shishmaref, United States','country_id' => '228'),\narray('id' => '5552','name' => '(SIT) - Sitka Rocky Gutierrez Airport, Sitka, United States','country_id' => '228'),\narray('id' => '5553','name' => '(WLK) - Selawik Airport, Selawik, United States','country_id' => '228'),\narray('id' => '5554','name' => '(SLQ) - Sleetmute Airport, Sleetmute, United States','country_id' => '228'),\narray('id' => '5555','name' => '(KSM) - St Mary\\'s Airport, St Mary\\'s, United States','country_id' => '228'),\narray('id' => '5556','name' => '(SNP) - St Paul Island Airport, St Paul Island, United States','country_id' => '228'),\narray('id' => '5557','name' => '(SOV) - Seldovia Airport, Seldovia, United States','country_id' => '228'),\narray('id' => '5558','name' => '(SMU) - Sheep Mountain Airport, Sheep Mountain, United States','country_id' => '228'),\narray('id' => '5559','name' => '(UMM) - Summit Airport, Summit, United States','country_id' => '228'),\narray('id' => '5560','name' => '(SVW) - Sparrevohn LRRS Airport, Sparrevohn, United States','country_id' => '228'),\narray('id' => '5561','name' => '(SKW) - Skwentna Airport, Skwentna, United States','country_id' => '228'),\narray('id' => '5562','name' => '(SXQ) - Soldotna Airport, Soldotna, United States','country_id' => '228'),\narray('id' => '5563','name' => '(SYA) - Eareckson Air Station, Shemya, United States','country_id' => '228'),\narray('id' => '5564','name' => '(TAL) - Ralph M Calhoun Memorial Airport, Tanana, United States','country_id' => '228'),\narray('id' => '5565','name' => '(TNC) - Tin City Long Range Radar Station Airport, Tin City, United States','country_id' => '228'),\narray('id' => '5566','name' => '(TLA) - Teller Airport, Teller, United States','country_id' => '228'),\narray('id' => '5567','name' => '(TOG) - Togiak Airport, Togiak Village, United States','country_id' => '228'),\narray('id' => '5568','name' => '(TKA) - Talkeetna Airport, Talkeetna, United States','country_id' => '228'),\narray('id' => '5569','name' => '(TLJ) - Tatalina LRRS Airport, Takotna, United States','country_id' => '228'),\narray('id' => '5570','name' => '(ATK) - Atqasuk Edward Burnell Sr Memorial Airport, Atqasuk, United States','country_id' => '228'),\narray('id' => '5571','name' => '(AUK) - Alakanuk Airport, Alakanuk, United States','country_id' => '228'),\narray('id' => '5572','name' => '(UMT) - Umiat Airport, Umiat, United States','country_id' => '228'),\narray('id' => '5573','name' => '(UNK) - Unalakleet Airport, Unalakleet, United States','country_id' => '228'),\narray('id' => '5574','name' => '(WOW) - Willow Airport, Willow, United States','country_id' => '228'),\narray('id' => '5575','name' => '(VAK) - Chevak Airport, Chevak, United States','country_id' => '228'),\narray('id' => '5576','name' => '(KVC) - King Cove Airport, King Cove, United States','country_id' => '228'),\narray('id' => '5577','name' => '(VDZ) - Valdez Pioneer Field, Valdez, United States','country_id' => '228'),\narray('id' => '5578','name' => '(VEE) - Venetie Airport, Venetie, United States','country_id' => '228'),\narray('id' => '5579','name' => '(KVL) - Kivalina Airport, Kivalina, United States','country_id' => '228'),\narray('id' => '5580','name' => '(WBQ) - Beaver Airport, Beaver, United States','country_id' => '228'),\narray('id' => '5581','name' => '(SWD) - Seward Airport, Seward, United States','country_id' => '228'),\narray('id' => '5582','name' => '(WRG) - Wrangell Airport, Wrangell, United States','country_id' => '228'),\narray('id' => '5583','name' => '(AIN) - Wainwright Airport, Wainwright, United States','country_id' => '228'),\narray('id' => '5584','name' => '(WMO) - White Mountain Airport, White Mountain, United States','country_id' => '228'),\narray('id' => '5585','name' => '(WTK) - Noatak Airport, Noatak, United States','country_id' => '228'),\narray('id' => '5586','name' => '(WWA) - Wasilla Airport, Wasilla, United States','country_id' => '228'),\narray('id' => '5587','name' => '(YAK) - Yakutat Airport, Yakutat, United States','country_id' => '228'),\narray('id' => '5588','name' => '(CIS) - Canton Island Airport, Abariringa, Kiribati','country_id' => '114'),\narray('id' => '5589','name' => '(PCO) - Punta Colorada Airport, La Ribera, Mexico','country_id' => '153'),\narray('id' => '5590','name' => '(PCQ) - Boun Neau Airport, Phongsaly, Laos','country_id' => '122'),\narray('id' => '5591','name' => '(PDI) - Pindiu Airport, Pindiu, Papua New Guinea','country_id' => '172'),\narray('id' => '5592','name' => '(PDR) - Presidente JosA Sarney Airport, Presidente Dutra, Brazil','country_id' => '29'),\narray('id' => '5593','name' => '(MFT) - Machu Pichu Airport, Machu Pichu, Peru','country_id' => '170'),\narray('id' => '5594','name' => '(PER) - Perleberg, Perleberg, Germany','country_id' => '54'),\narray('id' => '5595','name' => '(AKI) - Akiak Airport, Akiak, United States','country_id' => '228'),\narray('id' => '5596','name' => '(AET) - Allakaket Airport, Allakaket, United States','country_id' => '228'),\narray('id' => '5597','name' => '(PFC) - Pacific City State Airport, Pacific City, United States','country_id' => '228'),\narray('id' => '5598','name' => '(NCN) - Chenega Bay Airport, Chenega, United States','country_id' => '228'),\narray('id' => '5599','name' => '(CLP) - Clarks Point Airport, Clarks Point, United States','country_id' => '228'),\narray('id' => '5600','name' => '(ELI) - Elim Airport, Elim, United States','country_id' => '228'),\narray('id' => '5601','name' => '(KUK) - Kasigluk Airport, Kasigluk, United States','country_id' => '228'),\narray('id' => '5602','name' => '(KNK) - Kokhanok Airport, Kokhanok, United States','country_id' => '228'),\narray('id' => '5603','name' => '(KOT) - Kotlik Airport, Kotlik, United States','country_id' => '228'),\narray('id' => '5604','name' => '(KTS) - Brevig Mission Airport, Brevig Mission, United States','country_id' => '228'),\narray('id' => '5605','name' => '(KYU) - Koyukuk Airport, Koyukuk, United States','country_id' => '228'),\narray('id' => '5606','name' => '(KWT) - Kwethluk Airport, Kwethluk, United States','country_id' => '228'),\narray('id' => '5607','name' => '(ORV) - Robert (Bob) Curtis Memorial Airport, Noorvik, United States','country_id' => '228'),\narray('id' => '5608','name' => '(SKK) - Shaktoolik Airport, Shaktoolik, United States','country_id' => '228'),\narray('id' => '5609','name' => '(TKJ) - Tok Junction Airport, Tok, United States','country_id' => '228'),\narray('id' => '5610','name' => '(WSN) - South Naknek Nr 2 Airport, South Naknek, United States','country_id' => '228'),\narray('id' => '5611','name' => '(FYU) - Fort Yukon Airport, Fort Yukon, United States','country_id' => '228'),\narray('id' => '5612','name' => '(CPN) - Cape Rodney Airport, Cape Rodney, Papua New Guinea','country_id' => '172'),\narray('id' => '5613','name' => '(EMI) - Emirau Airport, Emirau Island, Papua New Guinea','country_id' => '172'),\narray('id' => '5614','name' => '(ERE) - Erave Airport, Erave, Papua New Guinea','country_id' => '172'),\narray('id' => '5615','name' => '(ESA) - Esa\\'ala Airport, Esa\\'ala, Papua New Guinea','country_id' => '172'),\narray('id' => '5616','name' => '(GAR) - Garaina Airport, Garaina, Papua New Guinea','country_id' => '172'),\narray('id' => '5617','name' => '(GOE) - Gonaili Airport, Gonaili, Papua New Guinea','country_id' => '172'),\narray('id' => '5618','name' => '(BPD) - Bapi Airstrip, Bapi, Papua New Guinea','country_id' => '172'),\narray('id' => '5619','name' => '(BPK) - Biangabip Airport, Biangabip, Papua New Guinea','country_id' => '172'),\narray('id' => '5620','name' => '(NWT) - Nowata Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '5621','name' => '(SGK) - Sengapi Airstrip, Sengapi, Papua New Guinea','country_id' => '172'),\narray('id' => '5622','name' => '(KII) - Kibuli Airstrip, Kibuli, Papua New Guinea','country_id' => '172'),\narray('id' => '5623','name' => '(AKG) - Anguganak Airport, Anguganak, Papua New Guinea','country_id' => '172'),\narray('id' => '5624','name' => '(TAJ) - Tadji Airport, Aitape, Papua New Guinea','country_id' => '172'),\narray('id' => '5625','name' => '(AWB) - Awaba Airport, Awaba, Papua New Guinea','country_id' => '172'),\narray('id' => '5626','name' => '(BAA) - Bialla Airport, Bialla, Matalilu, Ewase, Papua New Guinea','country_id' => '172'),\narray('id' => '5627','name' => '(CVB) - Chungribu Airport, Chungribu, Papua New Guinea','country_id' => '172'),\narray('id' => '5628','name' => '(GMI) - Gasmata Island Airport, Gasmata Island, Papua New Guinea','country_id' => '172'),\narray('id' => '5629','name' => '(GVI) - Green River Airport, Green River, Papua New Guinea','country_id' => '172'),\narray('id' => '5630','name' => '(HYF) - Hayfields Airport, Bainyik, Papua New Guinea','country_id' => '172'),\narray('id' => '5631','name' => '(IHU) - Ihu Airport, Ihu, Papua New Guinea','country_id' => '172'),\narray('id' => '5632','name' => '(IIS) - Nissan Island Airport, Nissan Island, Papua New Guinea','country_id' => '172'),\narray('id' => '5633','name' => '(JAQ) - Jacquinot Bay Airport, Jacquinot Bay, Papua New Guinea','country_id' => '172'),\narray('id' => '5634','name' => '(KDR) - Kandrian Airport, Kandrian, Papua New Guinea','country_id' => '172'),\narray('id' => '5635','name' => '(KKD) - Kokoda Airport, Kokoda, Papua New Guinea','country_id' => '172'),\narray('id' => '5636','name' => '(KUY) - Kamusi Airport, Kamusi, Papua New Guinea','country_id' => '172'),\narray('id' => '5637','name' => '(KWO) - Kawito Airport, Kawito, Papua New Guinea','country_id' => '172'),\narray('id' => '5638','name' => '(LMI) - Lumi Airport, Lumi, Papua New Guinea','country_id' => '172'),\narray('id' => '5639','name' => '(LMY) - Lake Murray Airport, Lake Murray, Papua New Guinea','country_id' => '172'),\narray('id' => '5640','name' => '(OBX) - Obo Airport, Obo, Papua New Guinea','country_id' => '172'),\narray('id' => '5641','name' => '(OPU) - Balimo Airport, Balimo, Papua New Guinea','country_id' => '172'),\narray('id' => '5642','name' => '(SKC) - Suki Airport, Suki, Papua New Guinea','country_id' => '172'),\narray('id' => '5643','name' => '(TFI) - Tufi Airport, Tufi, Papua New Guinea','country_id' => '172'),\narray('id' => '5644','name' => '(TFM) - Telefomin Airport, Telefomin, Papua New Guinea','country_id' => '172'),\narray('id' => '5645','name' => '(TLO) - Tol Airport, Tol, Papua New Guinea','country_id' => '172'),\narray('id' => '5646','name' => '(UKU) - Nuku Airport, Nuku, Papua New Guinea','country_id' => '172'),\narray('id' => '5647','name' => '(ULE) - Sule Airport, Sule, Papua New Guinea','country_id' => '172'),\narray('id' => '5648','name' => '(VMU) - Baimuru Airport, Baimuru, Papua New Guinea','country_id' => '172'),\narray('id' => '5649','name' => '(WPM) - Wipim Airport, Wipim, Papua New Guinea','country_id' => '172'),\narray('id' => '5650','name' => '(PGE) - Yegepa Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '5651','name' => '(PGM) - Port Graham Airport, Port Graham, United States','country_id' => '228'),\narray('id' => '5652','name' => '(ROP) - Rota International Airport, Rota Island, Northern Mariana Islands','country_id' => '145'),\narray('id' => '5653','name' => '(SPN) - Saipan International Airport, Saipan Island, Northern Mariana Islands','country_id' => '145'),\narray('id' => '5654','name' => '(UAM) - Andersen Air Force Base, Andersen,Mariana Island, Guam','country_id' => '89'),\narray('id' => '5655','name' => '(GUM) - Antonio B. Won Pat International Airport, HagAtAa, Guam International Airport, Guam','country_id' => '89'),\narray('id' => '5656','name' => '(TIQ) - Tinian International Airport, Tinian Island, Northern Mariana Islands','country_id' => '145'),\narray('id' => '5657','name' => '(CGY) - Laguindingan Airport, Cagayan de Oro City, Philippines','country_id' => '173'),\narray('id' => '5658','name' => '(ENI) - El Nido Airport, El Nido, Philippines','country_id' => '173'),\narray('id' => '5659','name' => '(BKH) - Barking Sands Airport, Kekaha, United States','country_id' => '228'),\narray('id' => '5660','name' => '(HDH) - Dillingham Airfield, Mokuleia, United States','country_id' => '228'),\narray('id' => '5661','name' => '(HHI) - Wheeler Army Airfield, Wahiawa, United States','country_id' => '228'),\narray('id' => '5662','name' => '(HNM) - Hana Airport, Hana, United States','country_id' => '228'),\narray('id' => '5663','name' => '(JHM) - Kapalua Airport, Lahaina, United States','country_id' => '228'),\narray('id' => '5664','name' => '(JRF) - Kalaeloa Airport, Kapolei, United States','country_id' => '228'),\narray('id' => '5665','name' => '(KOA) - Kona International At Keahole Airport, Kailua/Kona, United States','country_id' => '228'),\narray('id' => '5666','name' => '(LIH) - Lihue Airport, Lihue, United States','country_id' => '228'),\narray('id' => '5667','name' => '(LUP) - Kalaupapa Airport, Kalaupapa, United States','country_id' => '228'),\narray('id' => '5668','name' => '(MKK) - Molokai Airport, Kaunakakai, United States','country_id' => '228'),\narray('id' => '5669','name' => '(MUE) - Waimea Kohala Airport, Kamuela, United States','country_id' => '228'),\narray('id' => '5670','name' => '(NGF) - Kaneohe Bay MCAS (Marion E. Carl Field) Airport, Kaneohe, United States','country_id' => '228'),\narray('id' => '5671','name' => '(HNL) - Honolulu International Airport, Honolulu, United States','country_id' => '228'),\narray('id' => '5672','name' => '(LNY) - Lanai Airport, Lanai City, United States','country_id' => '228'),\narray('id' => '5673','name' => '(OGG) - Kahului Airport, Kahului, United States','country_id' => '228'),\narray('id' => '5674','name' => '(PAK) - Port Allen Airport, Hanapepe, United States','country_id' => '228'),\narray('id' => '5675','name' => '(BSF) - Bradshaw Army Airfield, Camp Pohakuloa, United States','country_id' => '228'),\narray('id' => '5676','name' => '(ITO) - Hilo International Airport, Hilo, United States','country_id' => '228'),\narray('id' => '5677','name' => '(UPP) - Upolu Airport, Hawi, United States','country_id' => '228'),\narray('id' => '5678','name' => '(BHC) - Bhurban Heliport, Bhurban, Pakistan','country_id' => '174'),\narray('id' => '5679','name' => '(CWP) - Campbellpore Airport, Campbellpore, Pakistan','country_id' => '174'),\narray('id' => '5680','name' => '(GRT) - Gujrat Airport, Gujrat, Pakistan','country_id' => '174'),\narray('id' => '5681','name' => '(HRA) - Mansehra Airport, Mansehra, Pakistan','country_id' => '174'),\narray('id' => '5682','name' => '(KCF) - Kadanwari Airport, Kadanwari, Pakistan','country_id' => '174'),\narray('id' => '5683','name' => '(REQ) - Reko Diq Airport, Chagai, Pakistan','country_id' => '174'),\narray('id' => '5684','name' => '(RZS) - Sawan Airport, Sawan, Pakistan','country_id' => '174'),\narray('id' => '5685','name' => '(ENT) - Eniwetok Airport, Eniwetok Atoll, Marshall Islands','country_id' => '139'),\narray('id' => '5686','name' => '(MAJ) - Marshall Islands International Airport, Majuro Atoll, Marshall Islands','country_id' => '139'),\narray('id' => '5687','name' => '(KAI) - Kaieteur International Airport, Kaieteur Falls, Guyana','country_id' => '91'),\narray('id' => '5688','name' => '(KWA) - Bucholz Army Air Field, Kwajalein, Marshall Islands','country_id' => '139'),\narray('id' => '5689','name' => '(CXI) - Cassidy International Airport, Banana, Kiribati','country_id' => '114'),\narray('id' => '5690','name' => '(PLE) - Paiela Airport, Paiela, Papua New Guinea','country_id' => '172'),\narray('id' => '5691','name' => '(TNV) - Tabuaeran Island Airport, Tabuaeran Island, Kiribati','country_id' => '114'),\narray('id' => '5692','name' => '(TNQ) - Washington Island Airstrip, Teraina, Kiribati','country_id' => '114'),\narray('id' => '5693','name' => '(MDY) - Henderson Field, Sand Island, United States Minor Outlying Islands','country_id' => '227'),\narray('id' => '5694','name' => '(PMM) - Phanom Sarakham Airport, Phanom Sarakham, Thailand','country_id' => '213'),\narray('id' => '5695','name' => '(PMP) - Pimaga Airport, Pimaga, Papua New Guinea','country_id' => '172'),\narray('id' => '5696','name' => '(PIZ) - Point Lay LRRS Airport, Point Lay, United States','country_id' => '228'),\narray('id' => '5697','name' => '(PPX) - Param Airport, Nepesi, Papua New Guinea','country_id' => '172'),\narray('id' => '5698','name' => '(HUC) - Humacao Airport, Humacao, Puerto Rico','country_id' => '178'),\narray('id' => '5699','name' => '(XSO) - Siocon Airport, , Philippines','country_id' => '173'),\narray('id' => '5700','name' => '(TKK) - Chuuk International Airport, Weno Island, Micronesia','country_id' => '70'),\narray('id' => '5701','name' => '(PNI) - Pohnpei International Airport, Pohnpei Island, Micronesia','country_id' => '70'),\narray('id' => '5702','name' => '(ROR) - Babelthuap Airport, Babelthuap Island, Palau','country_id' => '181'),\narray('id' => '5703','name' => '(KSA) - Kosrae International Airport, Okat, Micronesia','country_id' => '70'),\narray('id' => '5704','name' => '(YAP) - Yap International Airport, Yap Island, Micronesia','country_id' => '70'),\narray('id' => '5705','name' => '(PUA) - Puas Airport, Puas Mission, Papua New Guinea','country_id' => '172'),\narray('id' => '5706','name' => '(AWK) - Wake Island Airfield, Wake Island, United States Minor Outlying Islands','country_id' => '227'),\narray('id' => '5707','name' => '(BFA) - BahAa Negra Airport, BahAa Negra, Paraguay','country_id' => '182'),\narray('id' => '5708','name' => '(OLK) - Fuerte Olimpo Airport, Fuerte Olimpo, Paraguay','country_id' => '182'),\narray('id' => '5709','name' => '(PBT) - Puerto Leda Airport, Puerto Leda, Paraguay','country_id' => '182'),\narray('id' => '5710','name' => '(PCJ) - Puerto La Victoria Airport, Puerto La Victoria, Paraguay','country_id' => '182'),\narray('id' => '5711','name' => '(KIO) - Kili Airport, Kili Island, Marshall Islands','country_id' => '139'),\narray('id' => '5712','name' => '(DOH) - Hamad International Airport, Doha, Qatar','country_id' => '183'),\narray('id' => '5713','name' => '(RAA) - Rakanda Airport, Rakanda, Papua New Guinea','country_id' => '172'),\narray('id' => '5714','name' => '(RAW) - Arawa Airport, Arawa, Papua New Guinea','country_id' => '172'),\narray('id' => '5715','name' => '(RAX) - Oram Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '5716','name' => '(RBP) - Raba Raba Airport, Rabaraba, Papua New Guinea','country_id' => '172'),\narray('id' => '5717','name' => '(KNH) - Kinmen Airport, Shang-I, Taiwan','country_id' => '223'),\narray('id' => '5718','name' => '(LZN) - Matsu Nangan Airport, Nangang Island, Taiwan','country_id' => '223'),\narray('id' => '5719','name' => '(TTT) - Taitung Airport, Taitung City, Taiwan','country_id' => '223'),\narray('id' => '5720','name' => '(GNI) - Lyudao Airport, Lyudao, Taiwan','country_id' => '223'),\narray('id' => '5721','name' => '(KHH) - Kaohsiung International Airport, Kaohsiung City, Taiwan','country_id' => '223'),\narray('id' => '5722','name' => '(CYI) - Chiayi Airport, Chiayi City, Taiwan','country_id' => '223'),\narray('id' => '5723','name' => '(HCN) - Hengchun Airport, Hengchung, Taiwan','country_id' => '223'),\narray('id' => '5724','name' => '(TXG) - Taichung Airport, Taichung City, Taiwan','country_id' => '223'),\narray('id' => '5725','name' => '(KYD) - Lanyu Airport, Orchid Island, Taiwan','country_id' => '223'),\narray('id' => '5726','name' => '(RMQ) - Taichung Ching Chuang Kang Airport, Taichung City, Taiwan','country_id' => '223'),\narray('id' => '5727','name' => '(MFK) - Matsu Beigan Airport, Beigan Island, Taiwan','country_id' => '223'),\narray('id' => '5728','name' => '(TNN) - Tainan Airport, Tainan City, Taiwan','country_id' => '223'),\narray('id' => '5729','name' => '(HSZ) - Hsinchu Air Base, Hsinchu City, Taiwan','country_id' => '223'),\narray('id' => '5730','name' => '(MZG) - Makung Airport, Makung City, Taiwan','country_id' => '223'),\narray('id' => '5731','name' => '(PIF) - Pingtung North Airport, Pingtung, Taiwan','country_id' => '223'),\narray('id' => '5732','name' => '(TSA) - Taipei Songshan Airport, Taipei City, Taiwan','country_id' => '223'),\narray('id' => '5733','name' => '(TPE) - Taiwan Taoyuan International Airport, Taipei, Taiwan','country_id' => '223'),\narray('id' => '5734','name' => '(WOT) - Wang-an Airport, Wang-an, Taiwan','country_id' => '223'),\narray('id' => '5735','name' => '(HUN) - Hualien Airport, Hualien City, Taiwan','country_id' => '223'),\narray('id' => '5736','name' => '(RDV) - Red Devil Airport, Red Devil, United States','country_id' => '228'),\narray('id' => '5737','name' => '(RHT) - Alxa Right Banner-Badanjilin Airport, Badanjilin, China','country_id' => '45'),\narray('id' => '5738','name' => '(NRT) - Narita International Airport, Tokyo, Japan','country_id' => '110'),\narray('id' => '5739','name' => '(MMJ) - Matsumoto Airport, Matsumoto, Japan','country_id' => '110'),\narray('id' => '5740','name' => '(IBR) - Hyakuri Airport, Omitama, Japan','country_id' => '110'),\narray('id' => '5741','name' => '(MUS) - Minami Torishima Airport, , Japan','country_id' => '110'),\narray('id' => '5742','name' => '(IWO) - Iwo Jima Airport, , Japan','country_id' => '110'),\narray('id' => '5743','name' => '(KIX) - Kansai International Airport, Osaka, Japan','country_id' => '110'),\narray('id' => '5744','name' => '(SHM) - Nanki Shirahama Airport, Shirahama, Japan','country_id' => '110'),\narray('id' => '5745','name' => '(UKB) - Kobe Airport, Kobe, Japan','country_id' => '110'),\narray('id' => '5746','name' => '(HIW) - Hiroshimanishi Airport, , Japan','country_id' => '110'),\narray('id' => '5747','name' => '(TJH) - Tajima Airport, Tajima, Japan','country_id' => '110'),\narray('id' => '5748','name' => '(OBO) - Tokachi-Obihiro Airport, Obihiro, Japan','country_id' => '110'),\narray('id' => '5749','name' => '(CTS) - New Chitose Airport, Chitose / Tomakomai, Japan','country_id' => '110'),\narray('id' => '5750','name' => '(HKD) - Hakodate Airport, Hakodate, Japan','country_id' => '110'),\narray('id' => '5751','name' => '(KUH) - Kushiro Airport, Kushiro, Japan','country_id' => '110'),\narray('id' => '5752','name' => '(MMB) - Memanbetsu Airport, zora, Japan','country_id' => '110'),\narray('id' => '5753','name' => '(SHB) - Nakashibetsu Airport, Nakashibetsu, Japan','country_id' => '110'),\narray('id' => '5754','name' => '(OKD) - Okadama Airport, Sapporo, Japan','country_id' => '110'),\narray('id' => '5755','name' => '(RBJ) - Rebun Airport, Rebun, Japan','country_id' => '110'),\narray('id' => '5756','name' => '(WKJ) - Wakkanai Airport, Wakkanai, Japan','country_id' => '110'),\narray('id' => '5757','name' => '(AXJ) - Amakusa Airport, , Japan','country_id' => '110'),\narray('id' => '5758','name' => '(IKI) - Iki Airport, Iki, Japan','country_id' => '110'),\narray('id' => '5759','name' => '(UBJ) - Yamaguchi Ube Airport, Ube, Japan','country_id' => '110'),\narray('id' => '5760','name' => '(TSJ) - Tsushima Airport, Tsushima, Japan','country_id' => '110'),\narray('id' => '5761','name' => '(MBE) - Monbetsu Airport, Monbetsu, Japan','country_id' => '110'),\narray('id' => '5762','name' => '(AKJ) - Asahikawa Airport, Asahikawa / Hokkaid, Japan','country_id' => '110'),\narray('id' => '5763','name' => '(OIR) - Okushiri Airport, Okushiri Island, Japan','country_id' => '110'),\narray('id' => '5764','name' => '(RIS) - Rishiri Airport, Rishiri, Japan','country_id' => '110'),\narray('id' => '5765','name' => '(KUM) - Yakushima Airport, Yakushima, Japan','country_id' => '110'),\narray('id' => '5766','name' => '(FUJ) - Fukue Airport, Goto, Japan','country_id' => '110'),\narray('id' => '5767','name' => '(FUK) - Fukuoka Airport, Fukuoka, Japan','country_id' => '110'),\narray('id' => '5768','name' => '(TNE) - New Tanegashima Airport, Tanegashima, Japan','country_id' => '110'),\narray('id' => '5769','name' => '(KOJ) - Kagoshima Airport, Kagoshima, Japan','country_id' => '110'),\narray('id' => '5770','name' => '(KMI) - Miyazaki Airport, Miyazaki, Japan','country_id' => '110'),\narray('id' => '5771','name' => '(OIT) - Oita Airport, Oita, Japan','country_id' => '110'),\narray('id' => '5772','name' => '(KKJ) - Kitaky\"sh\" Airport, Kitaky\"sh\", Japan','country_id' => '110'),\narray('id' => '5773','name' => '(HSG) - Saga Airport, Saga, Japan','country_id' => '110'),\narray('id' => '5774','name' => '(KMJ) - Kumamoto Airport, Kumamoto, Japan','country_id' => '110'),\narray('id' => '5775','name' => '(NGS) - Nagasaki Airport, Nagasaki, Japan','country_id' => '110'),\narray('id' => '5776','name' => '(NGO) - Chubu Centrair International Airport, Tokoname, Japan','country_id' => '110'),\narray('id' => '5777','name' => '(ASJ) - Amami Airport, Amami, Japan','country_id' => '110'),\narray('id' => '5778','name' => '(OKE) - Okierabu Airport, Okinoerabujima, Japan','country_id' => '110'),\narray('id' => '5779','name' => '(KKX) - Kikai Airport, Kikai, Japan','country_id' => '110'),\narray('id' => '5780','name' => '(TKN) - Tokunoshima Airport, Tokunoshima, Japan','country_id' => '110'),\narray('id' => '5781','name' => '(NKM) - Nagoya Airport, Nagoya, Japan','country_id' => '110'),\narray('id' => '5782','name' => '(FKJ) - Fukui Airport, , Japan','country_id' => '110'),\narray('id' => '5783','name' => '(QGU) - Gifu Airport, Gifu, Japan','country_id' => '110'),\narray('id' => '5784','name' => '(KMQ) - Komatsu Airport, Kanazawa, Japan','country_id' => '110'),\narray('id' => '5785','name' => '(OKI) - Oki Airport, Okinoshima, Japan','country_id' => '110'),\narray('id' => '5786','name' => '(FSZ) - Mt. Fuji Shizuoka Airport, Makinohara / Shimada, Japan','country_id' => '110'),\narray('id' => '5787','name' => '(TOY) - Toyama Airport, Toyama, Japan','country_id' => '110'),\narray('id' => '5788','name' => '(NTQ) - Noto Airport, Wajima, Japan','country_id' => '110'),\narray('id' => '5789','name' => '(HIJ) - Hiroshima Airport, Hiroshima, Japan','country_id' => '110'),\narray('id' => '5790','name' => '(OKJ) - Okayama Airport, Okayama City, Japan','country_id' => '110'),\narray('id' => '5791','name' => '(IZO) - Izumo Airport, Izumo, Japan','country_id' => '110'),\narray('id' => '5792','name' => '(YGJ) - Miho Yonago Airport, Yonago, Japan','country_id' => '110'),\narray('id' => '5793','name' => '(KCZ) - Kchi Ryma Airport, Nankoku, Japan','country_id' => '110'),\narray('id' => '5794','name' => '(MYJ) - Matsuyama Airport, Matsuyama, Japan','country_id' => '110'),\narray('id' => '5795','name' => '(ITM) - Osaka International Airport, Osaka, Japan','country_id' => '110'),\narray('id' => '5796','name' => '(TTJ) - Tottori Airport, Tottori, Japan','country_id' => '110'),\narray('id' => '5797','name' => '(TKS) - Tokushima Airport, Tokushima, Japan','country_id' => '110'),\narray('id' => '5798','name' => '(TAK) - Takamatsu Airport, Takamatsu, Japan','country_id' => '110'),\narray('id' => '5799','name' => '(IWJ) - Iwami Airport, Masuda, Japan','country_id' => '110'),\narray('id' => '5800','name' => '(AOJ) - Aomori Airport, Aomori, Japan','country_id' => '110'),\narray('id' => '5801','name' => '(GAJ) - Yamagata Airport, Yamagata, Japan','country_id' => '110'),\narray('id' => '5802','name' => '(SDS) - Sado Airport, Sado, Japan','country_id' => '110'),\narray('id' => '5803','name' => '(FKS) - Fukushima Airport, Sukagawa, Japan','country_id' => '110'),\narray('id' => '5804','name' => '(HHE) - Hachinohe Airport, , Japan','country_id' => '110'),\narray('id' => '5805','name' => '(HNA) - Hanamaki Airport, , Japan','country_id' => '110'),\narray('id' => '5806','name' => '(AXT) - Akita Airport, Akita, Japan','country_id' => '110'),\narray('id' => '5807','name' => '(MSJ) - Misawa Air Base, Misawa, Japan','country_id' => '110'),\narray('id' => '5808','name' => '(KIJ) - Niigata Airport, Niigata, Japan','country_id' => '110'),\narray('id' => '5809','name' => '(ONJ) - Odate Noshiro Airport, Odate, Japan','country_id' => '110'),\narray('id' => '5810','name' => '(SDJ) - Sendai Airport, Sendai, Japan','country_id' => '110'),\narray('id' => '5811','name' => '(SYO) - Shonai Airport, Shonai, Japan','country_id' => '110'),\narray('id' => '5812','name' => '(NJA) - Atsugi Naval Air Facility, , Japan','country_id' => '110'),\narray('id' => '5813','name' => '(HAC) - Hachijojima Airport, Hachijojima, Japan','country_id' => '110'),\narray('id' => '5814','name' => '(OIM) - Oshima Airport, Izu Oshima, Japan','country_id' => '110'),\narray('id' => '5815','name' => '(MYE) - Miyakejima Airport, Miyakejima, Japan','country_id' => '110'),\narray('id' => '5816','name' => '(HND) - Tokyo International Airport, Tokyo, Japan','country_id' => '110'),\narray('id' => '5817','name' => '(QUT) - Utsunomiya Airport, , Japan','country_id' => '110'),\narray('id' => '5818','name' => '(OKO) - Yokota Air Base, Fussa, Japan','country_id' => '110'),\narray('id' => '5819','name' => '(MWX) - Muan International Airport, Muan, South Korea','country_id' => '118'),\narray('id' => '5820','name' => '(KWJ) - Gwangju Airport, Gwangju, South Korea','country_id' => '118'),\narray('id' => '5821','name' => '(KUV) - Kunsan Air Base, Kunsan, South Korea','country_id' => '118'),\narray('id' => '5822','name' => '(CHN) - Jeon Ju Airport, Jeon Ju, South Korea','country_id' => '118'),\narray('id' => '5823','name' => '(RSU) - Yeosu Airport, Yeosu, South Korea','country_id' => '118'),\narray('id' => '5824','name' => '(QUN) - A-306 Airport, Chun Chon City, South Korea','country_id' => '118'),\narray('id' => '5825','name' => '(SHO) - Sokcho Airport, , South Korea','country_id' => '118'),\narray('id' => '5826','name' => '(KAG) - Gangneung Airport, Gangneung, South Korea','country_id' => '118'),\narray('id' => '5827','name' => '(WJU) - Wonju Airport, Wonju, South Korea','country_id' => '118'),\narray('id' => '5828','name' => '(YNY) - Yangyang International Airport, Sokcho / Gangneung, South Korea','country_id' => '118'),\narray('id' => '5829','name' => '(CJU) - Jeju International Airport, Jeju City, South Korea','country_id' => '118'),\narray('id' => '5830','name' => '(JDG) - Jeongseok Airport, Jeju Island, South Korea','country_id' => '118'),\narray('id' => '5831','name' => '(CHF) - Jinhae Airport, Jinhae, South Korea','country_id' => '118'),\narray('id' => '5832','name' => '(PUS) - Gimhae International Airport, Busan, South Korea','country_id' => '118'),\narray('id' => '5833','name' => '(HIN) - Sacheon Air Base, Sacheon, South Korea','country_id' => '118'),\narray('id' => '5834','name' => '(USN) - Ulsan Airport, Ulsan, South Korea','country_id' => '118'),\narray('id' => '5835','name' => '(ICN) - Incheon International Airport, Seoul, South Korea','country_id' => '118'),\narray('id' => '5836','name' => '(SSN) - Seoul Air Base, , South Korea','country_id' => '118'),\narray('id' => '5837','name' => '(OSN) - Osan Air Base, , South Korea','country_id' => '118'),\narray('id' => '5838','name' => '(GMP) - Gimpo International Airport, Seoul, South Korea','country_id' => '118'),\narray('id' => '5839','name' => '(SWU) - Suwon Airport, , South Korea','country_id' => '118'),\narray('id' => '5840','name' => '(KPO) - Pohang Airport, Pohang, South Korea','country_id' => '118'),\narray('id' => '5841','name' => '(TAE) - Daegu Airport, Daegu, South Korea','country_id' => '118'),\narray('id' => '5842','name' => '(CJJ) - Cheongju International Airport, Cheongju, South Korea','country_id' => '118'),\narray('id' => '5843','name' => '(YEC) - Yecheon Airport, Yecheon, South Korea','country_id' => '118'),\narray('id' => '5844','name' => '(RKU) - Kairuku Airport, Yule Island, Papua New Guinea','country_id' => '172'),\narray('id' => '5845','name' => '(RKY) - Rokeby Airport, Rokeby, Australia','country_id' => '12'),\narray('id' => '5846','name' => '(RLP) - Rosella Plains Airport, Rosella Plains, Australia','country_id' => '12'),\narray('id' => '5847','name' => '(RMD) - Basanth Nagar Airport, Ramagundam, India','country_id' => '101'),\narray('id' => '5848','name' => '(RMU) - RegiAn de Murcia International Airport, Corvera, Spain','country_id' => '65'),\narray('id' => '5849','name' => '(OKA) - Naha Airport, Naha, Japan','country_id' => '110'),\narray('id' => '5850','name' => '(DNA) - Kadena Air Base, , Japan','country_id' => '110'),\narray('id' => '5851','name' => '(ISG) - Ishigaki Airport, Ishigaki, Japan','country_id' => '110'),\narray('id' => '5852','name' => '(UEO) - Kumejima Airport, , Japan','country_id' => '110'),\narray('id' => '5853','name' => '(KJP) - Kerama Airport, Kerama, Japan','country_id' => '110'),\narray('id' => '5854','name' => '(MMD) - Minami-Daito Airport, Minamidait, Japan','country_id' => '110'),\narray('id' => '5855','name' => '(MMY) - Miyako Airport, Miyako City, Japan','country_id' => '110'),\narray('id' => '5856','name' => '(AGJ) - Aguni Airport, Aguni, Japan','country_id' => '110'),\narray('id' => '5857','name' => '(IEJ) - Ie Jima Airport, Ie, Japan','country_id' => '110'),\narray('id' => '5858','name' => '(HTR) - Hateruma Airport, Hateruma, Japan','country_id' => '110'),\narray('id' => '5859','name' => '(KTD) - Kitadaito Airport, Kitadaitjima, Japan','country_id' => '110'),\narray('id' => '5860','name' => '(SHI) - Shimojishima Airport, Shimojishima, Japan','country_id' => '110'),\narray('id' => '5861','name' => '(TRA) - Tarama Airport, Tarama, Japan','country_id' => '110'),\narray('id' => '5862','name' => '(RNJ) - Yoron Airport, Yoronjima, Japan','country_id' => '110'),\narray('id' => '5863','name' => '(OGN) - Yonaguni Airport, , Japan','country_id' => '110'),\narray('id' => '5864','name' => '(SFS) - Subic Bay International Airport, Olongapo City, Philippines','country_id' => '173'),\narray('id' => '5865','name' => '(CRK) - Clark International Airport, Angeles City, Philippines','country_id' => '173'),\narray('id' => '5866','name' => '(LAO) - Laoag International Airport, Laoag City, Philippines','country_id' => '173'),\narray('id' => '5867','name' => '(MNL) - Ninoy Aquino International Airport, Manila, Philippines','country_id' => '173'),\narray('id' => '5868','name' => '(CYU) - Cuyo Airport, Cuyo, Philippines','country_id' => '173'),\narray('id' => '5869','name' => '(LGP) - Legazpi City International Airport, Legazpi City, Philippines','country_id' => '173'),\narray('id' => '5870','name' => '(SGL) - Danilo Atienza Air Base, Cavite City, Philippines','country_id' => '173'),\narray('id' => '5871','name' => '(LBX) - Lubang Airport, , Philippines','country_id' => '173'),\narray('id' => '5872','name' => '(AAV) - Allah Valley Airport, Surallah, Philippines','country_id' => '173'),\narray('id' => '5873','name' => '(CBO) - Awang Airport, Cotabato City, Philippines','country_id' => '173'),\narray('id' => '5874','name' => '(DVO) - Francisco Bangoy International Airport, Davao City, Philippines','country_id' => '173'),\narray('id' => '5875','name' => '(BXU) - Bancasi Airport, Butuan City, Philippines','country_id' => '173'),\narray('id' => '5876','name' => '(BPH) - Bislig Airport, , Philippines','country_id' => '173'),\narray('id' => '5877','name' => '(DPL) - Dipolog Airport, Dipolog City, Philippines','country_id' => '173'),\narray('id' => '5878','name' => '(CGM) - Camiguin Airport, , Philippines','country_id' => '173'),\narray('id' => '5879','name' => '(IGN) - Iligan Airport, , Philippines','country_id' => '173'),\narray('id' => '5880','name' => '(JOL) - Jolo Airport, , Philippines','country_id' => '173'),\narray('id' => '5881','name' => '(CGY) - Cagayan De Oro Airport, Cagayan De Oro City, Philippines','country_id' => '173'),\narray('id' => '5882','name' => '(MLP) - Malabang Airport, Malabang, Philippines','country_id' => '173'),\narray('id' => '5883','name' => '(SGS) - Sanga Sanga Airport, , Philippines','country_id' => '173'),\narray('id' => '5884','name' => '(OZC) - Labo Airport, Ozamiz City, Philippines','country_id' => '173'),\narray('id' => '5885','name' => '(PAG) - Pagadian Airport, Pagadian City, Philippines','country_id' => '173'),\narray('id' => '5886','name' => '(MXI) - Mati National Airport, , Philippines','country_id' => '173'),\narray('id' => '5887','name' => '(GES) - General Santos International Airport, General Santos, Philippines','country_id' => '173'),\narray('id' => '5888','name' => '(SUG) - Surigao Airport, Surigao City, Philippines','country_id' => '173'),\narray('id' => '5889','name' => '(CDY) - Cagayan de Sulu Airport, Mapun, Philippines','country_id' => '173'),\narray('id' => '5890','name' => '(IPE) - Ipil Airport, Ipil, Philippines','country_id' => '173'),\narray('id' => '5891','name' => '(TDG) - Tandag Airport, , Philippines','country_id' => '173'),\narray('id' => '5892','name' => '(ZAM) - Zamboanga International Airport, Zamboanga City, Philippines','country_id' => '173'),\narray('id' => '5893','name' => '(IAO) - Siargao Airport, Del Carmen, Philippines','country_id' => '173'),\narray('id' => '5894','name' => '(RZP) - Cesar Lim Rodriguez Airport, Taytay Airport, Sandoval Airport, Philippines','country_id' => '173'),\narray('id' => '5895','name' => '(BAG) - Loakan Airport, Baguio City, Philippines','country_id' => '173'),\narray('id' => '5896','name' => '(DTE) - Daet Airport, Daet, Philippines','country_id' => '173'),\narray('id' => '5897','name' => '(SJI) - San Jose Airport, San Jose, Philippines','country_id' => '173'),\narray('id' => '5898','name' => '(MBO) - Mamburao Airport, , Philippines','country_id' => '173'),\narray('id' => '5899','name' => '(WNP) - Naga Airport, Naga, Philippines','country_id' => '173'),\narray('id' => '5900','name' => '(BSO) - Basco Airport, Basco, Philippines','country_id' => '173'),\narray('id' => '5901','name' => '(BQA) - Dr.Juan C. Angara Airport, Baler, Philippines','country_id' => '173'),\narray('id' => '5902','name' => '(SFE) - San Fernando Airport, , Philippines','country_id' => '173'),\narray('id' => '5903','name' => '(TUG) - Tuguegarao Airport, Tuguegarao City, Philippines','country_id' => '173'),\narray('id' => '5904','name' => '(VRC) - Virac Airport, Virac, Philippines','country_id' => '173'),\narray('id' => '5905','name' => '(MRQ) - Marinduque Airport, Gasan, Philippines','country_id' => '173'),\narray('id' => '5906','name' => '(CYZ) - Cauayan Airport, Cauayan City, Philippines','country_id' => '173'),\narray('id' => '5907','name' => '(RPV) - Roper Valley Airport, Roper Valley, Australia','country_id' => '12'),\narray('id' => '5908','name' => '(TAC) - Daniel Z. Romualdez Airport, Tacloban City, Philippines','country_id' => '173'),\narray('id' => '5909','name' => '(BCD) - Bacolod-Silay City International Airport, Bacolod City, Philippines','country_id' => '173'),\narray('id' => '5910','name' => '(CYP) - Calbayog Airport, Calbayog City, Philippines','country_id' => '173'),\narray('id' => '5911','name' => '(DGT) - Sibulan Airport, Dumaguete City, Philippines','country_id' => '173'),\narray('id' => '5912','name' => '(MPH) - Godofredo P. Ramos Airport, Malay, Philippines','country_id' => '173'),\narray('id' => '5913','name' => '(CRM) - Catarman National Airport, Catarman, Philippines','country_id' => '173'),\narray('id' => '5914','name' => '(ILO) - Iloilo International Airport, Iloilo City, Philippines','country_id' => '173'),\narray('id' => '5915','name' => '(MBT) - Moises R. Espinosa Airport, Masbate, Philippines','country_id' => '173'),\narray('id' => '5916','name' => '(KLO) - Kalibo International Airport, Kalibo, Philippines','country_id' => '173'),\narray('id' => '5917','name' => '(CEB) - Mactan Cebu International Airport, Lapu-Lapu City, Philippines','country_id' => '173'),\narray('id' => '5918','name' => '(OMC) - Ormoc Airport, Ormoc City, Philippines','country_id' => '173'),\narray('id' => '5919','name' => '(PPS) - Puerto Princesa Airport, Puerto Princesa City, Philippines','country_id' => '173'),\narray('id' => '5920','name' => '(RXS) - Roxas Airport, Roxas City, Philippines','country_id' => '173'),\narray('id' => '5921','name' => '(EUQ) - Evelio Javier Airport, San Jose, Philippines','country_id' => '173'),\narray('id' => '5922','name' => '(TAG) - Tagbilaran Airport, Tagbilaran City, Philippines','country_id' => '173'),\narray('id' => '5923','name' => '(TBH) - Tugdan Airport, Tablas Island, Philippines','country_id' => '173'),\narray('id' => '5924','name' => '(USU) - Francisco B. Reyes Airport, Coron, Philippines','country_id' => '173'),\narray('id' => '5925','name' => '(RRM) - Marromeu Airport, Marromeu, Mozambique','country_id' => '155'),\narray('id' => '5926','name' => '(NGK) - Nogliki Airport, Nogliki-Sakhalin Island, Russia','country_id' => '187'),\narray('id' => '5927','name' => '(GRV) - Grozny North Airport, Grozny, Russia','country_id' => '187'),\narray('id' => '5928','name' => '(KDY) - Typliy Klyuch Airport, Khandyga, Russia','country_id' => '187'),\narray('id' => '5929','name' => '(LNX) - Smolensk South Airport, Smolensk, Russia','country_id' => '187'),\narray('id' => '5930','name' => '(VUS) - Velikiy Ustyug Airport, Velikiy Ustyug, Russia','country_id' => '187'),\narray('id' => '5931','name' => '(RUU) - Ruti Airport, Kawbenaberi, Papua New Guinea','country_id' => '172'),\narray('id' => '5932','name' => '(RVC) - River Cess Airport/Heliport, River Cess, Liberia','country_id' => '127'),\narray('id' => '5933','name' => '(LPS) - Lopez Island Airport, Lopez, United States','country_id' => '228'),\narray('id' => '5934','name' => '(MJR) - Miramar Airport, Miramar, Argentina','country_id' => '9'),\narray('id' => '5935','name' => '(COC) - Comodoro Pierrestegui Airport, Concordia, Argentina','country_id' => '9'),\narray('id' => '5936','name' => '(GHU) - Gualeguaychu Airport, Gualeguaychu, Argentina','country_id' => '9'),\narray('id' => '5937','name' => '(JNI) - Junin Airport, Junin, Argentina','country_id' => '9'),\narray('id' => '5938','name' => '(PRA) - General Urquiza Airport, Parana, Argentina','country_id' => '9'),\narray('id' => '5939','name' => '(ROS) - Islas Malvinas Airport, Rosario, Argentina','country_id' => '9'),\narray('id' => '5940','name' => '(SFN) - Sauce Viejo Airport, Santa Fe, Argentina','country_id' => '9'),\narray('id' => '5941','name' => '(AEP) - Jorge Newbery Airpark, Buenos Aires, Argentina','country_id' => '9'),\narray('id' => '5942','name' => '(LCM) - La Cumbre Airport, La Cumbre, Argentina','country_id' => '9'),\narray('id' => '5943','name' => '(COR) - Ingeniero Ambrosio Taravella Airport, Cordoba, Argentina','country_id' => '9'),\narray('id' => '5944','name' => '(FDO) - San Fernando Airport, San Fernando, Argentina','country_id' => '9'),\narray('id' => '5945','name' => '(LPG) - La Plata Airport, La Plata, Argentina','country_id' => '9'),\narray('id' => '5946','name' => '(EPA) - El Palomar Airport, El Palomar, Argentina','country_id' => '9'),\narray('id' => '5947','name' => '(EZE) - Ministro Pistarini International Airport, Buenos Aires, Argentina','country_id' => '9'),\narray('id' => '5948','name' => '(RAF) - Rafaela Airport, Rafaela, Argentina','country_id' => '9'),\narray('id' => '5949','name' => '(HOS) - Chos Malal Airport, Chos Malal, Argentina','country_id' => '9'),\narray('id' => '5950','name' => '(CVH) - Caviahue Airport, Lafontaine, Argentina','country_id' => '9'),\narray('id' => '5951','name' => '(GNR) - Dr. Arturo H. Illia Airport, General Roca, Argentina','country_id' => '9'),\narray('id' => '5952','name' => '(RDS) - Rincon De Los Sauces Airport, Rincon de los Sauces, Argentina','country_id' => '9'),\narray('id' => '5953','name' => '(APZ) - Zapala Airport, Zapala, Argentina','country_id' => '9'),\narray('id' => '5954','name' => '(SAM) - Salamo Airport, Salamo, Papua New Guinea','country_id' => '172'),\narray('id' => '5955','name' => '(MDZ) - El Plumerillo Airport, Mendoza, Argentina','country_id' => '9'),\narray('id' => '5956','name' => '(LGS) - Comodoro D.R. SalomAn Airport, Malargue, Argentina','country_id' => '9'),\narray('id' => '5957','name' => '(AFA) - Suboficial Ay Santiago Germano Airport, San Rafael, Argentina','country_id' => '9'),\narray('id' => '5958','name' => '(CTC) - Catamarca Airport, Catamarca, Argentina','country_id' => '9'),\narray('id' => '5959','name' => '(SDE) - Vicecomodoro Angel D. La Paz AragonAs Airport, Santiago del Estero, Argentina','country_id' => '9'),\narray('id' => '5960','name' => '(IRJ) - Capitan V A Almonacid Airport, La Rioja, Argentina','country_id' => '9'),\narray('id' => '5961','name' => '(RHD) - Termas de RAo Hondo international Airport, Termas de RAo Hondo, Argentina','country_id' => '9'),\narray('id' => '5962','name' => '(TUC) - Teniente Benjamin Matienzo Airport, San Miguel de TucumAn, Argentina','country_id' => '9'),\narray('id' => '5963','name' => '(UAQ) - Domingo Faustino Sarmiento Airport, San Juan, Argentina','country_id' => '9'),\narray('id' => '5964','name' => '(CRR) - Ceres Airport, Ceres, Argentina','country_id' => '9'),\narray('id' => '5965','name' => '(RCU) - Area De Material Airport, Rio Cuarto, Argentina','country_id' => '9'),\narray('id' => '5966','name' => '(VDR) - Villa Dolores Airport, Villa Dolores, Argentina','country_id' => '9'),\narray('id' => '5967','name' => '(VME) - Villa Reynolds Airport, Villa Mercedes, Argentina','country_id' => '9'),\narray('id' => '5968','name' => '(RLO) - Valle Del Conlara International Airport, Merlo, Argentina','country_id' => '9'),\narray('id' => '5969','name' => '(LUQ) - Brigadier Mayor D Cesar Raul Ojeda Airport, San Luis, Argentina','country_id' => '9'),\narray('id' => '5970','name' => '(CNQ) - Corrientes Airport, Corrientes, Argentina','country_id' => '9'),\narray('id' => '5971','name' => '(RES) - Resistencia International Airport, Resistencia, Argentina','country_id' => '9'),\narray('id' => '5972','name' => '(FMA) - Formosa Airport, Formosa, Argentina','country_id' => '9'),\narray('id' => '5973','name' => '(IGR) - Cataratas Del IguazAo International Airport, Puerto Iguazu, Argentina','country_id' => '9'),\narray('id' => '5974','name' => '(AOL) - Paso De Los Libres Airport, Paso de los Libres, Argentina','country_id' => '9'),\narray('id' => '5975','name' => '(MCS) - Monte Caseros Airport, Monte Caseros, Argentina','country_id' => '9'),\narray('id' => '5976','name' => '(PSS) - Libertador Gral D Jose De San Martin Airport, Posadas, Argentina','country_id' => '9'),\narray('id' => '5977','name' => '(SAS) - Salton Sea Airport, Salton City, United States','country_id' => '228'),\narray('id' => '5978','name' => '(SLA) - Martin Miguel De Guemes International Airport, Salta, Argentina','country_id' => '9'),\narray('id' => '5979','name' => '(JUJ) - Gobernador Horacio Guzman International Airport, San Salvador de Jujuy, Argentina','country_id' => '9'),\narray('id' => '5980','name' => '(ORA) - OrAn Airport, OrAn, Argentina','country_id' => '9'),\narray('id' => '5981','name' => '(TTG) - General Enrique Mosconi Airport, Tartagal, Argentina','country_id' => '9'),\narray('id' => '5982','name' => '(CLX) - Clorinda Airport, Clorinda, Argentina','country_id' => '9'),\narray('id' => '5983','name' => '(ELO) - El Dorado Airport, El Dorado, Argentina','country_id' => '9'),\narray('id' => '5984','name' => '(OYA) - Goya Airport, Goya, Argentina','country_id' => '9'),\narray('id' => '5985','name' => '(LLS) - Alferez Armando Rodriguez Airport, Las Lomitas, Argentina','country_id' => '9'),\narray('id' => '5986','name' => '(MDX) - Mercedes Airport, Mercedes, Argentina','country_id' => '9'),\narray('id' => '5987','name' => '(RCQ) - Reconquista Airport, Reconquista, Argentina','country_id' => '9'),\narray('id' => '5988','name' => '(UZU) - Curuzu Cuatia Airport, Curuzu Cuatia, Argentina','country_id' => '9'),\narray('id' => '5989','name' => '(EHL) - El Bolson Airport, El Bolson, Argentina','country_id' => '9'),\narray('id' => '5990','name' => '(CRD) - General E. Mosconi Airport, Comodoro Rivadavia, Argentina','country_id' => '9'),\narray('id' => '5991','name' => '(EMX) - El Maiten Airport, El Maiten, Argentina','country_id' => '9'),\narray('id' => '5992','name' => '(EQS) - Brigadier Antonio Parodi Airport, Esquel, Argentina','country_id' => '9'),\narray('id' => '5993','name' => '(LHS) - Las Heras Airport, Las Heras, Argentina','country_id' => '9'),\narray('id' => '5994','name' => '(IGB) - Cabo F.A.A. H. R. BordAn Airport, Ingeniero Jacobacci, Argentina','country_id' => '9'),\narray('id' => '5995','name' => '(OES) - Antoine De St Exupery Airport, San Antonio Oeste, Argentina','country_id' => '9'),\narray('id' => '5996','name' => '(MQD) - Maquinchao Airport, Maquinchao, Argentina','country_id' => '9'),\narray('id' => '5997','name' => '(ARR) - D. Casimiro Szlapelis Airport, Alto Rio Senguerr, Argentina','country_id' => '9'),\narray('id' => '5998','name' => '(SGV) - Sierra Grande Airport, Sierra Grande, Argentina','country_id' => '9'),\narray('id' => '5999','name' => '(REL) - Almirante Marco Andres Zar Airport, Rawson, Argentina','country_id' => '9'),\narray('id' => '6000','name' => '(VDM) - Gobernador Castello Airport, Viedma / Carmen de Patagones, Argentina','country_id' => '9'),\narray('id' => '6001','name' => '(PMY) - El Tehuelche Airport, Puerto Madryn, Argentina','country_id' => '9'),\narray('id' => '6002','name' => '(ING) - Lago Argentino Airport, El Calafate, Argentina','country_id' => '9'),\narray('id' => '6003','name' => '(FTE) - El Calafate Airport, El Calafate, Argentina','country_id' => '9'),\narray('id' => '6004','name' => '(PUD) - Puerto Deseado Airport, Puerto Deseado, Argentina','country_id' => '9'),\narray('id' => '6005','name' => '(RGA) - Hermes Quijada International Airport, Rio Grande, Argentina','country_id' => '9'),\narray('id' => '6006','name' => '(RGL) - Piloto Civil N. FernAndez Airport, Rio Gallegos, Argentina','country_id' => '9'),\narray('id' => '6007','name' => '(USH) - Malvinas Argentinas Airport, Ushuahia, Argentina','country_id' => '9'),\narray('id' => '6008','name' => '(ULA) - Capitan D Daniel Vazquez Airport, San Julian, Argentina','country_id' => '9'),\narray('id' => '6009','name' => '(ROY) - Rio Mayo Airport, Rio Mayo, Argentina','country_id' => '9'),\narray('id' => '6010','name' => '(PMQ) - Perito Moreno Airport, Perito Moreno, Argentina','country_id' => '9'),\narray('id' => '6011','name' => '(GGS) - Gobernador Gregores Airport, Gobernador Gregores, Argentina','country_id' => '9'),\narray('id' => '6012','name' => '(JSM) - Jose De San Martin Airport, Chubut, Argentina','country_id' => '9'),\narray('id' => '6013','name' => '(RYO) - 28 de Noviembre Airport, Rio Turbio, Argentina','country_id' => '9'),\narray('id' => '6014','name' => '(RZA) - Santa Cruz Airport, Santa Cruz, Argentina','country_id' => '9'),\narray('id' => '6015','name' => '(BHI) - Comandante Espora Airport, Bahia Blanca, Argentina','country_id' => '9'),\narray('id' => '6016','name' => '(CSZ) - Brigadier D.H.E. Ruiz Airport, Coronel Suarez, Argentina','country_id' => '9'),\narray('id' => '6017','name' => '(OVR) - Olavarria Airport, Olavarria, Argentina','country_id' => '9'),\narray('id' => '6018','name' => '(GPO) - General Pico Airport, General Pico, Argentina','country_id' => '9'),\narray('id' => '6019','name' => '(OYO) - Tres Arroyos Airport, Tres Arroyos, Argentina','country_id' => '9'),\narray('id' => '6020','name' => '(SST) - Santa Teresita Airport, Santa Teresita, Argentina','country_id' => '9'),\narray('id' => '6021','name' => '(MDQ) - Astor Piazzola International Airport, Mar del Plata, Argentina','country_id' => '9'),\narray('id' => '6022','name' => '(NQN) - Presidente Peron Airport, Neuquen, Argentina','country_id' => '9'),\narray('id' => '6023','name' => '(NEC) - Necochea Airport, Necochea, Argentina','country_id' => '9'),\narray('id' => '6024','name' => '(PEH) - Comodoro Pedro Zanni Airport, PehuajA, Argentina','country_id' => '9'),\narray('id' => '6025','name' => '(RSA) - Santa Rosa Airport, Santa Rosa, Argentina','country_id' => '9'),\narray('id' => '6026','name' => '(BRC) - San Carlos De Bariloche Airport, San Carlos de Bariloche, Argentina','country_id' => '9'),\narray('id' => '6027','name' => '(TDL) - HAroes De Malvinas Airport, Tandil, Argentina','country_id' => '9'),\narray('id' => '6028','name' => '(VLG) - Villa Gesell Airport, Villa Gesell, Argentina','country_id' => '9'),\narray('id' => '6029','name' => '(CUT) - Cutral-Co Airport, Cutral-Co, Argentina','country_id' => '9'),\narray('id' => '6030','name' => '(CPC) - Aviador C. Campos Airport, Chapelco/San Martin de los Andes, Argentina','country_id' => '9'),\narray('id' => '6031','name' => '(VIU) - Viru Harbour Airstrip, Viru, Solomon Islands','country_id' => '190'),\narray('id' => '6032','name' => '(CDJ) - ConceiAAo do Araguaia Airport, ConceiAAo Do Araguaia, Brazil','country_id' => '29'),\narray('id' => '6033','name' => '(AQA) - Araraquara Airport, Araraquara, Brazil','country_id' => '29'),\narray('id' => '6034','name' => '(AJU) - Santa Maria Airport, Aracaju, Brazil','country_id' => '29'),\narray('id' => '6035','name' => '(AFL) - Piloto Osvaldo Marques Dias Airport, Alta Floresta, Brazil','country_id' => '29'),\narray('id' => '6036','name' => '(ARU) - AraAatuba Airport, AraAatuba, Brazil','country_id' => '29'),\narray('id' => '6037','name' => '(AAX) - Romeu Zema Airport, AraxA, Brazil','country_id' => '29'),\narray('id' => '6038','name' => '(BEL) - Val de Cans/JAolio Cezar Ribeiro International Airport, BelAm, Brazil','country_id' => '29'),\narray('id' => '6039','name' => '(BGX) - Comandante Gustavo Kraemer Airport, BagA, Brazil','country_id' => '29'),\narray('id' => '6040','name' => '(PLU) - Pampulha - Carlos Drummond de Andrade Airport, Belo Horizonte, Brazil','country_id' => '29'),\narray('id' => '6041','name' => '(BFH) - Bacacheri Airport, Curitiba, Brazil','country_id' => '29'),\narray('id' => '6042','name' => '(BJP) - Aeroporto Estadual Arthur Siqueira Airport, BraganAa Paulista, Brazil','country_id' => '29'),\narray('id' => '6043','name' => '(QAK) - Major Brigadeiro Doorgal Borges Airport, Barbacena, Brazil','country_id' => '29'),\narray('id' => '6044','name' => '(BSB) - Presidente Juscelino Kubistschek International Airport, BrasAlia, Brazil','country_id' => '29'),\narray('id' => '6045','name' => '(BAT) - Chafei Amsei Airport, Barretos, Brazil','country_id' => '29'),\narray('id' => '6046','name' => '(BAU) - Bauru Airport, Bauru, Brazil','country_id' => '29'),\narray('id' => '6047','name' => '(BVB) - Atlas Brasil Cantanhede Airport, Boa Vista, Brazil','country_id' => '29'),\narray('id' => '6048','name' => '(BPG) - Barra do GarAas Airport, Barra Do GarAas, Brazil','country_id' => '29'),\narray('id' => '6049','name' => '(BZC) - Umberto Modiano Airport, Cabo Frio, Brazil','country_id' => '29'),\narray('id' => '6050','name' => '(CAC) - Cascavel Airport, Cascavel, Brazil','country_id' => '29'),\narray('id' => '6051','name' => '(CFB) - Cabo Frio Airport, Cabo Frio, Brazil','country_id' => '29'),\narray('id' => '6052','name' => '(CFC) - CaAador Airport, CaAador, Brazil','country_id' => '29'),\narray('id' => '6053','name' => '(CNF) - Tancredo Neves International Airport, Belo Horizonte, Brazil','country_id' => '29'),\narray('id' => '6054','name' => '(CGR) - Campo Grande Airport, Campo Grande, Brazil','country_id' => '29'),\narray('id' => '6055','name' => '(XAP) - Serafin Enoss Bertaso Airport, ChapecA, Brazil','country_id' => '29'),\narray('id' => '6056','name' => '(CLN) - Brig. Lysias Augusto Rodrigues Airport, Carolina, Brazil','country_id' => '29'),\narray('id' => '6057','name' => '(CKS) - CarajAs Airport, Parauapebas, Brazil','country_id' => '29'),\narray('id' => '6058','name' => '(CCM) - DiomAcio Freitas Airport, CriciAoma, Brazil','country_id' => '29'),\narray('id' => '6059','name' => '(CLV) - Nelson Ribeiro GuimarAes Airport, Caldas Novas, Brazil','country_id' => '29'),\narray('id' => '6060','name' => '(CAW) - Bartolomeu Lisandro Airport, Campos Dos Goytacazes, Brazil','country_id' => '29'),\narray('id' => '6061','name' => '(CMG) - CorumbA International Airport, CorumbA, Brazil','country_id' => '29'),\narray('id' => '6062','name' => '(CWB) - Afonso Pena Airport, Curitiba, Brazil','country_id' => '29'),\narray('id' => '6063','name' => '(CRQ) - Caravelas Airport, Caravelas, Brazil','country_id' => '29'),\narray('id' => '6064','name' => '(CXJ) - Hugo Cantergiani Regional Airport, Caxias Do Sul, Brazil','country_id' => '29'),\narray('id' => '6065','name' => '(CGB) - Marechal Rondon Airport, CuiabA, Brazil','country_id' => '29'),\narray('id' => '6066','name' => '(CZS) - Cruzeiro do Sul Airport, Cruzeiro Do Sul, Brazil','country_id' => '29'),\narray('id' => '6067','name' => '(BYO) - Bonito Airport, Bonito, Brazil','country_id' => '29'),\narray('id' => '6068','name' => '(PPB) - Presidente Prudente Airport, Presidente Prudente, Brazil','country_id' => '29'),\narray('id' => '6069','name' => '(MAO) - Eduardo Gomes International Airport, Manaus, Brazil','country_id' => '29'),\narray('id' => '6070','name' => '(JCR) - Jacareacanga Airport, Jacareacanga, Brazil','country_id' => '29'),\narray('id' => '6071','name' => '(ESI) - Espinosa Airport, Espinosa, Brazil','country_id' => '29'),\narray('id' => '6072','name' => '(IGU) - Cataratas International Airport, Foz Do IguaAu, Brazil','country_id' => '29'),\narray('id' => '6073','name' => '(FLN) - HercAlio Luz International Airport, FlorianApolis, Brazil','country_id' => '29'),\narray('id' => '6074','name' => '(FEN) - Fernando de Noronha Airport, Fernando De Noronha, Brazil','country_id' => '29'),\narray('id' => '6075','name' => '(FOR) - Pinto Martins International Airport, Fortaleza, Brazil','country_id' => '29'),\narray('id' => '6076','name' => '(GIG) - Rio GaleAo a\" Tom Jobim International Airport, Rio De Janeiro, Brazil','country_id' => '29'),\narray('id' => '6077','name' => '(GJM) - GuajarA-Mirim Airport, GuajarA-Mirim, Brazil','country_id' => '29'),\narray('id' => '6078','name' => '(GYN) - Santa Genoveva Airport, GoiAnia, Brazil','country_id' => '29'),\narray('id' => '6079','name' => '(GRU) - Guarulhos - Governador AndrA Franco Montoro International Airport, SAo Paulo, Brazil','country_id' => '29'),\narray('id' => '6080','name' => '(GPB) - Tancredo Thomas de Faria Airport, Guarapuava, Brazil','country_id' => '29'),\narray('id' => '6081','name' => '(GVR) - Coronel Altino Machado de Oliveira Airport, Governador Valadares, Brazil','country_id' => '29'),\narray('id' => '6082','name' => '(GUJ) - GuaratinguetA Airport, GuaratinguetA, Brazil','country_id' => '29'),\narray('id' => '6083','name' => '(ATM) - Altamira Airport, Altamira, Brazil','country_id' => '29'),\narray('id' => '6084','name' => '(ITA) - Itacoatiara Airport, Itacoatiara, Brazil','country_id' => '29'),\narray('id' => '6085','name' => '(ITB) - Itaituba Airport, Itaituba, Brazil','country_id' => '29'),\narray('id' => '6086','name' => '(IOS) - Bahia - Jorge Amado Airport, IlhAus, Brazil','country_id' => '29'),\narray('id' => '6087','name' => '(IPN) - Usiminas Airport, Ipatinga, Brazil','country_id' => '29'),\narray('id' => '6088','name' => '(ITR) - Francisco Vilela do Amaral Airport, Itumbiara, Brazil','country_id' => '29'),\narray('id' => '6089','name' => '(IMP) - Prefeito Renato Moreira Airport, Imperatriz, Brazil','country_id' => '29'),\narray('id' => '6090','name' => '(JJG) - Humberto Ghizzo Bortoluzzi Regional Airport, Jaguaruna, Brazil','country_id' => '29'),\narray('id' => '6091','name' => '(JDF) - Francisco de Assis Airport, Juiz De Fora, Brazil','country_id' => '29'),\narray('id' => '6092','name' => '(JPA) - Presidente Castro Pinto International Airport, JoAo Pessoa, Brazil','country_id' => '29'),\narray('id' => '6093','name' => '(JDO) - Orlando Bezerra de Menezes Airport, Juazeiro Do Norte, Brazil','country_id' => '29'),\narray('id' => '6094','name' => '(JOI) - Lauro Carneiro de Loyola Airport, Joinville, Brazil','country_id' => '29'),\narray('id' => '6095','name' => '(CPV) - Presidente JoAo Suassuna Airport, Campina Grande, Brazil','country_id' => '29'),\narray('id' => '6096','name' => '(VCP) - Viracopos International Airport, Campinas, Brazil','country_id' => '29'),\narray('id' => '6097','name' => '(LEC) - Coronel HorAcio de Mattos Airport, LenAAis, Brazil','country_id' => '29'),\narray('id' => '6098','name' => '(LAJ) - Lages Airport, Lages, Brazil','country_id' => '29'),\narray('id' => '6099','name' => '(LIP) - Lins Airport, Lins, Brazil','country_id' => '29'),\narray('id' => '6100','name' => '(LDB) - Governador JosA Richa Airport, Londrina, Brazil','country_id' => '29'),\narray('id' => '6101','name' => '(LAZ) - Bom Jesus da Lapa Airport, Bom Jesus Da Lapa, Brazil','country_id' => '29'),\narray('id' => '6102','name' => '(MAB) - JoAo Correa da Rocha Airport, MarabA, Brazil','country_id' => '29'),\narray('id' => '6103','name' => '(MQH) - MinaAu Airport, MinaAu, Brazil','country_id' => '29'),\narray('id' => '6104','name' => '(MEU) - Monte Dourado Airport, Almeirim, Brazil','country_id' => '29'),\narray('id' => '6105','name' => '(MEA) - MacaA Airport, MacaA, Brazil','country_id' => '29'),\narray('id' => '6106','name' => '(MGF) - Regional de MaringA - SAlvio Nane Junior Airport, MaringA, Brazil','country_id' => '29'),\narray('id' => '6107','name' => '(MOC) - MArio Ribeiro Airport, Montes Claros, Brazil','country_id' => '29'),\narray('id' => '6108','name' => '(MII) - Frank Miloye Milenkowichia\"MarAlia State Airport, MarAlia, Brazil','country_id' => '29'),\narray('id' => '6109','name' => '(PLL) - Ponta Pelada Airport, Manaus, Brazil','country_id' => '29'),\narray('id' => '6110','name' => '(MCZ) - Zumbi dos Palmares Airport, MaceiA, Brazil','country_id' => '29'),\narray('id' => '6111','name' => '(MCP) - Alberto Alcolumbre Airport, MacapA, Brazil','country_id' => '29'),\narray('id' => '6112','name' => '(MVF) - Dix-Sept Rosado Airport, MossorA, Brazil','country_id' => '29'),\narray('id' => '6113','name' => '(MNX) - ManicorA Airport, ManicorA, Brazil','country_id' => '29'),\narray('id' => '6114','name' => '(NVT) - Ministro Victor Konder International Airport, Navegantes, Brazil','country_id' => '29'),\narray('id' => '6115','name' => '(GEL) - Santo A\\'ngelo Airport, Santo A\\'ngelo, Brazil','country_id' => '29'),\narray('id' => '6116','name' => '(OYK) - Oiapoque Airport, Oiapoque, Brazil','country_id' => '29'),\narray('id' => '6117','name' => '(POA) - Salgado Filho Airport, Porto Alegre, Brazil','country_id' => '29'),\narray('id' => '6118','name' => '(PHB) - Prefeito Doutor JoAo Silva Filho Airport, ParnaAba, Brazil','country_id' => '29'),\narray('id' => '6119','name' => '(POO) - PoAos de Caldas - Embaixador Walther Moreira Salles Airport, PoAos De Caldas, Brazil','country_id' => '29'),\narray('id' => '6120','name' => '(PFB) - Lauro Kurtz Airport, Passo Fundo, Brazil','country_id' => '29'),\narray('id' => '6121','name' => '(PMW) - Brigadeiro Lysias Rodrigues Airport, Palmas, Brazil','country_id' => '29'),\narray('id' => '6122','name' => '(PET) - JoAo SimAes Lopes Neto International Airport, Pelotas, Brazil','country_id' => '29'),\narray('id' => '6123','name' => '(PNZ) - Senador Nilo Coelho Airport, Petrolina, Brazil','country_id' => '29'),\narray('id' => '6124','name' => '(PNB) - Porto Nacional Airport, Porto Nacional, Brazil','country_id' => '29'),\narray('id' => '6125','name' => '(PMG) - Ponta PorA Airport, Ponta PorA, Brazil','country_id' => '29'),\narray('id' => '6126','name' => '(BPS) - Porto Seguro Airport, Porto Seguro, Brazil','country_id' => '29'),\narray('id' => '6127','name' => '(PVH) - Governador Jorge Teixeira de Oliveira Airport, Porto Velho, Brazil','country_id' => '29'),\narray('id' => '6128','name' => '(VDC) - VitAria da Conquista Airport, VitAria Da Conquista, Brazil','country_id' => '29'),\narray('id' => '6129','name' => '(RBR) - PlAcido de Castro Airport, Rio Branco, Brazil','country_id' => '29'),\narray('id' => '6130','name' => '(REC) - Guararapes - Gilberto Freyre International Airport, Recife, Brazil','country_id' => '29'),\narray('id' => '6131','name' => '(SDU) - Santos Dumont Airport, Rio De Janeiro, Brazil','country_id' => '29'),\narray('id' => '6132','name' => '(RAO) - Leite Lopes Airport, RibeirAo Preto, Brazil','country_id' => '29'),\narray('id' => '6133','name' => '(BRB) - Barreirinhas Airport, , Brazil','country_id' => '29'),\narray('id' => '6134','name' => '(SNZ) - Santa Cruz Airport, Rio De Janeiro, Brazil','country_id' => '29'),\narray('id' => '6135','name' => '(NAT) - Governador AluAzio Alves International Airport, Natal, Brazil','country_id' => '29'),\narray('id' => '6136','name' => '(SJK) - Professor Urbano Ernesto Stumpf Airport, SAo JosA Dos Campos, Brazil','country_id' => '29'),\narray('id' => '6137','name' => '(SLZ) - Marechal Cunha Machado International Airport, SAo LuAs, Brazil','country_id' => '29'),\narray('id' => '6138','name' => '(RIA) - Santa Maria Airport, Santa Maria, Brazil','country_id' => '29'),\narray('id' => '6139','name' => '(STM) - Maestro Wilson Fonseca Airport, SantarAm, Brazil','country_id' => '29'),\narray('id' => '6140','name' => '(CGH) - Congonhas Airport, SAo Paulo, Brazil','country_id' => '29'),\narray('id' => '6141','name' => '(SJP) - Prof. Eribelto Manoel Reino State Airport, SAo JosA Do Rio Preto, Brazil','country_id' => '29'),\narray('id' => '6142','name' => '(SSZ) - Base AArea de Santos Airport, GuarujA, Brazil','country_id' => '29'),\narray('id' => '6143','name' => '(SSA) - Deputado Luiz Eduardo MagalhAes International Airport, Salvador, Brazil','country_id' => '29'),\narray('id' => '6144','name' => '(QHP) - Base de AviaAAo de TaubatA Airport, TaubatA, Brazil','country_id' => '29'),\narray('id' => '6145','name' => '(TMT) - Trombetas Airport, OriximinA, Brazil','country_id' => '29'),\narray('id' => '6146','name' => '(UNA) - Hotel TransamArica Airport, Una, Brazil','country_id' => '29'),\narray('id' => '6147','name' => '(TOW) - Toledo Airport, Toledo, Brazil','country_id' => '29'),\narray('id' => '6148','name' => '(THE) - Senador PetrAnio Portela Airport, Teresina, Brazil','country_id' => '29'),\narray('id' => '6149','name' => '(TFF) - TefA Airport, TefA, Brazil','country_id' => '29'),\narray('id' => '6150','name' => '(TRQ) - TarauacA Airport, TarauacA, Brazil','country_id' => '29'),\narray('id' => '6151','name' => '(TEC) - TelAamaco Borba Airport, TelAamaco Borba, Brazil','country_id' => '29'),\narray('id' => '6152','name' => '(TSQ) - Torres Airport, Torres, Brazil','country_id' => '29'),\narray('id' => '6153','name' => '(OBI) - TiriAs Airport, A\"bidos, Brazil','country_id' => '29'),\narray('id' => '6154','name' => '(TBT) - Tabatinga Airport, Tabatinga, Brazil','country_id' => '29'),\narray('id' => '6155','name' => '(TUR) - TucuruA Airport, TucuruA, Brazil','country_id' => '29'),\narray('id' => '6156','name' => '(SJL) - SAo Gabriel da Cachoeira Airport, SAo Gabriel Da Cachoeira, Brazil','country_id' => '29'),\narray('id' => '6157','name' => '(PAV) - Paulo Afonso Airport, Paulo Afonso, Brazil','country_id' => '29'),\narray('id' => '6158','name' => '(URG) - Rubem Berta Airport, Uruguaiana, Brazil','country_id' => '29'),\narray('id' => '6159','name' => '(UDI) - Ten. Cel. Aviador CAsar Bombonato Airport, UberlAndia, Brazil','country_id' => '29'),\narray('id' => '6160','name' => '(UBA) - MArio de Almeida Franco Airport, Uberaba, Brazil','country_id' => '29'),\narray('id' => '6161','name' => '(VAG) - Major Brigadeiro Trompowsky Airport, Varginha, Brazil','country_id' => '29'),\narray('id' => '6162','name' => '(BVH) - Brigadeiro CamarAo Airport, Vilhena, Brazil','country_id' => '29'),\narray('id' => '6163','name' => '(VIX) - Eurico de Aguiar Salles Airport, VitAria, Brazil','country_id' => '29'),\narray('id' => '6164','name' => '(QPS) - Campo Fontenelle Airport, Pirassununga, Brazil','country_id' => '29'),\narray('id' => '6165','name' => '(IZA) - Presidente Itamar Franco Airport, Juiz de Fora, Brazil','country_id' => '29'),\narray('id' => '6166','name' => '(ZUD) - Pupelde Airport, Ancud, Chile','country_id' => '43'),\narray('id' => '6167','name' => '(LOB) - San Rafael Airport, Los Andes, Chile','country_id' => '43'),\narray('id' => '6168','name' => '(WAP) - Alto Palena Airport, Alto Palena, Chile','country_id' => '43'),\narray('id' => '6169','name' => '(ARI) - Chacalluta Airport, Arica, Chile','country_id' => '43'),\narray('id' => '6170','name' => '(WPA) - Cabo 1A Juan RomAn Airport, Puerto Aysen, Chile','country_id' => '43'),\narray('id' => '6171','name' => '(CPO) - Desierto de Atacama Airport, Copiapo, Chile','country_id' => '43'),\narray('id' => '6172','name' => '(BBA) - Balmaceda Airport, Balmaceda, Chile','country_id' => '43'),\narray('id' => '6173','name' => '(TOQ) - Barriles Airport, Tocopilla, Chile','country_id' => '43'),\narray('id' => '6174','name' => '(CCH) - Chile Chico Airport, Chile Chico, Chile','country_id' => '43'),\narray('id' => '6175','name' => '(CJC) - El Loa Airport, Calama, Chile','country_id' => '43'),\narray('id' => '6176','name' => '(YAI) - Gral. Bernardo OAHiggins Airport, Chillan, Chile','country_id' => '43'),\narray('id' => '6177','name' => '(PUQ) - Pdte. carlos IbaAez del Campo Airport, Punta Arenas, Chile','country_id' => '43'),\narray('id' => '6178','name' => '(COW) - Tambillos Airport, Coquimbo, Chile','country_id' => '43'),\narray('id' => '6179','name' => '(GXQ) - Teniente Vidal Airport, Coyhaique, Chile','country_id' => '43'),\narray('id' => '6180','name' => '(IQQ) - Diego Aracena Airport, Iquique, Chile','country_id' => '43'),\narray('id' => '6181','name' => '(SCL) - Comodoro Arturo Merino BenAtez International Airport, Santiago, Chile','country_id' => '43'),\narray('id' => '6182','name' => '(ESR) - Ricardo GarcAa Posada Airport, El Salvador, Chile','country_id' => '43'),\narray('id' => '6183','name' => '(FRT) - El Avellano Airport, Frutillar, Chile','country_id' => '43'),\narray('id' => '6184','name' => '(ANF) - Cerro Moreno Airport, Antofagasta, Chile','country_id' => '43'),\narray('id' => '6185','name' => '(WPR) - Capitan Fuentes Martinez Airport Airport, Porvenir, Chile','country_id' => '43'),\narray('id' => '6186','name' => '(FFU) - FutaleufAo Airport, Futaleufu, Chile','country_id' => '43'),\narray('id' => '6187','name' => '(LSQ) - MarAa Dolores Airport, Los Angeles, Chile','country_id' => '43'),\narray('id' => '6188','name' => '(WPU) - Guardiamarina ZaAartu Airport, Puerto Williams, Chile','country_id' => '43'),\narray('id' => '6189','name' => '(LGR) - Cochrane Airport, Cochrane, Chile','country_id' => '43'),\narray('id' => '6190','name' => '(CCP) - Carriel Sur Airport, Concepcion, Chile','country_id' => '43'),\narray('id' => '6191','name' => '(IPC) - Mataveri Airport, Isla De Pascua, Chile','country_id' => '43'),\narray('id' => '6192','name' => '(ZOS) - CaAal Bajo Carlos - Hott Siebert Airport, Osorno, Chile','country_id' => '43'),\narray('id' => '6193','name' => '(VLR) - Vallenar Airport, Vallenar, Chile','country_id' => '43'),\narray('id' => '6194','name' => '(ZLR) - Municipal de Linares Airport, Linares, Chile','country_id' => '43'),\narray('id' => '6195','name' => '(PNT) - Tte. Julio Gallardo Airport, Puerto Natales, Chile','country_id' => '43'),\narray('id' => '6196','name' => '(OVL) - El Tuqui Airport, Ovalle, Chile','country_id' => '43'),\narray('id' => '6197','name' => '(ZPC) - PucAn Airport, Pucon, Chile','country_id' => '43'),\narray('id' => '6198','name' => '(MHC) - Mocopulli Airport, Dalcahue, Chile','country_id' => '43'),\narray('id' => '6199','name' => '(PUX) - El Mirador Airport, Puerto Varas, Chile','country_id' => '43'),\narray('id' => '6200','name' => '(ZCO) - La AraucanAa Airport, Temuco, Chile','country_id' => '43'),\narray('id' => '6201','name' => '(CNR) - ChaAaral Airport, ChaAaral, Chile','country_id' => '43'),\narray('id' => '6202','name' => '(VAP) - Rodelillo Airport, ViAa Del Mar, Chile','country_id' => '43'),\narray('id' => '6203','name' => '(QRC) - De La Independencia Airport, Rancagua, Chile','country_id' => '43'),\narray('id' => '6204','name' => '(TNM) - Teniente Rodolfo Marsh Martin Base, Isla Rey Jorge, Antarctica','country_id' => '8'),\narray('id' => '6205','name' => '(SMB) - Franco Bianco Airport, Cerro Sombrero, Chile','country_id' => '43'),\narray('id' => '6206','name' => '(LSC) - La Florida Airport, La Serena-Coquimbo, Chile','country_id' => '43'),\narray('id' => '6207','name' => '(SSD) - VActor LafAn Airport, San Felipe, Chile','country_id' => '43'),\narray('id' => '6208','name' => '(WCA) - Gamboa Airport, Castro, Chile','country_id' => '43'),\narray('id' => '6209','name' => '(PZS) - Maquehue Airport, Temuco, Chile','country_id' => '43'),\narray('id' => '6210','name' => '(PMC) - El Tepual Airport, Puerto Montt, Chile','country_id' => '43'),\narray('id' => '6211','name' => '(TLX) - Panguilemo Airport, Talca, Chile','country_id' => '43'),\narray('id' => '6212','name' => '(WCH) - ChaitAn Airport, Chaiten, Chile','country_id' => '43'),\narray('id' => '6213','name' => '(ZIC) - Victoria Airport, Victoria, Chile','country_id' => '43'),\narray('id' => '6214','name' => '(TTC) - Las Breas Airport, Taltal, Chile','country_id' => '43'),\narray('id' => '6215','name' => '(ZAL) - Pichoy Airport, Valdivia, Chile','country_id' => '43'),\narray('id' => '6216','name' => '(KNA) - ViAa del mar Airport, ViAa Del Mar, Chile','country_id' => '43'),\narray('id' => '6217','name' => '(CPQ) - Amarais Airport, Campinas, Brazil','country_id' => '29'),\narray('id' => '6218','name' => '(QCJ) - Botucatu - Tancredo de Almeida Neves Airport, Botucatu, Brazil','country_id' => '29'),\narray('id' => '6219','name' => '(OLC) - Senadora Eunice Micheles Airport, SAo Paulo De OlivenAa, Brazil','country_id' => '29'),\narray('id' => '6220','name' => '(SOD) - Sorocaba Airport, Sorocaba, Brazil','country_id' => '29'),\narray('id' => '6221','name' => '(QDC) - Dracena Airport, Dracena, Brazil','country_id' => '29'),\narray('id' => '6222','name' => '(SDI) - Saidor Airport, Saidor, Papua New Guinea','country_id' => '172'),\narray('id' => '6223','name' => '(JLS) - Jales Airport, Jales, Brazil','country_id' => '29'),\narray('id' => '6224','name' => '(QOA) - Mococa Airport, Mococa, Brazil','country_id' => '29'),\narray('id' => '6225','name' => '(QGC) - LenAAis Paulista Airport, LenAAis Paulista, Brazil','country_id' => '29'),\narray('id' => '6226','name' => '(QNV) - Aeroclube Airport, Nova IguaAu, Brazil','country_id' => '29'),\narray('id' => '6227','name' => '(OUS) - Ourinhos Airport, Ourinhos, Brazil','country_id' => '29'),\narray('id' => '6228','name' => '(OIA) - OurilAndia do Norte Airport, OurilAndia do Norte, Brazil','country_id' => '29'),\narray('id' => '6229','name' => '(QHB) - Piracicaba Airport, Piracicaba, Brazil','country_id' => '29'),\narray('id' => '6230','name' => '(QIQ) - Rio Claro Airport, Rio Claro, Brazil','country_id' => '29'),\narray('id' => '6231','name' => '(QVP) - AvarA-Arandu Airport, AvarA, Brazil','country_id' => '29'),\narray('id' => '6232','name' => '(REZ) - Resende Airport, Resende, Brazil','country_id' => '29'),\narray('id' => '6233','name' => '(QSC) - SAo Carlos Airport, SAo Carlos, Brazil','country_id' => '29'),\narray('id' => '6234','name' => '(UBT) - Ubatuba Airport, Ubatuba, Brazil','country_id' => '29'),\narray('id' => '6235','name' => '(ITP) - Itaperuna Airport, Itaperuna, Brazil','country_id' => '29'),\narray('id' => '6236','name' => '(QGS) - Alagoinhas Airport, Alagoinhas, Brazil','country_id' => '29'),\narray('id' => '6237','name' => '(VOT) - Votuporanga Airport, Votuporanga, Brazil','country_id' => '29'),\narray('id' => '6238','name' => '(QGB) - Limeira Airport, Limeira, Brazil','country_id' => '29'),\narray('id' => '6239','name' => '(IZA) - Zona da Mata Regional Airport, Juiz De Fora, Brazil','country_id' => '29'),\narray('id' => '6240','name' => '(ATF) - ChachoAn Airport, Ambato, Ecuador','country_id' => '60'),\narray('id' => '6241','name' => '(OCC) - Francisco De Orellana Airport, Coca, Ecuador','country_id' => '60'),\narray('id' => '6242','name' => '(CUE) - Mariscal Lamar Airport, Cuenca, Ecuador','country_id' => '60'),\narray('id' => '6243','name' => '(GPS) - Seymour Airport, Baltra, Ecuador','country_id' => '60'),\narray('id' => '6244','name' => '(GYE) - JosA JoaquAn de Olmedo International Airport, Guayaquil, Ecuador','country_id' => '60'),\narray('id' => '6245','name' => '(IBB) - General Villamil Airport, Isabela, Ecuador','country_id' => '60'),\narray('id' => '6246','name' => '(JIP) - Jipijapa Airport, Jipijapa, Ecuador','country_id' => '60'),\narray('id' => '6247','name' => '(LTX) - Cotopaxi International Airport, Latacunga, Ecuador','country_id' => '60'),\narray('id' => '6248','name' => '(MRR) - Jose Maria Velasco Ibarra Airport, MacarA, Ecuador','country_id' => '60'),\narray('id' => '6249','name' => '(XMS) - Coronel E Carvajal Airport, Macas, Ecuador','country_id' => '60'),\narray('id' => '6250','name' => '(MCH) - General Manuel Serrano Airport, Machala, Ecuador','country_id' => '60'),\narray('id' => '6251','name' => '(MEC) - Eloy Alfaro International Airport, Manta, Ecuador','country_id' => '60'),\narray('id' => '6252','name' => '(LGQ) - Nueva Loja Airport, Lago Agrio, Ecuador','country_id' => '60'),\narray('id' => '6253','name' => '(PYO) - Putumayo Airport, Puerto Putumayo, Ecuador','country_id' => '60'),\narray('id' => '6254','name' => '(PVO) - Reales Tamarindos Airport, Portoviejo, Ecuador','country_id' => '60'),\narray('id' => '6255','name' => '(UIO) - Mariscal Sucre International Airport, Quito, Ecuador','country_id' => '60'),\narray('id' => '6256','name' => '(ETR) - Santa Rosa International Airport, Santa Rosa, Ecuador','country_id' => '60'),\narray('id' => '6257','name' => '(SNC) - General Ulpiano Paez Airport, Salinas, Ecuador','country_id' => '60'),\narray('id' => '6258','name' => '(SUQ) - Sucua Airport, Sucua, Ecuador','country_id' => '60'),\narray('id' => '6259','name' => '(PTZ) - Rio Amazonas Airport, Shell Mera, Ecuador','country_id' => '60'),\narray('id' => '6260','name' => '(SCY) - San CristAbal Airport, San CristAbal, Ecuador','country_id' => '60'),\narray('id' => '6261','name' => '(BHA) - Los Perales Airport, BahAa de Caraquez, Ecuador','country_id' => '60'),\narray('id' => '6262','name' => '(TSC) - Taisha Airport, Taisha, Ecuador','country_id' => '60'),\narray('id' => '6263','name' => '(TPN) - Tiputini Airport, Tiputini, Ecuador','country_id' => '60'),\narray('id' => '6264','name' => '(LOH) - Camilo Ponce Enriquez Airport, La Toma (Catamayo), Ecuador','country_id' => '60'),\narray('id' => '6265','name' => '(ESM) - General Rivadeneira Airport, Tachina, Ecuador','country_id' => '60'),\narray('id' => '6266','name' => '(TPC) - Tarapoa Airport, Tarapoa, Ecuador','country_id' => '60'),\narray('id' => '6267','name' => '(TUA) - Teniente Coronel Luis a Mantilla Airport, TulcAn, Ecuador','country_id' => '60'),\narray('id' => '6268','name' => '(PSY) - Port Stanley Airport, Stanley, Falkland Islands','country_id' => '69'),\narray('id' => '6269','name' => '(SFU) - Safia Airport, Safia, Papua New Guinea','country_id' => '172'),\narray('id' => '6270','name' => '(ASU) - Silvio Pettirossi International Airport, AsunciAn, Paraguay','country_id' => '182'),\narray('id' => '6271','name' => '(AYO) - Juan De Ayolas Airport, Ayolas, Paraguay','country_id' => '182'),\narray('id' => '6272','name' => '(CIO) - Teniente Col Carmelo Peralta Airport, ConcepciAn, Paraguay','country_id' => '182'),\narray('id' => '6273','name' => '(ENO) - EncarnaciAn Airport, EncarnaciAn, Paraguay','country_id' => '182'),\narray('id' => '6274','name' => '(AGT) - Guarani International Airport, Ciudad del Este, Paraguay','country_id' => '182'),\narray('id' => '6275','name' => '(FLM) - Filadelfia Airport, Filadelfia, Paraguay','country_id' => '182'),\narray('id' => '6276','name' => '(ESG) - Dr. Luis Maria ArgaAa International Airport, Mariscal Estigarribia, Paraguay','country_id' => '182'),\narray('id' => '6277','name' => '(PIL) - Carlos Miguel Gimenez Airport, Pilar, Paraguay','country_id' => '182'),\narray('id' => '6278','name' => '(PJC) - Dr Augusto Roberto Fuster International Airport, Pedro Juan Caballero, Paraguay','country_id' => '182'),\narray('id' => '6279','name' => '(SIC) - San JosA Island Airport, Las Perlas, Panama','country_id' => '169'),\narray('id' => '6280','name' => '(LVR) - Municipal Bom Futuro Airport, Lucas do Rio Verde, Brazil','country_id' => '29'),\narray('id' => '6281','name' => '(FRC) - Franca Airport, Franca, Brazil','country_id' => '29'),\narray('id' => '6282','name' => '(SIZ) - Sissano Airport, Sissano, Papua New Guinea','country_id' => '172'),\narray('id' => '6283','name' => '(JUA) - InAcio LuAs do Nascimento Airport, Juara, Brazil','country_id' => '29'),\narray('id' => '6284','name' => '(CFO) - Confresa Airport, Confresa, Brazil','country_id' => '29'),\narray('id' => '6285','name' => '(RIG) - Rio Grande Airport, Rio Grande, Brazil','country_id' => '29'),\narray('id' => '6286','name' => '(JTC) - Bauru - Arealva Airport, Bauru, Brazil','country_id' => '29'),\narray('id' => '6287','name' => '(ARS) - AragarAas Airport, AragarAas, Brazil','country_id' => '29'),\narray('id' => '6288','name' => '(ARS) - Usina Santa Cruz Airport, Santa Cruz CabrAlia, Brazil','country_id' => '29'),\narray('id' => '6289','name' => '(ACM) - Arica Airport, Arica, Colombia','country_id' => '46'),\narray('id' => '6290','name' => '(ECO) - El Encanto Airport, El Encanto, Colombia','country_id' => '46'),\narray('id' => '6291','name' => '(ARO) - Arboletes Airport, Arboletes, Colombia','country_id' => '46'),\narray('id' => '6292','name' => '(JUO) - Jurado Airport, Jurado, Colombia','country_id' => '46'),\narray('id' => '6293','name' => '(SJR) - San Juan De Uraba Airport, San Juan De Uraba, Colombia','country_id' => '46'),\narray('id' => '6294','name' => '(NPU) - San Pedro Airport, San Pedro de UrabA, Colombia','country_id' => '46'),\narray('id' => '6295','name' => '(PCC) - Puerto Rico Airport, Puerto Rico, Colombia','country_id' => '46'),\narray('id' => '6296','name' => '(SQF) - Solano Airport, Solano, Colombia','country_id' => '46'),\narray('id' => '6297','name' => '(AYI) - Yari Airport, Yari, Colombia','country_id' => '46'),\narray('id' => '6298','name' => '(ACL) - Aguaclara Airport, Aguaclara, Colombia','country_id' => '46'),\narray('id' => '6299','name' => '(CUI) - Currillo Airport, Currillo, Colombia','country_id' => '46'),\narray('id' => '6300','name' => '(EUO) - Paratebueno Airport, Paratebueno, Colombia','country_id' => '46'),\narray('id' => '6301','name' => '(PRE) - Pore Airport, Pore, Colombia','country_id' => '46'),\narray('id' => '6302','name' => '(SQE) - San Luis De Palenque Airport, San Luis De Palenque, Colombia','country_id' => '46'),\narray('id' => '6303','name' => '(TAU) - Tauramena Airport, Tauramena, Colombia','country_id' => '46'),\narray('id' => '6304','name' => '(AYC) - Ayacucho Airport, Ayacucho, Colombia','country_id' => '46'),\narray('id' => '6305','name' => '(DZI) - Codazzi Airport, Hacienda Borrero, Colombia','country_id' => '46'),\narray('id' => '6306','name' => '(DZI) - Las Flores Airport, Codazzi, Colombia','country_id' => '46'),\narray('id' => '6307','name' => '(SJH) - San Juan Del CAsar Airport, San Juan Del CAsar, Colombia','country_id' => '46'),\narray('id' => '6308','name' => '(BHF) - Bahia Cupica Airport, BahAa Cupica, Colombia','country_id' => '46'),\narray('id' => '6309','name' => '(GGL) - Gilgal Airport, Villa Claret, Colombia','country_id' => '46'),\narray('id' => '6310','name' => '(UNC) - Unguia Airport, Arquia, Colombia','country_id' => '46'),\narray('id' => '6311','name' => '(AYA) - Ayapel Airport, Ayapel, Colombia','country_id' => '46'),\narray('id' => '6312','name' => '(NBB) - Barranco Minas Airport, Barranco Minas, Colombia','country_id' => '46'),\narray('id' => '6313','name' => '(MND) - Medina Airport, Medina, Colombia','country_id' => '46'),\narray('id' => '6314','name' => '(NAD) - Macanal Airport, Macanal, Colombia','country_id' => '46'),\narray('id' => '6315','name' => '(GCA) - Guacamayas Airport, Guacamayas, Colombia','country_id' => '46'),\narray('id' => '6316','name' => '(SRO) - Santana Ramos Airport, Santana Ramos, Colombia','country_id' => '46'),\narray('id' => '6317','name' => '(BAC) - Barranca De Upia Airport, Barranca De Upia, Colombia','country_id' => '46'),\narray('id' => '6318','name' => '(CQT) - Caquetania Airport, Caquetania, Colombia','country_id' => '46'),\narray('id' => '6319','name' => '(ELJ) - El Recreo Airport, Ruperto Polania, Colombia','country_id' => '46'),\narray('id' => '6320','name' => '(LMC) - El Refugio/La Macarena Airport, La Macarena, Colombia','country_id' => '46'),\narray('id' => '6321','name' => '(SOH) - Solita Airport, Solita, Colombia','country_id' => '46'),\narray('id' => '6322','name' => '(URI) - Uribe Airport, Uribe, Colombia','country_id' => '46'),\narray('id' => '6323','name' => '(ECR) - El Charco Airport, El Charco, Colombia','country_id' => '46'),\narray('id' => '6324','name' => '(ISD) - Santa BArbara Airport, IscuandA, Colombia','country_id' => '46'),\narray('id' => '6325','name' => '(AZT) - Zapatoca Airport, Zapatoca, Colombia','country_id' => '46'),\narray('id' => '6326','name' => '(HRR) - Herrera Airport, CampiAa, Colombia','country_id' => '46'),\narray('id' => '6327','name' => '(SQB) - Santa Ana Airport, Piedras, Colombia','country_id' => '46'),\narray('id' => '6328','name' => '(LPE) - La Primavera Airport, Costa Rica, Colombia','country_id' => '46'),\narray('id' => '6329','name' => '(ARF) - Acaricuara Airport, Acaricuara, Colombia','country_id' => '46'),\narray('id' => '6330','name' => '(MFB) - Monfort Airport, Monfort, Colombia','country_id' => '46'),\narray('id' => '6331','name' => '(MHF) - Morichal Airport, Morichal, Colombia','country_id' => '46'),\narray('id' => '6332','name' => '(CSR) - Casuarito Airport, Casuarito, Colombia','country_id' => '46'),\narray('id' => '6333','name' => '(LPE) - La Primavera Airport, La Primavera, Colombia','country_id' => '46'),\narray('id' => '6334','name' => '(ACR) - Araracuara Airport, Araracuara, Colombia','country_id' => '46'),\narray('id' => '6335','name' => '(ACD) - Alcides FernAndez Airport, AcandA, Colombia','country_id' => '46'),\narray('id' => '6336','name' => '(AFI) - Amalfi Airport, Amalfi, Colombia','country_id' => '46'),\narray('id' => '6337','name' => '(ADN) - Andes Airport, Andes, Colombia','country_id' => '46'),\narray('id' => '6338','name' => '(API) - Gomez Nino Apiay Air Base, Apiay, Colombia','country_id' => '46'),\narray('id' => '6339','name' => '(AXM) - El Eden Airport, Armenia, Colombia','country_id' => '46'),\narray('id' => '6340','name' => '(PUU) - Tres De Mayo Airport, Puerto AsAs, Colombia','country_id' => '46'),\narray('id' => '6341','name' => '(ELB) - Las Flores Airport, El Banco, Colombia','country_id' => '46'),\narray('id' => '6342','name' => '(BGA) - Palonegro Airport, Bucaramanga, Colombia','country_id' => '46'),\narray('id' => '6343','name' => '(BOG) - El Dorado International Airport, Bogota, Colombia','country_id' => '46'),\narray('id' => '6344','name' => '(BAQ) - Ernesto Cortissoz International Airport, Barranquilla, Colombia','country_id' => '46'),\narray('id' => '6345','name' => '(BSC) - JosA Celestino Mutis Airport, BahAa Solano, Colombia','country_id' => '46'),\narray('id' => '6346','name' => '(BUN) - Gerardo Tobar LApez Airport, Buenaventura, Colombia','country_id' => '46'),\narray('id' => '6347','name' => '(CPB) - CapurganA Airport, CapurganA, Colombia','country_id' => '46'),\narray('id' => '6348','name' => '(CUC) - Camilo Daza International Airport, CAocuta, Colombia','country_id' => '46'),\narray('id' => '6349','name' => '(COG) - Mandinga Airport, Condoto, Colombia','country_id' => '46'),\narray('id' => '6350','name' => '(CTG) - Rafael NuAez International Airport, Cartagena, Colombia','country_id' => '46'),\narray('id' => '6351','name' => '(CCO) - Carimagua Airport, Puerto LApez, Colombia','country_id' => '46'),\narray('id' => '6352','name' => '(CLO) - Alfonso Bonilla Aragon International Airport, Cali, Colombia','country_id' => '46'),\narray('id' => '6353','name' => '(CIM) - Cimitarra Airport, Cimitarra, Colombia','country_id' => '46'),\narray('id' => '6354','name' => '(RAV) - Cravo Norte Airport, Cravo Norte, Colombia','country_id' => '46'),\narray('id' => '6355','name' => '(TCO) - La Florida Airport, Tumaco, Colombia','country_id' => '46'),\narray('id' => '6356','name' => '(CUO) - CarurAo Airport, CarurAo, Colombia','country_id' => '46'),\narray('id' => '6357','name' => '(CAQ) - Juan H White Airport, Caucasia, Colombia','country_id' => '46'),\narray('id' => '6358','name' => '(CVE) - CoveAas Airport, CoveAas, Colombia','country_id' => '46'),\narray('id' => '6359','name' => '(CZU) - Las Brujas Airport, Corozal, Colombia','country_id' => '46'),\narray('id' => '6360','name' => '(EBG) - El Bagre Airport, El Bagre, Colombia','country_id' => '46'),\narray('id' => '6361','name' => '(EJA) - YariguAes Airport, Barrancabermeja, Colombia','country_id' => '46'),\narray('id' => '6362','name' => '(FLA) - Gustavo Artunduaga Paredes Airport, Florencia, Colombia','country_id' => '46'),\narray('id' => '6363','name' => '(FDA) - FundaciAn Airport, FundaciAn, Colombia','country_id' => '46'),\narray('id' => '6364','name' => '(LGT) - La Gaviota Airport, , Colombia','country_id' => '46'),\narray('id' => '6365','name' => '(GIR) - Santiago Vila Airport, Girardot, Colombia','country_id' => '46'),\narray('id' => '6366','name' => '(CRC) - Santa Ana Airport, Cartago, Colombia','country_id' => '46'),\narray('id' => '6367','name' => '(GPI) - Juan Casiano Airport, Guapi, Colombia','country_id' => '46'),\narray('id' => '6368','name' => '(CPL) - Chaparral Airport, Chaparral, Colombia','country_id' => '46'),\narray('id' => '6369','name' => '(HTZ) - Hato Corozal Airport, Hato Corozal, Colombia','country_id' => '46'),\narray('id' => '6370','name' => '(IBE) - Perales Airport, IbaguA, Colombia','country_id' => '46'),\narray('id' => '6371','name' => '(IGO) - ChigorodA Airport, ChigorodA, Colombia','country_id' => '46'),\narray('id' => '6372','name' => '(IPI) - San Luis Airport, Ipiales, Colombia','country_id' => '46'),\narray('id' => '6373','name' => '(APO) - Antonio Roldan Betancourt Airport, Carepa, Colombia','country_id' => '46'),\narray('id' => '6374','name' => '(LQM) - Caucaya Airport, Puerto LeguAzamo, Colombia','country_id' => '46'),\narray('id' => '6375','name' => '(MCJ) - Jorge Isaac Airport, La Mina-Maicao, Colombia','country_id' => '46'),\narray('id' => '6376','name' => '(LPD) - La Pedrera Airport, La Pedrera, Colombia','country_id' => '46'),\narray('id' => '6377','name' => '(LET) - Alfredo VAsquez Cobo International Airport, Leticia, Colombia','country_id' => '46'),\narray('id' => '6378','name' => '(EOH) - Enrique Olaya Herrera Airport, MedellAn, Colombia','country_id' => '46'),\narray('id' => '6379','name' => '(MFS) - Miraflores Airport, Miraflores, Colombia','country_id' => '46'),\narray('id' => '6380','name' => '(MGN) - Baracoa Airport, MaganguA, Colombia','country_id' => '46'),\narray('id' => '6381','name' => '(MTB) - Montelibano Airport, MontelAbano, Colombia','country_id' => '46'),\narray('id' => '6382','name' => '(MTR) - Los Garzones Airport, MonterAa, Colombia','country_id' => '46'),\narray('id' => '6383','name' => '(MVP) - Fabio Alberto Leon Bentley Airport, MitAo, Colombia','country_id' => '46'),\narray('id' => '6384','name' => '(MZL) - La Nubia Airport, Manizales, Colombia','country_id' => '46'),\narray('id' => '6385','name' => '(NCI) - Necocli Airport, Necocli, Colombia','country_id' => '46'),\narray('id' => '6386','name' => '(NQU) - Reyes Murillo Airport, NuquA, Colombia','country_id' => '46'),\narray('id' => '6387','name' => '(NVA) - Benito Salas Airport, Neiva, Colombia','country_id' => '46'),\narray('id' => '6388','name' => '(OCV) - Aguas Claras Airport, OcaAa, Colombia','country_id' => '46'),\narray('id' => '6389','name' => '(ORC) - Orocue Airport, Orocue, Colombia','country_id' => '46'),\narray('id' => '6390','name' => '(PCR) - German Olano Airport, Puerto CarreAo, Colombia','country_id' => '46'),\narray('id' => '6391','name' => '(PDA) - Obando Airport, Puerto InArida, Colombia','country_id' => '46'),\narray('id' => '6392','name' => '(PEI) - MatecaAa International Airport, Pereira, Colombia','country_id' => '46'),\narray('id' => '6393','name' => '(PTX) - Pitalito Airport, Pitalito, Colombia','country_id' => '46'),\narray('id' => '6394','name' => '(PLT) - Plato Airport, Plato, Colombia','country_id' => '46'),\narray('id' => '6395','name' => '(NAR) - Puerto Nare Airport, Armenia, Colombia','country_id' => '46'),\narray('id' => '6396','name' => '(PPN) - Guillermo LeAn Valencia Airport, PopayAn, Colombia','country_id' => '46'),\narray('id' => '6397','name' => '(PAL) - German Olano Air Base, La Dorada, Colombia','country_id' => '46'),\narray('id' => '6398','name' => '(PBE) - Puerto Berrio Airport, Puerto Berrio, Colombia','country_id' => '46'),\narray('id' => '6399','name' => '(PSO) - Antonio Narino Airport, Pasto, Colombia','country_id' => '46'),\narray('id' => '6400','name' => '(PVA) - El Embrujo Airport, Providencia, Colombia','country_id' => '46'),\narray('id' => '6401','name' => '(PZA) - Paz De Ariporo Airport, Paz De Ariporo, Colombia','country_id' => '46'),\narray('id' => '6402','name' => '(MQU) - Mariquita Airport, Mariquita, Colombia','country_id' => '46'),\narray('id' => '6403','name' => '(MDE) - Jose Maria CArdova International Airport, Rionegro, Colombia','country_id' => '46'),\narray('id' => '6404','name' => '(RCH) - Almirante Padilla Airport, Riohacha, Colombia','country_id' => '46'),\narray('id' => '6405','name' => '(RVE) - Los Colonizadores Airport, Saravena, Colombia','country_id' => '46'),\narray('id' => '6406','name' => '(SJE) - Jorge E. Gonzalez Torres Airport, San JosA Del Guaviare, Colombia','country_id' => '46'),\narray('id' => '6407','name' => '(SSL) - Santa Rosalia Airport, Santa Rosalia, Colombia','country_id' => '46'),\narray('id' => '6408','name' => '(SMR) - SimAn BolAvar International Airport, Santa Marta, Colombia','country_id' => '46'),\narray('id' => '6409','name' => '(SOX) - Alberto Lleras Camargo Airport, Sogamoso, Colombia','country_id' => '46'),\narray('id' => '6410','name' => '(ADZ) - Gustavo Rojas Pinilla International Airport, San AndrAs, Colombia','country_id' => '46'),\narray('id' => '6411','name' => '(SRS) - San Marcos Airport, San Marcos, Colombia','country_id' => '46'),\narray('id' => '6412','name' => '(SVI) - Eduardo Falla Solano Airport, San Vicente Del CaguAn, Colombia','country_id' => '46'),\narray('id' => '6413','name' => '(TIB) - TibAo Airport, TibAo, Colombia','country_id' => '46'),\narray('id' => '6414','name' => '(TDA) - Trinidad Airport, Trinidad, Colombia','country_id' => '46'),\narray('id' => '6415','name' => '(TLU) - Golfo de Morrosquillo Airport, TolAo, Colombia','country_id' => '46'),\narray('id' => '6416','name' => '(TME) - Gustavo Vargas Airport, Tame, Colombia','country_id' => '46'),\narray('id' => '6417','name' => '(TQS) - Tres Esquinas Air Base, Tres Esquinas, Colombia','country_id' => '46'),\narray('id' => '6418','name' => '(TRB) - Gonzalo MejAa Airport, Turbo, Colombia','country_id' => '46'),\narray('id' => '6419','name' => '(AUC) - Santiago Perez Airport, Arauca, Colombia','country_id' => '46'),\narray('id' => '6420','name' => '(UIB) - El CaraAo Airport, QuibdA, Colombia','country_id' => '46'),\narray('id' => '6421','name' => '(ULQ) - Heriberto GAl MartAnez Airport, TuluA, Colombia','country_id' => '46'),\narray('id' => '6422','name' => '(URR) - Urrao Airport, Urrao, Colombia','country_id' => '46'),\narray('id' => '6423','name' => '(VGZ) - Villa GarzAn Airport, Villa GarzAn, Colombia','country_id' => '46'),\narray('id' => '6424','name' => '(PYA) - VelAsquez Airport, Puerto BoyacA, Colombia','country_id' => '46'),\narray('id' => '6425','name' => '(VUP) - Alfonso LApez Pumarejo Airport, Valledupar, Colombia','country_id' => '46'),\narray('id' => '6426','name' => '(VVC) - Vanguardia Airport, Villavicencio, Colombia','country_id' => '46'),\narray('id' => '6427','name' => '(AYG) - Yaguara Airport, San Vicente Del CaguAn, Colombia','country_id' => '46'),\narray('id' => '6428','name' => '(EYP) - El Yopal Airport, El Yopal, Colombia','country_id' => '46'),\narray('id' => '6429','name' => '(MHW) - Monteagudo Airport, El BaAado, Bolivia','country_id' => '27'),\narray('id' => '6430','name' => '(APB) - Apolo Airport, Apolo, Bolivia','country_id' => '27'),\narray('id' => '6431','name' => '(ASC) - AscenciAn De Guarayos Airport, AscensiAn de Guarayos, Bolivia','country_id' => '27'),\narray('id' => '6432','name' => '(BJO) - Bermejo Airport, Bermejo, Bolivia','country_id' => '27'),\narray('id' => '6433','name' => '(CAM) - Camiri Airport, Camiri, Bolivia','country_id' => '27'),\narray('id' => '6434','name' => '(CBB) - Jorge Wilsterman International Airport, Cochabamba, Bolivia','country_id' => '27'),\narray('id' => '6435','name' => '(CIJ) - CapitAn AnAbal Arab Airport, Cobija, Bolivia','country_id' => '27'),\narray('id' => '6436','name' => '(CEP) - ConcepciAn Airport, ConcepciAn, Bolivia','country_id' => '27'),\narray('id' => '6437','name' => '(SRZ) - El Trompillo Airport, Santa Cruz, Bolivia','country_id' => '27'),\narray('id' => '6438','name' => '(GYA) - CapitAn de Av. Emilio BeltrAn Airport, GuayaramerAn, Bolivia','country_id' => '27'),\narray('id' => '6439','name' => '(BVK) - Huacaraje Airport, Itenes, Bolivia','country_id' => '27'),\narray('id' => '6440','name' => '(SLJ) - Solomon Aerodrome, , Australia','country_id' => '12'),\narray('id' => '6441','name' => '(SJS) - San JosA De Chiquitos Airport, San JosA de Chiquitos, Bolivia','country_id' => '27'),\narray('id' => '6442','name' => '(SJB) - San JoaquAn Airport, San JoaquAn, Bolivia','country_id' => '27'),\narray('id' => '6443','name' => '(SJV) - San Javier Airport, San Javier, Bolivia','country_id' => '27'),\narray('id' => '6444','name' => '(LPB) - El Alto International Airport, La Paz / El Alto, Bolivia','country_id' => '27'),\narray('id' => '6445','name' => '(MGD) - Magdalena Airport, Magdalena, Bolivia','country_id' => '27'),\narray('id' => '6446','name' => '(ORU) - Juan Mendoza Airport, Oruro, Bolivia','country_id' => '27'),\narray('id' => '6447','name' => '(POI) - Capitan Nicolas Rojas Airport, PotosA, Bolivia','country_id' => '27'),\narray('id' => '6448','name' => '(PUR) - Puerto Rico Airport, Puerto Rico/Manuripi, Bolivia','country_id' => '27'),\narray('id' => '6449','name' => '(PSZ) - CapitAn Av. Salvador Ogaya G. airport, Puerto SuArez, Bolivia','country_id' => '27'),\narray('id' => '6450','name' => '(SRD) - San RamAn Airport, San RamAn / MamorA, Bolivia','country_id' => '27'),\narray('id' => '6451','name' => '(RBO) - RoborA Airport, RoborA, Bolivia','country_id' => '27'),\narray('id' => '6452','name' => '(RIB) - CapitAn Av. Selin Zeitun Lopez Airport, Riberalta, Bolivia','country_id' => '27'),\narray('id' => '6453','name' => '(REY) - Reyes Airport, Reyes, Bolivia','country_id' => '27'),\narray('id' => '6454','name' => '(SBL) - Santa Ana Del Yacuma Airport, Santa Ana del Yacuma, Bolivia','country_id' => '27'),\narray('id' => '6455','name' => '(SRJ) - CapitAn Av. German Quiroga G. Airport, San Borja, Bolivia','country_id' => '27'),\narray('id' => '6456','name' => '(SNG) - CapitAn Av. Juan Cochamanidis S. Airport, San Ignacio de Velasco, Bolivia','country_id' => '27'),\narray('id' => '6457','name' => '(SNM) - San Ignacio de Moxos Airport, San Ignacio de Moxos, Bolivia','country_id' => '27'),\narray('id' => '6458','name' => '(SRB) - Santa Rosa De Yacuma Airport, Santa Rosa, Bolivia','country_id' => '27'),\narray('id' => '6459','name' => '(SRE) - Juana Azurduy De Padilla Airport, Sucre, Bolivia','country_id' => '27'),\narray('id' => '6460','name' => '(MQK) - San MatAas Airport, San MatAas, Bolivia','country_id' => '27'),\narray('id' => '6461','name' => '(TJA) - Capitan Oriel Lea Plaza Airport, Tarija, Bolivia','country_id' => '27'),\narray('id' => '6462','name' => '(TDD) - Teniente Av. Jorge Henrich Arauz Airport, Trinidad, Bolivia','country_id' => '27'),\narray('id' => '6463','name' => '(UYU) - Uyuni Airport, Quijarro, Bolivia','country_id' => '27'),\narray('id' => '6464','name' => '(VAH) - CapitAn Av. Vidal Villagomez Toledo Airport, Vallegrande, Bolivia','country_id' => '27'),\narray('id' => '6465','name' => '(VLM) - Teniente Coronel Rafael PabAn Airport, Villamontes, Bolivia','country_id' => '27'),\narray('id' => '6466','name' => '(VVI) - Viru Viru International Airport, Santa Cruz, Bolivia','country_id' => '27'),\narray('id' => '6467','name' => '(BYC) - Yacuiba Airport, YacuAba, Bolivia','country_id' => '27'),\narray('id' => '6468','name' => '(ABN) - Albina Airport, Albina, Suriname','country_id' => '202'),\narray('id' => '6469','name' => '(TOT) - Totness Airport, Totness, Suriname','country_id' => '202'),\narray('id' => '6470','name' => '(DRJ) - Drietabbetje Airport, Drietabbetje, Suriname','country_id' => '202'),\narray('id' => '6471','name' => '(SMH) - Sapmanga Airport, Sapmanga, Papua New Guinea','country_id' => '172'),\narray('id' => '6472','name' => '(PBM) - Johan Adolf Pengel International Airport, Zandery, Suriname','country_id' => '202'),\narray('id' => '6473','name' => '(MOJ) - Moengo Airstrip, Moengo, Suriname','country_id' => '202'),\narray('id' => '6474','name' => '(ICK) - Nieuw Nickerie Airport, Nieuw Nickerie, Suriname','country_id' => '202'),\narray('id' => '6475','name' => '(SMP) - Stockholm Airport, Stockholm, Papua New Guinea','country_id' => '172'),\narray('id' => '6476','name' => '(OEM) - Vincent Fayks Airport, Paloemeu, Suriname','country_id' => '202'),\narray('id' => '6477','name' => '(SMZ) - Stoelmanseiland Airport, Stoelmanseiland, Suriname','country_id' => '202'),\narray('id' => '6478','name' => '(AGI) - Wageningen Airstrip, Wageningen, Suriname','country_id' => '202'),\narray('id' => '6479','name' => '(ORG) - Zorg en Hoop Airport, Paramaribo, Suriname','country_id' => '202'),\narray('id' => '6480','name' => '(APY) - Alto ParnaAba Airport, Alto ParnaAba, Brazil','country_id' => '29'),\narray('id' => '6481','name' => '(APQ) - Arapiraca Airport, Arapiraca, Brazil','country_id' => '29'),\narray('id' => '6482','name' => '(AMJ) - Cirilo QueirAz Airport, Almenara, Brazil','country_id' => '29'),\narray('id' => '6483','name' => '(AIF) - Marcelo Pires Halzhausen Airport, Assis, Brazil','country_id' => '29'),\narray('id' => '6484','name' => '(BDC) - Barra do Corda Airport, Barra Do Corda, Brazil','country_id' => '29'),\narray('id' => '6485','name' => '(BVM) - Belmonte Airport, Belmonte, Brazil','country_id' => '29'),\narray('id' => '6486','name' => '(BRA) - Barreiras Airport, Barreiras, Brazil','country_id' => '29'),\narray('id' => '6487','name' => '(BSS) - Balsas Airport, Balsas, Brazil','country_id' => '29'),\narray('id' => '6488','name' => '(BMS) - SAcrates Mariani Bittencourt Airport, Brumado, Brazil','country_id' => '29'),\narray('id' => '6489','name' => '(BQQ) - Barra Airport, Barra, Brazil','country_id' => '29'),\narray('id' => '6490','name' => '(CTP) - Carutapera Airport, Carutapera, Brazil','country_id' => '29'),\narray('id' => '6491','name' => '(CPU) - Cururupu Airport, Cururupu, Brazil','country_id' => '29'),\narray('id' => '6492','name' => '(QCH) - Colatina Airport, Colatina, Brazil','country_id' => '29'),\narray('id' => '6493','name' => '(RDC) - RedenAAo Airport, RedenAAo, Brazil','country_id' => '29'),\narray('id' => '6494','name' => '(LEP) - Leopoldina Airport, Leopoldina, Brazil','country_id' => '29'),\narray('id' => '6495','name' => '(DTI) - Diamantina Airport, Diamantina, Brazil','country_id' => '29'),\narray('id' => '6496','name' => '(DIQ) - Brigadeiro Cabral Airport, DivinApolis, Brazil','country_id' => '29'),\narray('id' => '6497','name' => '(CNV) - SAcrates Rezende Airport, Canavieiras, Brazil','country_id' => '29'),\narray('id' => '6498','name' => '(SXX) - SAo FAlix do Xingu Airport, SAo FAlix Do Xingu, Brazil','country_id' => '29'),\narray('id' => '6499','name' => '(GUZ) - Guarapari Airport, Guarapari, Brazil','country_id' => '29'),\narray('id' => '6500','name' => '(GDP) - Guadalupe Airport, Guadalupe, Brazil','country_id' => '29'),\narray('id' => '6501','name' => '(GNM) - Guanambi Airport, Guanambi, Brazil','country_id' => '29'),\narray('id' => '6502','name' => '(GMS) - GuimarAes Airport, GuimarAes, Brazil','country_id' => '29'),\narray('id' => '6503','name' => '(QGP) - Garanhuns Airport, Garanhuns, Brazil','country_id' => '29'),\narray('id' => '6504','name' => '(IRE) - IrecAa Airport, IrecAa, Brazil','country_id' => '29'),\narray('id' => '6505','name' => '(QIG) - Iguatu Airport, Iguatu, Brazil','country_id' => '29'),\narray('id' => '6506','name' => '(QIT) - Itapetinga Airport, Itapetinga, Brazil','country_id' => '29'),\narray('id' => '6507','name' => '(IPU) - IpiaAo Airport, IpiaAo, Brazil','country_id' => '29'),\narray('id' => '6508','name' => '(JCM) - Jacobina Airport, Jacobina, Brazil','country_id' => '29'),\narray('id' => '6509','name' => '(FEC) - JoAo Durval Carneiro Airport, Feira De Santana, Brazil','country_id' => '29'),\narray('id' => '6510','name' => '(JEQ) - JequiA Airport, JequiA, Brazil','country_id' => '29'),\narray('id' => '6511','name' => '(JNA) - JanuAria Airport, JanuAria, Brazil','country_id' => '29'),\narray('id' => '6512','name' => '(JDR) - Prefeito OctAvio de Almeida Neves Airport, SAo JoAo Del Rei, Brazil','country_id' => '29'),\narray('id' => '6513','name' => '(CMP) - Santana do Araguaia Airport, Santana Do Araguaia, Brazil','country_id' => '29'),\narray('id' => '6514','name' => '(QDF) - Conselheiro Lafaiete Airport, Conselheiro Lafaiete, Brazil','country_id' => '29'),\narray('id' => '6515','name' => '(CDI) - Cachoeiro do Itapemirim Airport, Cachoeiro Do Itapemirim, Brazil','country_id' => '29'),\narray('id' => '6516','name' => '(QCP) - Currais Novos Airport, Currais Novos, Brazil','country_id' => '29'),\narray('id' => '6517','name' => '(SSO) - SAo LourenAo Airport, SAo LourenAo, Brazil','country_id' => '29'),\narray('id' => '6518','name' => '(MTE) - Monte Alegre Airport, Monte Alegre, Brazil','country_id' => '29'),\narray('id' => '6519','name' => '(MVS) - Mucuri Airport, Mucuri, Brazil','country_id' => '29'),\narray('id' => '6520','name' => '(SBJ) - SAo Mateus Airport, SAo Mateus, Brazil','country_id' => '29'),\narray('id' => '6521','name' => '(PTQ) - Porto de Moz Airport, Porto De Moz, Brazil','country_id' => '29'),\narray('id' => '6522','name' => '(NNU) - Nanuque Airport, Nanuque, Brazil','country_id' => '29'),\narray('id' => '6523','name' => '(QBX) - Sobral Airport, Sobral, Brazil','country_id' => '29'),\narray('id' => '6524','name' => '(PSW) - Municipal JosA Figueiredo Airport, Passos, Brazil','country_id' => '29'),\narray('id' => '6525','name' => '(FEJ) - FeijA Airport, FeijA, Brazil','country_id' => '29'),\narray('id' => '6526','name' => '(ORX) - OriximinA Airport, OriximinA, Brazil','country_id' => '29'),\narray('id' => '6527','name' => '(PCS) - Picos Airport, Picos, Brazil','country_id' => '29'),\narray('id' => '6528','name' => '(POJ) - Patos de Minas Airport, Patos De Minas, Brazil','country_id' => '29'),\narray('id' => '6529','name' => '(PIV) - Pirapora Airport, Pirapora, Brazil','country_id' => '29'),\narray('id' => '6530','name' => '(SNQ) - San QuintAn Military Airstrip, Military Camp Number 2-D, Mexico','country_id' => '153'),\narray('id' => '6531','name' => '(FLB) - Cangapara Airport, Floriano, Brazil','country_id' => '29'),\narray('id' => '6532','name' => '(PIV) - Fazenda Santo AndrA Airport, Pratinha, Brazil','country_id' => '29'),\narray('id' => '6533','name' => '(PDF) - Prado Airport, Prado, Brazil','country_id' => '29'),\narray('id' => '6534','name' => '(CAU) - Caruaru Airport, Caruaru, Brazil','country_id' => '29'),\narray('id' => '6535','name' => '(SFK) - Soure Airport, Soure, Brazil','country_id' => '29'),\narray('id' => '6536','name' => '(TXF) - 9 de Maio - Teixeira de Freitas Airport, Teixeira De Freitas, Brazil','country_id' => '29'),\narray('id' => '6537','name' => '(OBI) - A\"bidos Airport, A\"bidos, Brazil','country_id' => '29'),\narray('id' => '6538','name' => '(TFL) - Juscelino Kubitscheck Airport, TeAfilo Otoni, Brazil','country_id' => '29'),\narray('id' => '6539','name' => '(VAL) - ValenAa Airport, ValenAa, Brazil','country_id' => '29'),\narray('id' => '6540','name' => '(QID) - MAlio Viana Airport, TrAas CoraAAes, Brazil','country_id' => '29'),\narray('id' => '6541','name' => '(BVS) - Breves Airport, Breves, Brazil','country_id' => '29'),\narray('id' => '6542','name' => '(CMC) - Camocim Airport, Camocim, Brazil','country_id' => '29'),\narray('id' => '6543','name' => '(QXC) - Fazenda SAo Braz Airport, Barra De Santo Antonio, Brazil','country_id' => '29'),\narray('id' => '6544','name' => '(PHI) - Pinheiro Airport, Pinheiro, Brazil','country_id' => '29'),\narray('id' => '6545','name' => '(ITI) - AgropecuAria Castanhais Airport, Cumaru Do Norte, Brazil','country_id' => '29'),\narray('id' => '6546','name' => '(PPY) - Pouso Alegre Airport, Pouso Alegre, Brazil','country_id' => '29'),\narray('id' => '6547','name' => '(ITE) - ItuberA Airport, ItuberA, Brazil','country_id' => '29'),\narray('id' => '6548','name' => '(BXX) - Borama Airport, Borama, Somalia','country_id' => '201'),\narray('id' => '6549','name' => '(GTA) - Gatokae Airport, Gatokae, Solomon Islands','country_id' => '190'),\narray('id' => '6550','name' => '(SOA) - SAc TrAng Airport, SAc TrAng, Vietnam','country_id' => '236'),\narray('id' => '6551','name' => '(CAY) - Cayenne-Rochambeau Airport, Cayenne / Rochambeau, French Guiana','country_id' => '77'),\narray('id' => '6552','name' => '(GSI) - Grand-Santi Airport, Grand-Santi, French Guiana','country_id' => '77'),\narray('id' => '6553','name' => '(MPY) - Maripasoula Airport, Maripasoula, French Guiana','country_id' => '77'),\narray('id' => '6554','name' => '(OYP) - Saint-Georges-de-l\\'Oyapock Airport, Saint-Georges-de-l\\'Oyapock Airport, French Guiana','country_id' => '77'),\narray('id' => '6555','name' => '(LDX) - Saint-Laurent-du-Maroni Airport, Saint-Laurent-du-Maroni, French Guiana','country_id' => '77'),\narray('id' => '6556','name' => '(REI) - Regina Airport, Regina, French Guiana','country_id' => '77'),\narray('id' => '6557','name' => '(XAU) - SaAol Airport, SaAol, French Guiana','country_id' => '77'),\narray('id' => '6558','name' => '(SOR) - Al Thaurah Airport, Al Thaurah, Syria','country_id' => '207'),\narray('id' => '6559','name' => '(APE) - San Juan Aposento Airport, San Juan Aposento, Peru','country_id' => '170'),\narray('id' => '6560','name' => '(ALD) - Alerta Airport, Fortaleza, Peru','country_id' => '170'),\narray('id' => '6561','name' => '(AOP) - Alferez FAP Alfredo Vladimir Sara Bauer Airport, Andoas, Peru','country_id' => '170'),\narray('id' => '6562','name' => '(MBP) - Moyobamba Airport, Moyobamba, Peru','country_id' => '170'),\narray('id' => '6563','name' => '(BLP) - Huallaga Airport, Bellavista, Peru','country_id' => '170'),\narray('id' => '6564','name' => '(IBP) - Iberia Airport, Iberia, Peru','country_id' => '170'),\narray('id' => '6565','name' => '(PCL) - Cap FAP David Abenzur Rengifo International Airport, Pucallpa, Peru','country_id' => '170'),\narray('id' => '6566','name' => '(TDP) - Trompeteros Airport, Corrientes, Peru','country_id' => '170'),\narray('id' => '6567','name' => '(CHM) - Teniente FAP Jaime A De Montreuil Morales Airport, Chimbote, Peru','country_id' => '170'),\narray('id' => '6568','name' => '(TGI) - Tingo Maria Airport, Tingo Maria, Peru','country_id' => '170'),\narray('id' => '6569','name' => '(CIX) - Capitan FAP Jose A Quinones Gonzales International Airport, Chiclayo, Peru','country_id' => '170'),\narray('id' => '6570','name' => '(AYP) - Coronel FAP Alfredo Mendivil Duarte Airport, Ayacucho, Peru','country_id' => '170'),\narray('id' => '6571','name' => '(ANS) - Andahuaylas Airport, Andahuaylas, Peru','country_id' => '170'),\narray('id' => '6572','name' => '(ATA) - Comandante FAP German Arias Graziani Airport, Anta, Peru','country_id' => '170'),\narray('id' => '6573','name' => '(UMI) - Quince Air Base, Quince Mil, Peru','country_id' => '170'),\narray('id' => '6574','name' => '(LIM) - Jorge ChAvez International Airport, Lima, Peru','country_id' => '170'),\narray('id' => '6575','name' => '(SFK) - Satipo Airport, Satipo, Peru','country_id' => '170'),\narray('id' => '6576','name' => '(UCZ) - Uchiza Airport, Uchiza, Peru','country_id' => '170'),\narray('id' => '6577','name' => '(RIJ) - Juan Simons Vela Airport, Rioja, Peru','country_id' => '170'),\narray('id' => '6578','name' => '(JJI) - Juanjui Airport, JuanjuA, Peru','country_id' => '170'),\narray('id' => '6579','name' => '(JAU) - Francisco Carle Airport, Jauja, Peru','country_id' => '170'),\narray('id' => '6580','name' => '(JUL) - Inca Manco Capac International Airport, Juliaca, Peru','country_id' => '170'),\narray('id' => '6581','name' => '(SJA) - San Juan de Marcona Airport, San Juan de Marcona, Peru','country_id' => '170'),\narray('id' => '6582','name' => '(CJA) - Mayor General FAP Armando Revoredo Iglesias Airport, Cajamarca, Peru','country_id' => '170'),\narray('id' => '6583','name' => '(RIM) - San Nicolas Airport, Rodriguez de Mendoza, Peru','country_id' => '170'),\narray('id' => '6584','name' => '(ILQ) - Ilo Airport, Ilo, Peru','country_id' => '170'),\narray('id' => '6585','name' => '(TBP) - Capitan FAP Pedro Canga Rodriguez Airport, Tumbes, Peru','country_id' => '170'),\narray('id' => '6586','name' => '(SMG) - Santa Maria Airport, Santa MarAa, Peru','country_id' => '170'),\narray('id' => '6587','name' => '(YMS) - Moises Benzaquen Rengifo Airport, Yurimaguas, Peru','country_id' => '170'),\narray('id' => '6588','name' => '(HUU) - Alferez Fap David Figueroa Fernandini Airport, HuAnuco, Peru','country_id' => '170'),\narray('id' => '6589','name' => '(SQU) - Saposoa Airport, Plaza Saposoa, Peru','country_id' => '170'),\narray('id' => '6590','name' => '(SYC) - Shiringayoc/Hacienda Hda Mejia Airport, Leon Velarde, Peru','country_id' => '170'),\narray('id' => '6591','name' => '(CHH) - Chachapoyas Airport, Chachapoyas, Peru','country_id' => '170'),\narray('id' => '6592','name' => '(REQ) - Requena Airport, Requena, Peru','country_id' => '170'),\narray('id' => '6593','name' => '(IQT) - Coronel FAP Francisco Secada Vignetta International Airport, Iquitos, Peru','country_id' => '170'),\narray('id' => '6594','name' => '(AQP) - RodrAguez BallAn International Airport, Arequipa, Peru','country_id' => '170'),\narray('id' => '6595','name' => '(TRU) - Capitan FAP Carlos Martinez De Pinillos International Airport, Trujillo, Peru','country_id' => '170'),\narray('id' => '6596','name' => '(PIO) - CapitAn FAP RenAn ElAas Olivera International Airport, Pisco, Peru','country_id' => '170'),\narray('id' => '6597','name' => '(TPP) - Cadete FAP Guillermo Del Castillo Paredes Airport, Tarapoto, Peru','country_id' => '170'),\narray('id' => '6598','name' => '(SYC) - Shiringayoc Airport, Shiringayoc, Peru','country_id' => '170'),\narray('id' => '6599','name' => '(TCQ) - Coronel FAP Carlos Ciriani Santa Rosa International Airport, Tacna, Peru','country_id' => '170'),\narray('id' => '6600','name' => '(PEM) - Padre Aldamiz International Airport, Puerto Maldonado, Peru','country_id' => '170'),\narray('id' => '6601','name' => '(PIU) - CapitAn FAP Guillermo Concha Iberico International Airport, Piura, Peru','country_id' => '170'),\narray('id' => '6602','name' => '(TYL) - Capitan Montes Airport, Talara, Peru','country_id' => '170'),\narray('id' => '6603','name' => '(NZC) - Maria Reiche Neuman Airport, Nazca, Peru','country_id' => '170'),\narray('id' => '6604','name' => '(CUZ) - Alejandro Velasco Astete International Airport, Cusco, Peru','country_id' => '170'),\narray('id' => '6605','name' => '(SQD) - Sanqingshan Airport, Shangrao, China','country_id' => '45'),\narray('id' => '6606','name' => '(SQJ) - Shaxian Airport, Sanming, China','country_id' => '45'),\narray('id' => '6607','name' => '(SQT) - China Strait Airstrip, Samarai Island, Papua New Guinea','country_id' => '172'),\narray('id' => '6608','name' => '(AAJ) - Cayana Airstrip, Awaradam, Suriname','country_id' => '202'),\narray('id' => '6609','name' => '(KCB) - Tepoe Airstrip, Kasikasima, Suriname','country_id' => '202'),\narray('id' => '6610','name' => '(SRL) - Palo Verde Airport, Santa Rosalia, Mexico','country_id' => '153'),\narray('id' => '6611','name' => '(SRM) - Sandringham Airport, Sandringham Station, Australia','country_id' => '12'),\narray('id' => '6612','name' => '(SRV) - Stony River 2 Airport, Stony River, United States','country_id' => '228'),\narray('id' => '6613','name' => '(CZB) - Carlos Ruhl Airport, Cruz Alta, Brazil','country_id' => '29'),\narray('id' => '6614','name' => '(APU) - Apucarana Airport, Apucarana, Brazil','country_id' => '29'),\narray('id' => '6615','name' => '(BGV) - Aeroclube de Bento GonAalves Airport, Bento GonAalves, Brazil','country_id' => '29'),\narray('id' => '6616','name' => '(BNU) - Blumenau Airport, Blumenau, Brazil','country_id' => '29'),\narray('id' => '6617','name' => '(CCI) - ConcArdia Airport, ConcArdia, Brazil','country_id' => '29'),\narray('id' => '6618','name' => '(CSS) - CassilAndia Airport, CassilAndia, Brazil','country_id' => '29'),\narray('id' => '6619','name' => '(QCN) - Canela Airport, Canela, Brazil','country_id' => '29'),\narray('id' => '6620','name' => '(CKO) - CornAlio ProcApio Airport, CornAlio ProcApio, Brazil','country_id' => '29'),\narray('id' => '6621','name' => '(DOU) - Dourados Airport, Dourados, Brazil','country_id' => '29'),\narray('id' => '6622','name' => '(ERM) - Erechim Airport, Erechim, Brazil','country_id' => '29'),\narray('id' => '6623','name' => '(FBE) - Francisco BeltrAo Airport, Francisco BeltrAo, Brazil','country_id' => '29'),\narray('id' => '6624','name' => '(QGA) - GuaAra Airport, GuaAra, Brazil','country_id' => '29'),\narray('id' => '6625','name' => '(HRZ) - Walter BAndchen Airport, Horizontina, Brazil','country_id' => '29'),\narray('id' => '6626','name' => '(IJU) - IjuA Airport, IjuA, Brazil','country_id' => '29'),\narray('id' => '6627','name' => '(ITQ) - Itaqui Airport, Itaqui, Brazil','country_id' => '29'),\narray('id' => '6628','name' => '(JCB) - Santa Terezinha Airport, JoaAaba, Brazil','country_id' => '29'),\narray('id' => '6629','name' => '(CBW) - Campo MourAo Airport, Campo MourAo, Brazil','country_id' => '29'),\narray('id' => '6630','name' => '(QDB) - Cachoeira do Sul Airport, Cachoeira Do Sul, Brazil','country_id' => '29'),\narray('id' => '6631','name' => '(QCR) - Curitibanos Airport, Curitibanos, Brazil','country_id' => '29'),\narray('id' => '6632','name' => '(OAL) - Cacoal Airport, Cacoal, Brazil','country_id' => '29'),\narray('id' => '6633','name' => '(LOI) - Helmuth Baungarten Airport, Lontras, Brazil','country_id' => '29'),\narray('id' => '6634','name' => '(ALQ) - Alegrete Novo Airport, Alegrete, Brazil','country_id' => '29'),\narray('id' => '6635','name' => '(QMF) - Mafra Airport, Mafra, Brazil','country_id' => '29'),\narray('id' => '6636','name' => '(QGF) - Montenegro Airport, Montenegro, Brazil','country_id' => '29'),\narray('id' => '6637','name' => '(QHV) - Novo Hamburgo Airport, Novo Hamburgo, Brazil','country_id' => '29'),\narray('id' => '6638','name' => '(SQX) - SAo Miguel do Oeste Airport, SAo Miguel Do Oeste, Brazil','country_id' => '29'),\narray('id' => '6639','name' => '(APX) - Arapongas Airport, Arapongas, Brazil','country_id' => '29'),\narray('id' => '6640','name' => '(PTO) - Pato Branco Airport, Pato Branco, Brazil','country_id' => '29'),\narray('id' => '6641','name' => '(PNG) - ParanaguA Airport, ParanaguA, Brazil','country_id' => '29'),\narray('id' => '6642','name' => '(PVI) - ParanavaA Airport, ParanavaA, Brazil','country_id' => '29'),\narray('id' => '6643','name' => '(PBB) - ParanaAba Airport, ParanaAba, Brazil','country_id' => '29'),\narray('id' => '6644','name' => '(QAC) - Castro Airport, Castro, Brazil','country_id' => '29'),\narray('id' => '6645','name' => '(SQY) - SAo LourenAo do Sul Airport, SAo LourenAo Do Sul, Brazil','country_id' => '29'),\narray('id' => '6646','name' => '(SSS) - Siassi Airport, Siassi, Papua New Guinea','country_id' => '172'),\narray('id' => '6647','name' => '(QOJ) - SAo Borja Airport, SAo Borja, Brazil','country_id' => '29'),\narray('id' => '6648','name' => '(CSU) - Santa Cruz do Sul Airport, Santa Cruz Do Sul, Brazil','country_id' => '29'),\narray('id' => '6649','name' => '(TJL) - PlAnio Alarcom Airport, TrAas Lagoas, Brazil','country_id' => '29'),\narray('id' => '6650','name' => '(UMU) - Umuarama Airport, Umuarama, Brazil','country_id' => '29'),\narray('id' => '6651','name' => '(QVB) - UniAo da VitAria Airport, UniAo Da VitAria, Brazil','country_id' => '29'),\narray('id' => '6652','name' => '(SSV) - Siasi Airport, Siasi Island, Philippines','country_id' => '173'),\narray('id' => '6653','name' => '(VIA) - Videira Airport, Videira, Brazil','country_id' => '29'),\narray('id' => '6654','name' => '(CTQ) - Santa VitAria do Palmar Airport, Santa VitAria Do Palmar, Brazil','country_id' => '29'),\narray('id' => '6655','name' => '(AXE) - XanxerAa Airport, XanxerAa, Brazil','country_id' => '29'),\narray('id' => '6656','name' => '(AAG) - Arapoti Airport, Arapoti, Brazil','country_id' => '29'),\narray('id' => '6657','name' => '(SRA) - Santa Rosa Airport, Santa Rosa, Brazil','country_id' => '29'),\narray('id' => '6658','name' => '(PGZ) - Ponta Grossa Airport - Comandante Antonio Amilton Beraldo, Ponta Grossa, Brazil','country_id' => '29'),\narray('id' => '6659','name' => '(ATI) - Artigas International Airport, Artigas, Uruguay','country_id' => '229'),\narray('id' => '6660','name' => '(BUV) - Bella Union Airport, Bella Union, Uruguay','country_id' => '229'),\narray('id' => '6661','name' => '(CYR) - Laguna de Los Patos International Airport, Colonia del Sacramento, Uruguay','country_id' => '229'),\narray('id' => '6662','name' => '(DZO) - Santa Bernardina International Airport, Durazno, Uruguay','country_id' => '229'),\narray('id' => '6663','name' => '(PDP) - Capitan Corbeta CA Curbelo International Airport, Punta del Este, Uruguay','country_id' => '229'),\narray('id' => '6664','name' => '(MLZ) - Cerro Largo International Airport, Melo, Uruguay','country_id' => '229'),\narray('id' => '6665','name' => '(MVD) - Carrasco International /General C L Berisso Airport, Montevideo, Uruguay','country_id' => '229'),\narray('id' => '6666','name' => '(PDU) - Tydeo Larre Borges Airport, Paysandu, Uruguay','country_id' => '229'),\narray('id' => '6667','name' => '(RVY) - Presidente General Don Oscar D. Gestido International Airport, Rivera, Uruguay','country_id' => '229'),\narray('id' => '6668','name' => '(STY) - Nueva Hesperides International Airport, Salto, Uruguay','country_id' => '229'),\narray('id' => '6669','name' => '(TAW) - Tacuarembo Airport, Tacuarembo, Uruguay','country_id' => '229'),\narray('id' => '6670','name' => '(TYT) - Treinta y Tres Airport, Treinta y Tres, Uruguay','country_id' => '229'),\narray('id' => '6671','name' => '(VCH) - Vichadero Airport, Vichadero, Uruguay','country_id' => '229'),\narray('id' => '6672','name' => '(AGV) - Oswaldo Guevara Mujica Airport, Acarigua, Venezuela','country_id' => '233'),\narray('id' => '6673','name' => '(AAO) - Anaco Airport, Anaco, Venezuela','country_id' => '233'),\narray('id' => '6674','name' => '(LPJ) - Armando Schwarck Airport, Guayabal, Venezuela','country_id' => '233'),\narray('id' => '6675','name' => '(BLA) - General Jose Antonio Anzoategui International Airport, Barcelona, Venezuela','country_id' => '233'),\narray('id' => '6676','name' => '(BNS) - Barinas Airport, Barinas, Venezuela','country_id' => '233'),\narray('id' => '6677','name' => '(BRM) - Barquisimeto International Airport, Barquisimeto, Venezuela','country_id' => '233'),\narray('id' => '6678','name' => '(MYC) - Escuela Mariscal Sucre Airport, Maracay, Venezuela','country_id' => '233'),\narray('id' => '6679','name' => '(CBL) - Aeropuerto \"General Tomas de Heres\". Ciudad Bolivar, , Venezuela','country_id' => '233'),\narray('id' => '6680','name' => '(CXA) - Caicara del Orinoco Airport, , Venezuela','country_id' => '233'),\narray('id' => '6681','name' => '(CUV) - Casigua El Cubo Airport, Casigua El Cubo, Venezuela','country_id' => '233'),\narray('id' => '6682','name' => '(CLZ) - Calabozo Airport, Guarico, Venezuela','country_id' => '233'),\narray('id' => '6683','name' => '(CAJ) - Canaima Airport, Canaima, Venezuela','country_id' => '233'),\narray('id' => '6684','name' => '(VCR) - Carora Airport, Carora, Venezuela','country_id' => '233'),\narray('id' => '6685','name' => '(CUP) - General Francisco BermAodez Airport, CarAopano, Venezuela','country_id' => '233'),\narray('id' => '6686','name' => '(CZE) - JosA Leonardo Chirinos Airport, Coro, Venezuela','country_id' => '233'),\narray('id' => '6687','name' => '(CUM) - CumanA (Antonio JosA de Sucre) Airport, , Venezuela','country_id' => '233'),\narray('id' => '6688','name' => '(isl) - La Tortuga Punta Delgada Airport, Isla La Tortuga, Venezuela','country_id' => '233'),\narray('id' => '6689','name' => '(PPZ) - Puerto Paez Airport, Puerto Paez, Venezuela','country_id' => '233'),\narray('id' => '6690','name' => '(EOR) - El Dorado Airport, Bolivar, Venezuela','country_id' => '233'),\narray('id' => '6691','name' => '(EOZ) - Elorza Airport, , Venezuela','country_id' => '233'),\narray('id' => '6692','name' => '(GDO) - Guasdalito Airport, , Venezuela','country_id' => '233'),\narray('id' => '6693','name' => '(GUI) - Guiria Airport, , Venezuela','country_id' => '233'),\narray('id' => '6694','name' => '(GUQ) - Guanare Airport, Guanare, Venezuela','country_id' => '233'),\narray('id' => '6695','name' => '(HGE) - Higuerote Airport, Higuerote, Venezuela','country_id' => '233'),\narray('id' => '6696','name' => '(ICA) - IcabarAo Airport, , Venezuela','country_id' => '233'),\narray('id' => '6697','name' => '(ICC) - AndrAs Miguel Salazar Marcano Airport, Isla de Coche, Venezuela','country_id' => '233'),\narray('id' => '6698','name' => '(LSP) - Josefa Camejo International Airport, ParaguanA, Venezuela','country_id' => '233'),\narray('id' => '6699','name' => '(KAV) - Kavanayen Airport, , Venezuela','country_id' => '233'),\narray('id' => '6700','name' => '(LFR) - La Fria Airport, , Venezuela','country_id' => '233'),\narray('id' => '6701','name' => '(MAR) - La Chinita International Airport, Maracaibo, Venezuela','country_id' => '233'),\narray('id' => '6702','name' => '(MRD) - Alberto Carnevalli Airport, MArida, Venezuela','country_id' => '233'),\narray('id' => '6703','name' => '(PMV) - Del Caribe Santiago MariAo International Airport, Isla Margarita, Venezuela','country_id' => '233'),\narray('id' => '6704','name' => '(CCS) - SimAn BolAvar International Airport, Caracas, Venezuela','country_id' => '233'),\narray('id' => '6705','name' => '(MUN) - MaturAn Airport, , Venezuela','country_id' => '233'),\narray('id' => '6706','name' => '(CBS) - Oro Negro Airport, Cabimas, Venezuela','country_id' => '233'),\narray('id' => '6707','name' => '(PYH) - Cacique Aramare Airport, Puerto Ayacucho, Venezuela','country_id' => '233'),\narray('id' => '6708','name' => '(PBL) - General Bartolome Salom International Airport, , Venezuela','country_id' => '233'),\narray('id' => '6709','name' => '(PDZ) - Pedernales Airport, , Venezuela','country_id' => '233'),\narray('id' => '6710','name' => '(PPH) - Perai Tepuy Airport, , Venezuela','country_id' => '233'),\narray('id' => '6711','name' => '(SCI) - Paramillo Airport, , Venezuela','country_id' => '233'),\narray('id' => '6712','name' => '(PZO) - General Manuel Carlos Piar International Airport, Puerto Ordaz-Ciudad Guayana, Venezuela','country_id' => '233'),\narray('id' => '6713','name' => '(PTM) - Palmarito Airport, Palmarito, Venezuela','country_id' => '233'),\narray('id' => '6714','name' => '(LRV) - Los Roques Airport, Gran Roque Island, Venezuela','country_id' => '233'),\narray('id' => '6715','name' => '(SVS) - Stevens Village Airport, Stevens Village, United States','country_id' => '228'),\narray('id' => '6716','name' => '(SVZ) - San Antonio Del Tachira Airport, , Venezuela','country_id' => '233'),\narray('id' => '6717','name' => '(SBB) - Santa BArbara de Barinas Airport, Santa BArbara, Venezuela','country_id' => '233'),\narray('id' => '6718','name' => '(SNV) - Santa Elena de Uairen Airport, , Venezuela','country_id' => '233'),\narray('id' => '6719','name' => '(STD) - Mayor Buenaventura Vivas International Airport, Santo Domingo, Venezuela','country_id' => '233'),\narray('id' => '6720','name' => '(SNF) - Sub Teniente Nestor Arias Airport, San Felipe, Venezuela','country_id' => '233'),\narray('id' => '6721','name' => '(SFD) - San Fernando De Apure Airport, Inglaterra, Venezuela','country_id' => '233'),\narray('id' => '6722','name' => '(SOM) - San TomA Airport, El Tigre, Venezuela','country_id' => '233'),\narray('id' => '6723','name' => '(STB) - Santa BArbara del Zulia Airport, , Venezuela','country_id' => '233'),\narray('id' => '6724','name' => '(TUV) - Tucupita Airport, Tucupita, Venezuela','country_id' => '233'),\narray('id' => '6725','name' => '(TMO) - Tumeremo Airport, , Venezuela','country_id' => '233'),\narray('id' => '6726','name' => '(URM) - Uriman Airport, , Venezuela','country_id' => '233'),\narray('id' => '6727','name' => '(VLN) - Arturo Michelena International Airport, Valencia, Venezuela','country_id' => '233'),\narray('id' => '6728','name' => '(VIG) - Juan Pablo PArez Alfonso Airport, El VigAa, Venezuela','country_id' => '233'),\narray('id' => '6729','name' => '(VLV) - Dr. Antonio NicolAs BriceAo Airport, Valera, Venezuela','country_id' => '233'),\narray('id' => '6730','name' => '(VDP) - Valle de La Pascua Airport, , Venezuela','country_id' => '233'),\narray('id' => '6731','name' => '(BAZ) - Barcelos Airport, Barcelos, Brazil','country_id' => '29'),\narray('id' => '6732','name' => '(LCB) - Pontes e Lacerda Airport, Pontes e Lacerda, Brazil','country_id' => '29'),\narray('id' => '6733','name' => '(RBB) - Borba Airport, Borba, Brazil','country_id' => '29'),\narray('id' => '6734','name' => '(CAF) - Carauari Airport, Carauari, Brazil','country_id' => '29'),\narray('id' => '6735','name' => '(CQS) - Costa Marques Airport, Costa Marques, Brazil','country_id' => '29'),\narray('id' => '6736','name' => '(DMT) - Diamantino Airport, Diamantino, Brazil','country_id' => '29'),\narray('id' => '6737','name' => '(DNO) - DianApolis Airport, DianApolis, Brazil','country_id' => '29'),\narray('id' => '6738','name' => '(SWE) - Siwea Airport, Siwea, Papua New Guinea','country_id' => '172'),\narray('id' => '6739','name' => '(ERN) - EirunepA Airport, EirunepA, Brazil','country_id' => '29'),\narray('id' => '6740','name' => '(CQA) - Canarana Airport, Canarana, Brazil','country_id' => '29'),\narray('id' => '6741','name' => '(SXO) - SAo FAlix do Araguaia Airport, SAo FAlix Do Araguaia, Brazil','country_id' => '29'),\narray('id' => '6742','name' => '(SWG) - Satwag Airport, Satwag, Papua New Guinea','country_id' => '172'),\narray('id' => '6743','name' => '(GRP) - Gurupi Airport, Gurupi, Brazil','country_id' => '29'),\narray('id' => '6744','name' => '(AUX) - AraguaAna Airport, AraguaAna, Brazil','country_id' => '29'),\narray('id' => '6745','name' => '(HUW) - HumaitA Airport, HumaitA, Brazil','country_id' => '29'),\narray('id' => '6746','name' => '(IPG) - Ipiranga Airport, Santo AntAnio Do IAA, Brazil','country_id' => '29'),\narray('id' => '6747','name' => '(IDO) - Santa Izabel do Morro Airport, CristalAndia, Brazil','country_id' => '29'),\narray('id' => '6748','name' => '(JPR) - Ji-ParanA Airport, Ji-ParanA, Brazil','country_id' => '29'),\narray('id' => '6749','name' => '(JIA) - JuAna Airport, JuAna, Brazil','country_id' => '29'),\narray('id' => '6750','name' => '(JRN) - Juruena Airport, Juruena, Brazil','country_id' => '29'),\narray('id' => '6751','name' => '(JTI) - JataA Airport, JataA, Brazil','country_id' => '29'),\narray('id' => '6752','name' => '(CCX) - CAceres Airport, CAceres, Brazil','country_id' => '29'),\narray('id' => '6753','name' => '(CIZ) - Coari Airport, Coari, Brazil','country_id' => '29'),\narray('id' => '6754','name' => '(TLZ) - CatalAo Airport, CatalAo, Brazil','country_id' => '29'),\narray('id' => '6755','name' => '(LBR) - LAbrea Airport, LAbrea, Brazil','country_id' => '29'),\narray('id' => '6756','name' => '(RVD) - General Leite de Castro Airport, Rio Verde, Brazil','country_id' => '29'),\narray('id' => '6757','name' => '(MBZ) - MauAs Airport, MauAs, Brazil','country_id' => '29'),\narray('id' => '6758','name' => '(NVP) - Novo AripuanA Airport, Novo AripuanA, Brazil','country_id' => '29'),\narray('id' => '6759','name' => '(AQM) - Nova Vida Airport, Ariquemes, Brazil','country_id' => '29'),\narray('id' => '6760','name' => '(BCR) - Novo Campo Airport, Boca do Acre, Brazil','country_id' => '29'),\narray('id' => '6761','name' => '(NQL) - NiquelAndia Airport, NiquelAndia, Brazil','country_id' => '29'),\narray('id' => '6762','name' => '(APS) - AnApolis Airport, AnApolis, Brazil','country_id' => '29'),\narray('id' => '6763','name' => '(FBA) - Fonte Boa Airport, Fonte Boa, Brazil','country_id' => '29'),\narray('id' => '6764','name' => '(PBV) - Porto dos GaAochos Airport, Porto Dos GaAochos, Brazil','country_id' => '29'),\narray('id' => '6765','name' => '(PIN) - Parintins Airport, Parintins, Brazil','country_id' => '29'),\narray('id' => '6766','name' => '(PBQ) - Pimenta Bueno Airport, Pimenta Bueno, Brazil','country_id' => '29'),\narray('id' => '6767','name' => '(PBX) - Fazenda Piraguassu Airport, Porto Alegre Do Norte, Brazil','country_id' => '29'),\narray('id' => '6768','name' => '(SWR) - Silur Airport, Silur Mission, Papua New Guinea','country_id' => '172'),\narray('id' => '6769','name' => '(AAI) - Arraias Airport, Arraias, Brazil','country_id' => '29'),\narray('id' => '6770','name' => '(ROO) - Maestro Marinho Franco Airport, RondonApolis, Brazil','country_id' => '29'),\narray('id' => '6771','name' => '(AIR) - AripuanA Airport, AripuanA, Brazil','country_id' => '29'),\narray('id' => '6772','name' => '(OPS) - Presidente JoAo Batista Figueiredo Airport, Sinop, Brazil','country_id' => '29'),\narray('id' => '6773','name' => '(STZ) - Santa Terezinha Airport, Santa Terezinha, Brazil','country_id' => '29'),\narray('id' => '6774','name' => '(IRZ) - Tapuruquara Airport, Santa Isabel Do Rio Negro, Brazil','country_id' => '29'),\narray('id' => '6775','name' => '(TGQ) - TangarA da Serra Airport, TangarA Da Serra, Brazil','country_id' => '29'),\narray('id' => '6776','name' => '(AZL) - Fazenda TucunarA Airport, Sapezal, Brazil','country_id' => '29'),\narray('id' => '6777','name' => '(QHN) - Taguatinga Airport, Taguatinga, Brazil','country_id' => '29'),\narray('id' => '6778','name' => '(SQM) - SAo Miguel do Araguaia Airport, SAo Miguel Do Araguaia, Brazil','country_id' => '29'),\narray('id' => '6779','name' => '(MTG) - Vila Bela da SantAssima Trindade Airport, Vila Bela Da SantAssima Trindade, Brazil','country_id' => '29'),\narray('id' => '6780','name' => '(VLP) - Vila Rica Airport, Vila Rica, Brazil','country_id' => '29'),\narray('id' => '6781','name' => '(MBK) - Regional Orlando Villas Boas Airport, MatupA, Brazil','country_id' => '29'),\narray('id' => '6782','name' => '(NOK) - Xavantina Airport, Nova Xavantina, Brazil','country_id' => '29'),\narray('id' => '6783','name' => '(SXH) - Sehulea Airport, Sehulea, Papua New Guinea','country_id' => '172'),\narray('id' => '6784','name' => '(SXP) - Sheldon Point Airport, Nunam Iqua, United States','country_id' => '228'),\narray('id' => '6785','name' => '(SXV) - SXV Salem , Tamil Nadu, India, Salem, India','country_id' => '101'),\narray('id' => '6786','name' => '(AHL) - Aishalton Airport, Aishalton, Guyana','country_id' => '91'),\narray('id' => '6787','name' => '(NAI) - Annai Airport, Annai, Guyana','country_id' => '91'),\narray('id' => '6788','name' => '(SYB) - Seal Bay Seaplane Base, Seal Bay, United States','country_id' => '228'),\narray('id' => '6789','name' => '(BMJ) - Baramita Airport, Baramita, Guyana','country_id' => '91'),\narray('id' => '6790','name' => '(GFO) - Bartica A Airport, Bartica, Guyana','country_id' => '91'),\narray('id' => '6791','name' => '(GEO) - Cheddi Jagan International Airport, Georgetown, Guyana','country_id' => '91'),\narray('id' => '6792','name' => '(OGL) - Ogle Airport, Ogle, Guyana','country_id' => '91'),\narray('id' => '6793','name' => '(IMB) - Imbaimadai Airport, Imbaimadai, Guyana','country_id' => '91'),\narray('id' => '6794','name' => '(KAR) - Kamarang Airport, Kamarang, Guyana','country_id' => '91'),\narray('id' => '6795','name' => '(KRM) - Karanambo Airport, Karanambo, Guyana','country_id' => '91'),\narray('id' => '6796','name' => '(KRG) - Karasabai Airport, Karasabai, Guyana','country_id' => '91'),\narray('id' => '6797','name' => '(KTO) - Kato Airport, Kato, Guyana','country_id' => '91'),\narray('id' => '6798','name' => '(KKG) - Konawaruk Airport, Konawaruk, Guyana','country_id' => '91'),\narray('id' => '6799','name' => '(LUB) - Lumid Pau Airport, Lumid Pau, Guyana','country_id' => '91'),\narray('id' => '6800','name' => '(LTM) - Lethem Airport, Lethem, Guyana','country_id' => '91'),\narray('id' => '6801','name' => '(USI) - Mabaruma Airport, Mabaruma, Guyana','country_id' => '91'),\narray('id' => '6802','name' => '(MHA) - Mahdia Airport, Mahdia, Guyana','country_id' => '91'),\narray('id' => '6803','name' => '(MYM) - Monkey Mountain Airport, Monkey Mountain, Guyana','country_id' => '91'),\narray('id' => '6804','name' => '(MWJ) - Matthews Ridge Airport, Matthews Ridge, Guyana','country_id' => '91'),\narray('id' => '6805','name' => '(SYN) - Stanton Airfield, Stanton, United States','country_id' => '228'),\narray('id' => '6806','name' => '(QSX) - New Amsterdam Airport, New Amsterdam, Guyana','country_id' => '91'),\narray('id' => '6807','name' => '(ORJ) - Orinduik Airport, Orinduik, Guyana','country_id' => '91'),\narray('id' => '6808','name' => '(PMT) - Paramakatoi Airport, Paramakatoi, Guyana','country_id' => '91'),\narray('id' => '6809','name' => '(PRR) - Paruma Airport, Paruma, Guyana','country_id' => '91'),\narray('id' => '6810','name' => '(SDC) - Sand Creek Airport, Sand Creek, Guyana','country_id' => '91'),\narray('id' => '6811','name' => '(SKM) - Skeldon Airport, Skeldon, Guyana','country_id' => '91'),\narray('id' => '6812','name' => '(SZN) - Santa Cruz Island Airport, Santa Barbara, United States','country_id' => '228'),\narray('id' => '6813','name' => '(SZP) - Santa Paula Airport, Santa Paula, United States','country_id' => '228'),\narray('id' => '6814','name' => '(ANU) - V.C. Bird International Airport, St. George, Antigua and Barbuda','country_id' => '3'),\narray('id' => '6815','name' => '(BBQ) - Codrington Airport, Codrington, Antigua and Barbuda','country_id' => '3'),\narray('id' => '6816','name' => '(TBE) - Timbunke Airport, Timbunke, Papua New Guinea','country_id' => '172'),\narray('id' => '6817','name' => '(BGI) - Sir Grantley Adams International Airport, Bridgetown, Barbados','country_id' => '16'),\narray('id' => '6818','name' => '(TBQ) - Tarabo Airport, Tarabo, Papua New Guinea','country_id' => '172'),\narray('id' => '6819','name' => '(TBV) - Tabal Airstrip, Tabal Island, Marshall Islands','country_id' => '139'),\narray('id' => '6820','name' => '(TCK) - Tinboli Airport, Tinboli, Papua New Guinea','country_id' => '172'),\narray('id' => '6821','name' => '(TCT) - Takotna Airport, Takotna, United States','country_id' => '228'),\narray('id' => '6822','name' => '(TDB) - Tetebedi Airport, Tetebedi, Papua New Guinea','country_id' => '172'),\narray('id' => '6823','name' => '(DCF) - Canefield Airport, Canefield, Dominica','country_id' => '57'),\narray('id' => '6824','name' => '(DOM) - Melville Hall Airport, Marigot, Dominica','country_id' => '57'),\narray('id' => '6825','name' => '(TDS) - Sasereme Airport, Sasereme, Papua New Guinea','country_id' => '172'),\narray('id' => '6826','name' => '(TEO) - Terapo Airport, Terapo Mission, Papua New Guinea','country_id' => '172'),\narray('id' => '6827','name' => '(TFB) - Tifalmin Airport, Tifalmin, Papua New Guinea','country_id' => '172'),\narray('id' => '6828','name' => '(DSD) - La DAsirade Airport, Grande Anse, Guadeloupe','country_id' => '84'),\narray('id' => '6829','name' => '(BBR) - Baillif Airport, Basse Terre, Guadeloupe','country_id' => '84'),\narray('id' => '6830','name' => '(SFC) - St-FranAois Airport, St-FranAois, Guadeloupe','country_id' => '84'),\narray('id' => '6831','name' => '(FDF) - Martinique AimA CAsaire International Airport, Fort-de-France, Martinique','country_id' => '146'),\narray('id' => '6832','name' => '(SFG) - L\\'EspArance Airport, Grand Case, Saint Martin','country_id' => '137'),\narray('id' => '6833','name' => '(SBH) - Gustaf III Airport, Gustavia, Saint BarthAlemy','country_id' => '24'),\narray('id' => '6834','name' => '(GBJ) - Les Bases Airport, Grand Bourg, Guadeloupe','country_id' => '84'),\narray('id' => '6835','name' => '(PTP) - Pointe-A-Pitre Le Raizet, Pointe-A-Pitre Le Raizet, Guadeloupe','country_id' => '84'),\narray('id' => '6836','name' => '(LSS) - Terre-de-Haut Airport, Les Saintes, Guadeloupe','country_id' => '84'),\narray('id' => '6837','name' => '(TFY) - Tarfaya Airport, Tarfaya, Morocco','country_id' => '133'),\narray('id' => '6838','name' => '(TGL) - Tagula Airport, Sudest Island, Papua New Guinea','country_id' => '172'),\narray('id' => '6839','name' => '(GND) - Point Salines International Airport, Saint George\\'s, Grenada','country_id' => '75'),\narray('id' => '6840','name' => '(CRU) - Lauriston Airport, Carriacou Island, Grenada','country_id' => '75'),\narray('id' => '6841','name' => '(STT) - Cyril E. King Airport, Charlotte Amalie, Harry S. Truman Airport, U.S. Virgin Islands','country_id' => '235'),\narray('id' => '6842','name' => '(STX) - Henry E Rohlsen Airport, Christiansted, U.S. Virgin Islands','country_id' => '235'),\narray('id' => '6843','name' => '(ARE) - Antonio Nery Juarbe Pol Airport, Arecibo, Puerto Rico','country_id' => '178'),\narray('id' => '6844','name' => '(BQN) - Rafael Hernandez Airport, Aguadilla, Puerto Rico','country_id' => '178'),\narray('id' => '6845','name' => '(TJC) - Ticantiki Airport, Ticantiqui, Panama','country_id' => '169'),\narray('id' => '6846','name' => '(CPX) - Benjamin Rivera Noriega Airport, Culebra Island, Puerto Rico','country_id' => '178'),\narray('id' => '6847','name' => '(FAJ) - Diego Jimenez Torres Airport, Fajardo, Puerto Rico','country_id' => '178'),\narray('id' => '6848','name' => '(SIG) - Fernando Luis Ribas Dominicci Airport, San Juan, Puerto Rico','country_id' => '178'),\narray('id' => '6849','name' => '(MAZ) - Eugenio Maria De Hostos Airport, Mayaguez, Puerto Rico','country_id' => '178'),\narray('id' => '6850','name' => '(PSE) - Mercedita Airport, Ponce, Puerto Rico','country_id' => '178'),\narray('id' => '6851','name' => '(NRR) - JosA Aponte de la Torre Airport, Ceiba, Puerto Rico','country_id' => '178'),\narray('id' => '6852','name' => '(SJU) - Luis Munoz Marin International Airport, San Juan, Puerto Rico','country_id' => '178'),\narray('id' => '6853','name' => '(VQS) - Antonio Rivera Rodriguez Airport, Vieques Island, Puerto Rico','country_id' => '178'),\narray('id' => '6854','name' => '(SKB) - Robert L. Bradshaw International Airport, Basseterre, Saint Kitts and Nevis','country_id' => '116'),\narray('id' => '6855','name' => '(NEV) - Vance W. Amory International Airport, Charlestown, Saint Kitts and Nevis','country_id' => '116'),\narray('id' => '6856','name' => '(TLP) - Tumolbil Airport, Tumolbil, Papua New Guinea','country_id' => '172'),\narray('id' => '6857','name' => '(SLU) - George F. L. Charles Airport, Castries, Saint Lucia','country_id' => '124'),\narray('id' => '6858','name' => '(UVF) - Hewanorra International Airport, Vieux Fort, Saint Lucia','country_id' => '124'),\narray('id' => '6859','name' => '(TLT) - Tuluksak Airport, Tuluksak, United States','country_id' => '228'),\narray('id' => '6860','name' => '(NBE) - Enfidha - Hammamet International Airport, Enfidha, Tunisia','country_id' => '218'),\narray('id' => '6861','name' => '(AUA) - Queen Beatrix International Airport, Oranjestad, Aruba','country_id' => '13'),\narray('id' => '6862','name' => '(BON) - Flamingo International Airport, Kralendijk, Caribbean Netherlands','country_id' => '28'),\narray('id' => '6863','name' => '(CUR) - Hato International Airport, Willemstad, CuraAao','country_id' => '50'),\narray('id' => '6864','name' => '(EUX) - F. D. Roosevelt Airport, Sint Eustatius, Caribbean Netherlands','country_id' => '28'),\narray('id' => '6865','name' => '(SXM) - Princess Juliana International Airport, Saint Martin, Sint Maarten','country_id' => '206'),\narray('id' => '6866','name' => '(SAB) - Juancho E. Yrausquin Airport, Saba, Caribbean Netherlands','country_id' => '28'),\narray('id' => '6867','name' => '(TNW) - Jumandy Airport, Tena, Ecuador','country_id' => '60'),\narray('id' => '6868','name' => '(TOK) - Torokina Airport, Torokina, Papua New Guinea','country_id' => '172'),\narray('id' => '6869','name' => '(PTA) - Port Alsworth Airport, Port Alsworth, United States','country_id' => '228'),\narray('id' => '6870','name' => '(TPT) - Tapeta Airport, Tapeta, Liberia','country_id' => '127'),\narray('id' => '6871','name' => '(AXA) - Wallblake Airport, The Valley, Anguilla','country_id' => '4'),\narray('id' => '6872','name' => '(BGG) - BingAl Aeltiksuyu Airport, BingAl, Turkey','country_id' => '220'),\narray('id' => '6873','name' => '(OGU) - Ordu Giresun Airport, Ordu, Turkey','country_id' => '220'),\narray('id' => '6874','name' => '(IGD) - IAdAr Airport, IAdAr, Turkey','country_id' => '220'),\narray('id' => '6875','name' => '(MNI) - John A. Osborne Airport, Gerald\\'s Park, Montserrat','country_id' => '148'),\narray('id' => '6876','name' => '(TSG) - Tanacross Airport, Tanacross, United States','country_id' => '228'),\narray('id' => '6877','name' => '(TSI) - Tsile Tsile Airport, Tsile Tsile, Papua New Guinea','country_id' => '172'),\narray('id' => '6878','name' => '(TAB) - Tobago-Crown Point Airport, Scarborough, Trinidad and Tobago','country_id' => '221'),\narray('id' => '6879','name' => '(POS) - Piarco International Airport, Port of Spain, Trinidad and Tobago','country_id' => '221'),\narray('id' => '6880','name' => '(TUE) - Tupile Airport, Isla Tupile, Panama','country_id' => '169'),\narray('id' => '6881','name' => '(TUJ) - Tum Airport, Tum, Ethiopia','country_id' => '66'),\narray('id' => '6882','name' => '(NGD) - Captain Auguste George Airport, Anegada, British Virgin Islands','country_id' => '234'),\narray('id' => '6883','name' => '(EIS) - Terrance B. Lettsome International Airport, Road Town, British Virgin Islands','country_id' => '234'),\narray('id' => '6884','name' => '(VIJ) - Virgin Gorda Airport, Spanish Town, British Virgin Islands','country_id' => '234'),\narray('id' => '6885','name' => '(BQU) - J F Mitchell Airport, Bequia, Saint Vincent and the Grenadines','country_id' => '232'),\narray('id' => '6886','name' => '(CIW) - Canouan Airport, Canouan, Saint Vincent and the Grenadines','country_id' => '232'),\narray('id' => '6887','name' => '(MQS) - Mustique Airport, Mustique Island, Saint Vincent and the Grenadines','country_id' => '232'),\narray('id' => '6888','name' => '(UNI) - Union Island International Airport, Union Island, Saint Vincent and the Grenadines','country_id' => '232'),\narray('id' => '6889','name' => '(SVD) - E. T. Joshua Airport, Kingstown, Saint Vincent and the Grenadines','country_id' => '232'),\narray('id' => '6890','name' => '(DSX) - Dongsha Island Airport, Pratas Island, Taiwan','country_id' => '223'),\narray('id' => '6891','name' => '(CMJ) - Chi Mei Airport, Chi Mei, Taiwan','country_id' => '223'),\narray('id' => '6892','name' => '(BDA) - L.F. Wade International International Airport, Hamilton, Bermuda','country_id' => '25'),\narray('id' => '6893','name' => '(TYE) - Tyonek Airport, Tyonek, United States','country_id' => '228'),\narray('id' => '6894','name' => '(GIT) - Mchauru Airport, Geita, Tanzania','country_id' => '224'),\narray('id' => '6895','name' => '(LUY) - Lushoto Airport, Lushoto, Tanzania','country_id' => '224'),\narray('id' => '6896','name' => '(DBS) - Dubois Municipal Airport, Dubois, United States','country_id' => '228'),\narray('id' => '6897','name' => '(OOX) - Melitopol Air Base, Melitopol, Ukraine','country_id' => '225'),\narray('id' => '6898','name' => '(MXR) - Myrhorod Air Base, Myrhorod, Ukraine','country_id' => '225'),\narray('id' => '6899','name' => '(KHU) - Kakhnovka Airfield, Kremenchuk, Ukraine','country_id' => '225'),\narray('id' => '6900','name' => '(ALA) - Almaty Airport, Almaty, Kazakhstan','country_id' => '121'),\narray('id' => '6901','name' => '(BXH) - Balkhash Airport, Balkhash, Kazakhstan','country_id' => '121'),\narray('id' => '6902','name' => '(BXJ) - Boralday Airport, Aima Ata, Kazakhstan','country_id' => '121'),\narray('id' => '6903','name' => '(TSE) - Astana International Airport, Astana, Kazakhstan','country_id' => '121'),\narray('id' => '6904','name' => '(KOV) - Kokshetau Airport, Kokshetau, Kazakhstan','country_id' => '121'),\narray('id' => '6905','name' => '(PPK) - Petropavlosk South Airport, Petropavlosk, Kazakhstan','country_id' => '121'),\narray('id' => '6906','name' => '(DMB) - Taraz Airport, Taraz, Kazakhstan','country_id' => '121'),\narray('id' => '6907','name' => '(UAE) - Mount Aue Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '6908','name' => '(FRU) - Manas International Airport, Bishkek, Kyrgyzstan','country_id' => '112'),\narray('id' => '6909','name' => '(OSS) - Osh Airport, Osh, Kyrgyzstan','country_id' => '112'),\narray('id' => '6910','name' => '(CIT) - Shymkent Airport, Shymkent, Kazakhstan','country_id' => '121'),\narray('id' => '6911','name' => '(DZN) - Zhezkazgan Airport, Zhezkazgan, Kazakhstan','country_id' => '121'),\narray('id' => '6912','name' => '(KGF) - Sary-Arka Airport, Karaganda, Kazakhstan','country_id' => '121'),\narray('id' => '6913','name' => '(KZO) - Kzyl-Orda Southwest Airport, Kzyl-Orda, Kazakhstan','country_id' => '121'),\narray('id' => '6914','name' => '(URA) - Uralsk Airport, Uralsk, Kazakhstan','country_id' => '121'),\narray('id' => '6915','name' => '(EKB) - Ekibastuz Airport, Ekibastuz, Kazakhstan','country_id' => '121'),\narray('id' => '6916','name' => '(SZI) - Zaysan Airport, Zaysan, Kazakhstan','country_id' => '121'),\narray('id' => '6917','name' => '(UKK) - Ust-Kamennogorsk Airport, Ust Kamenogorsk, Kazakhstan','country_id' => '121'),\narray('id' => '6918','name' => '(PWQ) - Pavlodar Airport, Pavlodar, Kazakhstan','country_id' => '121'),\narray('id' => '6919','name' => '(DLX) - Semipalatinsk Airport, Semey, Kazakhstan','country_id' => '121'),\narray('id' => '6920','name' => '(SCO) - Aktau Airport, Aktau, Kazakhstan','country_id' => '121'),\narray('id' => '6921','name' => '(GUW) - Atyrau Airport, Atyrau, Kazakhstan','country_id' => '121'),\narray('id' => '6922','name' => '(AKX) - Aktobe Airport, Aktyuinsk, Kazakhstan','country_id' => '121'),\narray('id' => '6923','name' => '(AYK) - Arkalyk North Airport, Arkalyk, Kazakhstan','country_id' => '121'),\narray('id' => '6924','name' => '(KSN) - Kostanay West Airport, Kostanay, Kazakhstan','country_id' => '121'),\narray('id' => '6925','name' => '(GYD) - Heydar Aliyev International Airport, Baku, Azerbaijan','country_id' => '14'),\narray('id' => '6926','name' => '(KVD) - Ganja Airport, Ganja, Azerbaijan','country_id' => '14'),\narray('id' => '6927','name' => '(LLK) - Lankaran International Airport, Lankaran, Azerbaijan','country_id' => '14'),\narray('id' => '6928','name' => '(NAJ) - Nakhchivan Airport, Nakhchivan, Azerbaijan','country_id' => '14'),\narray('id' => '6929','name' => '(GBB) - Gabala International Airport, Gabala, Azerbaijan','country_id' => '14'),\narray('id' => '6930','name' => '(ZTU) - Zaqatala International Airport, Zaqatala, Azerbaijan','country_id' => '14'),\narray('id' => '6931','name' => '(YLV) - Yevlakh Airport, Yevlakh, Azerbaijan','country_id' => '14'),\narray('id' => '6932','name' => '(UBI) - Buin Airport, Buin, Papua New Guinea','country_id' => '172'),\narray('id' => '6933','name' => '(LWN) - Gyumri Shirak Airport, Gyumri, Armenia','country_id' => '6'),\narray('id' => '6934','name' => '(EVN) - Zvartnots International Airport, Yerevan, Armenia','country_id' => '6'),\narray('id' => '6935','name' => '(BQJ) - Batagay Airport, Batagay, Russia','country_id' => '187'),\narray('id' => '6936','name' => '(SUK) - Sakkyryr Airport, Batagay-Alyta, Russia','country_id' => '187'),\narray('id' => '6937','name' => '(UKG) - Ust-Kuyga Airport, Ust-Kuyga, Russia','country_id' => '187'),\narray('id' => '6938','name' => '(ADH) - Aldan Airport, Aldan, Russia','country_id' => '187'),\narray('id' => '6939','name' => '(YKS) - Yakutsk Airport, Yakutsk, Russia','country_id' => '187'),\narray('id' => '6940','name' => '(NER) - Chulman Airport, Neryungri, Russia','country_id' => '187'),\narray('id' => '6941','name' => '(USR) - Ust-Nera Airport, Ust-Nera, Russia','country_id' => '187'),\narray('id' => '6942','name' => '(UMS) - Ust-Maya Airport, Ust-Maya, Russia','country_id' => '187'),\narray('id' => '6943','name' => '(VHV) - Verkhnevilyuisk Airport, Verkhnevilyuisk, Russia','country_id' => '187'),\narray('id' => '6944','name' => '(SUY) - Suntar Airport, Suntar, Russia','country_id' => '187'),\narray('id' => '6945','name' => '(VYI) - Vilyuisk Airport, Vilyuisk, Russia','country_id' => '187'),\narray('id' => '6946','name' => '(ULK) - Lensk Airport, Lensk, Russia','country_id' => '187'),\narray('id' => '6947','name' => '(PYJ) - Polyarny Airport, Yakutia, Russia','country_id' => '187'),\narray('id' => '6948','name' => '(MJZ) - Mirny Airport, Mirny, Russia','country_id' => '187'),\narray('id' => '6949','name' => '(SYS) - Saskylakh Airport, Saskylakh, Russia','country_id' => '187'),\narray('id' => '6950','name' => '(SEK) - Srednekolymsk Airport, Srednekolymsk, Russia','country_id' => '187'),\narray('id' => '6951','name' => '(CKH) - Chokurdakh Airport, Chokurdah, Russia','country_id' => '187'),\narray('id' => '6952','name' => '(CYX) - Cherskiy Airport, Cherskiy, Russia','country_id' => '187'),\narray('id' => '6953','name' => '(IKS) - Tiksi Airport, Tiksi, Russia','country_id' => '187'),\narray('id' => '6954','name' => '(ZKP) - Zyryanka Airport, Zyryanka, Russia','country_id' => '187'),\narray('id' => '6955','name' => '(OYG) - Moyo Airport, Moyo, Uganda','country_id' => '226'),\narray('id' => '6956','name' => '(UGB) - Ugashik Bay Airport, Pilot Point, United States','country_id' => '228'),\narray('id' => '6957','name' => '(KUT) - Kopitnari Airport, Kutaisi, Georgia','country_id' => '76'),\narray('id' => '6958','name' => '(BUS) - Batumi International Airport, Batumi, Georgia','country_id' => '76'),\narray('id' => '6959','name' => '(SUI) - Sukhumi Dranda Airport, Sukhumi, Georgia','country_id' => '76'),\narray('id' => '6960','name' => '(TBS) - Tbilisi International Airport, Tbilisi, Georgia','country_id' => '76'),\narray('id' => '6961','name' => '(BQS) - Ignatyevo Airport, Blagoveschensk, Russia','country_id' => '187'),\narray('id' => '6962','name' => '(GDG) - Magdagachi Airport, Magdagachi, Russia','country_id' => '187'),\narray('id' => '6963','name' => '(TYD) - Tynda Airport, Tynda, Russia','country_id' => '187'),\narray('id' => '6964','name' => '(KHV) - Khabarovsk-Novy Airport, Khabarovsk, Russia','country_id' => '187'),\narray('id' => '6965','name' => '(KXK) - Komsomolsk-on-Amur Airport, Komsomolsk-on-Amur, Russia','country_id' => '187'),\narray('id' => '6966','name' => '(GVN) - Maygatka Airport., Sovetskaya Gavan, Russia','country_id' => '187'),\narray('id' => '6967','name' => '(DYR) - Ugolny Airport, Anadyr, Russia','country_id' => '187'),\narray('id' => '6968','name' => '(PVS) - Provideniya Bay Airport, Chukotka, Russia','country_id' => '187'),\narray('id' => '6969','name' => '(GDX) - Sokol Airport, Magadan, Russia','country_id' => '187'),\narray('id' => '6970','name' => '(PWE) - Pevek Airport, Pevek, Russia','country_id' => '187'),\narray('id' => '6971','name' => '(BQG) - Bogorodskoye Airport, Bogorodskoye, Russia','country_id' => '187'),\narray('id' => '6972','name' => '(NLI) - Nikolayevsk-na-Amure Airport, Nikolayevsk-na-Amure Airport, Russia','country_id' => '187'),\narray('id' => '6973','name' => '(OHO) - Okhotsk Airport, Okhotsk, Russia','country_id' => '187'),\narray('id' => '6974','name' => '(PKC) - Yelizovo Airport, Petropavlovsk-Kamchatsky, Russia','country_id' => '187'),\narray('id' => '6975','name' => '(BVV) - Burevestnik Airport, Iturup Island, Russia','country_id' => '187'),\narray('id' => '6976','name' => '(OHH) - Okha Airport, Okha, Russia','country_id' => '187'),\narray('id' => '6977','name' => '(ITU) - Iturup Airport, Kurilsk, Russia','country_id' => '187'),\narray('id' => '6978','name' => '(EKS) - Shakhtyorsk Airport, Shakhtersk, Russia','country_id' => '187'),\narray('id' => '6979','name' => '(DEE) - Mendeleyevo Airport, Kunashir Island, Russia','country_id' => '187'),\narray('id' => '6980','name' => '(ZZO) - Zonalnoye Airport, Tymovskoye, Russia','country_id' => '187'),\narray('id' => '6981','name' => '(UUS) - Yuzhno-Sakhalinsk Airport, Yuzhno-Sakhalinsk, Russia','country_id' => '187'),\narray('id' => '6982','name' => '(KVR) - Kavalerovo Airport, Kavalerovo, Russia','country_id' => '187'),\narray('id' => '6983','name' => '(TLY) - Plastun Airport, Plastun, Russia','country_id' => '187'),\narray('id' => '6984','name' => '(VVO) - Vladivostok International Airport, Vladivostok, Russia','country_id' => '187'),\narray('id' => '6985','name' => '(HTA) - Chita-Kadala Airport, Chita, Russia','country_id' => '187'),\narray('id' => '6986','name' => '(BTK) - Bratsk Airport, Bratsk, Russia','country_id' => '187'),\narray('id' => '6987','name' => '(UIK) - Ust-Ilimsk Airport, Ust-Ilimsk, Russia','country_id' => '187'),\narray('id' => '6988','name' => '(IKT) - Irkutsk Airport, Irkutsk, Russia','country_id' => '187'),\narray('id' => '6989','name' => '(ODO) - Bodaybo Airport, Bodaybo, Russia','country_id' => '187'),\narray('id' => '6990','name' => '(ERG) - Yerbogachen Airport, Erbogachen, Russia','country_id' => '187'),\narray('id' => '6991','name' => '(KCK) - Kirensk Airport, Kirensk, Russia','country_id' => '187'),\narray('id' => '6992','name' => '(UKX) - Ust-Kut Airport, Ust-Kut, Russia','country_id' => '187'),\narray('id' => '6993','name' => '(UUD) - Ulan-Ude Airport (Mukhino), Ulan Ude, Russia','country_id' => '187'),\narray('id' => '6994','name' => '(UJE) - Ujae Atoll Airport, Ujae Atoll, Marshall Islands','country_id' => '139'),\narray('id' => '6995','name' => '(UJN) - Uljin Airport, Uljin, South Korea','country_id' => '118'),\narray('id' => '6996','name' => '(KBP) - Boryspil International Airport, Kiev, Ukraine','country_id' => '225'),\narray('id' => '6997','name' => '(DOK) - Donetsk International Airport, Donetsk, Ukraine','country_id' => '225'),\narray('id' => '6998','name' => '(KRQ) - Kramatorsk Airport, Kramatorsk, Ukraine','country_id' => '225'),\narray('id' => '6999','name' => '(MPW) - Mariupol International Airport, Mariupol, Ukraine','country_id' => '225'),\narray('id' => '7000','name' => '(SEV) - Sievierodonetsk Airport, Sievierodonetsk, Ukraine','country_id' => '225'),\narray('id' => '7001','name' => '(VSG) - Luhansk International Airport, Luhansk, Ukraine','country_id' => '225'),\narray('id' => '7002','name' => '(ERD) - Berdyansk Airport, Berdyansk, Ukraine','country_id' => '225'),\narray('id' => '7003','name' => '(DNK) - Dnipropetrovsk International Airport, Dnipropetrovsk, Ukraine','country_id' => '225'),\narray('id' => '7004','name' => '(OZH) - Zaporizhzhia International Airport, Zaporizhia, Ukraine','country_id' => '225'),\narray('id' => '7005','name' => '(KWG) - Kryvyi Rih International Airport, Kryvyi Rih, Ukraine','country_id' => '225'),\narray('id' => '7006','name' => '(UKS) - Belbek Airport, Sevastopol, Ukraine','country_id' => '225'),\narray('id' => '7007','name' => '(SIP) - Simferopol International Airport, Simferopol, Ukraine','country_id' => '225'),\narray('id' => '7008','name' => '(KHC) - Kerch Airport, Kerch, Ukraine','country_id' => '225'),\narray('id' => '7009','name' => '(UKH) - Mukhaizna Airport, Mukhaizna Oil Field, Oman','country_id' => '168'),\narray('id' => '7010','name' => '(HRK) - Kharkiv International Airport, Kharkiv, Ukraine','country_id' => '225'),\narray('id' => '7011','name' => '(PLV) - Suprunovka Airport, Poltava, Ukraine','country_id' => '225'),\narray('id' => '7012','name' => '(UMY) - Sumy Airport, Sumy, Ukraine','country_id' => '225'),\narray('id' => '7013','name' => '(CKC) - Cherkasy International Airport, Cherkasy, Ukraine','country_id' => '225'),\narray('id' => '7014','name' => '(KGO) - Kirovograd Airport, Kirovograd, Ukraine','country_id' => '225'),\narray('id' => '7015','name' => '(IEV) - Kiev Zhuliany International Airport, Kiev, Ukraine','country_id' => '225'),\narray('id' => '7016','name' => '(GML) - Gostomel Airport, Kiev, Ukraine','country_id' => '225'),\narray('id' => '7017','name' => '(ZTR) - Zhytomyr Airport, , Ukraine','country_id' => '225'),\narray('id' => '7018','name' => '(UCK) - Lutsk Airport, Lutsk, Ukraine','country_id' => '225'),\narray('id' => '7019','name' => '(HMJ) - Khmelnytskyi Airport, Khmelnytskyi, Ukraine','country_id' => '225'),\narray('id' => '7020','name' => '(IFO) - Ivano-Frankivsk International Airport, Ivano-Frankivsk, Ukraine','country_id' => '225'),\narray('id' => '7021','name' => '(LWO) - Lviv International Airport, Lviv, Ukraine','country_id' => '225'),\narray('id' => '7022','name' => '(CWC) - Chernivtsi International Airport, Chernivtsi, Ukraine','country_id' => '225'),\narray('id' => '7023','name' => '(RWN) - Rivne International Airport, Rivne, Ukraine','country_id' => '225'),\narray('id' => '7024','name' => '(TNL) - Ternopil International Airport, Ternopil, Ukraine','country_id' => '225'),\narray('id' => '7025','name' => '(UDJ) - Uzhhorod International Airport, Uzhhorod, Ukraine','country_id' => '225'),\narray('id' => '7026','name' => '(KHE) - Chernobayevka Airport, Kherson, Ukraine','country_id' => '225'),\narray('id' => '7027','name' => '(NLV) - Mykolaiv International Airport, Nikolayev, Ukraine','country_id' => '225'),\narray('id' => '7028','name' => '(ODS) - Odessa International Airport, Odessa, Ukraine','country_id' => '225'),\narray('id' => '7029','name' => '(VIN) - Vinnytsia/Gavyryshivka Airport, Vinnitsa, Ukraine','country_id' => '225'),\narray('id' => '7030','name' => '(ARH) - Talagi Airport, Archangelsk, Russia','country_id' => '187'),\narray('id' => '7031','name' => '(LDG) - Leshukonskoye Airport, Leshukonskoye, Russia','country_id' => '187'),\narray('id' => '7032','name' => '(NNM) - Naryan Mar Airport, Naryan Mar, Russia','country_id' => '187'),\narray('id' => '7033','name' => '(CSH) - Solovki Airport, Solovetsky Islands, Russia','country_id' => '187'),\narray('id' => '7034','name' => '(CEE) - Cherepovets Airport, Cherepovets, Russia','country_id' => '187'),\narray('id' => '7035','name' => '(AMV) - Amderma Airport, Amderma, Russia','country_id' => '187'),\narray('id' => '7036','name' => '(VRI) - Varandey Airport, Varandey, Russia','country_id' => '187'),\narray('id' => '7037','name' => '(ULH) - Majeed Bin Abdulaziz Airport, Al Ula, Saudi Arabia','country_id' => '189'),\narray('id' => '7038','name' => '(KSZ) - Kotlas Airport, Kotlas, Russia','country_id' => '187'),\narray('id' => '7039','name' => '(LED) - Pulkovo Airport, St. Petersburg, Russia','country_id' => '187'),\narray('id' => '7040','name' => '(KVK) - Kirovsk-Apatity Airport, Apatity, Russia','country_id' => '187'),\narray('id' => '7041','name' => '(MMK) - Murmansk Airport, Murmansk, Russia','country_id' => '187'),\narray('id' => '7042','name' => '(VLU) - Velikiye Luki Airport, Velikiye Luki, Russia','country_id' => '187'),\narray('id' => '7043','name' => '(PKV) - Pskov Airport, Pskov, Russia','country_id' => '187'),\narray('id' => '7044','name' => '(PES) - Petrozavodsk Airport, Petrozavodsk, Russia','country_id' => '187'),\narray('id' => '7045','name' => '(VGD) - Vologda Airport, Vologda, Russia','country_id' => '187'),\narray('id' => '7046','name' => '(BQT) - Brest Airport, Brest, Belarus','country_id' => '33'),\narray('id' => '7047','name' => '(GME) - Gomel Airport, Gomel, Belarus','country_id' => '33'),\narray('id' => '7048','name' => '(VTB) - Vitebsk Vostochny Airport, Vitebsk, Belarus','country_id' => '33'),\narray('id' => '7049','name' => '(KGD) - Khrabrovo Airport, Kaliningrad, Russia','country_id' => '187'),\narray('id' => '7050','name' => '(GNA) - Hrodna Airport, Hrodna, Belarus','country_id' => '33'),\narray('id' => '7051','name' => '(MHP) - Minsk 1 Airport, Minsk, Belarus','country_id' => '33'),\narray('id' => '7052','name' => '(MSQ) - Minsk National Airport, Minsk, Belarus','country_id' => '33'),\narray('id' => '7053','name' => '(MVQ) - Mogilev Airport, Mogilev, Belarus','country_id' => '33'),\narray('id' => '7054','name' => '(ABA) - Abakan Airport, Abakan, Russia','country_id' => '187'),\narray('id' => '7055','name' => '(BAX) - Barnaul Airport, Barnaul, Russia','country_id' => '187'),\narray('id' => '7056','name' => '(RGK) - Gorno-Altaysk Airport, Gorno-Altaysk, Russia','country_id' => '187'),\narray('id' => '7057','name' => '(KEJ) - Kemerovo Airport, Kemerovo, Russia','country_id' => '187'),\narray('id' => '7058','name' => '(EIE) - Yeniseysk Airport, Yeniseysk, Russia','country_id' => '187'),\narray('id' => '7059','name' => '(KJA) - Yemelyanovo Airport, Krasnoyarsk, Russia','country_id' => '187'),\narray('id' => '7060','name' => '(ACS) - Achinsk Airport, Achinsk, Russia','country_id' => '187'),\narray('id' => '7061','name' => '(KYZ) - Kyzyl Airport, Kyzyl, Russia','country_id' => '187'),\narray('id' => '7062','name' => '(OVB) - Tolmachevo Airport, Novosibirsk, Russia','country_id' => '187'),\narray('id' => '7063','name' => '(OMS) - Omsk Central Airport, Omsk, Russia','country_id' => '187'),\narray('id' => '7064','name' => '(SWT) - Strezhevoy Airport, Strezhevoy, Russia','country_id' => '187'),\narray('id' => '7065','name' => '(TOF) - Bogashevo Airport, Tomsk, Russia','country_id' => '187'),\narray('id' => '7066','name' => '(NOZ) - Spichenkovo Airport, Novokuznetsk, Russia','country_id' => '187'),\narray('id' => '7067','name' => '(DKS) - Dikson Airport, Dikson, Russia','country_id' => '187'),\narray('id' => '7068','name' => '(HTG) - Khatanga Airport, Khatanga, Russia','country_id' => '187'),\narray('id' => '7069','name' => '(IAA) - Igarka Airport, Igarka, Russia','country_id' => '187'),\narray('id' => '7070','name' => '(NSK) - Norilsk-Alykel Airport, Norilsk, Russia','country_id' => '187'),\narray('id' => '7071','name' => '(THX) - Turukhansk Airport, Turukhansk, Russia','country_id' => '187'),\narray('id' => '7072','name' => '(AAQ) - Anapa Vityazevo Airport, Anapa, Russia','country_id' => '187'),\narray('id' => '7073','name' => '(EIK) - Yeysk Airport, Yeysk, Russia','country_id' => '187'),\narray('id' => '7074','name' => '(GDZ) - Gelendzhik Airport, Gelendzhik, Russia','country_id' => '187'),\narray('id' => '7075','name' => '(KRR) - Krasnodar Pashkovsky International Airport, Krasnodar, Russia','country_id' => '187'),\narray('id' => '7076','name' => '(MCX) - Uytash Airport, Makhachkala, Russia','country_id' => '187'),\narray('id' => '7077','name' => '(MRV) - Mineralnyye Vody Airport, Mineralnyye Vody, Russia','country_id' => '187'),\narray('id' => '7078','name' => '(NAL) - Nalchik Airport, Nalchik, Russia','country_id' => '187'),\narray('id' => '7079','name' => '(OGZ) - Beslan Airport, Beslan, Russia','country_id' => '187'),\narray('id' => '7080','name' => '(IGT) - Magas Airport, Magas, Russia','country_id' => '187'),\narray('id' => '7081','name' => '(STW) - Stavropol Shpakovskoye Airport, Stavropol, Russia','country_id' => '187'),\narray('id' => '7082','name' => '(ROV) - Rostov-on-Don Airport, Rostov-on-Don, Russia','country_id' => '187'),\narray('id' => '7083','name' => '(TGK) - Taganrog Yuzhny Airport, Taganrog, Russia','country_id' => '187'),\narray('id' => '7084','name' => '(VLK) - Volgodonsk Airport, , Russia','country_id' => '187'),\narray('id' => '7085','name' => '(AER) - Sochi International Airport, Sochi, Russia','country_id' => '187'),\narray('id' => '7086','name' => '(ASF) - Astrakhan Airport, Astrakhan, Russia','country_id' => '187'),\narray('id' => '7087','name' => '(ESL) - Elista Airport, Elista, Russia','country_id' => '187'),\narray('id' => '7088','name' => '(VOG) - Volgograd International Airport, Volgograd, Russia','country_id' => '187'),\narray('id' => '7089','name' => '(RTL) - Spirit Lake Municipal Airport, Spirit Lake, United States','country_id' => '228'),\narray('id' => '7090','name' => '(CEK) - Chelyabinsk Balandino Airport, Chelyabinsk, Russia','country_id' => '187'),\narray('id' => '7091','name' => '(MQF) - Magnitogorsk International Airport, Magnitogorsk, Russia','country_id' => '187'),\narray('id' => '7092','name' => '(SLY) - Salekhard Airport, Salekhard, Russia','country_id' => '187'),\narray('id' => '7093','name' => '(YMK) - Mys Kamenny Airport, Mys Kamennyi, Russia','country_id' => '187'),\narray('id' => '7094','name' => '(KKQ) - Krasnoselkup Airport, Krasnoselkup, Russia','country_id' => '187'),\narray('id' => '7095','name' => '(TQL) - Tarko-Sale Airport, Tarko-Sale, Russia','country_id' => '187'),\narray('id' => '7096','name' => '(UEN) - Urengoy Airport, Urengoy, Russia','country_id' => '187'),\narray('id' => '7097','name' => '(EZV) - Berezovo Airport, , Russia','country_id' => '187'),\narray('id' => '7098','name' => '(HMA) - Khanty Mansiysk Airport, Khanty-Mansiysk, Russia','country_id' => '187'),\narray('id' => '7099','name' => '(IRM) - Igrim Airport, , Russia','country_id' => '187'),\narray('id' => '7100','name' => '(NYA) - Nyagan Airport, Nyagan, Russia','country_id' => '187'),\narray('id' => '7101','name' => '(OVS) - Sovetskiy Airport, Sovetskiy, Russia','country_id' => '187'),\narray('id' => '7102','name' => '(URJ) - Uray Airport, Uray, Russia','country_id' => '187'),\narray('id' => '7103','name' => '(EYK) - Beloyarskiy Airport, , Russia','country_id' => '187'),\narray('id' => '7104','name' => '(IJK) - Izhevsk Airport, Izhevsk, Russia','country_id' => '187'),\narray('id' => '7105','name' => '(KVX) - Pobedilovo Airport, Kirov, Russia','country_id' => '187'),\narray('id' => '7106','name' => '(NYM) - Nadym Airport, Nadym, Russia','country_id' => '187'),\narray('id' => '7107','name' => '(NUX) - Novy Urengoy Airport, Novy Urengoy, Russia','country_id' => '187'),\narray('id' => '7108','name' => '(NJC) - Nizhnevartovsk Airport, Nizhnevartovsk, Russia','country_id' => '187'),\narray('id' => '7109','name' => '(PEE) - Bolshoye Savino Airport, Perm, Russia','country_id' => '187'),\narray('id' => '7110','name' => '(KGP) - Kogalym International Airport, Kogalym, Russia','country_id' => '187'),\narray('id' => '7111','name' => '(NFG) - Nefteyugansk Airport, Nefteyugansk, Russia','country_id' => '187'),\narray('id' => '7112','name' => '(NOJ) - Noyabrsk Airport, Noyabrsk, Russia','country_id' => '187'),\narray('id' => '7113','name' => '(SGC) - Surgut Airport, Surgut, Russia','country_id' => '187'),\narray('id' => '7114','name' => '(SVX) - Koltsovo Airport, Yekaterinburg, Russia','country_id' => '187'),\narray('id' => '7115','name' => '(TOX) - Tobolsk Airport, Tobolsk, Russia','country_id' => '187'),\narray('id' => '7116','name' => '(TJM) - Roshchino International Airport, Tyumen, Russia','country_id' => '187'),\narray('id' => '7117','name' => '(KRO) - Kurgan Airport, Kurgan, Russia','country_id' => '187'),\narray('id' => '7118','name' => '(BKN) - Balkanabat Airport, Balkanabat, Turkmenistan','country_id' => '217'),\narray('id' => '7119','name' => '(GMV) - Monument Valley Airport, Goulding\\'s Lodge, United States','country_id' => '228'),\narray('id' => '7120','name' => '(ASB) - Ashgabat Airport, Ashgabat, Turkmenistan','country_id' => '217'),\narray('id' => '7121','name' => '(KRW) - Turkmenbashi Airport, Krasnovodsk, Turkmenistan','country_id' => '217'),\narray('id' => '7122','name' => '(MYP) - Mary Airport, Mary, Turkmenistan','country_id' => '217'),\narray('id' => '7123','name' => '(TAZ) - Daoguz Airport, Daoguz, Turkmenistan','country_id' => '217'),\narray('id' => '7124','name' => '(CRZ) - Turkmenabat Airport, TArkmenabat, Turkmenistan','country_id' => '217'),\narray('id' => '7125','name' => '(DYU) - Dushanbe Airport, Dushanbe, Tajikistan','country_id' => '214'),\narray('id' => '7126','name' => '(TJU) - Kulob Airport, Kulyab, Tajikistan','country_id' => '214'),\narray('id' => '7127','name' => '(LBD) - Khudzhand Airport, Khudzhand, Tajikistan','country_id' => '214'),\narray('id' => '7128','name' => '(KQT) - Qurghonteppa International Airport, Kurgan-Tyube, Tajikistan','country_id' => '214'),\narray('id' => '7129','name' => '(AZN) - Andizhan Airport, Andizhan, Uzbekistan','country_id' => '230'),\narray('id' => '7130','name' => '(FEG) - Fergana International Airport, Fergana, Uzbekistan','country_id' => '230'),\narray('id' => '7131','name' => '(NMA) - Namangan Airport, Namangan, Uzbekistan','country_id' => '230'),\narray('id' => '7132','name' => '(NCU) - Nukus Airport, Nukus, Uzbekistan','country_id' => '230'),\narray('id' => '7133','name' => '(UGC) - Urgench Airport, Urgench, Uzbekistan','country_id' => '230'),\narray('id' => '7134','name' => '(NVI) - Navoi Airport, Navoi, Uzbekistan','country_id' => '230'),\narray('id' => '7135','name' => '(BHK) - Bukhara Airport, Bukhara, Uzbekistan','country_id' => '230'),\narray('id' => '7136','name' => '(KSQ) - Karshi Khanabad Airport, Khanabad, Uzbekistan','country_id' => '230'),\narray('id' => '7137','name' => '(AFS) - Sugraly Airport, Zarafshan, Uzbekistan','country_id' => '230'),\narray('id' => '7138','name' => '(SKD) - Samarkand Airport, Samarkand, Uzbekistan','country_id' => '230'),\narray('id' => '7139','name' => '(TMJ) - Termez Airport, Termez, Uzbekistan','country_id' => '230'),\narray('id' => '7140','name' => '(TAS) - Tashkent International Airport, Tashkent, Uzbekistan','country_id' => '230'),\narray('id' => '7141','name' => '(UTU) - Ustupo Airport, Ustupo, Panama','country_id' => '169'),\narray('id' => '7142','name' => '(KMW) - Kostroma Sokerkino Airport, Kostroma, Russia','country_id' => '187'),\narray('id' => '7143','name' => '(KLF) - Grabtsevo Airport, Kaluga, Russia','country_id' => '187'),\narray('id' => '7144','name' => '(IWA) - Ivanovo South Airport, Ivanovo, Russia','country_id' => '187'),\narray('id' => '7145','name' => '(RYB) - Staroselye Airport, Rybinsk, Russia','country_id' => '187'),\narray('id' => '7146','name' => '(BZK) - Bryansk Airport, Bryansk, Russia','country_id' => '187'),\narray('id' => '7147','name' => '(ZIA) - Zhukovsky International Airport, Zhukovsky, Russia','country_id' => '187'),\narray('id' => '7148','name' => '(DME) - Domodedovo International Airport, Moscow, Russia','country_id' => '187'),\narray('id' => '7149','name' => '(IAR) - Tunoshna Airport, , Russia','country_id' => '187'),\narray('id' => '7150','name' => '(SVO) - Sheremetyevo International Airport, Moscow, Russia','country_id' => '187'),\narray('id' => '7151','name' => '(KLD) - Migalovo Air Base, Tver, Russia','country_id' => '187'),\narray('id' => '7152','name' => '(CKL) - Chkalovskiy Airport, Moscow, Russia','country_id' => '187'),\narray('id' => '7153','name' => '(EGO) - Belgorod International Airport, Belgorod, Russia','country_id' => '187'),\narray('id' => '7154','name' => '(URS) - Kursk East Airport, Kursk, Russia','country_id' => '187'),\narray('id' => '7155','name' => '(LPK) - Lipetsk Airport, Lipetsk, Russia','country_id' => '187'),\narray('id' => '7156','name' => '(VOZ) - Voronezh International Airport, Voronezh, Russia','country_id' => '187'),\narray('id' => '7157','name' => '(OEL) - Oryol Yuzhny Airport, Orel, Russia','country_id' => '187'),\narray('id' => '7158','name' => '(TBW) - Donskoye Airport, Tambov, Russia','country_id' => '187'),\narray('id' => '7159','name' => '(UUU) - Manumu Airport, Manumu, Papua New Guinea','country_id' => '172'),\narray('id' => '7160','name' => '(RZN) - Turlatovo Airport, Ryazan, Russia','country_id' => '187'),\narray('id' => '7161','name' => '(TYA) - Klokovo Airfield, Tula, Russia','country_id' => '187'),\narray('id' => '7162','name' => '(VKO) - Vnukovo International Airport, Moscow, Russia','country_id' => '187'),\narray('id' => '7163','name' => '(UCT) - Ukhta Airport, Ukhta, Russia','country_id' => '187'),\narray('id' => '7164','name' => '(INA) - Inta Airport, Inta, Russia','country_id' => '187'),\narray('id' => '7165','name' => '(PEX) - Pechora Airport, Pechora, Russia','country_id' => '187'),\narray('id' => '7166','name' => '(USK) - Usinsk Airport, Usinsk, Russia','country_id' => '187'),\narray('id' => '7167','name' => '(VKT) - Vorkuta Airport, Vorkuta, Russia','country_id' => '187'),\narray('id' => '7168','name' => '(UTS) - Ust-Tsylma Airport, Ust-Tsylma, Russia','country_id' => '187'),\narray('id' => '7169','name' => '(SCW) - Syktyvkar Airport, Syktyvkar, Russia','country_id' => '187'),\narray('id' => '7170','name' => '(GOJ) - Nizhny Novgorod Strigino International Airport, Nizhny Novgorod, Russia','country_id' => '187'),\narray('id' => '7171','name' => '(UUA) - Bugulma Airport, Bugulma, Russia','country_id' => '187'),\narray('id' => '7172','name' => '(KZN) - Kazan International Airport, Kazan, Russia','country_id' => '187'),\narray('id' => '7173','name' => '(NBC) - Begishevo Airport, Nizhnekamsk, Russia','country_id' => '187'),\narray('id' => '7174','name' => '(JOK) - Yoshkar-Ola Airport, Yoshkar-Ola, Russia','country_id' => '187'),\narray('id' => '7175','name' => '(CSY) - Cheboksary Airport, Cheboksary, Russia','country_id' => '187'),\narray('id' => '7176','name' => '(ZIX) - Zhigansk Airport, Zhigansk, Russia','country_id' => '187'),\narray('id' => '7177','name' => '(ULV) - Ulyanovsk Baratayevka Airport, Ulyanovsk, Russia','country_id' => '187'),\narray('id' => '7178','name' => '(ULY) - Ulyanovsk East Airport, Ulyanovsk, Russia','country_id' => '187'),\narray('id' => '7179','name' => '(REN) - Orenburg Central Airport, Orenburg, Russia','country_id' => '187'),\narray('id' => '7180','name' => '(OSW) - Orsk Airport, Orsk, Russia','country_id' => '187'),\narray('id' => '7181','name' => '(PEZ) - Penza Airport, Penza, Russia','country_id' => '187'),\narray('id' => '7182','name' => '(SKX) - Saransk Airport, Saransk, Russia','country_id' => '187'),\narray('id' => '7183','name' => '(BWO) - Balakovo Airport, Balakovo, Russia','country_id' => '187'),\narray('id' => '7184','name' => '(RTW) - Saratov Central Airport, Saratov, Russia','country_id' => '187'),\narray('id' => '7185','name' => '(BCX) - Beloretsk Airport, Beloretsk, Russia','country_id' => '187'),\narray('id' => '7186','name' => '(NEF) - Neftekamsk Airport, Neftekamsk, Russia','country_id' => '187'),\narray('id' => '7187','name' => '(OKT) - Oktyabrskiy Airport, Kzyl-Yar, Russia','country_id' => '187'),\narray('id' => '7188','name' => '(UFA) - Ufa International Airport, Ufa, Russia','country_id' => '187'),\narray('id' => '7189','name' => '(KUF) - Kurumoch International Airport, Samara, Russia','country_id' => '187'),\narray('id' => '7190','name' => '(FZB) - Fray Bentos Airport, Fray Bentos, Uruguay','country_id' => '229'),\narray('id' => '7191','name' => '(RCH) - Rocha Airport, Rocha, Uruguay','country_id' => '229'),\narray('id' => '7192','name' => '(UZM) - Hope Bay Aerodrome, Hope Bay, Canada','country_id' => '35'),\narray('id' => '7193','name' => '(UZR) - Urzhar Airport, Urzhar, Kazakhstan','country_id' => '121'),\narray('id' => '7194','name' => '(REW) - Chorhata Airport, Rewa, India','country_id' => '101'),\narray('id' => '7195','name' => '(DIU) - Diu Airport, Diu, India','country_id' => '101'),\narray('id' => '7196','name' => '(AMD) - Sardar Vallabhbhai Patel International Airport, Ahmedabad, India','country_id' => '101'),\narray('id' => '7197','name' => '(AKD) - Akola Airport, , India','country_id' => '101'),\narray('id' => '7198','name' => '(IXU) - Aurangabad Airport, Aurangabad, India','country_id' => '101'),\narray('id' => '7199','name' => '(BOM) - Chhatrapati Shivaji International Airport, Mumbai, India','country_id' => '101'),\narray('id' => '7200','name' => '(PAB) - Bilaspur Airport, , India','country_id' => '101'),\narray('id' => '7201','name' => '(BHJ) - Bhuj Airport, Bhuj, India','country_id' => '101'),\narray('id' => '7202','name' => '(IXG) - Belgaum Airport, Belgaum, India','country_id' => '101'),\narray('id' => '7203','name' => '(BDQ) - Vadodara Airport, Vadodara, India','country_id' => '101'),\narray('id' => '7204','name' => '(BHO) - Raja Bhoj International Airport, Bhopal, India','country_id' => '101'),\narray('id' => '7205','name' => '(BHU) - Bhavnagar Airport, Bhavnagar, India','country_id' => '101'),\narray('id' => '7206','name' => '(NMB) - Daman Airport, , India','country_id' => '101'),\narray('id' => '7207','name' => '(GUX) - Guna Airport, , India','country_id' => '101'),\narray('id' => '7208','name' => '(GOI) - Dabolim Airport, Vasco da Gama, India','country_id' => '101'),\narray('id' => '7209','name' => '(HBX) - Hubli Airport, Hubli, India','country_id' => '101'),\narray('id' => '7210','name' => '(IDR) - Devi Ahilyabai Holkar Airport, Indore, India','country_id' => '101'),\narray('id' => '7211','name' => '(JLR) - Jabalpur Airport, , India','country_id' => '101'),\narray('id' => '7212','name' => '(JGA) - Jamnagar Airport, Jamnagar, India','country_id' => '101'),\narray('id' => '7213','name' => '(IXY) - Kandla Airport, Kandla, India','country_id' => '101'),\narray('id' => '7214','name' => '(HJR) - Khajuraho Airport, Khajuraho, India','country_id' => '101'),\narray('id' => '7215','name' => '(KLH) - Kolhapur Airport, , India','country_id' => '101'),\narray('id' => '7216','name' => '(IXK) - Keshod Airport, , India','country_id' => '101'),\narray('id' => '7217','name' => '(NDC) - Nanded Airport, Nanded, India','country_id' => '101'),\narray('id' => '7218','name' => '(NAG) - Dr. Babasaheb Ambedkar International Airport, Naqpur, India','country_id' => '101'),\narray('id' => '7219','name' => '(ISK) - Ozar Airport, Nasik, India','country_id' => '101'),\narray('id' => '7220','name' => '(PNQ) - Pune Airport, Pune, India','country_id' => '101'),\narray('id' => '7221','name' => '(PBD) - Porbandar Airport, Porbandar, India','country_id' => '101'),\narray('id' => '7222','name' => '(RTC) - Ratnagiri Airport, , India','country_id' => '101'),\narray('id' => '7223','name' => '(RAJ) - Rajkot Airport, Rajkot, India','country_id' => '101'),\narray('id' => '7224','name' => '(RPR) - Raipur Airport, Raipur, India','country_id' => '101'),\narray('id' => '7225','name' => '(SSE) - Solapur Airport, Solapur, India','country_id' => '101'),\narray('id' => '7226','name' => '(STV) - Surat Airport, , India','country_id' => '101'),\narray('id' => '7227','name' => '(UDR) - Maharana Pratap Airport, Udaipur, India','country_id' => '101'),\narray('id' => '7228','name' => '(CMB) - Bandaranaike International Colombo Airport, Colombo, Sri Lanka','country_id' => '126'),\narray('id' => '7229','name' => '(ACJ) - Anuradhapura Air Force Base, Anuradhapura, Sri Lanka','country_id' => '126'),\narray('id' => '7230','name' => '(BTC) - Batticaloa Airport, Batticaloa, Sri Lanka','country_id' => '126'),\narray('id' => '7231','name' => '(RML) - Colombo Ratmalana Airport, Colombo, Sri Lanka','country_id' => '126'),\narray('id' => '7232','name' => '(ADP) - Ampara Airport, Ampara, Sri Lanka','country_id' => '126'),\narray('id' => '7233','name' => '(HIM) - Hingurakgoda Air Force Base, Polonnaruwa Town, Sri Lanka','country_id' => '126'),\narray('id' => '7234','name' => '(JAF) - Kankesanturai Airport, Jaffna, Sri Lanka','country_id' => '126'),\narray('id' => '7235','name' => '(KCT) - Koggala Airport, Galle, Sri Lanka','country_id' => '126'),\narray('id' => '7236','name' => '(KTY) - Katukurunda Air Force Base, Kalutara, Sri Lanka','country_id' => '126'),\narray('id' => '7237','name' => '(GIU) - Sigiriya Air Force Base, Sigiriya, Sri Lanka','country_id' => '126'),\narray('id' => '7238','name' => '(TRR) - China Bay Airport, Trincomalee, Sri Lanka','country_id' => '126'),\narray('id' => '7239','name' => '(WRZ) - Weerawila Airport, Weerawila, Sri Lanka','country_id' => '126'),\narray('id' => '7240','name' => '(HRI) - Mattala Rajapaksa International Airport, , Sri Lanka','country_id' => '126'),\narray('id' => '7241','name' => '(BBM) - Battambang Airport, Battambang, Cambodia','country_id' => '113'),\narray('id' => '7242','name' => '(KZC) - Kampong Chhnang Airport, Kampong Chhnang, Cambodia','country_id' => '113'),\narray('id' => '7243','name' => '(KKZ) - Kaoh Kong Airport, Kaoh Kong, Cambodia','country_id' => '113'),\narray('id' => '7244','name' => '(KTI) - Kratie Airport, Kratie, Cambodia','country_id' => '113'),\narray('id' => '7245','name' => '(PNH) - Phnom Penh International Airport, Phnom Penh, Cambodia','country_id' => '113'),\narray('id' => '7246','name' => '(RBE) - Ratanakiri Airport, Ratanakiri, Cambodia','country_id' => '113'),\narray('id' => '7247','name' => '(REP) - Siem Reap International Airport, Siem Reap, Cambodia','country_id' => '113'),\narray('id' => '7248','name' => '(TNX) - Stung Treng Airport, Stung Treng, Cambodia','country_id' => '113'),\narray('id' => '7249','name' => '(KOS) - Sihanoukville International Airport, Sihanukville, Cambodia','country_id' => '113'),\narray('id' => '7250','name' => '(KZD) - Krakor Airport, Krakor, Cambodia','country_id' => '113'),\narray('id' => '7251','name' => '(LGY) - Lagunillas Airport, Lagunillas, Venezuela','country_id' => '233'),\narray('id' => '7252','name' => '(KTV) - Kamarata Airport, Kamarata, Venezuela','country_id' => '233'),\narray('id' => '7253','name' => '(LAG) - La Guaira Airport, La Guaira, Venezuela','country_id' => '233'),\narray('id' => '7254','name' => '(SFX) - Macagua Airport, Ciudad Guayana, Venezuela','country_id' => '233'),\narray('id' => '7255','name' => '(SVV) - San Salvador de Paul Airport, San Salvador de Paul, Venezuela','country_id' => '233'),\narray('id' => '7256','name' => '(WOK) - Wonken Airport, Wonken, Venezuela','country_id' => '233'),\narray('id' => '7257','name' => '(IXV) - Along Airport, , India','country_id' => '101'),\narray('id' => '7258','name' => '(IXA) - Agartala Airport, Agartala, India','country_id' => '101'),\narray('id' => '7259','name' => '(IXB) - Bagdogra Airport, Siliguri, India','country_id' => '101'),\narray('id' => '7260','name' => '(RGH) - Balurghat Airport, Balurghat, India','country_id' => '101'),\narray('id' => '7261','name' => '(SHL) - Shillong Airport, Shillong, India','country_id' => '101'),\narray('id' => '7262','name' => '(BBI) - Biju Patnaik Airport, Bhubaneswar, India','country_id' => '101'),\narray('id' => '7263','name' => '(CCU) - Netaji Subhash Chandra Bose International Airport, Kolkata, India','country_id' => '101'),\narray('id' => '7264','name' => '(COH) - Cooch Behar Airport, , India','country_id' => '101'),\narray('id' => '7265','name' => '(DBD) - Dhanbad Airport, , India','country_id' => '101'),\narray('id' => '7266','name' => '(RDP) - Kazi Nazrul Islam Airport, Durgapur, India','country_id' => '101'),\narray('id' => '7267','name' => '(DEP) - Daporijo Airport, Daporijo, India','country_id' => '101'),\narray('id' => '7268','name' => '(GOP) - Gorakhpur Airport, Gorakhpur, India','country_id' => '101'),\narray('id' => '7269','name' => '(GAU) - Lokpriya Gopinath Bordoloi International Airport, Guwahati, India','country_id' => '101'),\narray('id' => '7270','name' => '(GAY) - Gaya Airport, , India','country_id' => '101'),\narray('id' => '7271','name' => '(IMF) - Imphal Airport, Imphal, India','country_id' => '101'),\narray('id' => '7272','name' => '(PYB) - Jeypore Airport, Jeypore, India','country_id' => '101'),\narray('id' => '7273','name' => '(IXW) - Jamshedpur Airport, , India','country_id' => '101'),\narray('id' => '7274','name' => '(JRH) - Jorhat Airport, Jorhat, India','country_id' => '101'),\narray('id' => '7275','name' => '(IXQ) - Kamalpur Airport, , India','country_id' => '101'),\narray('id' => '7276','name' => '(IXH) - Kailashahar Airport, , India','country_id' => '101'),\narray('id' => '7277','name' => '(IXS) - Silchar Airport, Silchar, India','country_id' => '101'),\narray('id' => '7278','name' => '(IXN) - Khowai Airport, Khowai, India','country_id' => '101'),\narray('id' => '7279','name' => '(AJL) - Lengpui Airport, Aizawl, India','country_id' => '101'),\narray('id' => '7280','name' => '(IXI) - North Lakhimpur Airport, Lilabari, India','country_id' => '101'),\narray('id' => '7281','name' => '(LDA) - Malda Airport, Malda, India','country_id' => '101'),\narray('id' => '7282','name' => '(DIB) - Dibrugarh Airport, Dibrugarh, India','country_id' => '101'),\narray('id' => '7283','name' => '(DMU) - Dimapur Airport, Dimapur, India','country_id' => '101'),\narray('id' => '7284','name' => '(MZU) - Muzaffarpur Airport, , India','country_id' => '101'),\narray('id' => '7285','name' => '(IXT) - Pasighat Airport, Pasighat, India','country_id' => '101'),\narray('id' => '7286','name' => '(PAT) - Lok Nayak Jayaprakash Airport, Patna, India','country_id' => '101'),\narray('id' => '7287','name' => '(IXR) - Birsa Munda Airport, Ranchi, India','country_id' => '101'),\narray('id' => '7288','name' => '(RRK) - Rourkela Airport, , India','country_id' => '101'),\narray('id' => '7289','name' => '(RUP) - Rupsi India Airport, , India','country_id' => '101'),\narray('id' => '7290','name' => '(TEZ) - Tezpur Airport, , India','country_id' => '101'),\narray('id' => '7291','name' => '(VTZ) - Vishakhapatnam Airport, Visakhapatnam, India','country_id' => '101'),\narray('id' => '7292','name' => '(ZER) - Zero Airport, , India','country_id' => '101'),\narray('id' => '7293','name' => '(BZL) - Barisal Airport, Barisal, Bangladesh','country_id' => '17'),\narray('id' => '7294','name' => '(CXB) - Cox\\'s Bazar Airport, Cox\\'s Bazar, Bangladesh','country_id' => '17'),\narray('id' => '7295','name' => '(CLA) - Comilla Airport, Comilla, Bangladesh','country_id' => '17'),\narray('id' => '7296','name' => '(CGP) - Shah Amanat International Airport, Chittagong, Bangladesh','country_id' => '17'),\narray('id' => '7297','name' => '(IRD) - Ishurdi Airport, Ishurdi, Bangladesh','country_id' => '17'),\narray('id' => '7298','name' => '(JSR) - Jessore Airport, Jashahor, Bangladesh','country_id' => '17'),\narray('id' => '7299','name' => '(LLJ) - Lalmonirhat Airport, Lalmonirhat, Bangladesh','country_id' => '17'),\narray('id' => '7300','name' => '(RJH) - Shah Mokhdum Airport, Rajshahi, Bangladesh','country_id' => '17'),\narray('id' => '7301','name' => '(SPD) - Saidpur Airport, Saidpur, Bangladesh','country_id' => '17'),\narray('id' => '7302','name' => '(TKR) - Thakurgaon Airport, Thakurgaon, Bangladesh','country_id' => '17'),\narray('id' => '7303','name' => '(ZHM) - Shamshernagar Airport, Shamshernagar, Bangladesh','country_id' => '17'),\narray('id' => '7304','name' => '(ZYL) - Osmany International Airport, Sylhet, Bangladesh','country_id' => '17'),\narray('id' => '7305','name' => '(DAC) - Dhaka / Hazrat Shahjalal International Airport, Dhaka, Bangladesh','country_id' => '17'),\narray('id' => '7306','name' => '(HKG) - Chek Lap Kok International Airport, Hong Kong, Hong Kong','country_id' => '92'),\narray('id' => '7307','name' => '(AGR) - Agra Airport, , India','country_id' => '101'),\narray('id' => '7308','name' => '(IXD) - Allahabad Airport, Allahabad, India','country_id' => '101'),\narray('id' => '7309','name' => '(ATQ) - Sri Guru Ram Dass Jee International Airport, Amritsar, India','country_id' => '101'),\narray('id' => '7310','name' => '(BKB) - Nal Airport, Bikaner, India','country_id' => '101'),\narray('id' => '7311','name' => '(VNS) - Lal Bahadur Shastri Airport, Varanasi, India','country_id' => '101'),\narray('id' => '7312','name' => '(KUU) - Kullu Manali Airport, , India','country_id' => '101'),\narray('id' => '7313','name' => '(BUP) - Bhatinda Air Force Station, , India','country_id' => '101'),\narray('id' => '7314','name' => '(BEK) - Bareilly Air Force Station, Bareilly, India','country_id' => '101'),\narray('id' => '7315','name' => '(IXC) - Chandigarh Airport, Chandigarh, India','country_id' => '101'),\narray('id' => '7316','name' => '(DED) - Dehradun Airport, Dehradun, India','country_id' => '101'),\narray('id' => '7317','name' => '(DEL) - Indira Gandhi International Airport, New Delhi, India','country_id' => '101'),\narray('id' => '7318','name' => '(DHM) - Kangra Airport, , India','country_id' => '101'),\narray('id' => '7319','name' => '(GWL) - Gwalior Airport, Gwalior, India','country_id' => '101'),\narray('id' => '7320','name' => '(HSS) - Hissar Airport, , India','country_id' => '101'),\narray('id' => '7321','name' => '(JDH) - Jodhpur Airport, Jodhpur, India','country_id' => '101'),\narray('id' => '7322','name' => '(JAI) - Jaipur International Airport, Jaipur, India','country_id' => '101'),\narray('id' => '7323','name' => '(JSA) - Jaisalmer Airport, , India','country_id' => '101'),\narray('id' => '7324','name' => '(IXJ) - Jammu Airport, Jammu, India','country_id' => '101'),\narray('id' => '7325','name' => '(KNU) - Kanpur Airport, , India','country_id' => '101'),\narray('id' => '7326','name' => '(KTU) - Kota Airport, Kota, India','country_id' => '101'),\narray('id' => '7327','name' => '(LUH) - Ludhiana Airport, , India','country_id' => '101'),\narray('id' => '7328','name' => '(IXL) - Leh Kushok Bakula Rimpochee Airport, Leh, India','country_id' => '101'),\narray('id' => '7329','name' => '(LKO) - Chaudhary Charan Singh International Airport, Lucknow, India','country_id' => '101'),\narray('id' => '7330','name' => '(IXP) - Pathankot Air Force Station, , India','country_id' => '101'),\narray('id' => '7331','name' => '(PGH) - Pantnagar Airport, Pantnagar, India','country_id' => '101'),\narray('id' => '7332','name' => '(SLV) - Shimla Airport, , India','country_id' => '101'),\narray('id' => '7333','name' => '(SXR) - Sheikh ul Alam Airport, Srinagar, India','country_id' => '101'),\narray('id' => '7334','name' => '(TNI) - Satna Airport, , India','country_id' => '101'),\narray('id' => '7335','name' => '(VIV) - Vivigani Airfield, Vivigani, Papua New Guinea','country_id' => '172'),\narray('id' => '7336','name' => '(VJQ) - Gurue Airport, Gurue, Mozambique','country_id' => '155'),\narray('id' => '7337','name' => '(AOU) - Attopeu Airport, Attopeu, Laos','country_id' => '122'),\narray('id' => '7338','name' => '(HOE) - Ban Huoeisay Airport, Huay Xai, Laos','country_id' => '122'),\narray('id' => '7339','name' => '(LPQ) - Luang Phabang International Airport, Luang Phabang, Laos','country_id' => '122'),\narray('id' => '7340','name' => '(LXG) - Luang Namtha Airport, Luang Namtha, Laos','country_id' => '122'),\narray('id' => '7341','name' => '(ODY) - Oudomsay Airport, Oudomsay, Laos','country_id' => '122'),\narray('id' => '7342','name' => '(PKZ) - Pakse International Airport, Pakse, Laos','country_id' => '122'),\narray('id' => '7343','name' => '(ZBY) - Sayaboury Airport, Sainyabuli, Laos','country_id' => '122'),\narray('id' => '7344','name' => '(ZVK) - Savannakhet Airport, , Laos','country_id' => '122'),\narray('id' => '7345','name' => '(NEU) - Sam Neua Airport, , Laos','country_id' => '122'),\narray('id' => '7346','name' => '(VNA) - Saravane Airport, Saravane, Laos','country_id' => '122'),\narray('id' => '7347','name' => '(THK) - Thakhek Airport, Thakhek, Laos','country_id' => '122'),\narray('id' => '7348','name' => '(VTE) - Wattay International Airport, Vientiane, Laos','country_id' => '122'),\narray('id' => '7349','name' => '(XKH) - Xieng Khouang Airport, Xieng Khouang, Laos','country_id' => '122'),\narray('id' => '7350','name' => '(XIE) - Xienglom Airport, Xienglom, Laos','country_id' => '122'),\narray('id' => '7351','name' => '(VMI) - Dr Juan Plate Airport, Puerto Vallemi, Paraguay','country_id' => '182'),\narray('id' => '7352','name' => '(MFM) - Macau International Airport, Taipa, Macau','country_id' => '144'),\narray('id' => '7353','name' => '(VDH) - Dong Hoi Airport, Dong Hoi, Vietnam','country_id' => '236'),\narray('id' => '7354','name' => '(KON) - Kontum Airport, Kontum, Vietnam','country_id' => '236'),\narray('id' => '7355','name' => '(BJH) - Bajhang Airport, Bajhang, Nepal','country_id' => '164'),\narray('id' => '7356','name' => '(BHP) - Bhojpur Airport, Bhojpur, Nepal','country_id' => '164'),\narray('id' => '7357','name' => '(BGL) - Baglung Airport, Baglung, Nepal','country_id' => '164'),\narray('id' => '7358','name' => '(BHR) - Bharatpur Airport, Bharatpur, Nepal','country_id' => '164'),\narray('id' => '7359','name' => '(BJU) - Bajura Airport, Bajura, Nepal','country_id' => '164'),\narray('id' => '7360','name' => '(BIT) - Baitadi Airport, Baitadi, Nepal','country_id' => '164'),\narray('id' => '7361','name' => '(BWA) - Gautam Buddha Airport, Bhairawa, Nepal','country_id' => '164'),\narray('id' => '7362','name' => '(BDP) - Bhadrapur Airport, Bhadrapur, Nepal','country_id' => '164'),\narray('id' => '7363','name' => '(DNP) - Tulsipur Airport, Dang, Nepal','country_id' => '164'),\narray('id' => '7364','name' => '(DHI) - Dhangarhi Airport, Dhangarhi, Nepal','country_id' => '164'),\narray('id' => '7365','name' => '(DAP) - Darchula Airport, Darchula, Nepal','country_id' => '164'),\narray('id' => '7366','name' => '(DOP) - Dolpa Airport, Dolpa, Nepal','country_id' => '164'),\narray('id' => '7367','name' => '(SIH) - Silgadi Doti Airport, Silgadi Doti, Nepal','country_id' => '164'),\narray('id' => '7368','name' => '(GKH) - Palungtar Airport, Gorkha, Nepal','country_id' => '164'),\narray('id' => '7369','name' => '(JIR) - Jiri Airport, Jiri, Nepal','country_id' => '164'),\narray('id' => '7370','name' => '(JUM) - Jumla Airport, Jumla, Nepal','country_id' => '164'),\narray('id' => '7371','name' => '(JKR) - Janakpur Airport, Janakpur, Nepal','country_id' => '164'),\narray('id' => '7372','name' => '(JMO) - Jomsom Airport, Jomsom, Nepal','country_id' => '164'),\narray('id' => '7373','name' => '(KTM) - Tribhuvan International Airport, Kathmandu, Nepal','country_id' => '164'),\narray('id' => '7374','name' => '(LDN) - Lamidanda Airport, Lamidanda, Nepal','country_id' => '164'),\narray('id' => '7375','name' => '(LUA) - Lukla Airport, Lukla, Nepal','country_id' => '164'),\narray('id' => '7376','name' => '(LTG) - Langtang Airport, Langtang, Nepal','country_id' => '164'),\narray('id' => '7377','name' => '(NGX) - Manang Airport, Ngawal, Nepal','country_id' => '164'),\narray('id' => '7378','name' => '(MEY) - Meghauli Airport, Meghauli, Nepal','country_id' => '164'),\narray('id' => '7379','name' => '(XMG) - Mahendranagar Airport, Mahendranagar, Nepal','country_id' => '164'),\narray('id' => '7380','name' => '(KEP) - Nepalgunj Airport, Nepalgunj, Nepal','country_id' => '164'),\narray('id' => '7381','name' => '(PKR) - Pokhara Airport, Pokhara, Nepal','country_id' => '164'),\narray('id' => '7382','name' => '(PPL) - Phaplu Airport, Phaplu, Nepal','country_id' => '164'),\narray('id' => '7383','name' => '(RJB) - Rajbiraj Airport, Rajbiraj, Nepal','country_id' => '164'),\narray('id' => '7384','name' => '(RHP) - Ramechhap Airport, Ramechhap, Nepal','country_id' => '164'),\narray('id' => '7385','name' => '(RUK) - Rukumkot Airport, Rukumkot, Nepal','country_id' => '164'),\narray('id' => '7386','name' => '(RPA) - Rolpa Airport, Rolpa, Nepal','country_id' => '164'),\narray('id' => '7387','name' => '(RUM) - Rumjatar Airport, Rumjatar, Nepal','country_id' => '164'),\narray('id' => '7388','name' => '(SYH) - Syangboche Airport, Namche Bazaar, Nepal','country_id' => '164'),\narray('id' => '7389','name' => '(SIF) - Simara Airport, Simara, Nepal','country_id' => '164'),\narray('id' => '7390','name' => '(SKH) - Surkhet Airport, Surkhet, Nepal','country_id' => '164'),\narray('id' => '7391','name' => '(FEB) - Sanfebagar Airport, Sanfebagar, Nepal','country_id' => '164'),\narray('id' => '7392','name' => '(IMK) - Simikot Airport, Simikot, Nepal','country_id' => '164'),\narray('id' => '7393','name' => '(TPJ) - Taplejung Airport, Taplejung, Nepal','country_id' => '164'),\narray('id' => '7394','name' => '(TPU) - Tikapur Airport, Tikapur, Nepal','country_id' => '164'),\narray('id' => '7395','name' => '(TMI) - Tumling Tar Airport, Tumling Tar, Nepal','country_id' => '164'),\narray('id' => '7396','name' => '(BIR) - Biratnagar Airport, Biratnagar, Nepal','country_id' => '164'),\narray('id' => '7397','name' => '(LTU) - Murod Kond Airport, Latur, India','country_id' => '101'),\narray('id' => '7398','name' => '(AGX) - Agatti Airport, , India','country_id' => '101'),\narray('id' => '7399','name' => '(BEP) - Bellary Airport, Bellary, India','country_id' => '101'),\narray('id' => '7400','name' => '(BLR) - Kempegowda International Airport, Bangalore, India','country_id' => '101'),\narray('id' => '7401','name' => '(VGA) - Vijayawada Airport, , India','country_id' => '101'),\narray('id' => '7402','name' => '(CJB) - Coimbatore International Airport, Coimbatore, India','country_id' => '101'),\narray('id' => '7403','name' => '(COK) - Cochin International Airport, Cochin, India','country_id' => '101'),\narray('id' => '7404','name' => '(CCJ) - Calicut International Airport, Calicut, India','country_id' => '101'),\narray('id' => '7405','name' => '(CDP) - Cuddapah Airport, , India','country_id' => '101'),\narray('id' => '7406','name' => '(CBD) - Car Nicobar Air Force Station, , India','country_id' => '101'),\narray('id' => '7407','name' => '(HYD) - Rajiv Gandhi International Airport, Hyderabad, India','country_id' => '101'),\narray('id' => '7408','name' => '(BPM) - Begumpet Airport, Hyderabad, India','country_id' => '101'),\narray('id' => '7409','name' => '(IXM) - Madurai Airport, Madurai, India','country_id' => '101'),\narray('id' => '7410','name' => '(IXE) - Mangalore International Airport, Mangalore, India','country_id' => '101'),\narray('id' => '7411','name' => '(MAA) - Chennai International Airport, Chennai, India','country_id' => '101'),\narray('id' => '7412','name' => '(MYQ) - Mysore Airport, Mysore, India','country_id' => '101'),\narray('id' => '7413','name' => '(IXZ) - Vir Savarkar International Airport, Port Blair, India','country_id' => '101'),\narray('id' => '7414','name' => '(PNY) - Pondicherry Airport, , India','country_id' => '101'),\narray('id' => '7415','name' => '(PUT) - Sri Sathya Sai Airport, Puttaparthi, India','country_id' => '101'),\narray('id' => '7416','name' => '(RMD) - Basanth Nagar Airport, Ramagundam, India','country_id' => '101'),\narray('id' => '7417','name' => '(RJA) - Rajahmundry Airport, Rajahmundry, India','country_id' => '101'),\narray('id' => '7418','name' => '(SXV) - Salem Airport, Salem, India','country_id' => '101'),\narray('id' => '7419','name' => '(TJV) - Tanjore Air Force Base, Thanjavur, India','country_id' => '101'),\narray('id' => '7420','name' => '(TIR) - Tirupati Airport, Tirupati, India','country_id' => '101'),\narray('id' => '7421','name' => '(TRZ) - Tiruchirapally Civil Airport Airport, Tiruchirappally, India','country_id' => '101'),\narray('id' => '7422','name' => '(TRV) - Trivandrum International Airport, Thiruvananthapuram, India','country_id' => '101'),\narray('id' => '7423','name' => '(WGC) - Warangal Airport, Warrangal, India','country_id' => '101'),\narray('id' => '7424','name' => '(YON) - Yongphulla Airport, Tashigang, Bhutan','country_id' => '31'),\narray('id' => '7425','name' => '(BUT) - Bathpalathang Airport, Jakar, Bhutan','country_id' => '31'),\narray('id' => '7426','name' => '(GLU) - Gelephu Airport, Gelephu, Bhutan','country_id' => '31'),\narray('id' => '7427','name' => '(PBH) - Paro Airport, Paro, Bhutan','country_id' => '31'),\narray('id' => '7428','name' => '(IFU) - Ifuru Airport, Ifuru Island, Maldives','country_id' => '151'),\narray('id' => '7429','name' => '(DRV) - Dharavandhoo Airport, Baa Atoll, Maldives','country_id' => '151'),\narray('id' => '7430','name' => '(FVM) - Fuvahmulah Airport, Fuvahmulah Island, Maldives','country_id' => '151'),\narray('id' => '7431','name' => '(GAN) - Gan International Airport, Gan, Maldives','country_id' => '151'),\narray('id' => '7432','name' => '(HAQ) - Hanimaadhoo Airport, Haa Dhaalu Atoll, Maldives','country_id' => '151'),\narray('id' => '7433','name' => '(KDO) - Kadhdhoo Airport, Kadhdhoo, Maldives','country_id' => '151'),\narray('id' => '7434','name' => '(MLE) - MalA International Airport, MalA, Maldives','country_id' => '151'),\narray('id' => '7435','name' => '(GKK) - Kooddoo Airport, Huvadhu Atoll, Maldives','country_id' => '151'),\narray('id' => '7436','name' => '(KDM) - Kaadedhdhoo Airport, Huvadhu Atoll, Maldives','country_id' => '151'),\narray('id' => '7437','name' => '(VAM) - Villa Airport, Maamigili, Maldives','country_id' => '151'),\narray('id' => '7438','name' => '(TMF) - Thimarafushi Airport, Thimarafushi, Maldives','country_id' => '151'),\narray('id' => '7439','name' => '(DMK) - Don Mueang International Airport, Bangkok, Thailand','country_id' => '213'),\narray('id' => '7440','name' => '(KKM) - Sa Pran Nak Airport, , Thailand','country_id' => '213'),\narray('id' => '7441','name' => '(KDT) - Kamphaeng Saen Airport, Nakhon Pathom, Thailand','country_id' => '213'),\narray('id' => '7442','name' => '(TDX) - Trat Airport, , Thailand','country_id' => '213'),\narray('id' => '7443','name' => '(BKK) - Suvarnabhumi Airport, Bangkok, Thailand','country_id' => '213'),\narray('id' => '7444','name' => '(UTP) - U-Tapao International Airport, Rayong, Thailand','country_id' => '213'),\narray('id' => '7445','name' => '(CNX) - Chiang Mai International Airport, Chiang Mai, Thailand','country_id' => '213'),\narray('id' => '7446','name' => '(HGN) - Mae Hong Son Airport, , Thailand','country_id' => '213'),\narray('id' => '7447','name' => '(PYY) - Mae Hong Son Airport, Mae Hong Son, Thailand','country_id' => '213'),\narray('id' => '7448','name' => '(LPT) - Lampang Airport, , Thailand','country_id' => '213'),\narray('id' => '7449','name' => '(NNT) - Nan Airport, , Thailand','country_id' => '213'),\narray('id' => '7450','name' => '(PRH) - Phrae Airport, , Thailand','country_id' => '213'),\narray('id' => '7451','name' => '(CEI) - Chiang Rai International Airport, Chiang Rai, Thailand','country_id' => '213'),\narray('id' => '7452','name' => '(BAO) - Udorn Air Base, Ban Mak Khaen, Thailand','country_id' => '213'),\narray('id' => '7453','name' => '(PHY) - Phetchabun Airport, , Thailand','country_id' => '213'),\narray('id' => '7454','name' => '(HHQ) - Hua Hin Airport, Hua Hin, Thailand','country_id' => '213'),\narray('id' => '7455','name' => '(TKH) - Takhli Airport, , Thailand','country_id' => '213'),\narray('id' => '7456','name' => '(MAQ) - Mae Sot Airport, , Thailand','country_id' => '213'),\narray('id' => '7457','name' => '(THS) - Sukhothai Airport, , Thailand','country_id' => '213'),\narray('id' => '7458','name' => '(PHS) - Phitsanulok Airport, , Thailand','country_id' => '213'),\narray('id' => '7459','name' => '(TKT) - Tak Airport, , Thailand','country_id' => '213'),\narray('id' => '7460','name' => '(UTR) - Uttaradit Airport, Uttaradit, Thailand','country_id' => '213'),\narray('id' => '7461','name' => '(URT) - Surat Thani Airport, Surat Thani, Thailand','country_id' => '213'),\narray('id' => '7462','name' => '(NAW) - Narathiwat Airport, , Thailand','country_id' => '213'),\narray('id' => '7463','name' => '(CJM) - Chumphon Airport, , Thailand','country_id' => '213'),\narray('id' => '7464','name' => '(NST) - Nakhon Si Thammarat Airport, Nakhon Si Thammarat, Thailand','country_id' => '213'),\narray('id' => '7465','name' => '(KBV) - Krabi Airport, Krabi, Thailand','country_id' => '213'),\narray('id' => '7466','name' => '(SGZ) - Songkhla Airport, , Thailand','country_id' => '213'),\narray('id' => '7467','name' => '(PAN) - Pattani Airport, , Thailand','country_id' => '213'),\narray('id' => '7468','name' => '(USM) - Samui Airport, Na Thon (Ko Samui Island), Thailand','country_id' => '213'),\narray('id' => '7469','name' => '(HKT) - Phuket International Airport, Phuket, Thailand','country_id' => '213'),\narray('id' => '7470','name' => '(UNN) - Ranong Airport, , Thailand','country_id' => '213'),\narray('id' => '7471','name' => '(HDY) - Hat Yai International Airport, Hat Yai, Thailand','country_id' => '213'),\narray('id' => '7472','name' => '(TST) - Trang Airport, , Thailand','country_id' => '213'),\narray('id' => '7473','name' => '(UTH) - Udon Thani Airport, Udon Thani, Thailand','country_id' => '213'),\narray('id' => '7474','name' => '(SNO) - Sakon Nakhon Airport, , Thailand','country_id' => '213'),\narray('id' => '7475','name' => '(PXR) - Surin Airport, Surin, Thailand','country_id' => '213'),\narray('id' => '7476','name' => '(KKC) - Khon Kaen Airport, Khon Kaen, Thailand','country_id' => '213'),\narray('id' => '7477','name' => '(LOE) - Loei Airport, , Thailand','country_id' => '213'),\narray('id' => '7478','name' => '(BFV) - Buri Ram Airport, , Thailand','country_id' => '213'),\narray('id' => '7479','name' => '(NAK) - Nakhon Ratchasima Airport, , Thailand','country_id' => '213'),\narray('id' => '7480','name' => '(UBP) - Ubon Ratchathani Airport, Ubon Ratchathani, Thailand','country_id' => '213'),\narray('id' => '7481','name' => '(ROI) - Roi Et Airport, , Thailand','country_id' => '213'),\narray('id' => '7482','name' => '(KOP) - Nakhon Phanom Airport, , Thailand','country_id' => '213'),\narray('id' => '7483','name' => '(VUU) - Mvuu Camp Airport, Liwonde National Park, Malawi','country_id' => '152'),\narray('id' => '7484','name' => '(BMV) - Buon Ma Thuot Airport, Buon Ma Thuot, Vietnam','country_id' => '236'),\narray('id' => '7485','name' => '(VCL) - Chu Lai International Airport, Dung Quat Bay, Vietnam','country_id' => '236'),\narray('id' => '7486','name' => '(HPH) - Cat Bi International Airport, Haiphong, Vietnam','country_id' => '236'),\narray('id' => '7487','name' => '(CAH) - CA Mau Airport, Ca Mau City, Vietnam','country_id' => '236'),\narray('id' => '7488','name' => '(CXR) - Cam Ranh Airport, Nha Trang, Vietnam','country_id' => '236'),\narray('id' => '7489','name' => '(VCS) - Co Ong Airport, Con Ong, Vietnam','country_id' => '236'),\narray('id' => '7490','name' => '(VCA) - Can Tho International Airport, Can Tho, Vietnam','country_id' => '236'),\narray('id' => '7491','name' => '(DIN) - Dien Bien Phu Airport, Dien Bien Phu, Vietnam','country_id' => '236'),\narray('id' => '7492','name' => '(DLI) - Lien Khuong Airport, Dalat, Vietnam','country_id' => '236'),\narray('id' => '7493','name' => '(DAD) - Da Nang International Airport, Da Nang, Vietnam','country_id' => '236'),\narray('id' => '7494','name' => '(VVN) - Las Malvinas/Echarate Airport, Las Malvinas, Peru','country_id' => '170'),\narray('id' => '7495','name' => '(HAN) - Noi Bai International Airport, Hanoi, Vietnam','country_id' => '236'),\narray('id' => '7496','name' => '(SQH) - Na-San Airport, Son-La, Vietnam','country_id' => '236'),\narray('id' => '7497','name' => '(NHA) - Nha Trang Air Base, Nha Trang, Vietnam','country_id' => '236'),\narray('id' => '7498','name' => '(HUI) - Phu Bai Airport, Hue, Vietnam','country_id' => '236'),\narray('id' => '7499','name' => '(UIH) - Phu Cat Airport, Quy Nohn, Vietnam','country_id' => '236'),\narray('id' => '7500','name' => '(PXU) - Pleiku Airport, Pleiku, Vietnam','country_id' => '236'),\narray('id' => '7501','name' => '(PQC) - Phu Quoc International Airport, Phu Quoc Island, Vietnam','country_id' => '236'),\narray('id' => '7502','name' => '(PHA) - Phan Rang Airport, Phan Rang, Vietnam','country_id' => '236'),\narray('id' => '7503','name' => '(PHH) - Phan Thiet Airport, Phan Thiet, Vietnam','country_id' => '236'),\narray('id' => '7504','name' => '(VKG) - Rach Gia Airport, Rach Gia, Vietnam','country_id' => '236'),\narray('id' => '7505','name' => '(TBB) - Dong Tac Airport, Tuy Hoa, Vietnam','country_id' => '236'),\narray('id' => '7506','name' => '(SGN) - Tan Son Nhat International Airport, Ho Chi Minh City, Vietnam','country_id' => '236'),\narray('id' => '7507','name' => '(VII) - Vinh Airport, Vinh, Vietnam','country_id' => '236'),\narray('id' => '7508','name' => '(VTG) - Vung Tau Airport, Vung Tau, Vietnam','country_id' => '236'),\narray('id' => '7509','name' => '(NYU) - Bagan Airport, Nyaung U, Burma','country_id' => '142'),\narray('id' => '7510','name' => '(BMO) - Banmaw Airport, Banmaw, Burma','country_id' => '142'),\narray('id' => '7511','name' => '(VBP) - Bokpyinn Airport, Bokpyinn, Burma','country_id' => '142'),\narray('id' => '7512','name' => '(TVY) - Dawei Airport, Dawei, Burma','country_id' => '142'),\narray('id' => '7513','name' => '(NYT) - Naypyidaw Airport, Pyinmana, Burma','country_id' => '142'),\narray('id' => '7514','name' => '(GAW) - Gangaw Airport, Gangaw, Burma','country_id' => '142'),\narray('id' => '7515','name' => '(GWA) - Gwa Airport, Gwa, Burma','country_id' => '142'),\narray('id' => '7516','name' => '(HEH) - Heho Airport, Heho, Burma','country_id' => '142'),\narray('id' => '7517','name' => '(HOX) - Hommalinn Airport, Hommalinn, Burma','country_id' => '142'),\narray('id' => '7518','name' => '(TIO) - Tilin Airport, Tilin, Burma','country_id' => '142'),\narray('id' => '7519','name' => '(KET) - Kengtung Airport, Kengtung, Burma','country_id' => '142'),\narray('id' => '7520','name' => '(KHM) - Kanti Airport, Kanti, Burma','country_id' => '142'),\narray('id' => '7521','name' => '(KMV) - Kalay Airport, Kalemyo, Burma','country_id' => '142'),\narray('id' => '7522','name' => '(KYP) - Kyaukpyu Airport, Kyaukpyu, Burma','country_id' => '142'),\narray('id' => '7523','name' => '(KAW) - Kawthoung Airport, Kawthoung, Burma','country_id' => '142'),\narray('id' => '7524','name' => '(KYT) - Kyauktu Airport, Kyauktu, Burma','country_id' => '142'),\narray('id' => '7525','name' => '(LIW) - Loikaw Airport, Loikaw, Burma','country_id' => '142'),\narray('id' => '7526','name' => '(LSH) - Lashio Airport, Lashio, Burma','country_id' => '142'),\narray('id' => '7527','name' => '(MDL) - Mandalay International Airport, Mandalay, Burma','country_id' => '142'),\narray('id' => '7528','name' => '(MGZ) - Myeik Airport, Mkeik, Burma','country_id' => '142'),\narray('id' => '7529','name' => '(MYT) - Myitkyina Airport, Myitkyina, Burma','country_id' => '142'),\narray('id' => '7530','name' => '(MNU) - Mawlamyine Airport, Mawlamyine, Burma','country_id' => '142'),\narray('id' => '7531','name' => '(MGU) - Manaung Airport, Manaung, Burma','country_id' => '142'),\narray('id' => '7532','name' => '(MOE) - Momeik Airport, , Burma','country_id' => '142'),\narray('id' => '7533','name' => '(MOG) - Mong Hsat Airport, Mong Hsat, Burma','country_id' => '142'),\narray('id' => '7534','name' => '(MGK) - Mong Tong Airport, Mong Tong, Burma','country_id' => '142'),\narray('id' => '7535','name' => '(MWQ) - Magway Airport, Magway, Burma','country_id' => '142'),\narray('id' => '7536','name' => '(NMS) - Namsang Airport, Namsang, Burma','country_id' => '142'),\narray('id' => '7537','name' => '(NMT) - Namtu Airport, Namtu, Burma','country_id' => '142'),\narray('id' => '7538','name' => '(PAA) - Hpa-N Airport, Hpa-N, Burma','country_id' => '142'),\narray('id' => '7539','name' => '(PAU) - Pauk Airport, Pauk, Burma','country_id' => '142'),\narray('id' => '7540','name' => '(BSX) - Pathein Airport, Pathein, Burma','country_id' => '142'),\narray('id' => '7541','name' => '(PPU) - Hpapun Airport, Pa Pun, Burma','country_id' => '142'),\narray('id' => '7542','name' => '(PBU) - Putao Airport, Putao, Burma','country_id' => '142'),\narray('id' => '7543','name' => '(PKK) - Pakhokku Airport, Pakhokku, Burma','country_id' => '142'),\narray('id' => '7544','name' => '(PRU) - Pyay Airport, Pye, Burma','country_id' => '142'),\narray('id' => '7545','name' => '(AKY) - Sittwe Airport, Sittwe, Burma','country_id' => '142'),\narray('id' => '7546','name' => '(SNW) - Thandwe Airport, Thandwe, Burma','country_id' => '142'),\narray('id' => '7547','name' => '(THL) - Tachileik Airport, Tachileik, Burma','country_id' => '142'),\narray('id' => '7548','name' => '(XYE) - Ye Airport, Ye, Burma','country_id' => '142'),\narray('id' => '7549','name' => '(RGN) - Yangon International Airport, Yangon, Burma','country_id' => '142'),\narray('id' => '7550','name' => '(RCE) - Roche Harbor Airport, Roche Harbor, United States','country_id' => '228'),\narray('id' => '7551','name' => '(TQQ) - Maranggo Airport, Waha-Tomea Island, Indonesia','country_id' => '97'),\narray('id' => '7552','name' => '(UPG) - Hasanuddin International Airport, Ujung Pandang-Celebes Island, Indonesia','country_id' => '97'),\narray('id' => '7553','name' => '(MJU) - Tampa Padang Airport, Mamuju-Celebes Island, Indonesia','country_id' => '97'),\narray('id' => '7554','name' => '(BIK) - Frans Kaisiepo Airport, Biak-Supiori Island, Indonesia','country_id' => '97'),\narray('id' => '7555','name' => '(ONI) - Moanamani Airport, Moanamani-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7556','name' => '(WET) - Wagethe Airport, Wagethe-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7557','name' => '(NBX) - Nabire Airport, Nabire-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7558','name' => '(ILA) - Illaga Airport, Illaga-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7559','name' => '(KOX) - Kokonau Airport, Kokonau-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7560','name' => '(ZRI) - Serui Airport, Serui-Japen Island, Indonesia','country_id' => '97'),\narray('id' => '7561','name' => '(TIM) - Moses Kilangin Airport, Timika-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7562','name' => '(EWI) - Enarotali Airport, Enarotali-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7563','name' => '(WAD) - Andriamena Airport, Andriamena, Madagascar','country_id' => '138'),\narray('id' => '7564','name' => '(AMI) - Selaparang Airport, Mataram-Lombok Island, Indonesia','country_id' => '97'),\narray('id' => '7565','name' => '(BMU) - Muhammad Salahuddin Airport, Bima-Sumbawa Island, Indonesia','country_id' => '97'),\narray('id' => '7566','name' => '(DPS) - Ngurah Rai (Bali) International Airport, Denpasar-Bali Island, Indonesia','country_id' => '97'),\narray('id' => '7567','name' => '(LOP) - Lombok International Airport, Mataram, Indonesia','country_id' => '97'),\narray('id' => '7568','name' => '(SWQ) - Sumbawa Besar Airport, Sumbawa Island, Indonesia','country_id' => '97'),\narray('id' => '7569','name' => '(TMC) - Tambolaka Airport, Waikabubak-Sumba Island, Indonesia','country_id' => '97'),\narray('id' => '7570','name' => '(WGP) - Waingapu Airport, Waingapu-Sumba Island, Indonesia','country_id' => '97'),\narray('id' => '7571','name' => '(ARJ) - Arso Airport, Arso-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7572','name' => '(BUI) - Bokondini Airport, Bokondini, Indonesia','country_id' => '97'),\narray('id' => '7573','name' => '(ZRM) - Sarmi Airport, Sarmi-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7574','name' => '(DJJ) - Sentani Airport, Jayapura-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7575','name' => '(LHI) - Lereh Airport, Lereh-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7576','name' => '(LII) - Mulia Airport, Mulia-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7577','name' => '(OKL) - Oksibil Airport, Oksibil-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7578','name' => '(WAR) - Waris Airport, Swach, Indonesia','country_id' => '97'),\narray('id' => '7579','name' => '(SEH) - Senggeh Airport, Senggeh, Indonesia','country_id' => '97'),\narray('id' => '7580','name' => '(UBR) - Ubrub Airport, Ubrub-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7581','name' => '(WMX) - Wamena Airport, Wamena-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7582','name' => '(MDP) - Mindiptana Airport, Mindiptana-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7583','name' => '(BXD) - Bade Airport, Bade-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7584','name' => '(MKQ) - Mopah Airport, Merauke-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7585','name' => '(OKQ) - Okaba Airport, Okaba-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7586','name' => '(KEI) - Kepi Airport, Kepi-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7587','name' => '(TMH) - Tanah Merah Airport, Tanah Merah-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7588','name' => '(TJS) - Tanjung Harapan Airport, Tanjung Selor-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '7589','name' => '(DTD) - Datadawai Airport, Datadawai-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '7590','name' => '(BEJ) - Barau(Kalimaru) Airport, Tanjung Redep-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '7591','name' => '(BPN) - Sultan Aji Muhamad Sulaiman Airport, Kotamadya Balikpapan, Indonesia','country_id' => '97'),\narray('id' => '7592','name' => '(TRK) - Juwata Airport, Tarakan Island, Indonesia','country_id' => '97'),\narray('id' => '7593','name' => '(SRI) - Temindung Airport, Samarinda, Indonesia','country_id' => '97'),\narray('id' => '7594','name' => '(TSX) - Tanjung Santan Airport, Santan-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '7595','name' => '(BYQ) - Bunyu Airport, Bunju Island, Indonesia','country_id' => '97'),\narray('id' => '7596','name' => '(GLX) - Gamarmalamo Airport, Galela-Celebes Island, Indonesia','country_id' => '97'),\narray('id' => '7597','name' => '(GTO) - Jalaluddin Airport, Gorontalo-Celebes Island, Indonesia','country_id' => '97'),\narray('id' => '7598','name' => '(NAH) - Naha Airport, Tahuna-Sangihe Island, Indonesia','country_id' => '97'),\narray('id' => '7599','name' => '(TLI) - Sultan Bantilan Airport, Toli Toli-Celebes Island, Indonesia','country_id' => '97'),\narray('id' => '7600','name' => '(GEB) - Gebe Airport, Gebe Island, Indonesia','country_id' => '97'),\narray('id' => '7601','name' => '(KAZ) - Kao Airport, Kao-Celebes Island, Indonesia','country_id' => '97'),\narray('id' => '7602','name' => '(PLW) - Mutiara Airport, Palu-Celebes Island, Indonesia','country_id' => '97'),\narray('id' => '7603','name' => '(MDC) - Sam Ratulangi Airport, Manado-Celebes Island, Indonesia','country_id' => '97'),\narray('id' => '7604','name' => '(MNA) - Melangguane Airport, Karakelong Island, Indonesia','country_id' => '97'),\narray('id' => '7605','name' => '(PSJ) - Kasiguncu Airport, Poso-Celebes Island, Indonesia','country_id' => '97'),\narray('id' => '7606','name' => '(OTI) - Pitu Airport, Gotalalamo-Morotai Island, Indonesia','country_id' => '97'),\narray('id' => '7607','name' => '(TTE) - Sultan Khairun Babullah Airport, Sango-Ternate Island, Indonesia','country_id' => '97'),\narray('id' => '7608','name' => '(LUW) - Bubung Airport, Luwok-Celebes Island, Indonesia','country_id' => '97'),\narray('id' => '7609','name' => '(UOL) - Buol Airport, Buol-Celebes Island, Indonesia','country_id' => '97'),\narray('id' => '7610','name' => '(WAN) - Waverney Airport, Waverney, Australia','country_id' => '12'),\narray('id' => '7611','name' => '(BTW) - Batu Licin Airport, Batu Licin-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '7612','name' => '(PKN) - Iskandar Airport, Pangkalanbun-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '7613','name' => '(KBU) - Stagen Airport, Laut Island, Indonesia','country_id' => '97'),\narray('id' => '7614','name' => '(TJG) - Warukin Airport, Tanta-Tabalong-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '7615','name' => '(BDJ) - Syamsudin Noor Airport, Banjarmasin-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '7616','name' => '(PKY) - Tjilik Riwut Airport, Palangkaraya-Kalimantan Tengah, Indonesia','country_id' => '97'),\narray('id' => '7617','name' => '(SMQ) - Sampit(Hasan) Airport, Sampit-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '7618','name' => '(AHI) - Amahai Airport, Amahai-Seram Island, Indonesia','country_id' => '97'),\narray('id' => '7619','name' => '(NDA) - Bandanaira Airport, Banda-Naira Island, Indonesia','country_id' => '97'),\narray('id' => '7620','name' => '(DOB) - Rar Gwamar Airport, Dobo-Warmar Island, Indonesia','country_id' => '97'),\narray('id' => '7621','name' => '(MAL) - Mangole Airport, Falabisahaya, Mangole Island, Indonesia','country_id' => '97'),\narray('id' => '7622','name' => '(NRE) - Namrole Airport, Namrole-Buru Island, Indonesia','country_id' => '97'),\narray('id' => '7623','name' => '(LAH) - Oesman Sadik Airport, Labuha, Labuha-Halmahera Island, Indonesia','country_id' => '97'),\narray('id' => '7624','name' => '(SXK) - Saumlaki/Olilit Airport, Saumlaki-Yamdena Island, Indonesia','country_id' => '97'),\narray('id' => '7625','name' => '(BJK) - Nangasuri Airport, Maikoor Island, Indonesia','country_id' => '97'),\narray('id' => '7626','name' => '(LUV) - Dumatumbun Airport, Langgur-Seram Island, Indonesia','country_id' => '97'),\narray('id' => '7627','name' => '(SQN) - Emalamo Sanana Airport, Sanana-Seram Island, Indonesia','country_id' => '97'),\narray('id' => '7628','name' => '(AMQ) - Pattimura Airport, Ambon, Ambon, Indonesia','country_id' => '97'),\narray('id' => '7629','name' => '(NAM) - Namlea Airport, Namlea-Buru Island, Indonesia','country_id' => '97'),\narray('id' => '7630','name' => '(TAX) - Taliabu Island Airport, Tikong-Taliabu Island, Indonesia','country_id' => '97'),\narray('id' => '7631','name' => '(WBA) - Wahai,Seram Island, Seram Island, Indonesia','country_id' => '97'),\narray('id' => '7632','name' => '(MLG) - Abdul Rachman Saleh Airport, Malang-Java Island, Indonesia','country_id' => '97'),\narray('id' => '7633','name' => '(CPF) - Ngloram Airport, Tjepu-Java Island, Indonesia','country_id' => '97'),\narray('id' => '7634','name' => '(JOG) - Adi Sutjipto International Airport, Yogyakarta-Java Island, Indonesia','country_id' => '97'),\narray('id' => '7635','name' => '(SOC) - Adi Sumarmo Wiryokusumo Airport, Sukarata(Solo)-Java Island, Indonesia','country_id' => '97'),\narray('id' => '7636','name' => '(SUB) - Juanda International Airport, Surabaya, Indonesia','country_id' => '97'),\narray('id' => '7637','name' => '(SRG) - Achmad Yani Airport, Semarang-Java Island, Indonesia','country_id' => '97'),\narray('id' => '7638','name' => '(SUP) - Trunojoyo Airport, Sumenep-Madura Island, Indonesia','country_id' => '97'),\narray('id' => '7639','name' => '(KWB) - Dewadaru - Kemujan Island, Karimunjawa, Indonesia','country_id' => '97'),\narray('id' => '7640','name' => '(NTI) - Stenkol Airport, Bintuni, Indonesia','country_id' => '97'),\narray('id' => '7641','name' => '(RSK) - Abresso Airport, Ransiki-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7642','name' => '(KEQ) - Kebar Airport, Kebar-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7643','name' => '(FKQ) - Fakfak Airport, Fakfak-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7644','name' => '(INX) - Inanwatan Airport, Inanwatan Airport-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7645','name' => '(KNG) - Kaimana Airport, Kaimana-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7646','name' => '(RDE) - Merdei Airport, Merdei-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7647','name' => '(BXB) - Babo Airport, Babo-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7648','name' => '(MKW) - Rendani Airport, Manokwari-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7649','name' => '(TXM) - Teminabuan Airport, Atinjoe-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7650','name' => '(WSR) - Wasior Airport, Wasior-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7651','name' => '(BJW) - Bajawa Soa Airport, Bajawa, Indonesia','country_id' => '97'),\narray('id' => '7652','name' => '(MOF) - Maumere(Wai Oti) Airport, Maumere-Flores Island, Indonesia','country_id' => '97'),\narray('id' => '7653','name' => '(ENE) - Ende (H Hasan Aroeboesman) Airport, Ende-Flores Island, Indonesia','country_id' => '97'),\narray('id' => '7654','name' => '(RTG) - Frans Sales Lega Airport, Satar Tacik-Flores Island, Indonesia','country_id' => '97'),\narray('id' => '7655','name' => '(ARD) - Mali Airport, Alor Island, Indonesia','country_id' => '97'),\narray('id' => '7656','name' => '(LBJ) - Komodo (Mutiara II) Airport, Labuan Bajo-Flores Island, Indonesia','country_id' => '97'),\narray('id' => '7657','name' => '(KOE) - El Tari Airport, Kupang-Timor Island, Indonesia','country_id' => '97'),\narray('id' => '7658','name' => '(BUW) - Betoambari Airport, Bau Bau-Butung Island, Indonesia','country_id' => '97'),\narray('id' => '7659','name' => '(MXB) - Andi Jemma Airport, Masamba-Celebes Island, Indonesia','country_id' => '97'),\narray('id' => '7660','name' => '(SQR) - Soroako Airport, Soroako-Celebes Island, Indonesia','country_id' => '97'),\narray('id' => '7661','name' => '(TTR) - Pongtiku Airport, Makale, Indonesia','country_id' => '97'),\narray('id' => '7662','name' => '(KDI) - Wolter Monginsidi Airport, Kendari-Celebes Island, Indonesia','country_id' => '97'),\narray('id' => '7663','name' => '(SOQ) - Dominique Edward Osok Airport, Sorong-Papua Island, Indonesia','country_id' => '97'),\narray('id' => '7664','name' => '(WBB) - Stebbins Airport, Stebbins, United States','country_id' => '228'),\narray('id' => '7665','name' => '(WBC) - Wapolu Airport, Wapolu, Papua New Guinea','country_id' => '172'),\narray('id' => '7666','name' => '(BTU) - Bintulu Airport, Bintulu, Malaysia','country_id' => '154'),\narray('id' => '7667','name' => '(BLG) - Belaga Airport, Belaga, Malaysia','country_id' => '154'),\narray('id' => '7668','name' => '(LSM) - Long Semado Airport, Long Semado, Malaysia','country_id' => '154'),\narray('id' => '7669','name' => '(LGL) - Long Lellang Airport, Long Datih, Malaysia','country_id' => '154'),\narray('id' => '7670','name' => '(KCH) - Kuching International Airport, Kuching, Malaysia','country_id' => '154'),\narray('id' => '7671','name' => '(ODN) - Long Seridan Airport, Long Seridan, Malaysia','country_id' => '154'),\narray('id' => '7672','name' => '(LMN) - Limbang Airport, Limbang, Malaysia','country_id' => '154'),\narray('id' => '7673','name' => '(MKM) - Mukah Airport, Mukah, Malaysia','country_id' => '154'),\narray('id' => '7674','name' => '(LKH) - Long Akah Airport, Long Akah, Malaysia','country_id' => '154'),\narray('id' => '7675','name' => '(MUR) - Marudi Airport, Marudi, Malaysia','country_id' => '154'),\narray('id' => '7676','name' => '(BSE) - Sematan Airport, Sematan, Malaysia','country_id' => '154'),\narray('id' => '7677','name' => '(KPI) - Kapit Airport, Kapit, Malaysia','country_id' => '154'),\narray('id' => '7678','name' => '(BKM) - Bakalalan Airport, Bakalalan, Malaysia','country_id' => '154'),\narray('id' => '7679','name' => '(MYY) - Miri Airport, Miri, Malaysia','country_id' => '154'),\narray('id' => '7680','name' => '(SBW) - Sibu Airport, Sibu, Malaysia','country_id' => '154'),\narray('id' => '7681','name' => '(TGC) - Tanjung Manis Airport, Tanjung Manis, Malaysia','country_id' => '154'),\narray('id' => '7682','name' => '(LSU) - Long Sukang Airport, Long Sukang, Malaysia','country_id' => '154'),\narray('id' => '7683','name' => '(LWY) - Lawas Airport, Lawas, Malaysia','country_id' => '154'),\narray('id' => '7684','name' => '(BBN) - Bario Airport, Bario, Malaysia','country_id' => '154'),\narray('id' => '7685','name' => '(SMM) - Semporna Airport, Semporna, Malaysia','country_id' => '154'),\narray('id' => '7686','name' => '(LDU) - Lahad Datu Airport, Lahad Datu, Malaysia','country_id' => '154'),\narray('id' => '7687','name' => '(TEL) - Telupid Airport, Telupid, Malaysia','country_id' => '154'),\narray('id' => '7688','name' => '(KGU) - Keningau Airport, Keningau, Malaysia','country_id' => '154'),\narray('id' => '7689','name' => '(SXS) - Sahabat [Sahabat 16] Airport, Sahabat, Malaysia','country_id' => '154'),\narray('id' => '7690','name' => '(BKI) - Kota Kinabalu International Airport, Kota Kinabalu, Malaysia','country_id' => '154'),\narray('id' => '7691','name' => '(LBU) - Labuan Airport, Labuan, Malaysia','country_id' => '154'),\narray('id' => '7692','name' => '(TMG) - Tomanggong Airport, Tomanggong, Malaysia','country_id' => '154'),\narray('id' => '7693','name' => '(GSA) - Long Pasia Airport, Long Miau, Malaysia','country_id' => '154'),\narray('id' => '7694','name' => '(SPE) - Sepulot Airport, Sepulot, Malaysia','country_id' => '154'),\narray('id' => '7695','name' => '(PAY) - Pamol Airport, Pamol, Malaysia','country_id' => '154'),\narray('id' => '7696','name' => '(RNU) - Ranau Airport, Ranau, Malaysia','country_id' => '154'),\narray('id' => '7697','name' => '(SDK) - Sandakan Airport, Sandakan, Malaysia','country_id' => '154'),\narray('id' => '7698','name' => '(KUD) - Kudat Airport, Kudat, Malaysia','country_id' => '154'),\narray('id' => '7699','name' => '(TWU) - Tawau Airport, Tawau, Malaysia','country_id' => '154'),\narray('id' => '7700','name' => '(MZV) - Mulu Airport, Mulu, Malaysia','country_id' => '154'),\narray('id' => '7701','name' => '(BWN) - Brunei International Airport, Bandar Seri Begawan, Brunei','country_id' => '26'),\narray('id' => '7702','name' => '(WEA) - Parker County Airport, Weatherford, United States','country_id' => '228'),\narray('id' => '7703','name' => '(WED) - Wedau Airport, Wedau, Papua New Guinea','country_id' => '172'),\narray('id' => '7704','name' => '(WHL) - Welshpool Airport, Welshpool, Australia','country_id' => '12'),\narray('id' => '7705','name' => '(TKG) - Radin Inten II (Branti) Airport, Bandar Lampung-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7706','name' => '(PKU) - Sultan Syarif Kasim Ii (Simpang Tiga) Airport, Pekanbaru-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7707','name' => '(DUM) - Pinang Kampai Airport, Dumai-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7708','name' => '(RKO) - Rokot Airport, Sipora Island, Indonesia','country_id' => '97'),\narray('id' => '7709','name' => '(SEQ) - Sungai Pakning Bengkalis Airport, Bengkalis-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7710','name' => '(TJB) - Sei Bati Airport, Tanjung Balai-Karinmunbesar Island, Indonesia','country_id' => '97'),\narray('id' => '7711','name' => '(BDO) - Husein Sastranegara International Airport, Bandung-Java Island, Indonesia','country_id' => '97'),\narray('id' => '7712','name' => '(CBN) - Penggung Airport, Cirebon-Java Island, Indonesia','country_id' => '97'),\narray('id' => '7713','name' => '(TSY) - Cibeureum Airport, Tasikmalaya-Java Island, Indonesia','country_id' => '97'),\narray('id' => '7714','name' => '(BTH) - Hang Nadim International Airport, Batam Island, Indonesia','country_id' => '97'),\narray('id' => '7715','name' => '(PPR) - Pasir Pangaraan Airport, Pasir Pengarayan-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7716','name' => '(TNJ) - Raja Haji Fisabilillah International Airport, Tanjung Pinang-Bintan Island, Indonesia','country_id' => '97'),\narray('id' => '7717','name' => '(SIQ) - Dabo Airport, Pasirkuning-Singkep Island, Indonesia','country_id' => '97'),\narray('id' => '7718','name' => '(HLP) - Halim Perdanakusuma International Airport, Jakarta, Indonesia','country_id' => '97'),\narray('id' => '7719','name' => '(CXP) - Tunggul Wulung Airport, Cilacap-Java Island, Indonesia','country_id' => '97'),\narray('id' => '7720','name' => '(PCB) - Pondok Cabe Air Base, Jakarta, Indonesia','country_id' => '97'),\narray('id' => '7721','name' => '(CGK) - Soekarno-Hatta International Airport, Jakarta, Indonesia','country_id' => '97'),\narray('id' => '7722','name' => '(GNS) - Binaka Airport, Gunung Sitoli-Nias Island, Indonesia','country_id' => '97'),\narray('id' => '7723','name' => '(AEG) - Aek Godang Airport, Padang Sidempuan-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7724','name' => '(PDG) - Tabing Airport, Padang-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7725','name' => '(MES) - Soewondo Air Force Base, Medan-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7726','name' => '(KNO) - Kualanamu International Airport, , Indonesia','country_id' => '97'),\narray('id' => '7727','name' => '(DTB) - Silangit Airport, Siborong-Borong, Indonesia','country_id' => '97'),\narray('id' => '7728','name' => '(SIW) - Sibisa Airport, Parapat-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7729','name' => '(TJQ) - Buluh Tumbang (H A S Hanandjoeddin) Airport, Tanjung Pandan-Belitung Island, Indonesia','country_id' => '97'),\narray('id' => '7730','name' => '(NPO) - Nanga Pinoh Airport, Nanga Pinoh-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '7731','name' => '(KTG) - Ketapang(Rahadi Usman) Airport, Ketapang-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '7732','name' => '(MWK) - Tarempa Airport, Matak Island, Indonesia','country_id' => '97'),\narray('id' => '7733','name' => '(NTX) - Ranai Airport, Ranai-Natuna Besar Island, Indonesia','country_id' => '97'),\narray('id' => '7734','name' => '(PNK) - Supadio Airport, Pontianak-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '7735','name' => '(PSU) - Pangsuma Airport, Putussibau-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '7736','name' => '(SQG) - Sintang(Susilo) Airport, Sintang-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '7737','name' => '(DJB) - Sultan Thaha Airport, Jambi-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7738','name' => '(PGK) - Pangkal Pinang (Depati Amir) Airport, Pangkal Pinang-Palaubangka Island, Indonesia','country_id' => '97'),\narray('id' => '7739','name' => '(BKS) - Fatmawati Soekarno Airport, Bengkulu-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7740','name' => '(PLM) - Sultan Mahmud Badaruddin II Airport, Palembang-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7741','name' => '(PDO) - Pendopo Airport, Talang Gudang-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7742','name' => '(RGT) - Japura Airport, Rengat-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7743','name' => '(PDG) - Minangkabau Airport, Ketaping/Padang-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7744','name' => '(MPC) - Muko Muko Airport, Muko Muko-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7745','name' => '(KLQ) - Keluang Airport, Keluang-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7746','name' => '(TPK) - Teuku Cut Ali Airport, Tapak Tuan-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7747','name' => '(SBG) - Maimun Saleh Airport, Sabang-We Island, Indonesia','country_id' => '97'),\narray('id' => '7748','name' => '(MEQ) - Seunagan Airport, Peureumeue-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7749','name' => '(LSX) - Lhok Sukon Airport, Lhok Sukon-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7750','name' => '(LSW) - Malikus Saleh Airport, Lhok Seumawe-Sumatra Island, Indonesia','country_id' => '97'),\narray('id' => '7751','name' => '(BTJ) - Sultan Iskandar Muda International Airport, Banda Aceh, Indonesia','country_id' => '97'),\narray('id' => '7752','name' => '(SXT) - Sungai Tiang Airport, Taman Negara, Malaysia','country_id' => '154'),\narray('id' => '7753','name' => '(MEP) - Mersing Airport, Mersing, Malaysia','country_id' => '154'),\narray('id' => '7754','name' => '(SWY) - Sitiawan Airport, Sitiawan, Malaysia','country_id' => '154'),\narray('id' => '7755','name' => '(TPG) - Taiping (Tekah) Airport, Taiping, Malaysia','country_id' => '154'),\narray('id' => '7756','name' => '(TOD) - Pulau Tioman Airport, Pulau Tioman, Malaysia','country_id' => '154'),\narray('id' => '7757','name' => '(AOR) - Sultan Abdul Halim Airport, Alor Satar, Malaysia','country_id' => '154'),\narray('id' => '7758','name' => '(BWH) - Butterworth Airport, Butterworth, Malaysia','country_id' => '154'),\narray('id' => '7759','name' => '(KBR) - Sultan Ismail Petra Airport, Kota Baharu, Malaysia','country_id' => '154'),\narray('id' => '7760','name' => '(KUA) - Kuantan Airport, Kuantan, Malaysia','country_id' => '154'),\narray('id' => '7761','name' => '(KTE) - Kerteh Airport, Kerteh, Malaysia','country_id' => '154'),\narray('id' => '7762','name' => '(IPH) - Sultan Azlan Shah Airport, Ipoh, Malaysia','country_id' => '154'),\narray('id' => '7763','name' => '(JHB) - Senai International Airport, Senai, Malaysia','country_id' => '154'),\narray('id' => '7764','name' => '(KUL) - Kuala Lumpur International Airport, Kuala Lumpur, Malaysia','country_id' => '154'),\narray('id' => '7765','name' => '(LGK) - Langkawi International Airport, Langkawi, Malaysia','country_id' => '154'),\narray('id' => '7766','name' => '(MKZ) - Malacca Airport, Malacca, Malaysia','country_id' => '154'),\narray('id' => '7767','name' => '(TGG) - Sultan Mahmud Airport, Kuala Terengganu, Malaysia','country_id' => '154'),\narray('id' => '7768','name' => '(PEN) - Penang International Airport, Penang, Malaysia','country_id' => '154'),\narray('id' => '7769','name' => '(PKG) - Pulau Pangkor Airport, Pangkor Island, Malaysia','country_id' => '154'),\narray('id' => '7770','name' => '(RDN) - LTS Pulau Redang Airport, Redang, Malaysia','country_id' => '154'),\narray('id' => '7771','name' => '(SZB) - Sultan Abdul Aziz Shah International Airport, Subang, Malaysia','country_id' => '154'),\narray('id' => '7772','name' => '(DTR) - Decatur Shores Airport, Decatur, United States','country_id' => '228'),\narray('id' => '7773','name' => '(WNU) - Wanuma Airport, Wanuma, Papua New Guinea','country_id' => '172'),\narray('id' => '7774','name' => '(AUT) - Atauro Airport, Atauro, Timor-Leste','country_id' => '216'),\narray('id' => '7775','name' => '(UAI) - Suai Airport, Suai, Timor-Leste','country_id' => '216'),\narray('id' => '7776','name' => '(DIL) - Presidente Nicolau Lobato International Airport, Dili, Timor-Leste','country_id' => '216'),\narray('id' => '7777','name' => '(BCH) - Cakung Airport, Baucau, Timor-Leste','country_id' => '216'),\narray('id' => '7778','name' => '(MPT) - Maliana Airport, Maliana, Timor-Leste','country_id' => '216'),\narray('id' => '7779','name' => '(OEC) - Oecussi Airport, Oecussi-Ambeno, Timor-Leste','country_id' => '216'),\narray('id' => '7780','name' => '(VIQ) - Viqueque Airport, Viqueque, Timor-Leste','country_id' => '216'),\narray('id' => '7781','name' => '(ABU) - Haliwen Airport, Atambua-Timor Island, Indonesia','country_id' => '97'),\narray('id' => '7782','name' => '(BJW) - Pahdameleda Airport, Bajawa-Flores Island, Indonesia','country_id' => '97'),\narray('id' => '7783','name' => '(LKA) - Gewayentana Airport, Larantuka-Flores Island, Indonesia','country_id' => '97'),\narray('id' => '7784','name' => '(RTI) - David C. Saudale - Rote Airport, Namodale-Rote Island, Indonesia','country_id' => '97'),\narray('id' => '7785','name' => '(SAU) - Sabu-Tardanu Airport, Sabu-Sawu Island, Indonesia','country_id' => '97'),\narray('id' => '7786','name' => '(SGQ) - Sanggata/Sangkimah Airport, Sanggata/Sangkimah, Indonesia','country_id' => '97'),\narray('id' => '7787','name' => '(LBW) - Long Bawan Airport, Long Bawan-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '7788','name' => '(BXT) - Bontang Airport, Bontang-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '7789','name' => '(NNX) - Nunukan Airport, Nunukan-Nunukan Island, Indonesia','country_id' => '97'),\narray('id' => '7790','name' => '(TNB) - Tanah Grogot Airport, Tanah Grogot-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '7791','name' => '(LPU) - Long Apung Airport, Long Apung-Borneo Island, Indonesia','country_id' => '97'),\narray('id' => '7792','name' => '(WSA) - Wasua Airport, Wasua, Papua New Guinea','country_id' => '172'),\narray('id' => '7793','name' => '(QPG) - Paya Lebar Air Base, , Singapore','country_id' => '194'),\narray('id' => '7794','name' => '(TGA) - Tengah Air Base, , Singapore','country_id' => '194'),\narray('id' => '7795','name' => '(WSM) - Wiseman Airport, Wiseman, United States','country_id' => '228'),\narray('id' => '7796','name' => '(XSP) - Seletar Airport, Seletar, Singapore','country_id' => '194'),\narray('id' => '7797','name' => '(SIN) - Singapore Changi Airport, Singapore, Singapore','country_id' => '194'),\narray('id' => '7798','name' => '(WTT) - Wantoat Airport, Wantoat, Papua New Guinea','country_id' => '172'),\narray('id' => '7799','name' => '(WUV) - Wuvulu Island Airport, Wuvulu Island, Papua New Guinea','country_id' => '172'),\narray('id' => '7800','name' => '(GWV) - Glendale Fokker Field, Glendale, United States','country_id' => '228'),\narray('id' => '7801','name' => '(XBN) - Biniguni Airport, Biniguni, Papua New Guinea','country_id' => '172'),\narray('id' => '7802','name' => '(XIG) - Xinguara Municipal Airport, Xinguara, Brazil','country_id' => '29'),\narray('id' => '7803','name' => '(XMA) - Maramag Airport, Maramag, Philippines','country_id' => '173'),\narray('id' => '7804','name' => '(XVL) - Vinh Long Airfield, Vinh Long, Vietnam','country_id' => '236'),\narray('id' => '7805','name' => '(UKN) - Waukon Municipal Airport, Waukon, United States','country_id' => '228'),\narray('id' => '7806','name' => '(ALH) - Albany Airport, Albany, Australia','country_id' => '12'),\narray('id' => '7807','name' => '(ABG) - Abingdon Downs Airport, , Australia','country_id' => '12'),\narray('id' => '7808','name' => '(AWN) - Alton Downs Airport, , Australia','country_id' => '12'),\narray('id' => '7809','name' => '(AUD) - Augustus Downs Airport, , Australia','country_id' => '12'),\narray('id' => '7810','name' => '(MRP) - Marla Airport, , Australia','country_id' => '12'),\narray('id' => '7811','name' => '(AXL) - Alexandria Homestead Airport, , Australia','country_id' => '12'),\narray('id' => '7812','name' => '(AXC) - Aramac Airport, , Australia','country_id' => '12'),\narray('id' => '7813','name' => '(ADO) - Andamooka Airport, , Australia','country_id' => '12'),\narray('id' => '7814','name' => '(AMX) - Ammaroo Airport, , Australia','country_id' => '12'),\narray('id' => '7815','name' => '(AMT) - Amata Airport, , Australia','country_id' => '12'),\narray('id' => '7816','name' => '(WLP) - West Angelas Airport, , Australia','country_id' => '12'),\narray('id' => '7817','name' => '(AYL) - Anthony Lagoon Airport, , Australia','country_id' => '12'),\narray('id' => '7818','name' => '(ABH) - Alpha Airport, Alpha, Australia','country_id' => '12'),\narray('id' => '7819','name' => '(ARY) - Ararat Airport, , Australia','country_id' => '12'),\narray('id' => '7820','name' => '(GYL) - Argyle Airport, , Australia','country_id' => '12'),\narray('id' => '7821','name' => '(ARM) - Armidale Airport, Armidale, Australia','country_id' => '12'),\narray('id' => '7822','name' => '(AAB) - Arrabury Airport, , Australia','country_id' => '12'),\narray('id' => '7823','name' => '(AUU) - Aurukun Airport, Aurukun, Australia','country_id' => '12'),\narray('id' => '7824','name' => '(AWP) - Austral Downs Airport, , Australia','country_id' => '12'),\narray('id' => '7825','name' => '(AVG) - Auvergne Airport, , Australia','country_id' => '12'),\narray('id' => '7826','name' => '(AYQ) - Ayers Rock Connellan Airport, Ayers Rock, Australia','country_id' => '12'),\narray('id' => '7827','name' => '(AYR) - Ayr Airport, , Australia','country_id' => '12'),\narray('id' => '7828','name' => '(ACF) - Brisbane Archerfield Airport, Brisbane, Australia','country_id' => '12'),\narray('id' => '7829','name' => '(ABM) - Northern Peninsula Airport, Bamaga, Australia','country_id' => '12'),\narray('id' => '7830','name' => '(BCI) - Barcaldine Airport, Barcaldine, Australia','country_id' => '12'),\narray('id' => '7831','name' => '(ASP) - Alice Springs Airport, Alice Springs, Australia','country_id' => '12'),\narray('id' => '7832','name' => '(BDD) - Badu Island Airport, , Australia','country_id' => '12'),\narray('id' => '7833','name' => '(BKP) - Barkly Downs Airport, , Australia','country_id' => '12'),\narray('id' => '7834','name' => '(BBE) - Big Bell Airport, Big Bell, Australia','country_id' => '12'),\narray('id' => '7835','name' => '(BNE) - Brisbane International Airport, Brisbane, Australia','country_id' => '12'),\narray('id' => '7836','name' => '(OOL) - Gold Coast Airport, Gold Coast, Australia','country_id' => '12'),\narray('id' => '7837','name' => '(BKQ) - Blackall Airport, Blackall, Australia','country_id' => '12'),\narray('id' => '7838','name' => '(CNS) - Cairns International Airport, Cairns, Australia','country_id' => '12'),\narray('id' => '7839','name' => '(CTL) - Charleville Airport, Charleville, Australia','country_id' => '12'),\narray('id' => '7840','name' => '(BDW) - Bedford Downs Airport, , Australia','country_id' => '12'),\narray('id' => '7841','name' => '(BXG) - Bendigo Airport, , Australia','country_id' => '12'),\narray('id' => '7842','name' => '(BVI) - Birdsville Airport, , Australia','country_id' => '12'),\narray('id' => '7843','name' => '(BXF) - Bellburn Airstrip, Pumululu National Park, Australia','country_id' => '12'),\narray('id' => '7844','name' => '(BTX) - Betoota Airport, , Australia','country_id' => '12'),\narray('id' => '7845','name' => '(BEE) - Beagle Bay Airport, Beagle Bay, Australia','country_id' => '12'),\narray('id' => '7846','name' => '(OCM) - Boolgeeda, , Australia','country_id' => '12'),\narray('id' => '7847','name' => '(BQW) - Balgo Hill Airport, Balgo, Australia','country_id' => '12'),\narray('id' => '7848','name' => '(BHQ) - Broken Hill Airport, Broken Hill, Australia','country_id' => '12'),\narray('id' => '7849','name' => '(HTI) - Hamilton Island Airport, Hamilton Island, Australia','country_id' => '12'),\narray('id' => '7850','name' => '(BEU) - Bedourie Airport, , Australia','country_id' => '12'),\narray('id' => '7851','name' => '(BIW) - Billiluna Airport, , Australia','country_id' => '12'),\narray('id' => '7852','name' => '(BZP) - Bizant Airport, Lakefield National Park, Australia','country_id' => '12'),\narray('id' => '7853','name' => '(BRK) - Bourke Airport, , Australia','country_id' => '12'),\narray('id' => '7854','name' => '(BUC) - Burketown Airport, , Australia','country_id' => '12'),\narray('id' => '7855','name' => '(BLN) - Benalla Airport, , Australia','country_id' => '12'),\narray('id' => '7856','name' => '(LCN) - Balcanoona Airport, , Australia','country_id' => '12'),\narray('id' => '7857','name' => '(BLS) - Bollon Airport, , Australia','country_id' => '12'),\narray('id' => '7858','name' => '(BQB) - Busselton Regional Airport, , Australia','country_id' => '12'),\narray('id' => '7859','name' => '(ISA) - Mount Isa Airport, Mount Isa, Australia','country_id' => '12'),\narray('id' => '7860','name' => '(MCY) - Sunshine Coast Airport, Maroochydore, Australia','country_id' => '12'),\narray('id' => '7861','name' => '(BFC) - Bloomfield River Airport, , Australia','country_id' => '12'),\narray('id' => '7862','name' => '(MKY) - Mackay Airport, Mackay, Australia','country_id' => '12'),\narray('id' => '7863','name' => '(BNK) - Ballina Byron Gateway Airport, Ballina, Australia','country_id' => '12'),\narray('id' => '7864','name' => '(BSJ) - Bairnsdale Airport, , Australia','country_id' => '12'),\narray('id' => '7865','name' => '(GIC) - Boigu Airport, , Australia','country_id' => '12'),\narray('id' => '7866','name' => '(OKY) - Oakey Airport, , Australia','country_id' => '12'),\narray('id' => '7867','name' => '(BQL) - Boulia Airport, , Australia','country_id' => '12'),\narray('id' => '7868','name' => '(BMP) - Brampton Island Airport, , Australia','country_id' => '12'),\narray('id' => '7869','name' => '(PPP) - Proserpine Whitsunday Coast Airport, Proserpine, Australia','country_id' => '12'),\narray('id' => '7870','name' => '(ROK) - Rockhampton Airport, Rockhampton, Australia','country_id' => '12'),\narray('id' => '7871','name' => '(BOX) - Borroloola Airport, , Australia','country_id' => '12'),\narray('id' => '7872','name' => '(BME) - Broome International Airport, Broome, Australia','country_id' => '12'),\narray('id' => '7873','name' => '(BZD) - Balranald Airport, , Australia','country_id' => '12'),\narray('id' => '7874','name' => '(BTD) - Brunette Downs Airport, , Australia','country_id' => '12'),\narray('id' => '7875','name' => '(BWQ) - Brewarrina Airport, , Australia','country_id' => '12'),\narray('id' => '7876','name' => '(BYP) - Barimunya Airport, , Australia','country_id' => '12'),\narray('id' => '7877','name' => '(BHS) - Bathurst Airport, Bathurst, Australia','country_id' => '12'),\narray('id' => '7878','name' => '(BRT) - Bathurst Island Airport, , Australia','country_id' => '12'),\narray('id' => '7879','name' => '(TSV) - Townsville Airport, Townsville, Australia','country_id' => '12'),\narray('id' => '7880','name' => '(BLT) - Blackwater Airport, , Australia','country_id' => '12'),\narray('id' => '7881','name' => '(BVW) - Batavia Downs Airport, , Australia','country_id' => '12'),\narray('id' => '7882','name' => '(BDB) - Bundaberg Airport, Bundaberg, Australia','country_id' => '12'),\narray('id' => '7883','name' => '(BUY) - Bunbury Airport, , Australia','country_id' => '12'),\narray('id' => '7884','name' => '(BIP) - Bulimba Airport, , Australia','country_id' => '12'),\narray('id' => '7885','name' => '(ZBO) - Bowen Airport, , Australia','country_id' => '12'),\narray('id' => '7886','name' => '(WEI) - Weipa Airport, Weipa, Australia','country_id' => '12'),\narray('id' => '7887','name' => '(BCK) - Bolwarra Airport, , Australia','country_id' => '12'),\narray('id' => '7888','name' => '(WTB) - Brisbane West Wellcamp Airport, Wellcamp, Australia','country_id' => '12'),\narray('id' => '7889','name' => '(BWB) - Barrow Island Airport, , Australia','country_id' => '12'),\narray('id' => '7890','name' => '(BVZ) - Beverley Springs Airport, , Australia','country_id' => '12'),\narray('id' => '7891','name' => '(CTR) - Cattle Creek Airport, , Australia','country_id' => '12'),\narray('id' => '7892','name' => '(CGV) - Caiguna Airport, , Australia','country_id' => '12'),\narray('id' => '7893','name' => '(CLH) - Coolah Airport, , Australia','country_id' => '12'),\narray('id' => '7894','name' => '(CVQ) - Carnarvon Airport, Carnarvon, Australia','country_id' => '12'),\narray('id' => '7895','name' => '(CSI) - Casino Airport, , Australia','country_id' => '12'),\narray('id' => '7896','name' => '(CAZ) - Cobar Airport, , Australia','country_id' => '12'),\narray('id' => '7897','name' => '(COJ) - Coonabarabran Airport, , Australia','country_id' => '12'),\narray('id' => '7898','name' => '(CBY) - Canobie Airport, Canobie, Australia','country_id' => '12'),\narray('id' => '7899','name' => '(CBI) - Cape Barren Island Airport, , Australia','country_id' => '12'),\narray('id' => '7900','name' => '(CPD) - Coober Pedy Airport, , Australia','country_id' => '12'),\narray('id' => '7901','name' => '(CRB) - Collarenebri Airport, , Australia','country_id' => '12'),\narray('id' => '7902','name' => '(CCL) - Chinchilla Airport, , Australia','country_id' => '12'),\narray('id' => '7903','name' => '(CNC) - Coconut Island Airport, , Australia','country_id' => '12'),\narray('id' => '7904','name' => '(CNJ) - Cloncurry Airport, Cloncurry, Australia','country_id' => '12'),\narray('id' => '7905','name' => '(CBX) - Condobolin Airport, , Australia','country_id' => '12'),\narray('id' => '7906','name' => '(CUD) - Caloundra Airport, , Australia','country_id' => '12'),\narray('id' => '7907','name' => '(CED) - Ceduna Airport, , Australia','country_id' => '12'),\narray('id' => '7908','name' => '(CVC) - Cleve Airport, , Australia','country_id' => '12'),\narray('id' => '7909','name' => '(CFI) - Camfield Airport, , Australia','country_id' => '12'),\narray('id' => '7910','name' => '(CFH) - Clifton Hills Airport, Clifton Hills, Australia','country_id' => '12'),\narray('id' => '7911','name' => '(CQP) - Cape Flattery Airport, , Australia','country_id' => '12'),\narray('id' => '7912','name' => '(LLG) - Chillagoe Airport, , Australia','country_id' => '12'),\narray('id' => '7913','name' => '(CRH) - Cherrabah Airport, Cherrabah Homestead Resort, Australia','country_id' => '12'),\narray('id' => '7914','name' => '(CKW) - Graeme Rowley Aerodrome, Christmas Creek Mine, Australia','country_id' => '12'),\narray('id' => '7915','name' => '(CXT) - Charters Towers Airport, , Australia','country_id' => '12'),\narray('id' => '7916','name' => '(DCN) - RAAF Base Curtin, , Australia','country_id' => '12'),\narray('id' => '7917','name' => '(CKI) - Croker Island Airport, , Australia','country_id' => '12'),\narray('id' => '7918','name' => '(CTN) - Cooktown Airport, , Australia','country_id' => '12'),\narray('id' => '7919','name' => '(CMQ) - Clermont Airport, , Australia','country_id' => '12'),\narray('id' => '7920','name' => '(CMA) - Cunnamulla Airport, , Australia','country_id' => '12'),\narray('id' => '7921','name' => '(CML) - Camooweal Airport, , Australia','country_id' => '12'),\narray('id' => '7922','name' => '(NIF) - Camp Nifty Airport, , Australia','country_id' => '12'),\narray('id' => '7923','name' => '(CES) - Cessnock Airport, , Australia','country_id' => '12'),\narray('id' => '7924','name' => '(CNB) - Coonamble Airport, , Australia','country_id' => '12'),\narray('id' => '7925','name' => '(ODL) - Cordillo Downs Airport, Cordillo Downs, Australia','country_id' => '12'),\narray('id' => '7926','name' => '(CUQ) - Coen Airport, Coen, Australia','country_id' => '12'),\narray('id' => '7927','name' => '(CIE) - Collie Airport, Collie, Australia','country_id' => '12'),\narray('id' => '7928','name' => '(OOM) - Cooma Snowy Mountains Airport, Cooma, Australia','country_id' => '12'),\narray('id' => '7929','name' => '(CDA) - Cooinda Airport, , Australia','country_id' => '12'),\narray('id' => '7930','name' => '(CWW) - Corowa Airport, , Australia','country_id' => '12'),\narray('id' => '7931','name' => '(CFP) - Carpentaria Downs Airport, Carpentaria Downs, Australia','country_id' => '12'),\narray('id' => '7932','name' => '(CYG) - Corryong Airport, , Australia','country_id' => '12'),\narray('id' => '7933','name' => '(CXQ) - Christmas Creek Station Airport, Christmas Creek, Australia','country_id' => '12'),\narray('id' => '7934','name' => '(CDQ) - Croydon Airport, , Australia','country_id' => '12'),\narray('id' => '7935','name' => '(KCE) - Collinsville Airport, , Australia','country_id' => '12'),\narray('id' => '7936','name' => '(CMD) - Cootamundra Airport, , Australia','country_id' => '12'),\narray('id' => '7937','name' => '(CUG) - Cudal Airport, , Australia','country_id' => '12'),\narray('id' => '7938','name' => '(CUY) - Cue Airport, , Australia','country_id' => '12'),\narray('id' => '7939','name' => '(CJF) - Coondewanna Airport, Coondewanna, Australia','country_id' => '12'),\narray('id' => '7940','name' => '(CWR) - Cowarie Airport, , Australia','country_id' => '12'),\narray('id' => '7941','name' => '(CCW) - Cowell Airport, , Australia','country_id' => '12'),\narray('id' => '7942','name' => '(CWT) - Cowra Airport, , Australia','country_id' => '12'),\narray('id' => '7943','name' => '(COY) - Coolawanyah Airport, Coolawanyah Station, Australia','country_id' => '12'),\narray('id' => '7944','name' => '(DJR) - Dajarra Airport, , Australia','country_id' => '12'),\narray('id' => '7945','name' => '(DBY) - Dalby Airport, , Australia','country_id' => '12'),\narray('id' => '7946','name' => '(DRN) - Dirranbandi Airport, , Australia','country_id' => '12'),\narray('id' => '7947','name' => '(DNB) - Dunbar Airport, , Australia','country_id' => '12'),\narray('id' => '7948','name' => '(DRB) - Derby Airport, , Australia','country_id' => '12'),\narray('id' => '7949','name' => '(DFP) - Drumduff Airport, Drumduff, Australia','country_id' => '12'),\narray('id' => '7950','name' => '(DGD) - Dalgaranga Gold Mine Airport, , Australia','country_id' => '12'),\narray('id' => '7951','name' => '(DNG) - Doongan Airport, , Australia','country_id' => '12'),\narray('id' => '7952','name' => '(DXD) - Dixie Airport, New Dixie, Australia','country_id' => '12'),\narray('id' => '7953','name' => '(DKI) - Dunk Island Airport, Dunk Island, Australia','country_id' => '12'),\narray('id' => '7954','name' => '(DLK) - Dulkaninna Airport, Dulkaninna, Australia','country_id' => '12'),\narray('id' => '7955','name' => '(DNQ) - Deniliquin Airport, Deniliquin, Australia','country_id' => '12'),\narray('id' => '7956','name' => '(DDN) - Delta Downs Airport, , Australia','country_id' => '12'),\narray('id' => '7957','name' => '(DLV) - Delissaville Airport, , Australia','country_id' => '12'),\narray('id' => '7958','name' => '(DYW) - Daly Waters Airport, Daly Waters, Australia','country_id' => '12'),\narray('id' => '7959','name' => '(DMD) - Doomadgee Airport, , Australia','country_id' => '12'),\narray('id' => '7960','name' => '(DVR) - Daly River Airport, , Australia','country_id' => '12'),\narray('id' => '7961','name' => '(NLF) - Darnley Island Airport, Darnley Island, Australia','country_id' => '12'),\narray('id' => '7962','name' => '(DRD) - Dorunda Airport, Dorunda Outstation, Australia','country_id' => '12'),\narray('id' => '7963','name' => '(DVP) - Davenport Downs Airport, , Australia','country_id' => '12'),\narray('id' => '7964','name' => '(DPO) - Devonport Airport, Devonport, Australia','country_id' => '12'),\narray('id' => '7965','name' => '(DOX) - Dongara Airport, , Australia','country_id' => '12'),\narray('id' => '7966','name' => '(DRY) - Drysdale River Airport, , Australia','country_id' => '12'),\narray('id' => '7967','name' => '(DHD) - Durham Downs Airport, , Australia','country_id' => '12'),\narray('id' => '7968','name' => '(DRR) - Durrie Airport, , Australia','country_id' => '12'),\narray('id' => '7969','name' => '(SRR) - Dunwich Airport, Stradbroke Island, Australia','country_id' => '12'),\narray('id' => '7970','name' => '(DKV) - Docker River Airport, , Australia','country_id' => '12'),\narray('id' => '7971','name' => '(DYA) - Dysart Airport, , Australia','country_id' => '12'),\narray('id' => '7972','name' => '(WDA) - Wadi Ain Airport, Wadi Ain, Yemen','country_id' => '241'),\narray('id' => '7973','name' => '(ECH) - Echuca Airport, , Australia','country_id' => '12'),\narray('id' => '7974','name' => '(EUC) - Eucla Airport, , Australia','country_id' => '12'),\narray('id' => '7975','name' => '(ETD) - Etadunna Airport, Etadunna, Australia','country_id' => '12'),\narray('id' => '7976','name' => '(ENB) - Eneabba Airport, Eneabba, Australia','country_id' => '12'),\narray('id' => '7977','name' => '(EIH) - Einasleigh Airport, Einasleigh, Australia','country_id' => '12'),\narray('id' => '7978','name' => '(ELC) - Elcho Island Airport, Elcho Island, Australia','country_id' => '12'),\narray('id' => '7979','name' => '(EKD) - Elkedra Airport, , Australia','country_id' => '12'),\narray('id' => '7980','name' => '(EMD) - Emerald Airport, Emerald, Australia','country_id' => '12'),\narray('id' => '7981','name' => '(YEQ) - Yenkis(Yankisa) Airport, , Papua New Guinea','country_id' => '172'),\narray('id' => '7982','name' => '(EDD) - Erldunda Airport, , Australia','country_id' => '12'),\narray('id' => '7983','name' => '(ERB) - Ernabella Airport, , Australia','country_id' => '12'),\narray('id' => '7984','name' => '(ERQ) - Elrose Airport, Elrose Mine, Australia','country_id' => '12'),\narray('id' => '7985','name' => '(EPR) - Esperance Airport, Esperance, Australia','country_id' => '12'),\narray('id' => '7986','name' => '(EVD) - Eva Downs Airport, Eva Downs, Australia','country_id' => '12'),\narray('id' => '7987','name' => '(EVH) - Evans Head Aerodrome, , Australia','country_id' => '12'),\narray('id' => '7988','name' => '(EXM) - Exmouth Airport, , Australia','country_id' => '12'),\narray('id' => '7989','name' => '(FRB) - Forbes Airport, Forbes,, Australia','country_id' => '12'),\narray('id' => '7990','name' => '(KFE) - Fortescue - Dave Forrest Aerodrome, Cloudbreak Village, Australia','country_id' => '12'),\narray('id' => '7991','name' => '(FLY) - Finley Airport, , Australia','country_id' => '12'),\narray('id' => '7992','name' => '(FLS) - Flinders Island Airport, Flinders Island, Australia','country_id' => '12'),\narray('id' => '7993','name' => '(FVL) - Flora Valley Airport, , Australia','country_id' => '12'),\narray('id' => '7994','name' => '(FIK) - Finke Airport, Finke, Australia','country_id' => '12'),\narray('id' => '7995','name' => '(FOS) - Forrest Airport, , Australia','country_id' => '12'),\narray('id' => '7996','name' => '(FVR) - Oombulgurri Airport, Forrest River Mission, Australia','country_id' => '12'),\narray('id' => '7997','name' => '(FOT) - Forster (Wallis Is) Airport, , Australia','country_id' => '12'),\narray('id' => '7998','name' => '(FIZ) - Fitzroy Crossing Airport, , Australia','country_id' => '12'),\narray('id' => '7999','name' => '(GBP) - Gamboola Airport, , Australia','country_id' => '12'),\narray('id' => '8000','name' => '(GAH) - Gayndah Airport, , Australia','country_id' => '12'),\narray('id' => '8001','name' => '(GBL) - South Goulburn Is Airport, , Australia','country_id' => '12'),\narray('id' => '8002','name' => '(GUH) - Gunnedah Airport, , Australia','country_id' => '12'),\narray('id' => '8003','name' => '(GOO) - Goondiwindi Airport, , Australia','country_id' => '12'),\narray('id' => '8004','name' => '(GDD) - Gordon Downs Airport, Gordon Downs, Australia','country_id' => '12'),\narray('id' => '8005','name' => '(GGD) - Gregory Downs Airport, , Australia','country_id' => '12'),\narray('id' => '8006','name' => '(GTS) - Granite Downs Airport, , Australia','country_id' => '12'),\narray('id' => '8007','name' => '(GET) - Geraldton Airport, Geraldton, Australia','country_id' => '12'),\narray('id' => '8008','name' => '(GFN) - Grafton Airport, , Australia','country_id' => '12'),\narray('id' => '8009','name' => '(GBV) - Gibb River Airport, , Australia','country_id' => '12'),\narray('id' => '8010','name' => '(GKL) - Great Keppel Is Airport, Great Keppel Island, Australia','country_id' => '12'),\narray('id' => '8011','name' => '(GLT) - Gladstone Airport, Gladstone, Australia','country_id' => '12'),\narray('id' => '8012','name' => '(GUL) - Goulburn Airport, , Australia','country_id' => '12'),\narray('id' => '8013','name' => '(GLG) - Glengyle Airport, , Australia','country_id' => '12'),\narray('id' => '8014','name' => '(GEX) - Geelong Airport, , Australia','country_id' => '12'),\narray('id' => '8015','name' => '(GLI) - Glen Innes Airport, , Australia','country_id' => '12'),\narray('id' => '8016','name' => '(GLM) - Glenormiston Airport, , Australia','country_id' => '12'),\narray('id' => '8017','name' => '(GFE) - Grenfell Airport, Grenfell, Australia','country_id' => '12'),\narray('id' => '8018','name' => '(GVP) - Greenvale Airport, , Australia','country_id' => '12'),\narray('id' => '8019','name' => '(GPD) - Mount Gordon Airport, Mount Gordon Mine, Australia','country_id' => '12'),\narray('id' => '8020','name' => '(GPN) - Garden Point Airport, , Australia','country_id' => '12'),\narray('id' => '8021','name' => '(GSC) - Gascoyne Junction Airport, Gascoyne Junction, Australia','country_id' => '12'),\narray('id' => '8022','name' => '(GTE) - Groote Eylandt Airport, Groote Eylandt, Australia','country_id' => '12'),\narray('id' => '8023','name' => '(GFF) - Griffith Airport, Griffith, Australia','country_id' => '12'),\narray('id' => '8024','name' => '(GTT) - Georgetown Airport, , Australia','country_id' => '12'),\narray('id' => '8025','name' => '(GEE) - Georgetown (Tas) Airport, , Australia','country_id' => '12'),\narray('id' => '8026','name' => '(GYP) - Gympie Airport, , Australia','country_id' => '12'),\narray('id' => '8027','name' => '(HWK) - Wilpena Pound Airport, Hawker, Australia','country_id' => '12'),\narray('id' => '8028','name' => '(HXX) - Hay Airport, , Australia','country_id' => '12'),\narray('id' => '8029','name' => '(HVB) - Hervey Bay Airport, Hervey Bay, Australia','country_id' => '12'),\narray('id' => '8030','name' => '(HUB) - Humbert River Airport, , Australia','country_id' => '12'),\narray('id' => '8031','name' => '(HRY) - Henbury Airport, , Australia','country_id' => '12'),\narray('id' => '8032','name' => '(HIP) - Headingly Airport, , Australia','country_id' => '12'),\narray('id' => '8033','name' => '(HIG) - Highbury Airport, , Australia','country_id' => '12'),\narray('id' => '8034','name' => '(HID) - Horn Island Airport, Horn Island, Australia','country_id' => '12'),\narray('id' => '8035','name' => '(HLL) - Hillside Airport, Hillside, Australia','country_id' => '12'),\narray('id' => '8036','name' => '(HCQ) - Halls Creek Airport, , Australia','country_id' => '12'),\narray('id' => '8037','name' => '(HMG) - Hermannsburg Airport, , Australia','country_id' => '12'),\narray('id' => '8038','name' => '(HLT) - Hamilton Airport, , Australia','country_id' => '12'),\narray('id' => '8039','name' => '(HOK) - Hooker Creek Airport, Lajamanu, Australia','country_id' => '12'),\narray('id' => '8040','name' => '(MHU) - Mount Hotham Airport, Mount Hotham, Australia','country_id' => '12'),\narray('id' => '8041','name' => '(HTU) - Hopetoun Airport, , Australia','country_id' => '12'),\narray('id' => '8042','name' => '(HPE) - Hope Vale Airport, Hope Vale, Australia','country_id' => '12'),\narray('id' => '8043','name' => '(HSM) - Horsham Airport, , Australia','country_id' => '12'),\narray('id' => '8044','name' => '(HAT) - Heathlands Airport, , Australia','country_id' => '12'),\narray('id' => '8045','name' => '(HGD) - Hughenden Airport, , Australia','country_id' => '12'),\narray('id' => '8046','name' => '(IDK) - Indulkana Airport, , Australia','country_id' => '12'),\narray('id' => '8047','name' => '(IFL) - Innisfail Airport, , Australia','country_id' => '12'),\narray('id' => '8048','name' => '(IFF) - Iffley Airport, , Australia','country_id' => '12'),\narray('id' => '8049','name' => '(IGH) - Ingham Airport, , Australia','country_id' => '12'),\narray('id' => '8050','name' => '(IKP) - Inkerman Airport, , Australia','country_id' => '12'),\narray('id' => '8051','name' => '(INJ) - Injune Airport, Injune, Australia','country_id' => '12'),\narray('id' => '8052','name' => '(INM) - Innamincka Airport, , Australia','country_id' => '12'),\narray('id' => '8053','name' => '(IVW) - Inverway Airport, Inverway, Australia','country_id' => '12'),\narray('id' => '8054','name' => '(ISI) - Isisford Airport, , Australia','country_id' => '12'),\narray('id' => '8055','name' => '(IVR) - Inverell Airport, Inverell, Australia','country_id' => '12'),\narray('id' => '8056','name' => '(JAB) - Jabiru Airport, , Australia','country_id' => '12'),\narray('id' => '8057','name' => '(JUN) - Jundah Airport, , Australia','country_id' => '12'),\narray('id' => '8058','name' => '(QJD) - Jindabyne Airport, , Australia','country_id' => '12'),\narray('id' => '8059','name' => '(JCK) - Julia Creek Airport, , Australia','country_id' => '12'),\narray('id' => '8060','name' => '(JUR) - Jurien Bay Airport, , Australia','country_id' => '12'),\narray('id' => '8061','name' => '(UBU) - Kalumburu Airport, , Australia','country_id' => '12'),\narray('id' => '8062','name' => '(KDB) - Kambalda Airport, Kambalda, Australia','country_id' => '12'),\narray('id' => '8063','name' => '(KAX) - Kalbarri Airport, Kalbarri, Australia','country_id' => '12'),\narray('id' => '8064','name' => '(KBY) - Streaky Bay Airport, , Australia','country_id' => '12'),\narray('id' => '8065','name' => '(KBJ) - Kings Canyon Airport, Kings Canyon Resort, Australia','country_id' => '12'),\narray('id' => '8066','name' => '(KCS) - Kings Creek Airport, , Australia','country_id' => '12'),\narray('id' => '8067','name' => '(KRA) - Kerang Airport, , Australia','country_id' => '12'),\narray('id' => '8068','name' => '(KNS) - King Island Airport, , Australia','country_id' => '12'),\narray('id' => '8069','name' => '(KBB) - Kirkimbie Station Airport, Kirkimbie, Australia','country_id' => '12'),\narray('id' => '8070','name' => '(KFG) - Kalkgurung Airport, , Australia','country_id' => '12'),\narray('id' => '8071','name' => '(KOH) - Koolatah Airport, , Australia','country_id' => '12'),\narray('id' => '8072','name' => '(KKP) - Koolburra Airport, Koolburra, Australia','country_id' => '12'),\narray('id' => '8073','name' => '(KRB) - Karumba Airport, , Australia','country_id' => '12'),\narray('id' => '8074','name' => '(KML) - Kamileroi Airport, , Australia','country_id' => '12'),\narray('id' => '8075','name' => '(KPS) - Kempsey Airport, , Australia','country_id' => '12'),\narray('id' => '8076','name' => '(KNI) - Katanning Airport, , Australia','country_id' => '12'),\narray('id' => '8077','name' => '(KWM) - Kowanyama Airport, Kowanyama, Australia','country_id' => '12'),\narray('id' => '8078','name' => '(KPP) - Kalpowar Airport, Kalpower, Australia','country_id' => '12'),\narray('id' => '8079','name' => '(KGY) - Kingaroy Airport, , Australia','country_id' => '12'),\narray('id' => '8080','name' => '(KGC) - Kingscote Airport, , Australia','country_id' => '12'),\narray('id' => '8081','name' => '(KUG) - Kubin Airport, Moa Island, Australia','country_id' => '12'),\narray('id' => '8082','name' => '(KRD) - Kurundi Airport, Kurundi Station, Australia','country_id' => '12'),\narray('id' => '8083','name' => '(LWH) - Lawn Hill Airport, , Australia','country_id' => '12'),\narray('id' => '8084','name' => '(LGH) - Leigh Creek Airport, , Australia','country_id' => '12'),\narray('id' => '8085','name' => '(LNO) - Leonora Airport, Leonora, Australia','country_id' => '12'),\narray('id' => '8086','name' => '(LEL) - Lake Evella Airport, , Australia','country_id' => '12'),\narray('id' => '8087','name' => '(LFP) - Lakefield Airport, Lakefield, Australia','country_id' => '12'),\narray('id' => '8088','name' => '(LDH) - Lord Howe Island Airport, Lord Howe Island, Australia','country_id' => '12'),\narray('id' => '8089','name' => '(IRG) - Lockhart River Airport, Lockhart River, Australia','country_id' => '12'),\narray('id' => '8090','name' => '(LTP) - Lyndhurst Airport, Lyndhurst, Australia','country_id' => '12'),\narray('id' => '8091','name' => '(LIB) - Limbunya Airport, Limbunya, Australia','country_id' => '12'),\narray('id' => '8092','name' => '(LDC) - Lindeman Island Airport, Lindeman Island, Australia','country_id' => '12'),\narray('id' => '8093','name' => '(LSY) - Lismore Airport, Lismore, Australia','country_id' => '12'),\narray('id' => '8094','name' => '(LNH) - Lake Nash Airport, Alpurrurulam, Australia','country_id' => '12'),\narray('id' => '8095','name' => '(BBL) - Ballera Airport, , Australia','country_id' => '12'),\narray('id' => '8096','name' => '(LKD) - Lakeland Airport, Lakeland Downs, Australia','country_id' => '12'),\narray('id' => '8097','name' => '(LOC) - Lock Airport, Lock, Australia','country_id' => '12'),\narray('id' => '8098','name' => '(LOA) - Lorraine Airport, , Australia','country_id' => '12'),\narray('id' => '8099','name' => '(LTV) - Lotus Vale Airport, Lotus Vale, Australia','country_id' => '12'),\narray('id' => '8100','name' => '(YLP) - Mingan Airport, Mingan, Canada','country_id' => '35'),\narray('id' => '8101','name' => '(LUU) - Laura Airport, , Australia','country_id' => '12'),\narray('id' => '8102','name' => '(LHG) - Lightning Ridge Airport, , Australia','country_id' => '12'),\narray('id' => '8103','name' => '(LRE) - Longreach Airport, Longreach, Australia','country_id' => '12'),\narray('id' => '8104','name' => '(LUT) - New Laura Airport, , Australia','country_id' => '12'),\narray('id' => '8105','name' => '(LER) - Leinster Airport, , Australia','country_id' => '12'),\narray('id' => '8106','name' => '(LVO) - Laverton Airport, , Australia','country_id' => '12'),\narray('id' => '8107','name' => '(TGN) - Latrobe Valley Airport, Morwell, Australia','country_id' => '12'),\narray('id' => '8108','name' => '(LZR) - Lizard Island Airport, , Australia','country_id' => '12'),\narray('id' => '8109','name' => '(UBB) - Mabuiag Island Airport, Mabuiag Island, Australia','country_id' => '12'),\narray('id' => '8110','name' => '(AVV) - Avalon Airport, Melbourne, Australia','country_id' => '12'),\narray('id' => '8111','name' => '(ABX) - Albury Airport, Albury, Australia','country_id' => '12'),\narray('id' => '8112','name' => '(MRG) - Mareeba Airport, , Australia','country_id' => '12'),\narray('id' => '8113','name' => '(MBB) - Marble Bar Airport, , Australia','country_id' => '12'),\narray('id' => '8114','name' => '(XMC) - Mallacoota Airport, , Australia','country_id' => '12'),\narray('id' => '8115','name' => '(MFP) - Manners Creek Airport, , Australia','country_id' => '12'),\narray('id' => '8116','name' => '(MLR) - Millicent Airport, , Australia','country_id' => '12'),\narray('id' => '8117','name' => '(DGE) - Mudgee Airport, Mudgee, Australia','country_id' => '12'),\narray('id' => '8118','name' => '(MQA) - Mandora Airport, Mandora, Australia','country_id' => '12'),\narray('id' => '8119','name' => '(MNW) - Macdonald Downs Airport, , Australia','country_id' => '12'),\narray('id' => '8120','name' => '(MKR) - Meekatharra Airport, , Australia','country_id' => '12'),\narray('id' => '8121','name' => '(MEB) - Melbourne Essendon Airport, , Australia','country_id' => '12'),\narray('id' => '8122','name' => '(MIM) - Merimbula Airport, Merimbula, Australia','country_id' => '12'),\narray('id' => '8123','name' => '(MLV) - Merluna Airport, Merluna, Australia','country_id' => '12'),\narray('id' => '8124','name' => '(MGT) - Milingimbi Airport, Milingimbi Island, Australia','country_id' => '12'),\narray('id' => '8125','name' => '(MNG) - Maningrida Airport, Maningrida, Australia','country_id' => '12'),\narray('id' => '8126','name' => '(GSN) - Mount Gunson Airport, Mount Gunson, Australia','country_id' => '12'),\narray('id' => '8127','name' => '(MGV) - Margaret River (Station) Airport, , Australia','country_id' => '12'),\narray('id' => '8128','name' => '(MQZ) - Margaret River Airport, , Australia','country_id' => '12'),\narray('id' => '8129','name' => '(MVU) - Musgrave Airport, Musgrave, Australia','country_id' => '12'),\narray('id' => '8130','name' => '(HBA) - Hobart International Airport, Hobart, Australia','country_id' => '12'),\narray('id' => '8131','name' => '(MHO) - Mount House Airport, , Australia','country_id' => '12'),\narray('id' => '8132','name' => '(MCV) - McArthur River Mine Airport, McArthur River Mine, Australia','country_id' => '12'),\narray('id' => '8133','name' => '(MQL) - Mildura Airport, Mildura, Australia','country_id' => '12'),\narray('id' => '8134','name' => '(XML) - Minlaton Airport, , Australia','country_id' => '12'),\narray('id' => '8135','name' => '(MIH) - Mitchell Plateau Airport, Mitchell Plateau, Australia','country_id' => '12'),\narray('id' => '8136','name' => '(MTQ) - Mitchell Airport, , Australia','country_id' => '12'),\narray('id' => '8137','name' => '(MJP) - Manjimup Airport, , Australia','country_id' => '12'),\narray('id' => '8138','name' => '(WLE) - Miles Airport, , Australia','country_id' => '12'),\narray('id' => '8139','name' => '(LST) - Launceston Airport, Launceston, Australia','country_id' => '12'),\narray('id' => '8140','name' => '(MBW) - Melbourne Moorabbin Airport, Melbourne, Australia','country_id' => '12'),\narray('id' => '8141','name' => '(MEL) - Melbourne International Airport, Melbourne, Australia','country_id' => '12'),\narray('id' => '8142','name' => '(MMM) - Middlemount Airport, , Australia','country_id' => '12'),\narray('id' => '8143','name' => '(MTL) - Maitland Airport, , Australia','country_id' => '12'),\narray('id' => '8144','name' => '(WME) - Mount Keith Airport, , Australia','country_id' => '12'),\narray('id' => '8145','name' => '(ONR) - Monkira Airport, , Australia','country_id' => '12'),\narray('id' => '8146','name' => '(OXY) - Morney Airport, , Australia','country_id' => '12'),\narray('id' => '8147','name' => '(MMG) - Mount Magnet Airport, , Australia','country_id' => '12'),\narray('id' => '8148','name' => '(OOR) - Mooraberree Airport, , Australia','country_id' => '12'),\narray('id' => '8149','name' => '(MRZ) - Moree Airport, Moree, Australia','country_id' => '12'),\narray('id' => '8150','name' => '(MET) - Moreton Airport, Moreton, Australia','country_id' => '12'),\narray('id' => '8151','name' => '(MIN) - Minnipa Airport, , Australia','country_id' => '12'),\narray('id' => '8152','name' => '(MQE) - Marqua Airport, Marqua, Australia','country_id' => '12'),\narray('id' => '8153','name' => '(MOV) - Moranbah Airport, Moranbah, Australia','country_id' => '12'),\narray('id' => '8154','name' => '(RRE) - Marree Airport, , Australia','country_id' => '12'),\narray('id' => '8155','name' => '(MWB) - Morawa Airport, , Australia','country_id' => '12'),\narray('id' => '8156','name' => '(MYA) - Moruya Airport, Moruya, Australia','country_id' => '12'),\narray('id' => '8157','name' => '(MTD) - Mount Sanford Station Airport, , Australia','country_id' => '12'),\narray('id' => '8158','name' => '(MIY) - Mittebah Airport, , Australia','country_id' => '12'),\narray('id' => '8159','name' => '(UTB) - Muttaburra Airport, , Australia','country_id' => '12'),\narray('id' => '8160','name' => '(MGB) - Mount Gambier Airport, , Australia','country_id' => '12'),\narray('id' => '8161','name' => '(ONG) - Mornington Island Airport, , Australia','country_id' => '12'),\narray('id' => '8162','name' => '(MNQ) - Monto Airport, , Australia','country_id' => '12'),\narray('id' => '8163','name' => '(MUQ) - Muccan Station Airport, Muccan Station, Australia','country_id' => '12'),\narray('id' => '8164','name' => '(MNE) - Mungeranie Airport, Mungeranie, Australia','country_id' => '12'),\narray('id' => '8165','name' => '(MYI) - Murray Island Airport, Murray Island, Australia','country_id' => '12'),\narray('id' => '8166','name' => '(MVK) - Mulka Airport, Mulka, Australia','country_id' => '12'),\narray('id' => '8167','name' => '(MUP) - Mulga Park Airport, , Australia','country_id' => '12'),\narray('id' => '8168','name' => '(MKV) - Mount Cavenagh Airport, , Australia','country_id' => '12'),\narray('id' => '8169','name' => '(MXU) - Mullewa Airport, , Australia','country_id' => '12'),\narray('id' => '8170','name' => '(MWT) - Moolawatana Airport, Moolawatana Station, Australia','country_id' => '12'),\narray('id' => '8171','name' => '(MXD) - Marion Downs Airport, , Australia','country_id' => '12'),\narray('id' => '8172','name' => '(MBH) - Maryborough Airport, , Australia','country_id' => '12'),\narray('id' => '8173','name' => '(RTY) - Merty Merty Airport, , Australia','country_id' => '12'),\narray('id' => '8174','name' => '(NMR) - Nappa Merrie Airport, , Australia','country_id' => '12'),\narray('id' => '8175','name' => '(NRA) - Narrandera Airport, Narrandera, Australia','country_id' => '12'),\narray('id' => '8176','name' => '(NAA) - Narrabri Airport, Narrabri, Australia','country_id' => '12'),\narray('id' => '8177','name' => '(RPM) - Ngukurr Airport, , Australia','country_id' => '12'),\narray('id' => '8178','name' => '(NBH) - Nambucca Heads Airport, Nambucca Heads, Australia','country_id' => '12'),\narray('id' => '8179','name' => '(NLS) - Nicholson Airport, , Australia','country_id' => '12'),\narray('id' => '8180','name' => '(NKB) - Noonkanbah Airport, , Australia','country_id' => '12'),\narray('id' => '8181','name' => '(NMP) - New Moon Airport, Basalt, Australia','country_id' => '12'),\narray('id' => '8182','name' => '(NPP) - Napperby Airport, Napperby, Australia','country_id' => '12'),\narray('id' => '8183','name' => '(NAC) - Naracoorte Airport, , Australia','country_id' => '12'),\narray('id' => '8184','name' => '(NRG) - Narrogin Airport, Narrogin, Australia','country_id' => '12'),\narray('id' => '8185','name' => '(QRM) - Narromine Airport, , Australia','country_id' => '12'),\narray('id' => '8186','name' => '(RVT) - Ravensthorpe Airport, , Australia','country_id' => '12'),\narray('id' => '8187','name' => '(NSV) - Noosa Airport, , Australia','country_id' => '12'),\narray('id' => '8188','name' => '(NSM) - Norseman Airport, , Australia','country_id' => '12'),\narray('id' => '8189','name' => '(NTN) - Normanton Airport, Normanton, Australia','country_id' => '12'),\narray('id' => '8190','name' => '(NUR) - Nullabor Motel Airport, , Australia','country_id' => '12'),\narray('id' => '8191','name' => '(NLL) - Nullagine Airport, , Australia','country_id' => '12'),\narray('id' => '8192','name' => '(NUB) - Numbulwar Airport, , Australia','country_id' => '12'),\narray('id' => '8193','name' => '(UTD) - Nutwood Downs Airport, Nutwood Downs, Australia','country_id' => '12'),\narray('id' => '8194','name' => '(ZNE) - Newman Airport, Newman, Australia','country_id' => '12'),\narray('id' => '8195','name' => '(NYN) - Nyngan Airport, , Australia','country_id' => '12'),\narray('id' => '8196','name' => '(OPI) - Oenpelli Airport, , Australia','country_id' => '12'),\narray('id' => '8197','name' => '(YOI) - Opinaca Aerodrome, AlAonore Mine, Canada','country_id' => '35'),\narray('id' => '8198','name' => '(XCO) - Colac Airport, , Australia','country_id' => '12'),\narray('id' => '8199','name' => '(OLP) - Olympic Dam Airport, Olympic Dam, Australia','country_id' => '12'),\narray('id' => '8200','name' => '(ONS) - Onslow Airport, , Australia','country_id' => '12'),\narray('id' => '8201','name' => '(ODD) - Oodnadatta Airport, , Australia','country_id' => '12'),\narray('id' => '8202','name' => '(MOO) - Moomba Airport, , Australia','country_id' => '12'),\narray('id' => '8203','name' => '(RBS) - Orbost Airport, , Australia','country_id' => '12'),\narray('id' => '8204','name' => '(OAG) - Orange Airport, Orange, Australia','country_id' => '12'),\narray('id' => '8205','name' => '(ODR) - Ord River Airport, Ord River, Australia','country_id' => '12'),\narray('id' => '8206','name' => '(OSO) - Osborne Mine Airport, , Australia','country_id' => '12'),\narray('id' => '8207','name' => '(OYN) - Ouyen Airport, , Australia','country_id' => '12'),\narray('id' => '8208','name' => '(ADL) - Adelaide International Airport, Adelaide, Australia','country_id' => '12'),\narray('id' => '8209','name' => '(PUG) - Port Augusta Airport, , Australia','country_id' => '12'),\narray('id' => '8210','name' => '(PMK) - Palm Island Airport, , Australia','country_id' => '12'),\narray('id' => '8211','name' => '(PBO) - Paraburdoo Airport, Paraburdoo, Australia','country_id' => '12'),\narray('id' => '8212','name' => '(CCK) - Cocos (Keeling) Islands Airport, Cocos (Keeling) Islands, Cocos (Keeling) Islands','country_id' => '36'),\narray('id' => '8213','name' => '(PDN) - Parndana Airport, Kangaroo Island, Australia','country_id' => '12'),\narray('id' => '8214','name' => '(PDE) - Pandie Pandie Airport, , Australia','country_id' => '12'),\narray('id' => '8215','name' => '(DRW) - Darwin International Airport, Darwin, Australia','country_id' => '12'),\narray('id' => '8216','name' => '(PRD) - Pardoo Airport, Pardoo, Australia','country_id' => '12'),\narray('id' => '8217','name' => '(BEO) - Lake Macquarie Airport, , Australia','country_id' => '12'),\narray('id' => '8218','name' => '(GOV) - Gove Airport, Nhulunbuy, Australia','country_id' => '12'),\narray('id' => '8219','name' => '(PPI) - Port Pirie Airport, , Australia','country_id' => '12'),\narray('id' => '8220','name' => '(JAD) - Perth Jandakot Airport, Perth, Australia','country_id' => '12'),\narray('id' => '8221','name' => '(KTA) - Karratha Airport, Karratha, Australia','country_id' => '12'),\narray('id' => '8222','name' => '(KGI) - Kalgoorlie Boulder Airport, Kalgoorlie, Australia','country_id' => '12'),\narray('id' => '8223','name' => '(PKE) - Parkes Airport, Parkes, Australia','country_id' => '12'),\narray('id' => '8224','name' => '(PKT) - Port Keats Airport, , Australia','country_id' => '12'),\narray('id' => '8225','name' => '(KNX) - Kununurra Airport, Kununurra, Australia','country_id' => '12'),\narray('id' => '8226','name' => '(PLO) - Port Lincoln Airport, Port Lincoln, Australia','country_id' => '12'),\narray('id' => '8227','name' => '(LEA) - Learmonth Airport, Exmouth, Australia','country_id' => '12'),\narray('id' => '8228','name' => '(PXH) - Prominent Hill Airport, OZ Minerals Prominent Hill Mine, Australia','country_id' => '12'),\narray('id' => '8229','name' => '(EDR) - Pormpuraaw Airport, Pormpuraaw, Australia','country_id' => '12'),\narray('id' => '8230','name' => '(PQQ) - Port Macquarie Airport, Port Macquarie, Australia','country_id' => '12'),\narray('id' => '8231','name' => '(PEY) - Penong Airport, Penong, Australia','country_id' => '12'),\narray('id' => '8232','name' => '(PTJ) - Portland Airport, , Australia','country_id' => '12'),\narray('id' => '8233','name' => '(PHE) - Port Hedland International Airport, Port Hedland, Australia','country_id' => '12'),\narray('id' => '8234','name' => '(PER) - Perth International Airport, Perth, Australia','country_id' => '12'),\narray('id' => '8235','name' => '(PEA) - Penneshaw Airport, Ironstone, Australia','country_id' => '12'),\narray('id' => '8236','name' => '(KTR) - Tindal Airport, , Australia','country_id' => '12'),\narray('id' => '8237','name' => '(UMR) - Woomera Airfield, Woomera, Australia','country_id' => '12'),\narray('id' => '8238','name' => '(XCH) - Christmas Island Airport, Christmas Island, Christmas Island','country_id' => '51'),\narray('id' => '8239','name' => '(UIR) - Quirindi Airport, , Australia','country_id' => '12'),\narray('id' => '8240','name' => '(ULP) - Quilpie Airport, , Australia','country_id' => '12'),\narray('id' => '8241','name' => '(UEE) - Queenstown Airport, , Australia','country_id' => '12'),\narray('id' => '8242','name' => '(RRV) - Robinson River Airport, , Australia','country_id' => '12'),\narray('id' => '8243','name' => '(YRD) - Dean River Airport, Kimsquit Valley, Canada','country_id' => '35'),\narray('id' => '8244','name' => '(RMK) - Renmark Airport, , Australia','country_id' => '12'),\narray('id' => '8245','name' => '(RCM) - Richmond Airport, , Australia','country_id' => '12'),\narray('id' => '8246','name' => '(RAM) - Ramingining Airport, , Australia','country_id' => '12'),\narray('id' => '8247','name' => '(ROH) - Robinhood Airport, , Australia','country_id' => '12'),\narray('id' => '8248','name' => '(RBU) - Roebourne Airport, Roebourne, Australia','country_id' => '12'),\narray('id' => '8249','name' => '(RBC) - Robinvale Airport, , Australia','country_id' => '12'),\narray('id' => '8250','name' => '(RMA) - Roma Airport, Roma, Australia','country_id' => '12'),\narray('id' => '8251','name' => '(RPB) - Roper Bar Airport, Roper Bar, Australia','country_id' => '12'),\narray('id' => '8252','name' => '(RSB) - Roseberth Airport, , Australia','country_id' => '12'),\narray('id' => '8253','name' => '(RTS) - Rottnest Island Airport, , Australia','country_id' => '12'),\narray('id' => '8254','name' => '(RTP) - Rutland Plains Airport, , Australia','country_id' => '12'),\narray('id' => '8255','name' => '(RHL) - Roy Hill Station Airport, , Australia','country_id' => '12'),\narray('id' => '8256','name' => '(NDS) - Sandstone Airport, Sandstone, Australia','country_id' => '12'),\narray('id' => '8257','name' => '(BWU) - Sydney Bankstown Airport, Sydney, Australia','country_id' => '12'),\narray('id' => '8258','name' => '(CBR) - Canberra International Airport, Canberra, Australia','country_id' => '12'),\narray('id' => '8259','name' => '(CFS) - Coffs Harbour Airport, Coffs Harbour, Australia','country_id' => '12'),\narray('id' => '8260','name' => '(CDU) - Camden Airport, , Australia','country_id' => '12'),\narray('id' => '8261','name' => '(NSO) - Scone Airport, , Australia','country_id' => '12'),\narray('id' => '8262','name' => '(SQC) - Southern Cross Airport, , Australia','country_id' => '12'),\narray('id' => '8263','name' => '(DBO) - Dubbo City Regional Airport, Dubbo, Australia','country_id' => '12'),\narray('id' => '8264','name' => '(SGO) - St George Airport, , Australia','country_id' => '12'),\narray('id' => '8265','name' => '(SIX) - Singleton Airport, Singleton, Australia','country_id' => '12'),\narray('id' => '8266','name' => '(ZGL) - South Galway Airport, , Australia','country_id' => '12'),\narray('id' => '8267','name' => '(SGP) - Shay Gap Airport, Shay Gap, Australia','country_id' => '12'),\narray('id' => '8268','name' => '(MJK) - Shark Bay Airport, Denham, Australia','country_id' => '12'),\narray('id' => '8269','name' => '(JHQ) - Shute Harbour Airport, , Australia','country_id' => '12'),\narray('id' => '8270','name' => '(SHT) - Shepparton Airport, , Australia','country_id' => '12'),\narray('id' => '8271','name' => '(SBR) - Saibai Island Airport, Saibai Island, Australia','country_id' => '12'),\narray('id' => '8272','name' => '(SIO) - Smithton Airport, , Australia','country_id' => '12'),\narray('id' => '8273','name' => '(SHU) - Smith Point Airport, , Australia','country_id' => '12'),\narray('id' => '8274','name' => '(STH) - Strathmore Airport, , Australia','country_id' => '12'),\narray('id' => '8275','name' => '(SNB) - Snake Bay Airport, , Australia','country_id' => '12'),\narray('id' => '8276','name' => '(NLK) - Norfolk Island International Airport, Burnt Pine, Norfolk Island','country_id' => '159'),\narray('id' => '8277','name' => '(NOA) - Nowra Airport, , Australia','country_id' => '12'),\narray('id' => '8278','name' => '(SNH) - Stanthorpe Airport, , Australia','country_id' => '12'),\narray('id' => '8279','name' => '(SCG) - Spring Creek Airport, , Australia','country_id' => '12'),\narray('id' => '8280','name' => '(SHQ) - Southport Airport, , Australia','country_id' => '12'),\narray('id' => '8281','name' => '(KSV) - Springvale Airport, , Australia','country_id' => '12'),\narray('id' => '8282','name' => '(XRH) - RAAF Base Richmond, Richmond, Australia','country_id' => '12'),\narray('id' => '8283','name' => '(SRN) - Strahan Airport, , Australia','country_id' => '12'),\narray('id' => '8284','name' => '(SYD) - Sydney Kingsford Smith International Airport, Sydney, Australia','country_id' => '12'),\narray('id' => '8285','name' => '(HLS) - St Helens Airport, , Australia','country_id' => '12'),\narray('id' => '8286','name' => '(TMW) - Tamworth Airport, Tamworth, Australia','country_id' => '12'),\narray('id' => '8287','name' => '(SSP) - Silver Plains Airport, Silver Plains, Australia','country_id' => '12'),\narray('id' => '8288','name' => '(WGA) - Wagga Wagga City Airport, Wagga Wagga, Australia','country_id' => '12'),\narray('id' => '8289','name' => '(SWH) - Swan Hill Airport, , Australia','country_id' => '12'),\narray('id' => '8290','name' => '(SWC) - Stawell Airport, , Australia','country_id' => '12'),\narray('id' => '8291','name' => '(XTR) - Tara Airport, , Australia','country_id' => '12'),\narray('id' => '8292','name' => '(TBL) - Tableland Homestead Airport, , Australia','country_id' => '12'),\narray('id' => '8293','name' => '(XTO) - Taroom Airport, , Australia','country_id' => '12'),\narray('id' => '8294','name' => '(TAQ) - Tarcoola Airport, Tarcoola, Australia','country_id' => '12'),\narray('id' => '8295','name' => '(PYX) - Pattaya Airpark, Pattaya, Thailand','country_id' => '213'),\narray('id' => '8296','name' => '(TBK) - Timber Creek Airport, , Australia','country_id' => '12'),\narray('id' => '8297','name' => '(TDR) - Theodore Airport, , Australia','country_id' => '12'),\narray('id' => '8298','name' => '(TQP) - Trepell Airport, Trepell, Australia','country_id' => '12'),\narray('id' => '8299','name' => '(TEF) - Telfer Airport, , Australia','country_id' => '12'),\narray('id' => '8300','name' => '(TEM) - Temora Airport, , Australia','country_id' => '12'),\narray('id' => '8301','name' => '(TAN) - Tangalooma Airport, , Australia','country_id' => '12'),\narray('id' => '8302','name' => '(XTG) - Thargomindah Airport, , Australia','country_id' => '12'),\narray('id' => '8303','name' => '(TDN) - Theda Station Airport, Theda Station, Australia','country_id' => '12'),\narray('id' => '8304','name' => '(TYG) - Thylungra Airport, , Australia','country_id' => '12'),\narray('id' => '8305','name' => '(TYB) - Tibooburra Airport, , Australia','country_id' => '12'),\narray('id' => '8306','name' => '(TKY) - Turkey Creek Airport, Turkey Creek, Australia','country_id' => '12'),\narray('id' => '8307','name' => '(PHQ) - The Monument Airport, Phosphate Hill, Australia','country_id' => '12'),\narray('id' => '8308','name' => '(TUM) - Tumut Airport, , Australia','country_id' => '12'),\narray('id' => '8309','name' => '(TYP) - Tobermorey Airport, Tobermorey, Australia','country_id' => '12'),\narray('id' => '8310','name' => '(TXR) - Tanbar Airport, Tanbar Station, Australia','country_id' => '12'),\narray('id' => '8311','name' => '(THG) - Thangool Airport, Biloela, Australia','country_id' => '12'),\narray('id' => '8312','name' => '(TCA) - Tennant Creek Airport, Tennant Creek, Australia','country_id' => '12'),\narray('id' => '8313','name' => '(TCW) - Tocumwal Airport, , Australia','country_id' => '12'),\narray('id' => '8314','name' => '(TRO) - Taree Airport, Taree, Australia','country_id' => '12'),\narray('id' => '8315','name' => '(TTX) - Truscott-Mungalalu Airport, Anjo Peninsula, Australia','country_id' => '12'),\narray('id' => '8316','name' => '(TWB) - Toowoomba Airport, , Australia','country_id' => '12'),\narray('id' => '8317','name' => '(UDA) - Undara Airport, , Australia','country_id' => '12'),\narray('id' => '8318','name' => '(CZY) - Cluny Airport, , Australia','country_id' => '12'),\narray('id' => '8319','name' => '(USL) - Useless Loop Airport, , Australia','country_id' => '12'),\narray('id' => '8320','name' => '(VCD) - Victoria River Downs Airport, , Australia','country_id' => '12'),\narray('id' => '8321','name' => '(VNR) - Vanrook Station Airport, , Australia','country_id' => '12'),\narray('id' => '8322','name' => '(WLA) - Wallal Airport, Wallal, Australia','country_id' => '12'),\narray('id' => '8323','name' => '(WAV) - Wave Hill Airport, , Australia','country_id' => '12'),\narray('id' => '8324','name' => '(WMB) - Warrnambool Airport, , Australia','country_id' => '12'),\narray('id' => '8325','name' => '(SYU) - Warraber Island Airport, Sue Islet, Australia','country_id' => '12'),\narray('id' => '8326','name' => '(WIO) - Wilcannia Airport, , Australia','country_id' => '12'),\narray('id' => '8327','name' => '(WLC) - Walcha Airport, , Australia','country_id' => '12'),\narray('id' => '8328','name' => '(WAZ) - Warwick Airport, , Australia','country_id' => '12'),\narray('id' => '8329','name' => '(WND) - Windarra Airport, , Australia','country_id' => '12'),\narray('id' => '8330','name' => '(WNR) - Windorah Airport, , Australia','country_id' => '12'),\narray('id' => '8331','name' => '(WON) - Wondoola Airport, Wondoola, Australia','country_id' => '12'),\narray('id' => '8332','name' => '(MFL) - Mount Full Stop Airport, Wando Vale, Australia','country_id' => '12'),\narray('id' => '8333','name' => '(WGT) - Wangaratta Airport, , Australia','country_id' => '12'),\narray('id' => '8334','name' => '(WYA) - Whyalla Airport, Whyalla, Australia','country_id' => '12'),\narray('id' => '8335','name' => '(WSY) - Whitsunday Island Airport, , Australia','country_id' => '12'),\narray('id' => '8336','name' => '(WIT) - Wittenoom Airport, , Australia','country_id' => '12'),\narray('id' => '8337','name' => '(WKB) - Warracknabeal Airport, , Australia','country_id' => '12'),\narray('id' => '8338','name' => '(WGE) - Walgett Airport, , Australia','country_id' => '12'),\narray('id' => '8339','name' => '(NTL) - Newcastle Airport, Williamtown, Australia','country_id' => '12'),\narray('id' => '8340','name' => '(WUN) - Wiluna Airport, , Australia','country_id' => '12'),\narray('id' => '8341','name' => '(WPK) - Wrotham Park Airport, , Australia','country_id' => '12'),\narray('id' => '8342','name' => '(WDI) - Wondai Airport, , Australia','country_id' => '12'),\narray('id' => '8343','name' => '(WOL) - Wollongong Airport, , Australia','country_id' => '12'),\narray('id' => '8344','name' => '(WLL) - Wollogorang Airport, , Australia','country_id' => '12'),\narray('id' => '8345','name' => '(QRR) - Warren Airport, , Australia','country_id' => '12'),\narray('id' => '8346','name' => '(SXE) - West Sale Airport, Sale, Australia','country_id' => '12'),\narray('id' => '8347','name' => '(WLO) - Waterloo Airport, , Australia','country_id' => '12'),\narray('id' => '8348','name' => '(WIN) - Winton Airport, , Australia','country_id' => '12'),\narray('id' => '8349','name' => '(WUD) - Wudinna Airport, , Australia','country_id' => '12'),\narray('id' => '8350','name' => '(WEW) - Wee Waa Airport, , Australia','country_id' => '12'),\narray('id' => '8351','name' => '(WRW) - Warrawagine Airport, , Australia','country_id' => '12'),\narray('id' => '8352','name' => '(WWI) - Woodie Woodie Airport, Woodie Woodie, Australia','country_id' => '12'),\narray('id' => '8353','name' => '(WWY) - West Wyalong Airport, West Wyalong, Australia','country_id' => '12'),\narray('id' => '8354','name' => '(WYN) - Wyndham Airport, , Australia','country_id' => '12'),\narray('id' => '8355','name' => '(BWT) - Wynyard Airport, Burnie, Australia','country_id' => '12'),\narray('id' => '8356','name' => '(YLG) - Yalgoo Airport, Yalgoo, Australia','country_id' => '12'),\narray('id' => '8357','name' => '(OKR) - Yorke Island Airport, Yorke Island, Australia','country_id' => '12'),\narray('id' => '8358','name' => '(KYF) - Yeelirrie Airport, , Australia','country_id' => '12'),\narray('id' => '8359','name' => '(XMY) - Yam Island Airport, Yam Island, Australia','country_id' => '12'),\narray('id' => '8360','name' => '(YUE) - Yuendumu Airport, , Australia','country_id' => '12'),\narray('id' => '8361','name' => '(NGA) - Young Airport, , Australia','country_id' => '12'),\narray('id' => '8362','name' => '(ORR) - Yorketown Airport, , Australia','country_id' => '12'),\narray('id' => '8363','name' => '(KYI) - Yalata Mission Airport, Yalata Mission, Australia','country_id' => '12'),\narray('id' => '8364','name' => '(KKI) - Akiachak Airport, Akiachak, United States','country_id' => '228'),\narray('id' => '8365','name' => '(BCC) - Bear Creek 3 Airport, Bear Creek, United States','country_id' => '228'),\narray('id' => '8366','name' => '(KBC) - Birch Creek Airport, Birch Creek, United States','country_id' => '228'),\narray('id' => '8367','name' => '(CZC) - Copper Center 2 Airport, Copper Center, United States','country_id' => '228'),\narray('id' => '8368','name' => '(ULX) - Ulusaba Airport, Ulusaba, South Africa','country_id' => '243'),\narray('id' => '8369','name' => '(TDT) - Tanda Tula Airport, Welverdiend, South Africa','country_id' => '243'),\narray('id' => '8370','name' => '(HZV) - Hazyview Airport, Hazyview, South Africa','country_id' => '243'),\narray('id' => '8371','name' => '(KHO) - Khoka Moya Airport, Khoka Moya, South Africa','country_id' => '243'),\narray('id' => '8372','name' => '(MBM) - Mkambati Airport, Mkambati, South Africa','country_id' => '243'),\narray('id' => '8373','name' => '(INY) - Inyati Airport, Inyati, South Africa','country_id' => '243'),\narray('id' => '8374','name' => '(TSD) - Tshipise Airport, Tshipise, South Africa','country_id' => '243'),\narray('id' => '8375','name' => '(KIG) - Koingnaas Airport, Koingnaas, South Africa','country_id' => '243'),\narray('id' => '8376','name' => '(PEK) - Beijing Capital International Airport, Beijing, China','country_id' => '45'),\narray('id' => '8377','name' => '(CIF) - Chifeng Airport, Chifeng, China','country_id' => '45'),\narray('id' => '8378','name' => '(CIH) - Changzhi Airport, Changzhi, China','country_id' => '45'),\narray('id' => '8379','name' => '(BPE) - Qinhuangdao Beidaihe Airport, Qinhuangdao, China','country_id' => '45'),\narray('id' => '8380','name' => '(DSN) - Ordos Ejin Horo Airport, Ordos, China','country_id' => '45'),\narray('id' => '8381','name' => '(DAT) - Datong Airport, Datong, China','country_id' => '45'),\narray('id' => '8382','name' => '(ERL) - Erenhot Saiwusu International Airport, Erenhot,, China','country_id' => '45'),\narray('id' => '8383','name' => '(YIE) - Arxan Yi\\'ershi Airport, Arxan, China','country_id' => '45'),\narray('id' => '8384','name' => '(HDG) - Handan Airport, Handan, China','country_id' => '45'),\narray('id' => '8385','name' => '(HET) - Baita International Airport, Hohhot, China','country_id' => '45'),\narray('id' => '8386','name' => '(ZBK) - abljak Airport, abljak Airport, Montenegro','country_id' => '136'),\narray('id' => '8387','name' => '(HLD) - Dongshan Airport, Hailar, China','country_id' => '45'),\narray('id' => '8388','name' => '(NAY) - Beijing Nanyuan Airport, Beijing, China','country_id' => '45'),\narray('id' => '8389','name' => '(BAV) - Baotou Airport, Baotou, China','country_id' => '45'),\narray('id' => '8390','name' => '(SJW) - Shijiazhuang Daguocun International Airport, Shijiazhuang, China','country_id' => '45'),\narray('id' => '8391','name' => '(TSN) - Tianjin Binhai International Airport, Tianjin, China','country_id' => '45'),\narray('id' => '8392','name' => '(TGO) - Tongliao Airport, Tongliao, China','country_id' => '45'),\narray('id' => '8393','name' => '(WUA) - Wuhai Airport, Wuhai, China','country_id' => '45'),\narray('id' => '8394','name' => '(HLH) - Ulanhot Airport, Ulanhot, China','country_id' => '45'),\narray('id' => '8395','name' => '(XIL) - Xilinhot Airport, Xilinhot, China','country_id' => '45'),\narray('id' => '8396','name' => '(XNT) - Xingtai Dalian Airport, Xingtai, China','country_id' => '45'),\narray('id' => '8397','name' => '(YCU) - Yuncheng Guangong Airport, Yuncheng, China','country_id' => '45'),\narray('id' => '8398','name' => '(TYN) - Taiyuan Wusu Airport, Taiyuan, China','country_id' => '45'),\narray('id' => '8399','name' => '(RLK) - Bayannur Tianjitai Airport, Bavannur, China','country_id' => '45'),\narray('id' => '8400','name' => '(ZDY) - Delma Airport, Delma Island, United Arab Emirates','country_id' => '1'),\narray('id' => '8401','name' => '(ZEN) - Zenag Airport, Zenag, Papua New Guinea','country_id' => '172'),\narray('id' => '8402','name' => '(BHY) - Beihai Airport, Beihai, China','country_id' => '45'),\narray('id' => '8403','name' => '(CGD) - Changde Airport, Changde, China','country_id' => '45'),\narray('id' => '8404','name' => '(HJJ) - Zhijiang Airport, Huaihua, China','country_id' => '45'),\narray('id' => '8405','name' => '(DYG) - Dayong Airport, Dayong, China','country_id' => '45'),\narray('id' => '8406','name' => '(CAN) - Guangzhou Baiyun International Airport, Guangzhou, China','country_id' => '45'),\narray('id' => '8407','name' => '(CSX) - Changsha Huanghua International Airport, Changsha, China','country_id' => '45'),\narray('id' => '8408','name' => '(HCJ) - Hechi Jinchengjiang Airport, Hechi, China','country_id' => '45'),\narray('id' => '8409','name' => '(SHF) - Huayuan Airport, Shihezi, China','country_id' => '45'),\narray('id' => '8410','name' => '(HNY) - Hengyang Nanyue Airport, Hengyang, China','country_id' => '45'),\narray('id' => '8411','name' => '(KWL) - Guilin Liangjiang International Airport, Guilin City, China','country_id' => '45'),\narray('id' => '8412','name' => '(LLF) - Lingling Airport, Yongzhou, China','country_id' => '45'),\narray('id' => '8413','name' => '(MXZ) - Meixian Airport, Meixian, China','country_id' => '45'),\narray('id' => '8414','name' => '(NNG) - Nanning Wuxu Airport, Nanning, China','country_id' => '45'),\narray('id' => '8415','name' => '(SWA) - Jieyang Chaoshan International Airport, Shantou, China','country_id' => '45'),\narray('id' => '8416','name' => '(ZUH) - Zhuhai Jinwan Airport, Zhuhai, China','country_id' => '45'),\narray('id' => '8417','name' => '(SZX) - Shenzhen Bao\\'an International Airport, Shenzhen, China','country_id' => '45'),\narray('id' => '8418','name' => '(WUZ) - Wuzhou Changzhoudao Airport, Wuzhou, China','country_id' => '45'),\narray('id' => '8419','name' => '(XIN) - Xingning Airport, Xingning, China','country_id' => '45'),\narray('id' => '8420','name' => '(LZH) - Liuzhou Bailian Airport, Liuzhou, China','country_id' => '45'),\narray('id' => '8421','name' => '(ZHA) - Zhanjiang Airport, Zhanjiang, China','country_id' => '45'),\narray('id' => '8422','name' => '(AYN) - Anyang Airport, Anyang, China','country_id' => '45'),\narray('id' => '8423','name' => '(CGO) - Zhengzhou Xinzheng International Airport, Zhengzhou, China','country_id' => '45'),\narray('id' => '8424','name' => '(ENH) - Enshi Airport, Enshi, China','country_id' => '45'),\narray('id' => '8425','name' => '(LHK) - Guangzhou MR Air Base, Guanghua, China','country_id' => '45'),\narray('id' => '8426','name' => '(WUH) - Wuhan Tianhe International Airport, Wuhan, China','country_id' => '45'),\narray('id' => '8427','name' => '(LYA) - Luoyang Airport, Luoyang, China','country_id' => '45'),\narray('id' => '8428','name' => '(NNY) - Nanyang Jiangying Airport, Nanyang, China','country_id' => '45'),\narray('id' => '8429','name' => '(SHS) - Shashi Airport, Shashi, China','country_id' => '45'),\narray('id' => '8430','name' => '(WDS) - Shiyan Wudangshan Airport, Shiyan, China','country_id' => '45'),\narray('id' => '8431','name' => '(XFN) - Xiangyang Liuji Airport, Xiangfan, China','country_id' => '45'),\narray('id' => '8432','name' => '(YIH) - Yichang Sanxia Airport, Yichang, China','country_id' => '45'),\narray('id' => '8433','name' => '(HAK) - Haikou Meilan International Airport, Haikou, China','country_id' => '45'),\narray('id' => '8434','name' => '(SYX) - Sanya Phoenix International Airport, Sanya, China','country_id' => '45'),\narray('id' => '8435','name' => '(FNJ) - Pyongyang Sunan International Airport, Pyongyang, North Korea','country_id' => '117'),\narray('id' => '8436','name' => '(DSO) - Sondok Airport, Sndng-ni, North Korea','country_id' => '117'),\narray('id' => '8437','name' => '(WOS) - Wonsan Kalma International Airport, Wonsan, North Korea','country_id' => '117'),\narray('id' => '8438','name' => '(AKA) - Ankang Wulipu Airport, Ankang, China','country_id' => '45'),\narray('id' => '8439','name' => '(DNH) - Dunhuang Airport, Dunhuang, China','country_id' => '45'),\narray('id' => '8440','name' => '(HXD) - Delingha Airport, Delingha, China','country_id' => '45'),\narray('id' => '8441','name' => '(GOQ) - Golmud Airport, Golmud, China','country_id' => '45'),\narray('id' => '8442','name' => '(GYU) - Guyuan Liupanshan Airport, Guyuan, China','country_id' => '45'),\narray('id' => '8443','name' => '(HTT) - Huatugou Airport, Mengnai, China','country_id' => '45'),\narray('id' => '8444','name' => '(HZG) - Hanzhong Chenggu Airport, Hanzhong, China','country_id' => '45'),\narray('id' => '8445','name' => '(INC) - Yinchuan Airport, Yinchuan, China','country_id' => '45'),\narray('id' => '8446','name' => '(JNG) - Jining Qufu Airport, Jining, China','country_id' => '45'),\narray('id' => '8447','name' => '(JGN) - Jiayuguan Airport, Jiayuguan, China','country_id' => '45'),\narray('id' => '8448','name' => '(LHW) - Lanzhou Zhongchuan Airport, Lanzhou, China','country_id' => '45'),\narray('id' => '8449','name' => '(IQN) - Qingyang Airport, Qingyang, China','country_id' => '45'),\narray('id' => '8450','name' => '(SIA) - Xi\\'an Xiguan Airport, Xi\\'an, China','country_id' => '45'),\narray('id' => '8451','name' => '(GXH) - Gannan Xiahe Airport, Xiahe, China','country_id' => '45'),\narray('id' => '8452','name' => '(XNN) - Xining Caojiabu Airport, Xining, China','country_id' => '45'),\narray('id' => '8453','name' => '(XIY) - Xi\\'an Xianyang International Airport, Xianyang, China','country_id' => '45'),\narray('id' => '8454','name' => '(ENY) - Yan\\'an Ershilipu Airport, Yan\\'an, China','country_id' => '45'),\narray('id' => '8455','name' => '(UYN) - Yulin Yuyang Airport, Yulin, China','country_id' => '45'),\narray('id' => '8456','name' => '(ZHY) - Zhongwei Shapotou Airport, Zhongwei, China','country_id' => '45'),\narray('id' => '8457','name' => '(AVK) - Arvaikheer Airport, Arvaikheer, Mongolia','country_id' => '143'),\narray('id' => '8458','name' => '(LTI) - Altai Airport, Altai, Mongolia','country_id' => '143'),\narray('id' => '8459','name' => '(BYN) - Bayankhongor Airport, Bayankhongor, Mongolia','country_id' => '143'),\narray('id' => '8460','name' => '(UGA) - Bulgan Airport, Bulgan, Mongolia','country_id' => '143'),\narray('id' => '8461','name' => '(UGT) - Bulagtai Resort Airport, Umnugobitour, Mongolia','country_id' => '143'),\narray('id' => '8462','name' => '(HBU) - Bulgan Sum Airport, Bulgan, Mongolia','country_id' => '143'),\narray('id' => '8463','name' => '(UUN) - Baruun Urt Airport, , Mongolia','country_id' => '143'),\narray('id' => '8464','name' => '(COQ) - Choibalsan Airport, , Mongolia','country_id' => '143'),\narray('id' => '8465','name' => '(ZMD) - Sena Madureira Airport, Sena Madureira, Brazil','country_id' => '29'),\narray('id' => '8466','name' => '(ULZ) - Donoi Airport, Uliastai, Mongolia','country_id' => '143'),\narray('id' => '8467','name' => '(DLZ) - Dalanzadgad Airport, Dalanzadgad, Mongolia','country_id' => '143'),\narray('id' => '8468','name' => '(KHR) - Kharkhorin Airport, , Mongolia','country_id' => '143'),\narray('id' => '8469','name' => '(HJT) - Khujirt Airport, Khujirt, Mongolia','country_id' => '143'),\narray('id' => '8470','name' => '(HVD) - Khovd Airport, Khovd, Mongolia','country_id' => '143'),\narray('id' => '8471','name' => '(MXV) - MArAn Airport, MArAn, Mongolia','country_id' => '143'),\narray('id' => '8472','name' => '(TSZ) - Tselserleg Airport, Tselserleg, Mongolia','country_id' => '143'),\narray('id' => '8473','name' => '(TNZ) - Tosontsengel Airport, Tosontsengel, Mongolia','country_id' => '143'),\narray('id' => '8474','name' => '(ULN) - Chinggis Khaan International Airport, Ulan Bator, Mongolia','country_id' => '143'),\narray('id' => '8475','name' => '(ULO) - Ulaangom Airport, Ulaangom, Mongolia','country_id' => '143'),\narray('id' => '8476','name' => '(ULG) - Ulgii Mongolei Airport, , Mongolia','country_id' => '143'),\narray('id' => '8477','name' => '(ZNC) - Nyac Airport, Nyac, United States','country_id' => '228'),\narray('id' => '8478','name' => '(DLU) - Dali Airport, Xiaguan, China','country_id' => '45'),\narray('id' => '8479','name' => '(DIG) - Diqing Airport, Shangri-La, China','country_id' => '45'),\narray('id' => '8480','name' => '(JHG) - Xishuangbanna Gasa Airport, Jinghong, China','country_id' => '45'),\narray('id' => '8481','name' => '(LJG) - Lijiang Airport, Lijiang, China','country_id' => '45'),\narray('id' => '8482','name' => '(LUM) - Mangshi Airport, Luxi, China','country_id' => '45'),\narray('id' => '8483','name' => '(KMG) - Kunming Changshui International Airport, Kunming, China','country_id' => '45'),\narray('id' => '8484','name' => '(SYM) - Pu\\'er Simao Airport, Pu\\'er, China','country_id' => '45'),\narray('id' => '8485','name' => '(WNH) - Wenshan Puzhehei Airport, Wenshan, China','country_id' => '45'),\narray('id' => '8486','name' => '(ZAT) - Zhaotong Airport, Zhaotong, China','country_id' => '45'),\narray('id' => '8487','name' => '(XMN) - Xiamen Gaoqi International Airport, Xiamen, China','country_id' => '45'),\narray('id' => '8488','name' => '(AQG) - Anqing Tianzhushan Airport, Anqing, China','country_id' => '45'),\narray('id' => '8489','name' => '(BFU) - Bengbu Airport, Bengbu, China','country_id' => '45'),\narray('id' => '8490','name' => '(CZX) - Changzhou Benniu Airport, Changzhou, China','country_id' => '45'),\narray('id' => '8491','name' => '(KHN) - Nanchang Changbei International Airport, Nanchang, China','country_id' => '45'),\narray('id' => '8492','name' => '(FUG) - Fuyang Xiguan Airport, Fuyang, China','country_id' => '45'),\narray('id' => '8493','name' => '(FOC) - Fuzhou Changle International Airport, Fuzhou, China','country_id' => '45'),\narray('id' => '8494','name' => '(KOW) - Ganzhou Airport, Ganzhou, China','country_id' => '45'),\narray('id' => '8495','name' => '(HGH) - Hangzhou Xiaoshan International Airport, Hangzhou, China','country_id' => '45'),\narray('id' => '8496','name' => '(JDZ) - Jingdezhen Airport, Jingdezhen, China','country_id' => '45'),\narray('id' => '8497','name' => '(JIU) - Jiujiang Lushan Airport, Jiujiang, China','country_id' => '45'),\narray('id' => '8498','name' => '(TNA) - Yaoqiang Airport, Jinan, China','country_id' => '45'),\narray('id' => '8499','name' => '(JUZ) - Quzhou Airport, Quzhou, China','country_id' => '45'),\narray('id' => '8500','name' => '(LCX) - Longyan Guanzhishan Airport, Longyan, China','country_id' => '45'),\narray('id' => '8501','name' => '(LYG) - Lianyungang Airport, Lianyungang, China','country_id' => '45'),\narray('id' => '8502','name' => '(HYN) - Huangyan Luqiao Airport, Huangyan, China','country_id' => '45'),\narray('id' => '8503','name' => '(LYI) - Shubuling Airport, Linyi, China','country_id' => '45'),\narray('id' => '8504','name' => '(NGB) - Ningbo Lishe International Airport, Ningbo, China','country_id' => '45'),\narray('id' => '8505','name' => '(NKG) - Nanjing Lukou Airport, Nanjing, China','country_id' => '45'),\narray('id' => '8506','name' => '(HFE) - Hefei Luogang International Airport, Hefei, China','country_id' => '45'),\narray('id' => '8507','name' => '(PVG) - Shanghai Pudong International Airport, Shanghai, China','country_id' => '45'),\narray('id' => '8508','name' => '(TAO) - Liuting Airport, Qingdao, China','country_id' => '45'),\narray('id' => '8509','name' => '(JJN) - Quanzhou Jinjiang International Airport, Quanzhou, China','country_id' => '45'),\narray('id' => '8510','name' => '(RUG) - Rugao Air Base, Rugao, China','country_id' => '45'),\narray('id' => '8511','name' => '(SHA) - Shanghai Hongqiao International Airport, Shanghai, China','country_id' => '45'),\narray('id' => '8512','name' => '(SZV) - Suzhou Guangfu Airport, Suzhou, China','country_id' => '45'),\narray('id' => '8513','name' => '(TXN) - Tunxi International Airport, Huangshan, China','country_id' => '45'),\narray('id' => '8514','name' => '(WEF) - Weifang Airport, Weifang, China','country_id' => '45'),\narray('id' => '8515','name' => '(WEH) - Weihai Airport, Weihai, China','country_id' => '45'),\narray('id' => '8516','name' => '(WHU) - Wuhu Air Base, Wuhu, China','country_id' => '45'),\narray('id' => '8517','name' => '(WUX) - Sunan Shuofang International Airport, Wuxi, China','country_id' => '45'),\narray('id' => '8518','name' => '(WUS) - Nanping Wuyishan Airport, Wuyishan, China','country_id' => '45'),\narray('id' => '8519','name' => '(WNZ) - Wenzhou Yongqiang Airport, Wenzhou, China','country_id' => '45'),\narray('id' => '8520','name' => '(XUZ) - Xuzhou Guanyin Airport, Xuzhou, China','country_id' => '45'),\narray('id' => '8521','name' => '(YTY) - Yangzhou Taizhou Airport, Yangzhou and Taizhou, China','country_id' => '45'),\narray('id' => '8522','name' => '(YIC) - Yichun Mingyueshan Airport, Yichun, China','country_id' => '45'),\narray('id' => '8523','name' => '(YNZ) - Yancheng Airport, Yancheng, China','country_id' => '45'),\narray('id' => '8524','name' => '(YNT) - Yantai Laishan Airport, Yantai, China','country_id' => '45'),\narray('id' => '8525','name' => '(YIW) - Yiwu Airport, Yiwu, China','country_id' => '45'),\narray('id' => '8526','name' => '(HSN) - Zhoushan Airport, Zhoushan, China','country_id' => '45'),\narray('id' => '8527','name' => '(NGQ) - Ngari Gunsa Airport, Shiquanhe, China','country_id' => '45'),\narray('id' => '8528','name' => '(AVA) - Anshun Huangguoshu Airport, Anshun, China','country_id' => '45'),\narray('id' => '8529','name' => '(BPX) - Qamdo Bangda Airport, Bangda, China','country_id' => '45'),\narray('id' => '8530','name' => '(BFJ) - Bijie Feixiong Airport, Bijie, China','country_id' => '45'),\narray('id' => '8531','name' => '(CKG) - Chongqing Jiangbei International Airport, Chongqing, China','country_id' => '45'),\narray('id' => '8532','name' => '(DAX) - Dachuan Airport, Dazhou, China','country_id' => '45'),\narray('id' => '8533','name' => '(GHN) - Guanghan Airport, Civil Aviation Flight University of China, China','country_id' => '45'),\narray('id' => '8534','name' => '(GYS) - Guangyuan Airport, Guangyuan, China','country_id' => '45'),\narray('id' => '8535','name' => '(KWE) - Longdongbao Airport, Guiyang, China','country_id' => '45'),\narray('id' => '8536','name' => '(JZH) - Jiuzhai Huanglong Airport, Jiuzhaigou, China','country_id' => '45'),\narray('id' => '8537','name' => '(KJH) - Kaili Airport, Huangping, China','country_id' => '45'),\narray('id' => '8538','name' => '(LIA) - Liangping Airport, Liangping, China','country_id' => '45'),\narray('id' => '8539','name' => '(LXA) - Lhasa Gonggar Airport, Lhasa, China','country_id' => '45'),\narray('id' => '8540','name' => '(LZO) - Luzhou Airport, Luzhou, China','country_id' => '45'),\narray('id' => '8541','name' => '(UNR) - A-ndArkhaan Airport, A-ndArkhaan, Mongolia','country_id' => '143'),\narray('id' => '8542','name' => '(MIG) - Mianyang Airport, Mianyang, China','country_id' => '45'),\narray('id' => '8543','name' => '(NAO) - Nanchong Airport, Nanchong, China','country_id' => '45'),\narray('id' => '8544','name' => '(HZH) - Liping Airport, Liping, China','country_id' => '45'),\narray('id' => '8545','name' => '(LZY) - Nyingchi Airport, Nyingchi, China','country_id' => '45'),\narray('id' => '8546','name' => '(TCZ) - Tengchong Tuofeng Airport, Tengchong, China','country_id' => '45'),\narray('id' => '8547','name' => '(TEN) - Tongren Fenghuang Airport, , China','country_id' => '45'),\narray('id' => '8548','name' => '(CTU) - Chengdu Shuangliu International Airport, Chengdu, China','country_id' => '45'),\narray('id' => '8549','name' => '(WXN) - Wanxian Airport, Wanxian, China','country_id' => '45'),\narray('id' => '8550','name' => '(XIC) - Xichang Qingshan Airport, Xichang, China','country_id' => '45'),\narray('id' => '8551','name' => '(YBP) - Yibin Caiba Airport, Yibin, China','country_id' => '45'),\narray('id' => '8552','name' => '(ACX) - Xingyi Airport, Xingyi, China','country_id' => '45'),\narray('id' => '8553','name' => '(ZYI) - Zunyi Xinzhou Airport, Zunyi, China','country_id' => '45'),\narray('id' => '8554','name' => '(AKU) - Aksu Airport, Aksu, China','country_id' => '45'),\narray('id' => '8555','name' => '(BPL) - Alashankou Bole (Bortala) airport, Bole, China','country_id' => '45'),\narray('id' => '8556','name' => '(IQM) - Qiemo Airport, Qiemo, China','country_id' => '45'),\narray('id' => '8557','name' => '(HMI) - Hami Airport, Hami, China','country_id' => '45'),\narray('id' => '8558','name' => '(KCA) - Kuqa Airport, Kuqa, China','country_id' => '45'),\narray('id' => '8559','name' => '(KRL) - Korla Airport, Korla, China','country_id' => '45'),\narray('id' => '8560','name' => '(KRY) - Karamay Airport, Karamay, China','country_id' => '45'),\narray('id' => '8561','name' => '(KJI) - Kanas Airport, Burqin, China','country_id' => '45'),\narray('id' => '8562','name' => '(NLT) - Xinyuan Nalati Airport, Xinyuan County, China','country_id' => '45'),\narray('id' => '8563','name' => '(KHG) - Kashgar Airport, Kashgar, China','country_id' => '45'),\narray('id' => '8564','name' => '(SXJ) - Shanshan Airport, Shanshan, China','country_id' => '45'),\narray('id' => '8565','name' => '(TCG) - Tacheng Airport, Tacheng, China','country_id' => '45'),\narray('id' => '8566','name' => '(HTN) - Hotan Airport, Hotan, China','country_id' => '45'),\narray('id' => '8567','name' => '(TLQ) - Turpan Jiaohe Airport, Turpan, China','country_id' => '45'),\narray('id' => '8568','name' => '(URC) - ArAmqi Diwopu International Airport, ArAmqi, China','country_id' => '45'),\narray('id' => '8569','name' => '(YIN) - Yining Airport, Yining, China','country_id' => '45'),\narray('id' => '8570','name' => '(AOG) - Anshan Air Base, Anshan, China','country_id' => '45'),\narray('id' => '8571','name' => '(CGQ) - Longjia Airport, Changchun, China','country_id' => '45'),\narray('id' => '8572','name' => '(CNI) - Changhai Airport, Changhai, China','country_id' => '45'),\narray('id' => '8573','name' => '(CHG) - Chaoyang Airport, Chaoyang, China','country_id' => '45'),\narray('id' => '8574','name' => '(FYJ) - Dongji Aiport, Fuyuan, China','country_id' => '45'),\narray('id' => '8575','name' => '(HRB) - Taiping Airport, Harbin, China','country_id' => '45'),\narray('id' => '8576','name' => '(HEK) - Heihe Airport, Heihe, China','country_id' => '45'),\narray('id' => '8577','name' => '(JIL) - Jilin Airport, Jilin, China','country_id' => '45'),\narray('id' => '8578','name' => '(JMU) - Jiamusi Airport, Jiamusi, China','country_id' => '45'),\narray('id' => '8579','name' => '(JXA) - Jixi Xingkaihu Airport, Jixi, China','country_id' => '45'),\narray('id' => '8580','name' => '(JNZ) - Jinzhou Airport, Jinzhou, China','country_id' => '45'),\narray('id' => '8581','name' => '(LDS) - Lindu Airport, Yichun, China','country_id' => '45'),\narray('id' => '8582','name' => '(YUS) - Yushu Batang Airport, Yushu, China','country_id' => '45'),\narray('id' => '8583','name' => '(MDG) - Mudanjiang Hailang International Airport, Mudanjiang, China','country_id' => '45'),\narray('id' => '8584','name' => '(OHE) - Gu-Lian Airport, Mohe, China','country_id' => '45'),\narray('id' => '8585','name' => '(NDG) - Qiqihar Sanjiazi Airport, Qiqihar, China','country_id' => '45'),\narray('id' => '8586','name' => '(DLC) - Zhoushuizi Airport, Dalian, China','country_id' => '45'),\narray('id' => '8587','name' => '(TNH) - Tonghua Sanyuanpu Airport, Tonghua, China','country_id' => '45'),\narray('id' => '8588','name' => '(SHE) - Taoxian Airport, Shenyang, China','country_id' => '45'),\narray('id' => '8589','name' => '(YNJ) - Yanji Chaoyangchuan Airport, Yanji, China','country_id' => '45'),\narray('id' => '8590','name' => '(YKH) - Yingkou Lanqi Airport, Yingkou, China','country_id' => '45')\n);\n\n \n DB::table('airports')->insert( $airports );\n \n }", "public function index()\n {\n $airports = Airport::all();\n return view('frontend.booking',compact('airports'));\n }", "public function index()\n {\n return Airplaneseat::all();\n }", "public function index()\n {\n $data['airports'] = Airport::all();\n\n return view('airport.airport', $data);\n }", "public function index()\n {\n $airports = Airport::latest()->paginate(5);\n\n return view('admin.airport', compact('airports'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $airlines = $em->getRepository('OnicFlightInventoryBundle:FiAirline')->findAll();\n\n return $this->render('OnicFlightInventoryBundle:Airline:index.html.twig', array(\n 'airlines' => $airlines,\n ));\n }", "function get_list_fa($airport, $params) {\n $function = \"WHERE\";\n $sql = \"SELECT * \n FROM (\n SELECT a.*, airlines_nm, e.services_nm \n FROM fa_data a \n LEFT JOIN airlines b ON a.airlines_id = b.airlines_id\n LEFT JOIN fa_process c ON c.data_id = a.data_id \n LEFT JOIN fa_flow d ON d.flow_id = c.flow_id \n LEFT JOIN services_code e ON e.services_cd = a.services_cd \";\n foreach ($airport as $value) {\n $sql .= $function . \" rute_all LIKE '%\" . $value . \"%' \";\n $function = \"OR\";\n }\n $sql .= \" GROUP BY a.data_id)result \n WHERE (? BETWEEN date_start AND date_end OR ? BETWEEN date_start AND date_end OR ? BETWEEN date_end AND date_start OR ? BETWEEN date_end AND date_start)\n AND (published_no LIKE ? OR document_no LIKE ?)\n AND data_type = ?\n AND data_flight LIKE ?\n AND airlines_nm LIKE ?\n AND services_cd LIKE ?\n AND result.data_st = 'approved' \n LIMIT ?, ?\";\n $query = $this->db->query($sql, $params);\n if ($query->num_rows() > 0) {\n $result = $query->result_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }", "public function index()\n {\n //\n $airport = Airport::all();\n return view('admin.plane.airport.index',compact('airport'));\n }", "public function index()\n {\n return view('views::airports.index');\n }", "private function loadAirportCharts2(array &$airports, string $apIcaoList) {\n $query = \"SELECT *,\";\n $query .= \" (CASE WHEN type LIKE 'AREA%' THEN 1 WHEN type LIKE 'VAC%' THEN 2 WHEN type LIKE 'AD INFO%' THEN 3 ELSE 4 END) AS sortorder1\";\n $query .= \" FROM ad_charts2 \";\n $query .= \" WHERE ad_icao IN (\" . $apIcaoList . \")\";\n $query .= \" ORDER BY\";\n $query .= \" source ASC,\";\n $query .= \" sortorder1 ASC,\";\n $query .= \" type ASC\";\n\n $result = $this->dbService->execMultiResultQuery($query, \"error reading charts\");\n\n while ($row = $result->fetch_assoc()) {\n foreach ($airports as &$ap) {\n if ($ap->icao === $row[\"ad_icao\"]) {\n $ap->charts2[] = DbAirportChart2Converter::fromDbRow($row);\n break;\n }\n }\n }\n }", "public function index()\n {\n if($amount = request('amount')) {\n $data = [];\n\n $base_mem = memory_get_usage();\n $before = microtime(true);\n $airports = Airport::take($amount)->get();\n $after = microtime(true);\n $total_mem = memory_get_usage();\n\n $data[] = ($after - $before) * 1000; //Convert to ms\n $data[] = ($total_mem - $base_mem) / 1024; //Convert to kb\n\n $result = implode(',', $data) . \"\\n\";\n\n $this->writeToFile(env('APP_ROOT'),\"index\", $result);\n\n return $airports;\n }\n return Airport::all();\n }", "public function airtable()\n {\n\n ServiceOrganization::truncate();\n $airtable = new Airtable(array(\n 'api_key' => 'keyIvQZcMYmjNbtUO',\n 'base' => 'app2sk6MlzyikwbzL',\n ));\n\n $request = $airtable->getContent( 'organizations' );\n\n do {\n\n\n $response = $request->getResponse();\n\n $airtable_response = json_decode( $response, TRUE );\n\n foreach ( $airtable_response['records'] as $record ) {\n\n $service_organization = new ServiceOrganization();\n $service_organization->organization_recordid = $record[ 'id' ];\n $service_organization->organization_x_id = isset($record['fields']['x-id'])?$record['fields']['x-id']:null;\n $service_organization->organization_name = isset($record['fields']['name'])?$record['fields']['name']:null;\n $service_organization->organization_alternate_name = isset($record['fields']['alternate_name'])?$record['fields']['alternate_name']:null;\n $service_organization->organization_description = isset($record['fields']['description'])?$record['fields']['description']:null;\n $service_organization->organization_email = isset($record['fields']['email'])?$record['fields']['email']:null;\n $service_organization->organization_url = isset($record['fields']['url'])?$record['fields']['url']:null;\n $service_organization->organization_legal_status = isset($record['fields']['legal_status'])?$record['fields']['legal_status']:null;\n $service_organization->organization_tax_status = isset($record['fields']['tax_status'])?$record['fields']['tax_status']:null;\n $service_organization->organization_tax_id = isset($record['fields']['tax_id'])?$record['fields']['tax_id']:null;\n $service_organization->organization_year_incorporated= isset($record['fields']['year_incorporated'])?$record['fields']['year_incorporated']:null;\n $service_organization->organization_services = isset($record['fields']['services'])? implode(\",\", $record['fields']['services']):null;\n $service_organization->organization_phones = isset($record['fields']['phones'])? implode(\",\", $record['fields']['phone']):null;\n $service_organization->organization_locations = isset($record['fields']['locations'])? implode(\",\", $record['fields']['locations']):null;\n $service_organization->organization_contact = isset($record['fields']['contact'])? implode(\",\", $record['fields']['contact']):null;\n $service_organization->organization_details = isset($record['fields']['details'])? implode(\",\", $record['fields']['details']):null;\n $service_organization->save();\n\n }\n \n }\n while( $request = $response->next() );\n\n $date = date(\"Y/m/d H:i:s\");\n $airtable = Airtable_services::where('table_name', '=', 'Services_Organizations')->first();\n $airtable->total_records = ServiceOrganization::count();\n $airtable->last_synced = $date;\n $airtable->save();\n }", "public function indexAction()\n {\n $em = $this->getEm();\n\n $portitems = $em->getRepository('MarcaPortfolioBundle:Portitem')->findAll();\n\n return array('portitems' => $portitems);\n }", "public function airportTestHMVC()\n {\n $CI =& get_instance(); // the current controller instance (Eg: mycows::cows)\n\n $CI->load->helper('url');\n\n $offset = $CI->uri->segment( $CI->uri->total_segments() );\n $rows = $CI->Airport_model->as_array()\n ->find_all();\n\n return $rows;\n }", "public function planes_listar(){\n\t\t$params = array();\n\t\ttry {\n\t\t\t$flow = $this->send('plans/list', $params, 'GET');\t \t\t\t\n\t\t\treturn $flow;\n\t\t} catch (Exception $e) { return $e->getCode().\" - \".$e->getMessage(); }\n\t}", "public function apiList();", "public function getAllAirportsAlphabetically($columns = ['*'])\n {\n return $this->model->orderBy('name', 'ASC')->get($columns)->toArray();\n }", "public function listAction(){\n\n $listAdverts = $this\n ->getDoctrine()\n ->getManager()\n ->getRepository('OCPlatformBundle:Advert')\n ->getAdvertWithApplications()\n ;\n\n foreach ($listAdverts as $advert) {\n // Ne déclenche pas de requête : les candidatures sont déjà chargées !\n // Vous pourriez faire une boucle dessus pour les afficher toutes\n $advert->getApplications();\n }\n }", "function airtable_list_records($view, $filterByFormula, $fields){\n\t$endpoint = $data['endpoint'];\n\t$params = [\n\t \"filterByFormula\" => $filterByFormula,\n\t \"fields\" => $fields,\n\t \"sort\" => [['field' => 'name', 'direction' => \"asc\"]],\n\t \"maxRecords\" => 200,\n\t \"pageSize\" => 100,\n\t \"view\" => $view\n\t];\n\t\n\t$call = artaible_call_api($params, $endpoint);\n\treturn $call;\n}", "public function actionListAvailable()\n\t{\n\t\t$destination = new Destinations();\n\t\t$tour = new Tours();\n\n\t\t$models = $destination->getAvailableDestination();\n\n\t\t$data = array();\n\t\tforeach ($models as $model) {\n\t\t\t$totalTours = count($tour->getTourInDestination($model->id));\n\n\t\t\t$data[] = array('des' => $model, 'totalTours' => $totalTours);\n\t\t}\n\t\theader('Content-Type: application/json');\n\t\theader(\"Access-Control-Allow-Origin: *\");\n header(\"Access-Control-Allow-Methods: GET, POST, PUT, DELETE\");\n echo json_encode($data);\n\t}", "public function indexAction(Request $request)\n {\n try {\n $airports = $this->getAirportList();\n\n return $this->render('default/index.html.twig', [\n 'airports' => $airports\n ]);\n } catch (\\Exception $e) {\n\n return $this->render('default/error.html.twig', [\n 'message' => 'An error occurred when showing the list of airports. Please try again later.'\n ]);\n }\n }", "public function getAgendaAlarmListAction(){\n /** @var Object_Agenda $agenda */\n $this->getDeviceSession()->getUserId();\n $agenda = new Object_Agenda();\n $this->_helper->json($agenda->getClass()->getFieldDefinition('Alarm'));\n }", "public function index()\n {\n return Accessories::all();\n }", "function ambil_paket_list(){\r\n\t\t\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\t\t$result=$this->m_master_ambil_paket->ambil_paket_list($query,$start,$end);\r\n\t\techo $result;\r\n\t}", "public function index()\n {\n $airlines = Airline::latest()->paginate(5);\n\n return view('admin.airline', compact('airlines'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "function alat_list(){\r\n\t\t\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\r\n\t\t$result=$this->m_alat->alat_list($query,$start,$end);\r\n\t\techo $result;\r\n\t}", "public function agencyList() {\n\t\t$station = \\Auth::User()->station;\n\t\t$agencyList = ConnectContentAgency::where('station_id', '=', $station->id)->get();\n\t\t$agencies = array();\n\t\tforeach($agencyList as $agency) {\n\t\t\t$agencies[] = $agency->agency_name;\n\t\t}\n\t\ttry {\n\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => $agencies));\n\n\t\t} catch(\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\t}", "public function index()\n {\n //\n $sports = Sport::all();\n return $this->showAll($sports);\n }", "function get_list_rute($params, $airport) {\n $function = \"WHERE\";\n $sql = \"SELECT a.*, b.izin_rute_start, d.airlines_nm, e.group_nm, e.group_alias, c.start_date, c.end_date, c.tipe, c.capacity, c.roon \n FROM izin_registrasi a \n LEFT JOIN izin_rute b ON b.registrasi_id = a.registrasi_id \n LEFT JOIN izin_data c ON c.izin_id = b.izin_id \n LEFT JOIN airlines d ON d.airlines_id = a.airlines_id \n LEFT JOIN izin_group e ON e.group_id = a.izin_group \";\n foreach ($airport as $value) {\n $sql .= $function . \" b.izin_rute_start LIKE '%\" . $value . \"%' \";\n $function = \"OR\";\n }\n $sql .= \"AND a.izin_approval = 'approved' AND b.izin_active = '1' AND a.izin_published_letter LIKE ? AND d.airlines_nm LIKE ? AND b.izin_rute_start LIKE ? AND a.izin_flight = ? \n GROUP BY a.registrasi_id\";\n $query = $this->db->query($sql, $params);\n if ($query->num_rows() > 0) {\n $result = $query->result_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }", "public function index()\n {\n //\n getAllPlanets();\n }", "function getApnList()\n {\n \t$activeApn = $this->getApn();\t//get the current apn being used by the device\n \tdebug('(cell_controller.inc|getApnList()) current apn being used on the device'.$activeApn); \t\t\t\t//DEBUG\n \t\n \t$sh_args = 'getapnlist';\t\t//admin client command for getting secondary apn list\n \t$sh_out = atsexec(escapeshellcmd($sh_args));\t//socket call\n \tdebug('(cell_controller.inc|getApnList()) admin client api command getapnlist output: sh_out', $sh_out); \t//DEBUG\n \t\n \tif(($sh_out != 'phpcmd: fail') && ($sh_out != 'phpcmd: invalid command'))\n \t{\n \t\t$xml = new SimpleXMLElement($sh_out);\t//create SimpleXML object\n\t \t$html =''; \t\t\t\t\t\t\t\t\t//store the html markup\n\t \tdebug('(cell_controller.inc|getApnList()) apn list converted into SimpleXMLElement object '.$xml); \t\t//DEBUG\n\t \t\n\t \tforeach($xml->network as $network)\t\t\t\n\t \t{\n\t \t\t$html .= '<optgroup label=\"'.$network->attributes()->name.'\">';\t \t\t//create Carrier section\n\t \t\tforeach ($network->apn as $apn)\t\t\t\t\t\t\t\t\t\t\t//group apns under each Carrier\n\t \t\t{\n\t \t\t\tdebug('(cell_controller.inc|getApnList()) $apn '.$apn); \t\t//DEBUG\n\t \t\t\t$html .= '<option '.((strcasecmp($apn,$activeApn) == 0) ? 'selected=\"selected\"':'').' value=\"'.$apn.'\">'.$apn.'</option>';\n\t \t\t}\n\t \t\t$html .= '</optgroup>';\n\t \t}\n\n\t \treturn $html;\n \t}\n \telse\n \t{\n \t\treturn '<option value=\"\">Failed to retrieve APN list</option>';\n \t}\n }", "public function listdataAsetAction() {\n $this->view->dataList = $this->adm_listdata_serv->getDataList('ASET');\n }", "public function getAirportCode()\n {\n return $this->airportCode;\n }", "public function index()\n {\n return DepartmentResource::collection(Department::paginate());\n }", "public function index()\n {\n $this->list_trip();\n }", "public function getList();", "public function getList();", "public function index()\n {\n $this->authorize('use-permission', 'adm/smartcars/flights');\n\n $flights = Pirep::query()->orderByDesc('created_at')->paginate(50);\n\n return $this->viewMake('adm.smartcars.flights')->with('flights', $flights);\n }", "public function index()\n {\n $trips = Trip::with(['from_airport','to_airport'])->get();\n return view('backend.trips.index',compact('trips'));\n }", "public function listAction()\r\n {\r\n $pid = $this->_getParam('projectid');\r\n $where = array();\r\n if ($pid) {\r\n $where['projectid='] = $pid;\r\n }\r\n $cid = $this->_getParam('clientid');\r\n if ($cid) {\r\n $where['clientid='] = $cid;\r\n }\r\n \r\n $this->view->timesheets = $this->projectService->getTimesheets($where);\r\n \r\n $this->renderView('timesheet/list.php');\r\n }", "public function index()\n {\n $departamentos = Department::all();\n return $this->showAll($departamentos);\n }", "public function japiGet_All()\n\t{\n\t\tif (Yii::app()->user->isGuest)\n\t\t\treturn array('ret'=>'failed', 'reason'=>'not login');\n\n\t\t$games=User::model()->findByPk(Yii::app()->user->id)->own_games;\n\t\t$games_info = array();\n\t\tforeach ($games as $game)\t\n\t\t\tarray_push($games_info, $game->attributes);\n\t\treturn array('ret'=>'ok', 'list'=>$games_info);\n\t}", "public function getFlights()\n {\n $flights = Flight::with('airline')->get();\n\n return response()->json($flights, 200);\n }", "function ships_list()\n\t\t{\n\t\t\t$id = $this->uri->segment(3);\n\n\t\t\t$data['ships'] = $this->ship_model->get_company_ships($id);\n\t\t\t// $data['ships_type'] = $this->\n\t\t\t$this->directPageDetails(\"ships/ships\",\"\",$data);\n\t\t}", "public function index()\n {\n $aircraft = Aircraft::paginate(6);\n\n return view('aircraft.index', compact('aircraft'));\n }", "public function index()\n\t{\n\t\treturn $this->vacationRepository->all();\n\t}", "public function getAppointmentsList() {\nglobal $_LW;\ninclude $_LW->INCLUDES_DIR_PATH.'/core/modules/core/includes/class.livewhale_manager.php'; // include manager class\n$_LW->module='appointments';\n$GLOBALS['manager_appointments']=$_LW->showManager('<ul id=\"manager_appointments\" class=\"manager simple list-group\"/>', '<li id=\"item{id}\" class=\"{class} list-group-item\">\n\t{checkbox}\n\t<h5>{title}</h5>\n\t{appointments}\n</li>', 'managerQuery', 'formatManager');\nreturn $_LW->xphp->parseString('<xphp var=\"manager_appointments\"/>');\n}", "public function index()\n {\n $sports = Sport::get();\n return SportResource::collection($sports);\n }", "function getAttendanceList($act_id){\n $data = array(\n 'act_id' => $act_id,\n 'dept_id' => $this->activity_model->fetchDeptID($act_id)->act_department,\n 'att_list' => $this->activity_model->fetchAttendance($act_id)->result()\n );\n return $this->load->view('activitymonitoring/att_list', $data);\n }", "function getOneAirport( $params ) {\n global $airportManager;\n\n $result = 0;\n\n if ( !empty( $params[ \"id\" ] ) ) {\n try {\n // Convert to an int\n $id = intval( $params[ \"id\" ], 10 );\n\n $airport = $airportManager->getAirportById( $id );\n\n $result = [\n \"id\" => $airport->getId(),\n \"code\" => $airport->getCode(),\n \"cityCode\" => $airport->getCityCode(),\n \"name\" => $airport->getName(),\n \"city\" => $airport->getCity(),\n \"countryCode\" => $airport->getCountryCode(),\n \"regionCode\" => $airport->getRegionCode(),\n \"latitude\" => $airport->getlatitude(),\n \"longitude\" => $airport->getLongittude(),\n \"timezone\" => $airport->getTimezone(),\n ];\n } catch (\\Throwable $th) {\n $result = [ \"error\" => true, \"message\" => \"Something happen on our side.. please try again later\" ];\n }\n }\n\n echo json_encode( $result );\n}", "public function airlines(){}", "abstract public function getList();", "public function indexAction()\n {\n if(!$this->get('security.authorization_checker')->isGranted('ROLE_ADMIN')){\n throw new ForbiddenOverwriteException('Access Denied');\n }\n\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('FlyPlatformBundle:Airport')->findAll();\n\n return $this->render('FlyPlatformBundle:Airport:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "private function requestAnimeList () {\n\t\t$curl = curl_init ();\n\t\t\n\t\tcurl_setopt ($curl, CURLOPT_URL, $this->api_url);\n\t\tcurl_setopt ($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t\n\t\t$response = curl_exec ($curl);\n\t\t\n\t\tcurl_close($curl);\n\t\t\n\t\treturn ($response);\n\t}", "public function index()\n {\n $departments = Department::orderBy('created_at', 'asc')->paginate();\n\n return response()->json($departments, 200);\n }", "public function index()\n {\n return new PlancomptasResource(Plancompta::paginate());\n }", "public function indexAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $entities = $em->getRepository('LicenciaBundle:AdmTipoAporte')->findAll();\r\n $paginator = $this->get('knp_paginator');\r\n $pagination = $paginator->paginate(\r\n $entities,\r\n $this->get('request')->query->get('page', 1) /*page number*/,\r\n 10\r\n );\r\n return array(\r\n 'entities' => $pagination,\r\n );\r\n }", "public function show(Airline $airline)\n {\n //\n }", "public function ListaTravels()\n\t{\t\n\t\t$filter = DataFilter::source(new Travels);\n\t\t/*Header*/\n $filter->link('travels/create', 'Crear Nuevo', 'TR');\n /*Header*/\n\n\t\t$filter->attributes(array('class'=>'form-inline'));\n\t\t$filter->add('name','Buscar por Nombre', 'text');\n\t\t$filter->add('code','Buscar por Código', 'text');\n\t\t$filter->submit('Buscar');\n\t\t$filter->reset('Limpiar');\n\n\t\t$grid = DataGrid::source($filter);\n $grid->attributes(array(\"class\"=>\"table table-striped\"));\n $grid->add('name','Nombre', true);\n $grid->add('code','Código', true);\n $grid->add('viaticum','Viático', true);\n $grid->add('hotel','Hotel', true);\n $grid->add('gasoline','Pasaje/Bencina', true);\n $grid->add('taxi','Pasajes/Taxi', true);\n $grid->add('km','Kilometros', true);\n $grid->edit(url().'/travels/edit', 'Editar/Borrar','modify|delete'); \n $grid->paginate(10);\n\n\t\treturn view('travels/lista', compact('filter', 'grid'));\n\t}", "private function getSportLinksAsList() {\n\t\t$Links = '';\n\n\t\tif ($this->ShowAllSportsLink) {\n\t\t\t$Links .= '<li'.(-1==$this->sportid ? ' class=\"active\"' : '').'>'.$this->getInnerLink(__('All'), -1, $this->year, $this->dat).'</li>';\n\t\t}\n\n\t\t$Sports = SportFactory::NamesAsArray();\n\t\tforeach ($Sports as $id => $name) {\n\t\t\t$Links .= '<li'.($id == $this->sportid ? ' class=\"active\"' : '').'>'.$this->getInnerLink($name, $id, $this->year, $this->dat).'</li>';\n\t\t}\n\n\t\treturn $Links;\n\t}", "public function index()\n {\n $airline_companies = AirlineCompany::all();\n return view('airline_companies.index')->with('airline_companies', $airline_companies);\n }", "public function listAction()\n {\n $dashboardApi = $this->objectManager->get('Eww\\\\SubhhOaDashboard\\\\Service\\\\DashboardApi');\n $repositories = json_decode($dashboardApi->listRepos());\n $this->view->assign('repositories', $repositories);\n }", "function get_employee_list() {\r\n\t$result = get_filter();\r\n\t\r\n\tif ($result === false) {\r\n\t\t$filter = array();\r\n\t\t$filter['employee'] = empty($_REQUEST['employee']) ? '' : trim($_REQUEST['employee']);\r\n\t\t$filter['stations'] = empty($_REQUEST['stations']) ? '' : intval($_REQUEST['stations']);\r\n\t\t$filter['city_code'] = empty($_REQUEST['city_code']) ? '' : intval($_REQUEST['city_code']);\r\n\r\n\t\t$where = \" WHERE a.flag=1 AND b.city_code\" .$GLOBALS['city_code'];\r\n\t\tif (isset($_REQUEST['is_ajax']) && $_REQUEST['is_ajax'] == 1)\t\t\t$filter['employee'] = json_str_iconv($filter['employee']);\r\n\t\tif ($filter['employee'])\t\t$where .= \" AND name LIKE '%\" . $filter['employee'] . \"%'\";\r\n\t\tif ($filter['stations'])\t\t\t\t$where .= \" AND a.station_id='\" . $filter['stations'] . \"'\";\r\n\t\tif ($filter['city_code'])\t$where .= \" AND b.city_code =\" .$filter['city_code'] . \"\";\r\n\r\n\t\t$query = \"SELECT COUNT(*) FROM hr_employees AS a LEFT JOIN ship_station AS b ON a.station_id=b.station_id $where\";\r\n\t\t$filter['record_count'] = $GLOBALS['db_read']->getOne($query);\r\n\t\t$filter = page_and_size($filter);\r\n\t\t\r\n\t\t$sql = \"SELECT * FROM hr_employees AS a LEFT JOIN ship_station AS b ON a.station_id=b.station_id $where\";\r\n\t\t$filter['employee'] = stripslashes($filter['employee']);\r\n\t\tset_filter($filter, $sql);\t\r\n\t} else {\r\n\t\t//$filter = $result['filter'];\r\n\t\t//$sql = $result['sql'];\r\n\t}\r\n\t$list = array();\r\n\t$res = $GLOBALS['db_read']->selectLimit($sql, $filter['page_size'], $filter['start']);\r\n\twhile ($rows = $GLOBALS['db_read']->fetchRow($res)) {\r\n\t\t$list[] = $rows;\r\n\t}\r\n\treturn array('list' => $list, 'filter' => $filter, 'page_count' => $filter['page_count'], 'record_count' => $filter['record_count'],);\r\n}", "public function carrouselListAction()\n {\n $listFilter = new Llv_Services_Cms_Filter_Carrousel();\n// $listFilter->online = true;\n $listFilter->includeDeleted = false;\n $this->view->assign('list', Llv_Context_Cms::getInstance()->carrouselGetList($listFilter));\n }", "public function index()\n {\n $caballerizas = Stable::with('sanciones')->get();\n activity()\n ->withProperties(['IP_add' => request()->ip()])\n ->log('Acceso a listado de caballerizas.');\n\n return $caballerizas;\n }", "public function index()\n {\n $Plannings = Planning::paginate(15);\n\n \n return PlanningResource::collection($Plannings);\n }", "public function airtable()\n {\n\n Address::truncate();\n $airtable = new Airtable(array(\n 'api_key' => 'keyIvQZcMYmjNbtUO',\n 'base' => 'appd1eQuF0gFcOMsV',\n ));\n\n $request = $airtable->getContent( 'address' );\n\n do {\n\n\n $response = $request->getResponse();\n\n $airtable_response = json_decode( $response, TRUE );\n\n foreach ( $airtable_response['records'] as $record ) {\n\n $address = new Address();\n $address->address_id = $record[ 'id' ];\n $address->address_1 = isset($record['fields']['address_1'])?$record['fields']['address_1']:null;\n $address->city = isset($record['fields']['city'])?$record['fields']['city']:null;\n $address->state_province = isset($record['fields']['state_province'])?$record['fields']['state_province']:null;\n $address->postal_code = isset($record['fields']['postal_code'])?$record['fields']['postal_code']:null;\n $address->contact = isset($record['fields']['Contact'])? implode(\",\", $record['fields']['Contact']):null;\n $address->postal_code = isset($record['fields']['postal_code'])?$record['fields']['postal_code']:null;\n $address->attention = isset($record['fields']['attention'])?$record['fields']['attention']:null;\n $address->locations = isset($record['fields']['locations'])?$record['fields']['locations']:null;\n $address->region = isset($record['fields']['region'])?$record['fields']['region']:null;\n $address->country = isset($record['fields']['country'])?$record['fields']['country']:null;\n $address->address_type = isset($record['fields']['address_type'])? implode(\",\", $record['fields']['address_type']):null;\n $address->latitude = isset($record['fields']['latitude'])?$record['fields']['latitude']:null;\n $address->longitude = isset($record['fields']['longitude'])?$record['fields']['longitude']:null;\n $address->sources = isset($record['fields']['Sources'])?$record['fields']['Sources']:null;\n $address->organizations = isset($record['fields']['organizations'])? implode(\",\", $record['fields']['organizations']):null;\n $address ->save();\n\n }\n \n }\n while( $request = $response->next() );\n\n $date = date(\"Y/m/d H:i:s\");\n $airtable = Airtable_people::where('table_name', '=', 'Address')->first();\n $airtable->total_records = Address::count();\n $airtable->last_synced = $date;\n $airtable->save();\n }", "public function getPlanoAcoes()\r\n {\r\n \t\r\n \t$select =$this->_db->select()\r\n \t->from(array('n' => 'TB_PLANO_ACAO'),array(\"*\",'DT_ATUALIZACAO' => new Zend_Db_Expr(\"DATE_FORMAT(DT_ATUALIZACAO,'%d/%m/%Y')\"),'DT_CONTROLE' => new Zend_Db_Expr(\"DATE_FORMAT(DT_CONTROLE,'%d/%m/%Y')\"),'DT_CONCLUSAO' => new Zend_Db_Expr(\"DATE_FORMAT(DT_CONCLUSAO,'%d/%m/%Y')\"),'DT_PREVISAO' => new Zend_Db_Expr(\"DATE_FORMAT(DT_PREVISAO,'%d/%m/%Y')\")))\r\n \t->joinLeft(array('o' => 'TB_OPERADOR'),('n.FK_OPERADOR =o.ID_OPERADOR'),array('PRIMEIRO_NOME' => new Zend_Db_Expr(\"Substring_index(o.NM_OPERADOR,' ',1)\")))\r\n \t ->joinInner(array('p' => 'TB_PROJETO'),('p.ID_PROJETO =n.FK_PROJETO'))\r\n \t->joinLeft(array('st' => 'TB_STATUS_PLANO_ACAO'),('st.ID_STATUS_PLANO_ACAO=n.FK_STATUS_PLANO_ACAO'));\r\n \t//->order(\"n.DT_SERVICO DESC\");\r\n \t\r\n \t\r\n \t\r\n \t$result = $this->getAdapter()->fetchAll($select);\r\n \treturn $result;\r\n }", "public function index()\n {\n $apartments = $this->apartmentRepository->getList();\n if ( ! $apartments)\n {\n return Response::json([\n 'error' => 'E_NOT_FOUND',\n 'message' => \"No apartment\"\n ], 404);\n }\n return new Collection(array_map(\n function ($apartment) {\n return new ApartmentPresenter($apartment);\n }, $apartments->toArray()));\n }", "public function actionPlayedlist() {\n // Response format data\n $result_array = array(\n 'result' => self::BadRequest,\n 'msg' => Yii::t('user', 'Request method illegal!'),\n 'total' => 0,\n 'list' => array(),\n );\n // Check request type\n $request_type = Yii::app()->request->getRequestType();\n if ('GET' != $request_type) {\n $this->sendResults($result_array, self::BadRequest);\n }\n\n // Get query data\n $_offset = Yii::app()->request->getQuery('offset');\n $_limit = Yii::app()->request->getQuery('limit');\n $_offset = empty($_offset) ? 0 : intval($_offset);\n $_limit = empty($_limit) ? $this->playlist_maximum : intval($_limit);\n $_limit = ($_limit > $this->playlist_maximum) ? $this->playlist_maximum : $_limit;\n\n // Get room device\n //$_device = DeviceState::model()->findByAttributes(array('room_id' => $this->_roomID, 'status' => 0));\n // Get STB\n $_device = Yii::app()->db->createCommand()\n ->select('ds.device_id')\n ->from('{{device_state}} ds')\n ->join('{{room}} r', 'ds.room_id = r.id')\n ->join('{{device}} d', 'ds.device_id = d.id')\n ->where('r.id=:id AND d.type=:type', array(':id' => $this->_roomID, ':type' => 1))\n ->queryRow();\n\n if (!is_null($_device) && !empty($_device)) {\n $_deviceid = $_device['device_id'];\n\n // log\n $criteria = new CDbCriteria();\n $criteria->condition = 'status = :status and device_id = :deviceid';\n\n // get played list\n $criteria->params = array(':deviceid' => $_deviceid, ':status' => 2);\n\n $_count = intval(DevicePlaylist::model()->count($criteria));\n\n $criteria->offset = $_offset;\n $criteria->limit = $_limit;\n $criteria->order = 'index_num asc';\n $play_list = DevicePlaylist::model()->findAll($criteria);\n if (!empty($play_list)) {\n // Get list success\n $result_array['result'] = self::Success;\n $result_array['msg'] = Yii::t('user', 'Get played list success!');\n $result_array['total'] = $_count;\n foreach ($play_list as $key => $_list) {\n $_media = $_list->media;\n // get user avatar information of song adder\n $_userinfo = $this->getUserInfo($_list->create_user_id);\n\n $result_array['list'][] = array(\n 'songid' => $_media->songid,\n 'played_time' => intval($_list->index_num),\n 'songname' => $_media->name,\n 'singername' => $_media->artist->name,\n 'duration' => intval($_media->duration),\n 'smallpicurl' => $this->getMediaPicUrl($_media, $_media->spic_url, 0),\n 'bigpicurl' => $this->getMediaPicUrl($_media, $_media->bpic_url),\n 'userid' => $_userinfo['uid'],\n 'nickname' => $_userinfo['nickname'],\n 'avatarurl' => $_userinfo['avatarurl'],\n );\n }\n } else {\n $result_array['result'] = self::Success;\n $result_array['msg'] = Yii::t('user', 'Played list is empty!');\n $result_array['total'] = $_count;\n }\n } else {\n $result_array['msg'] = Yii::t('user', 'Room STB invalid!');\n }\n\n // Set response information\n $this->sendResults($result_array);\n }", "public function fetchAll($page=null, $count=10){\n try{\n if($page !== null){\n $statement = $this->pdo->prepare(\"\n\t\t\t\t\tSELECT * FROM `Airport` A\n\t\t\t\t\tORDER BY A.name ASC\n\t\t\t\t\tLIMIT {$page},{$count}\n\t\t\t\t\");\n $statement->execute();\n }else{\n $statement = $this->pdo->prepare(\"\n\t\t\t\t\tSELECT * FROM `Airport` A\n\t\t\t\t\tORDER BY A.name ASC\n\t\t\t\t\");\n $statement->execute();\n }\n\n return array_map(function($i) use ($statement){\n //$i->created_date = $i->created_date;\n //$i->modified_date = new DateTime($i->modified_date);\n\n return $i;\n },$statement->fetchAll());\n }catch (PDOException $e){\n throw new Exception(\"Can't get next airport item.\",0,$e);\n }\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $activities = Activity::all();\n\n return $activities;\n }", "public function get()\n {\n $this->_access(\"get\");\n $data = $this->Assets_model->getAdList(Assets_model::FULL_LIST);\n $this->_returnAjax(true, $data);\n }", "public function airtable()\n {\n\n ServiceAddress::truncate();\n $airtable = new Airtable(array(\n 'api_key' => 'keyIvQZcMYmjNbtUO',\n 'base' => 'app2sk6MlzyikwbzL',\n ));\n\n $request = $airtable->getContent( 'address' );\n\n do {\n\n\n $response = $request->getResponse();\n\n $airtable_response = json_decode( $response, TRUE );\n\n foreach ( $airtable_response['records'] as $record ) {\n\n $service_address = new ServiceAddress();\n $service_address->address_recordid = $record[ 'id' ];\n $service_address->services_address_1 = isset($record['fields']['address_1'])?$record['fields']['address_1']:null;\n $service_address->services_address_2 = isset($record['fields']['address_2'])?$record['fields']['address_2']:null;\n $service_address->services_address_city = isset($record['fields']['city'])?$record['fields']['city']:null;\n $service_address->services_address_state_province = isset($record['fields']['state_province'])?$record['fields']['state_province']:null;\n $service_address->services_address_state_province = isset($record['fields']['state_province'])?$record['fields']['state_province']:null;\n $service_address->services_address_postalcode = isset($record['fields']['postal_code'])?$record['fields']['postal_code']:null;\n $service_address->services_address_region = isset($record['fields']['region'])?$record['fields']['region']:null;\n $service_address->services_address_country = isset($record['fields']['country'])?$record['fields']['country']:null;\n $service_address->services_address_attention = isset($record['fields']['attention'])?$record['fields']['attention']:null;\n $service_address->services_address_type = isset($record['fields']['type'])? implode(\",\", $record['fields']['type']):null;\n $service_address->services_address_locations = isset($record['fields']['locations'])? implode(\",\", $record['fields']['locations']):null;\n $service_address->save();\n\n }\n \n }\n while( $request = $response->next() );\n\n $date = date(\"Y/m/d H:i:s\");\n $airtable = Airtable_services::where('table_name', '=', 'Services_address')->first();\n $airtable->total_records = ServiceAddress::count();\n $airtable->last_synced = $date;\n $airtable->save();\n }", "public function index()\n {\n return response(Internship::paginate(10));\n }", "public function index()\n {\n return Auto::with('type', 'organizations', 'employers', 'employers.position')->get();\n }", "public function wlistAction()\n {\n $em = $this->getDoctrine()->getManager();\n $agency = $this->getUser()->getAgency();\n $maincompany = $this->getUser()->getMaincompany();\n $type = $agency->getType();\n\n if ($type == \"MASTER\") {\n $entities = $em->getRepository('NvCargaBundle:Guide')->createQueryBuilder('g')\n ->where('g.bill IS NOT NULL')\n ->andwhere('g.maincompany = :maincompany')\n ->setParameters(array('maincompany' => $maincompany))\n ->orderBy('g.creationdate', 'DESC')\n ->setMaxResults(200)\n ->setFirstResult(0)\n ->getQuery()\n ->getResult();\n $agencies = $em->getRepository('NvCargaBundle:Agency')->findByMaincompany($maincompany);\n } else {\n $entities = $em->getRepository('NvCargaBundle:Guide')->createQueryBuilder('g')\n ->where('g.agency = :ag' )\n ->andwhere('g.bill IS NOT NULL')\n ->setParameters(array('ag' => $agency))\n ->orderBy('g.creationdate', 'DESC')\n ->setMaxResults(200)\n ->setFirstResult(0)\n ->getQuery()\n ->getResult();\n $agencies = null;\n }\n return array(\n 'entities' => $entities,\n 'agencies' => $agencies,\n );\n }", "public abstract function get_lists();", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n $agency = $this->getUser()->getAgency();\n $maincompany = $this->getUser()->getMaincompany();\n $type = $agency->getType();\n\n if ($type == \"MASTER\") {\n $entities = $em->getRepository('NvCargaBundle:Guide')->createQueryBuilder('g')\n ->where('g.bill IS NULL')\n ->andwhere('g.maincompany = :maincompany')\n ->setParameters(array('maincompany' => $maincompany))\n ->orderBy('g.number', 'ASC')\n ->setMaxResults(1000)\n ->getQuery()\n ->getResult();\n $agencies = $em->getRepository('NvCargaBundle:Agency')->findByMaincompany($maincompany);\n } else {\n $entities = $em->getRepository('NvCargaBundle:Guide')->createQueryBuilder('g')\n ->where('g.agency = :ag' )\n ->andwhere('g.bill IS NULL')\n ->setParameters(array('ag' => $agency))\n ->orderBy('g.number', 'ASC')\n ->setMaxResults(1000)\n ->getQuery()\n ->getResult();\n $agencies = null;\n }\n return array(\n 'entities' => $entities,\n 'agencies' => $agencies,\n );\n }", "public function indexAction() {\n\t\t$perpage = $this->perpage;\n\t\t$page = intval($this->getInput('page'));\n\t\tif ($page < 1) $page = 1;\n\t\t\n\t\t//游戏库分类列表\n\t\tlist(, $categorys) = Resource_Service_Attribute::getList(1, 100,array('at_type'=>1,'status'=>1));\n\t\t$categorys_id = Common::resetKey($categorys, 'id');\n\t\t$this->assign('categorys', $categorys);\n\t\t\n\t\t$name = $this->getInput('name');\n\t\t$category_id = intval($this->getInput('category_id'));\n\t\t$params = array();\n\t\t$search = array();\n\t\tif($name) {\n\t\t\t$search['name'] = $name;\n\t\t\t$params['name'] = array('LIKE', $name);\n\t\t}\n\t\tif($category_id) {\n\t\t\t$search['category_id'] = $category_id;\n\t\t}\t\t\n\t\t//所有首页推荐广告游戏id\n\t\tlist(, $idx_games) = Client_Service_Ad::getAdGames(array('ad_type'=>$this->ad_type));\n\t\t$idx_games = Common::resetKey($idx_games, 'link');\n\t\t$this->assign('ad_games', $idx_games);\n\t\t$idx_games = array_keys($idx_games);\n\t\t\n\t\t//获取广告游戏的分类信息\n\t\tif($idx_games){\n\t\t\t$tmp = $category_games = $client_games = array();\n\t\t\t$adgame_categorys = Resource_Service_Games::getIdxGameResourceCategoryBy(array('game_id'=>array('IN', $idx_games)));//getIdxGameResourceCategorys();\n\t\t\t\n\t\t\tforeach($adgame_categorys as $key=>$value){\n\t\t\t\t$tmp[$value['game_id']][] = $value['category_id'];\n\t\t\t}\n\t\t\t$category_title = array();\n\t\t\tforeach($tmp as $key=>$val){\n\t\t\t\tforeach($val as $key1=>$val1){\n\t\t\t\t\t$category_title[$key][] = $categorys_id[$val1]['title'];\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//获取本地所有游戏\n\t\t\tif ($category_id) {\n\t\t\t\t$game_ids = Resource_Service_Games::getIdxGameResourceCategoryBy(array('game_id'=>array('IN', $idx_games), 'status'=>1, 'category_id'=>$category_id,'game_status'=>1));\n\t\t\t\t$tmp = Common::resetKey($game_ids, 'game_id');\n\t\t\t\t$tmp = array_keys($tmp);\n\t\t\t\tif($game_ids){\n\t\t\t\t\t$params['id'] = array('IN',$tmp);\n\t\t\t\t} else {\n\t\t\t\t\t$params['create_time'] = 0;\n\t\t\t\t}\n\t\t\t\n\t\t\t} else {\n\t\t\t\t$params['id'] = array('IN',$idx_games);\n\t\t\t}\n\t\t\t\n\t\t\tlist($total, $games) = Resource_Service_Games::search($page, $this->perpage, $params);\n\t\t\tforeach($games as $key=>$value){\n\t\t\t\t$info[] = Resource_Service_Games::getGameAllInfo(array('id'=>$value['id']));\n\t\t\t}\n\t\t\t$oline_versions = common::resetkey($info, 'id');\n\t\t}\n\t\t\n\n\t $this->assign('subjects', $subjects);\n\t\t$this->assign('ad_type', $this->ad_type);\n\t\t$this->assign('category_title', $category_title);\n\t\t$this->assign('search', $search);\n\t\t$this->assign('games', $games);\n\t\t$this->assign('oline_versions', $oline_versions);\n\t\t$this->assign('total', $total);\n\t\t$this->assign('ad_ptype', $this->ad_ptype);\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $this->perpage, $url));\n\t}", "public function index()\n {\n $accounts = $this->accountRepo->findAll();\n return $this->apiResponse($accounts);\n //\n }", "function getActivityList() {\n try {\n $items = $this->perform_query_no_param(\"SELECT * from activityModel\");\n return $this->result_to_array($items);\n } catch (Exception $ex) {\n $this->print_error_message(\"Unable to Getting Activity List\");\n return null;\n }\n }", "public function index()\n {\n $planes = Plane::all();\n return $planes; \n }", "public function getList() {\n\t\t\tif (is_null($this->arList)) $this->load(); \n\t\t\treturn $this->arList; \n\t\t}", "public function showAll() {\n return response()->json(Appointment::all());\n }", "public function lists($page=1)\n {\n\t$articulos= new Articulos();\n\t$this->listapersona=$articulos->paginacion($page);\n }", "public function listarAerolineas() {\n//Se obtiene la conexion\n $conn = Conexion::singleton()->obtenerConexion();\n try {\n //Consulta para listar las aerolinas registradas\n $query = $conn->prepare(\"SELECT * FROM tbl_aerolinea\");\n $query->execute();\n return $query->fetchAll();\n }\n catch (Exception $ex) {\n\n echo 'ERROR' . $ex->getMessage();\n }\n\n $conn = null;\n }" ]
[ "0.79990906", "0.7924506", "0.72659403", "0.7230382", "0.6912281", "0.68131477", "0.67443", "0.67161447", "0.65922433", "0.64775115", "0.63593835", "0.63497937", "0.6311081", "0.62983954", "0.62945336", "0.625903", "0.61564213", "0.61474574", "0.6138124", "0.6116315", "0.605096", "0.6025357", "0.5910623", "0.5806396", "0.5802542", "0.577434", "0.5769344", "0.5735761", "0.56440747", "0.559919", "0.5587544", "0.5568942", "0.5563975", "0.55538404", "0.55261135", "0.5519227", "0.5512607", "0.5482212", "0.54583526", "0.54524815", "0.54497164", "0.54424477", "0.5438826", "0.5423796", "0.5417149", "0.54088056", "0.53683597", "0.5360031", "0.5360031", "0.53587335", "0.5354235", "0.53492343", "0.5348633", "0.5342542", "0.53347284", "0.5314185", "0.5307471", "0.53025675", "0.5300834", "0.5294557", "0.5292222", "0.5291578", "0.5290478", "0.5287552", "0.52847505", "0.5281398", "0.5261124", "0.5259861", "0.52566177", "0.52450466", "0.5235515", "0.5232486", "0.5221608", "0.5221465", "0.5219944", "0.52176636", "0.52147526", "0.52142733", "0.5210803", "0.52072906", "0.52059", "0.5202976", "0.519918", "0.51973706", "0.5197183", "0.51931876", "0.5181701", "0.51816493", "0.5180611", "0.51796967", "0.51792717", "0.517541", "0.5174347", "0.51736027", "0.51630735", "0.5158345", "0.514846", "0.5141049", "0.5138307", "0.5134894" ]
0.61986846
16
/ name: getPartnersList Safe bag params: return: desc: getPartnersList Safe bag backend
public static function getPartnersList($qryArray=array()){ $partnerslist = array(); $wheredata = array(); $partnerslist = DB::table('sb24_partnercode'); if(count($qryArray)>0) { if(isset($qryArray['portId']) && $qryArray['portId']>'0'){ $partnerslist->where('id', $qryArray['portId']); $partnerslist->take(1); } } $partnerslist->orderBy('id', 'desc'); $partnerslist = $partnerslist->get(); return $partnerslist; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPartners()\n {\n return $this->partners;\n }", "public function getPartinUsersList(){\n return $this->_get(2);\n }", "public function getExtraAvailParts($sender, $param)\n\t{\n\t\t$html = \"No parts found!\";\n\t\ttry{\n\t\t\tif(!isset($param->CallbackParameter->selectedIds) || (($selectedId = $param->CallbackParameter->selectedIds) == '') )\n\t\t\t\tthrow new Exception(\"Please select a request first!\");\n\n\t\t\t$request = Factory::service(\"FacilityRequest\")->get($selectedId);\n\t\t\tif(!$request instanceof FacilityRequest)\n\t\t\t\tthrow new Exception(\"Invalid facility request id provided(={$selectedId})!\");\n\n\n\t\t\t$partType = $request->getPartType();\n\t\t\t$hotMessage = $partType->getAlias(PartTypeAliasType::ID_HOT_MESSAGE);\n\n\t\t\t$goodParts = 1;\n\t\t\tif(isset($param->CallbackParameter->goodParts))\n\t\t\t{\n\t\t\t\t$goodParts = $param->CallbackParameter->goodParts;\n\t\t\t}\n\n\t\t\t$compatibleParts = false;\n\t\t\tif(isset($param->CallbackParameter->compatibleParts))\n\t\t\t{\n\t\t\t\t$compatibleParts = $param->CallbackParameter->compatibleParts;\n\t\t\t}\n\t\t\t$result = $this->_getAvailableParts($request->getPartType()->getId(), false, $goodParts, $compatibleParts);\n\n\t\t\t$html = \"<table class='ResultDataList'>\";\n\t\t\tif($hotMessage)\n\t\t\t{\n\t\t\t\t$html .= \"<tr><td>\". PartTypeLogic::showHotMessageDetail($hotMessage, '', false, false) . \"</td></tr>\";\n\t\t\t}\n\n\t\t\t$html .= \"<tr>\";\n\t\t\tif($compatibleParts)\n\t\t\t\t$html .= \"<td><a href='javascript: void(0);' onClick='pageJs.viewAvailList(\\\"\" . $selectedId . \"\\\", \\\"\" . $this->showAvailListBtn->getUniqueID() . \"\\\", \\\"\" . $goodParts . \"\\\", true)'>View Compatible Parts from \" . $this->_ownerWarehouse->getName() . \"</a></td>\";\n\t\t\telse\n\t\t\t\t$html .= \"<td><a href='javascript: void(0);' onClick='pageJs.viewAvailList(\\\"\" . $selectedId . \"\\\", \\\"\" . $this->showAvailListBtn->getUniqueID() . \"\\\", \\\"\" . $goodParts . \"\\\", false)'>View Parts from \" . $this->_ownerWarehouse->getName() . \"</a></td>\";\n\n\t\t\t$html .= \"<td style='float:right'><input type='image' src='/themes/images/mail.gif' onclick='return pageJs.email(\\\"\" . $selectedId . \"\\\", \\\"\" . $this->showEmailPanelBtn->getUniqueID() . \"\\\", this);' title='Send an email'/></td>\";\n\t\t\t$html .= \"</tr>\";\n\t\t\t$html .= \"<table>\";\n\n\t\t\tif($compatibleParts)\n\t\t\t\t$html .= PartTypeLogic::showCompatiblePartTypeDetail($partType);\n\t\t\telse\n\t\t\t\t$html .= \"<div><br><b>Part Details : </b>\".$partType->getAlias().\" - \".$partType->getName().\"</div><br>\";\n\n\t\t\tif(count($result)=== 0)\n\t\t\t{\n\t\t\t\t$html .= \"<br><b style='color:red'>No parts found!</b>\";\n\t\t\t\t$this->responseLabel->Text = $html;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$html .= \"<table class='ResultDataList'>\";\n\t\t\t$html .= \"<thead>\";\n\t\t\t$html .= \"<tr>\";\n\t\t\t$html .= \"<th>Warehouse</th>\";\n\t\t\tif($compatibleParts){$html .= \"<th>PartCode</th>\";}\n\t\t\t$html .= \"<th>Status</th>\";\n\t\t\t$html .= \"<th>Qty</th>\";\n\t\t\t$html .= \"<th>Reserved For</th>\";\n\t\t\t$html .= \"</tr>\";\n\t\t\t$html .= \"</thead>\";\n\t\t\t$html .= \"<tbody>\";\n\t\t\t$rowNo =0;\n\t\t\t$total = 0;\n\t\t\t$previousState = \"\";\n\t\t\tforeach($result as $r)\n\t\t\t{\n\t\t\t\tif(!($warehouse = Factory::service(\"Warehouse\")->get($r['warehouseId'])) instanceof Warehouse)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif($previousState==\"\" || $previousState!= $r['stateName'])\n\t\t\t\t{\n\t\t\t\t\t$colspan=($compatibleParts?'5':'4');\n\t\t\t\t\t$html .= \"<tr><td colspan=\".$colspan.\" style='color:white;background:black'><b>\" . $r['stateName'] . \"</b></td></tr>\";\n\t\t\t\t}\n\n\t\t\t\t$warehouseName = $warehouse;\n\t\t\t\t$index = strpos ($warehouse, \"|\");\n\t\t\t\tif($index > 0)\n\t\t\t\t{\n\t\t\t\t\t$warehouseName = substr($warehouse , 0, $index);\n\t\t\t\t}\n\n\t\t\t\t$html .= \"<tr class='\" . ($rowNo++ % 2 === 0 ? \"ResultDataListItem\" : \"ResultDataListAlterItem\") . \"' >\";\n\t\t\t\t$html .= \"<td>\" . $warehouseName . \"</td>\";\n\t\t\t\tif($compatibleParts)\n\t\t\t\t{\n\t\t\t\t\t$partcode = Factory::service('PartType')->get($r['partTypeId'])->getAlias();\n\t\t\t\t\t$html .= \"<td>\".$partcode.\"</td>\";\n\t\t\t\t}\n\n\t\t\t\t$html .= \"<td>{$r['status']}</td>\";\n\t\t\t\t$html .= \"<td>{$r['qty']}</td>\";\n\t\t\t\t$html .= \"<td>{$r['fieldTaskId']}</td>\";\n\t\t\t\t$html .= \"</tr>\";\n\t\t\t\t$total +=$r['qty'];\n\t\t\t\t$previousState = $r['stateName'];\n\t\t\t}\n\t\t\t$html .= \"</tbody>\";\n\t\t\t$html .= \"<tfoot>\";\n\t\t\t$html .= \"<tr>\";\n\t\t\t$html .= \"<td>Total</td>\";\n\t\t\t$html .= \"<td>&nbsp;</td>\";\n\t\t\tif($compatibleParts){$html .= \"<td>&nbsp;</td>\";}\n\t\t\t$html .= \"<td>$total</td>\";\n\t\t\t$html .= \"<td>&nbsp;</td>\";\n\t\t\t$html .= \"</tr>\";\n\t\t\t$html .= \"</tfoot>\";\n\t\t\t$html .= \"</table>\";\n\t\t}\n\t\tcatch(Exception $ex)\n\t\t{\n\t\t\t$html = $this->_getErrorMsg($ex->getMessage());\n\t\t}\n\n\t\t$this->responseLabel->Text = $html;\n\t}", "protected function getChannelPartnersRequest()\n {\n\n $resourcePath = '/channel_partner/channel_partners';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('x-ultracart-simple-key');\n if ($apiKey !== null) {\n $headers['x-ultracart-simple-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function getAvailParts($sender, $param)\n\t{\n\t\t$html = \"No parts found!\";\n\t\ttry\n\t\t{\n\t\t\tif(!isset($param->CallbackParameter->selectedIds) || (($selectedId = $param->CallbackParameter->selectedIds) == '') )\n\t\t\t\tthrow new Exception(\"Please select a request first!\");\n\n\t\t\t$request = Factory::service(\"FacilityRequest\")->get($selectedId);\n\t\t\t$partType = $request->getPartType();\n\t\t\t$hotMessage = $partType->getAlias(PartTypeAliasType::ID_HOT_MESSAGE);\n\n\t\t\tif(!$request instanceof FacilityRequest)\n\t\t\t\tthrow new Exception(\"Invalid facility request id provided(={$selectedId})!\");\n\n\t\t\t$goodParts = 1;\n\t\t\tif(isset($param->CallbackParameter->goodParts))\n\t\t\t{\n\t\t\t\t$goodParts = $param->CallbackParameter->goodParts;\n\t\t\t}\n\t\t\t$compatibleParts = false;\n\t\t\tif(isset($param->CallbackParameter->compatibleParts))\n\t\t\t{\n\t\t\t\t$compatibleParts = $param->CallbackParameter->compatibleParts;\n\t\t\t}\n\n\t\t\t$result = $this->_getAvailableParts($partType->getId(), true, $goodParts, $compatibleParts);\n\t\t\t$html = \"\";\n\n\t\t\t$html .= \"<table class='ResultDataList'>\";\n\n\t\t\tif($hotMessage)\n\t\t\t{\n\t\t\t\t$html .= \"<tr><td>\". PartTypeLogic::showHotMessageDetail($hotMessage, '', false, false) . \"</td></tr>\";\n\t\t\t}\n\n\t\t\t$html .= \"<tr>\";\n\t\t\tif($compatibleParts)\n\t\t\t\t$html .= \"<td><a href='javascript: void(0);' onClick='pageJs.viewAvailListOtherStores(\\\"\" . $selectedId . \"\\\", \\\"\" . $this->showExtraAvailListBtn->getUniqueID() . \"\\\",\\\"\" . $goodParts . \"\\\",true)'>View Compatible Parts from other Locations</a></td>\";\n\t\t\telse\n\t\t\t\t$html .= \"<td><a href='javascript: void(0);' onClick='pageJs.viewAvailListOtherStores(\\\"\" . $selectedId . \"\\\", \\\"\" . $this->showExtraAvailListBtn->getUniqueID() . \"\\\",\\\"\" . $goodParts . \"\\\",false)'>View Parts from other Locations</a></td>\";\n\n\t\t\t$html .= \"<td style='float:right'><input type='image' src='/themes/images/mail.gif' onclick='return pageJs.email(\\\"\" . $selectedId . \"\\\", \\\"\" . $this->showEmailPanelBtn->getUniqueID() . \"\\\", this);' title='Send an email'/></td>\";\n\n\t\t\t$html .= \"</tr>\";\n\t\t\t$html .= \"<table>\";\n\n\t\t\tif($compatibleParts)\n\t\t\t\t$html .= PartTypeLogic::showCompatiblePartTypeDetail($partType);\n\t\t\telse\n\t\t\t\t$html .= \"<div><br><b>Part Details : </b>\".$partType->getAlias().\" - \".$partType->getName().\"</div><br>\";\n\n\t\t\tif(count($result)=== 0)\n\t\t\t{\n\t\t\t\t$html .= \"<br><b style='color:red'>No parts found!</b>\";\n\t\t\t\t$this->responseLabel->Text = $html;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$html .= \"<table class='ResultDataList'>\";\n\t\t\t$html .= \"<thead>\";\n\t\t\t$html .= \"<tr>\";\n\t\t\t$html .= \"<th>Warehouse</th>\";\n\t\t\tif($compatibleParts){$html .= \"<th>Partcode</th>\";}\n\t\t\t$html .= \"<th>Status</th>\";\n\t\t\t$html .= \"<th>Qty</th>\";\n\t\t\t$html .= \"<th>Reserved For</th>\";\n\t\t\t$html .= \"</tr>\";\n\t\t\t$html .= \"</thead>\";\n\t\t\t$html .= \"<tbody>\";\n\t\t\t$rowNo =0;\n\t\t\t$total = 0;\n\t\t\tforeach($result as $r)\n\t\t\t{\n\t\t\t\tif(!($warehouse = Factory::service(\"Warehouse\")->get($r['warehouseId'])) instanceof Warehouse)\n\t\t\t\tcontinue;\n\n\t\t\t\t$html .= \"<tr class='\" . ($rowNo++ % 2 === 0 ? \"ResultDataListItem\" : \"ResultDataListAlterItem\") . \"' >\";\n\t\t\t\t$html .= \"<td>\" . $warehouse->getBreadCrumbs() . \"</td>\";\n\t\t\t\tif($compatibleParts)\n\t\t\t\t{\n\t\t\t\t\t$partcode = Factory::service('PartType')->get($r['partTypeId'])->getAlias();\n\t\t\t\t\t$html .= \"<td>\".$partcode.\"</td>\";\n\t\t\t\t}\n\t\t\t\t$html .= \"<td>{$r['status']}</td>\";\n\t\t\t\t$html .= \"<td>{$r['qty']}</td>\";\n\t\t\t\t$html .= \"<td>{$r['fieldTaskId']}</td>\";\n\t\t\t\t$html .= \"</tr>\";\n\t\t\t\t$total +=$r['qty'];\n\t\t\t}\n\t\t\t$html .= \"</tbody>\";\n\t\t\t$html .= \"<tfoot>\";\n\t\t\t$html .= \"<tr>\";\n\t\t\t$html .= \"<td>Total</td>\";\n\t\t\t$html .= \"<td>&nbsp;</td>\";\n\t\t\tif($compatibleParts){$html .= \"<td>&nbsp;</td>\";}\n\t\t\t$html .= \"<td>$total</td>\";\n\t\t\t$html .= \"<td>&nbsp;</td>\";\n\t\t\t$html .= \"</tr>\";\n\t\t\t$html .= \"</tfoot>\";\n\t\t\t$html .= \"</table>\";\n\t\t}\n\t\tcatch(Exception $ex)\n\t\t{\n\t\t\t$html = $this->_getErrorMsg($ex->getMessage());\n\t\t}\n\t\t$this->responseLabel->Text = $html;\n\t}", "function getPartnersList()\n {\n $partners = Employee::where('Emp_level' , '=', 4)->get();\n $partnersList = [];\n\n foreach ($partners as $partner) {\n $partnerName = $partner->Emp_Firstname .\" \". $partner->Emp_Lastname;\n array_push($partnersList, $partnerName);\n }\n\n return $partnersList;\n\n }", "function retrieve_promoter_clients_list(){\n\t\t\n\t\t$this->CI->load->model('model_users_promoters', 'users_promoters', true);\n\t\t$clients = $this->CI->users_promoters->retrieve_promoter_clients_list($this->promoter->up_id, $this->promoter->team->t_fan_page_id);\n\t\tforeach($clients as $key => &$client){\n\t\t\t\n\t\t\tif($client->pglr_user_oauth_uid === null){\n\t\t\t\tunset($clients[$key]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$client = $client->pglr_user_oauth_uid;\n\t\t}\n\t\treturn $clients;\n\t\t\n\t}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('RudakPartnerBundle:Partner')->getPartnersList();\n\n return $this->render('RudakPartnerBundle:Partner:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function __construct(Partners $partners)\n {\n $this->partners = $partners;\n \n }", "public function getPrequestList(){\n return $this->_get(5);\n }", "public function getServerList() {}", "public function index()\n {\n $eventpartners = Eventpartner::all();\n return $eventpartners;\n }", "public function getParts(Request $request)\n {\n /*$item = \\App\\WorkItem::find($request->get('item'));\n\n if(!is_null($item))\n $res['res'] = $item->parts()->whereNotIn('id', $request->get('selected'))->pluck('part', 'id');\n else\n $res['res'] = null;*/\n if($request->has('selected'))\n $res['res'] = \\App\\Part::whereNotIn('id', $request->get('selected'))\n ->orderBy('part')\n ->pluck('id', 'part');\n else\n $res['res'] = \\App\\Part::orderBy('part')->pluck('id', 'part');\n\n return $res; \n }", "public function list_get()\n\t{\n\t\ttry{\n\n\t\t\t$this->checkCanCandidateId();\n\t\t\t$filters = array(\n\t\t\t\t\"{$this->_candidateIdFkKey}\" =>$this->getCanCandidateId()\n\t\t\t);\n\t\t\t$list = $this->_model->getBy($filters);\n\t\t\t$this->response($list);\n\t\t}catch( Exception $e ){\n\t\t\t$message = $e->getMessage();\n\t\t\t$code = $e->getCode();\n\t\t\t$this->error_response($message,$code);\n\t\t}\n\n\t}", "public function get_invites() {\n\t\tif (!$this->get_settings()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$http = new HttpSocket(array(\n\t\t\t'timeout' => 15,\n\t\t\t'ssl_verify_host' => false // PHP does not seem to check SANs for CNs\n\t\t));\n\t\tif (isset($this->args[0])) { \n\t\t\t$results = $http->post($this->settings['hostname.mbd'].'/ignite/getinvites?X-ApiKey='.$this->settings['mbd.api_key'], \n\t\t\t\tjson_encode(array(\n\t\t\t\t\t'panelistIds' => array(\n\t\t\t\t\t\t$this->args[0]\n\t\t\t\t\t)\n\t\t\t\t)), \n\t\t\t\tarray('header' => array(\n\t\t\t\t\t'Accept' => 'application/json',\n\t\t\t\t\t'Content-Type' => 'application/json; charset=UTF-8'\n\t\t\t\t))\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\t$results = $http->get($this->settings['hostname.mbd'].'/ignite/getinvites?X-ApiKey='.$this->settings['mbd.api_key'], array(\n\t\t\t\t'maxResults' => '100'\n\t\t\t), $this->options);\n\t\t}\n\t\t\n\t\t$results = json_decode($results, true);\n\t\tCakeLog::write('mbd.invites', print_r($results, true));\n\t\t\n\t\t$this->out('Total of '.count($results).' results');\n\t\tif (!empty($results)) {\n\t\t\tforeach ($results as $result) {\n\t\t\t\t$results = $http->get($result['url'].'&test=true',\n\t\t\t\t\tarray(),\n\t\t\t\t\tarray('header' => array(\n\t\t\t\t\t\t'Accept' => 'application/json',\n\t\t\t\t\t\t'Content-Type' => 'application/json; charset=UTF-8'\n\t\t\t\t\t))\n\t\t\t\t);\n\t\t\t\t$this->out('#'.$result['panelistId'].' '.$result['url'].': '.$results['body']); \n\t\t\t}\n\t\t}\n\t\t$this->out('invite data logged in mbd.invites.log');\n\t}", "public function actionIndex()\n\t{\n\t\t$searchModel = new ChannelPartnersSearch();\n\t\t$model = new ChannelPartners();\n\t\t$productsList = Products::productList();\n\t\t$loginId = Yii::$app->user->identity->id;\n\t\t$fieldForce = Users::getRecoursive($loginId,true);\n\t\t$channelPartners = Users::getPartners($fieldForce);\n\t\t$label_names_display = LabelNames::labelNamesDisplay();\n\t\t// $dataProvider = $searchModel->searchDetails(Yii::$app->request->queryParams);\n\t\treturn $this->render('partners', [\n\t\t\t\t//\t'searchModel' => $searchModel,\n\t\t\t\t'model'\t\t => $model,\n\t\t\t\t'ProductList' => $productsList,\n\t\t\t\t'PartnersInfo' => $channelPartners,\n\t\t\t\t'label_names_display' => $label_names_display\n\t\t]);\n\n\t\t/* \treturn $this->render('index', [\n\t\t 'searchModel' => $searchModel,\n\t\t 'model'\t\t =>$model,\n\t\t 'dataProvider' => $dataProvider['dataProvider'],\n\t\t 'columns' => $dataProvider['columns'],\n\t\t]); */\n\t}", "function getPartners($limit, $offset=0) {\n $this->db->select(\"*\");\n $this->db->order_by(\"partnerName\", \"asc\");\n\t\t$this->db->limit($limit, $offset);\n $query = $this->db->get('partner');\n if ($query->num_rows() > 0) {\n return $query->result_array();\n }\n return array();\n }", "public function index()\n {\n //\n $slider=Partner::all(); \n return view('livewire.admin.listpartners',['list'=>$slider]);\n }", "public function partners(Request $request)\n\t{\n\t\t$roles = json_decode(Auth::user()->user_role, 1);\n\t\tif (!isset($roles) || empty($roles) || !in_array('partners', $roles))\n\t\t{\n\t\t\techo \"You don't have permission to view integrations.\";\n\t\t\tdie;\n\t\t}\n\t\t$partners = Partner::orderBy('id', 'desc')->get();\n\t\treturn view('admin.admin_partner', ['partners' => $partners]);\n\t}", "public function updatePartners($e)\n {\n $partnersArray = $e->getParam('partners');\n\n $partnerService = $e->getTarget()\n ->getServiceManager()\n ->get('playgroundpartnership_partner_service');\n $partners = $partnerService->getActivepartners();\n\n foreach ($partners as $partner) {\n $partnersArray[$partner->getId()] = $partner->getName();\n }\n\n return $partnersArray;\n }", "public function getChannelPartnersWithHttpInfo()\n {\n return $this->getChannelPartnersWithHttpInfoRetry(true );\n }", "public function index()\n {\n $part_dealer = $this->getUserDetail(\n $this->part_dealer->getVerifiedPartDealers()\n );\n \n return $part_dealer->additional([\n 'message' => 'All verified part dealers retrieved successfully',\n 'status' => \"success\"\n ]);\n }", "public function select_data_partners(){\n echo json_encode($this->db->get('table_partners')->result());\n }", "public function partners($limit,$start,$is_deleted) \n\t{\n\t\t$sql = \"SELECT * FROM test_tbl ORDER BY id DESC LIMIT $start,$limit\";\n\t\t$val = $this->db->query($sql);\n\t\tif($val->num_rows() > 0) \n\t\t{\n\t\t\treturn $val->result_array();\n\t\t}\t\n\t\t\n\t}", "function babeliumsubmission_get_available_exercise_list(){\n Logging::logBabelium(\"Getting available exercise list\");\n $this->exercises = $this->getBabeliumRemoteService()->getExerciseList();\n return $this->getExercisesMenu();\n }", "public function getRsrvdParts($sender, $param)\n\t{\n\t\t$html = \"No parts found!\";\n\t\ttry\n\t\t{\n\t\t\tif(!isset($param->CallbackParameter->selectedIds) || count($selectedIds = ($param->CallbackParameter->selectedIds)) === 0)\n\t\t\t\tthrow new Exception(\"Please select a request first!\");\n\n\t\t\t$requestId = $selectedIds[0];\n\t\t\t$request = Factory::service(\"FacilityRequest\")->get($requestId);\n\t\t\tif(!$request instanceof FacilityRequest)\n\t\t\t\tthrow new Exception(\"Invalid facility request id provided(=$requestId)!\");\n\n\t\t\t//find all reserved part instances\n\t\t\t$pis = Factory::service(\"PartInstance\")->findByCriteria(\"pi.facilityRequestId = $requestId\");\n\n\t\t\t$html = \"<table class='ResultDataList'>\";\n\t\t\t$html .= \"<thead>\";\n\t\t\t$html .= \"<tr>\";\n\t\t\t$html .= \"<th width='20%'>Barcode</th>\";\n\t\t\t$html .= \"<th>Comments</th>\";\n\t\t\t$html .= \"<th width='8%'>Qty</th>\";\n\t\t\t$html .= \"<th width='5%'>&nbsp</th>\";\n\t\t\t$html .= \"</tr>\";\n\t\t\t$html .= \"</thead>\";\n\t\t\t$html .= \"<tbody>\";\n\t\t\t$html .= \"<tr class='ResultDataListAlterItem' resrpartpan='reservedTr'>\";\n\n\t\t\tif(!in_array($request->getStatus(), FacilityRequest::getStatusesAllowResvPI()))\n\t\t\t\t$html .= \"<td colspan=4 style='color: red; font-weight: bold;'>The status(`\" . $request->getStatus() . \"`) of the selected request does not allow reservation of parts!</td>\";\n\t\t\telse if(!Factory::service(\"FacilityRequest\")->checkOwnership($request, $this->getOwnerWarehouse()))\n\t\t\t\t$html .= \"<td colspan=4 style='color: red; font-weight: bold;'>You don't have access to this request.You need to own the request to proceed.</td>\";\n\t\t\telse\n\t\t\t{\n\t\t\t\t$html .= \"<td><input PlaceHolder='Barcode' resrpartpan='reservedSerialNoSearch' onkeydown=\\\"pageJs.enterEvent(event, $(this).up('tr[resrpartpan=reservedTr]').down('input[resrpartpan=reservedAddBtn]'));\\\"/>\n\t\t\t\t</br>\n\t\t\t\t</br>BL:\n\t\t\t\t<input id='BLNo' PlaceHolder='Barcode:BL' resrpartpan='reservedBLNoSearch' onkeydown=\\\"pageJs.enterEvent(event, $(this).up('tr[resrpartpan=reservedTr]').down('input[resrpartpan=reservedAddBtn]'));\\\"/>\n\t\t\t\t</td>\";\n\t\t\t\t$html .= \"<td>\n\t\t\t\t</br>\n\t\t\t\t(Limit text to 120 Characters)<input PlaceHolder='Comments' resrpartpan='reservedComments' style='width: 98%;'/>\n\t\t\t\t</br>\n\t\t\t\t</td>\";\n\t\t\t\t$html .= \"<td><input id='reservedQty' resrpartpan='reservedQty' value='1' style='width: 30px;'/></th>\";\n\t\t\t\t$html .= \"<td>\";\n\t\t\t\t$html .= \"<input resrpartpan='reservedAddBtn' type='button' value='Add' Onclick=\\\"pageJs.reservePI('$requestId', '\" . $this->rsvPartBtn->getUniqueID() . \"', '\" . $this->unRsvPartBtn->getUniqueID() . \"', this,'\" . $this->checkPartBtn->getUniqueID() .\n\t\t\t\t\"','\" . $this->checkPartType->getClientId() . \"','\" . $this->checkPartErrors->getClientId() . \"','\" . $this->errorBL->getClientId() . \"');\\\"/>\";\n\t\t\t\t$html .= \"<input resrpartpan='bpregex' type='hidden' value='\" . BarcodeService::getBarcodeRegex(BarcodeService::BARCODE_REGEX_CHK_PART_TYPE, null, '^', '$') . \"' />\";\n\t\t\t\t$html .= \"<input resrpartpan='partregex' type='hidden' value='\" . BarcodeService::getBarcodeRegex(BarcodeService::BARCODE_REGEX_CHK_PART, null, '^', '$') . \"' />\";\n\t\t\t\t$html .= \"</td>\";\n\t\t\t}\n\t\t\t$html .= \"</tr>\";\n\t\t\t$rowNo =0;\n\t\t\t$total = 0;\n\t\t\tforeach($pis as $pi)\n\t\t\t{\n\t\t\t\t$piQty = ($pi->getPartType()->getSerialised()==1)? 1:$pi->getQuantity();\n\t\t\t\t$barcode = ($pi->getPartType()->getSerialised()==1)? $pi->getAlias(PartInstanceAliasType::ID_SERIAL_NO):$pi->getPartType()->getAlias(PartTypeAliasType::ID_BP);\n\t\t\t\t$html .= \"<tr rsvdPIId=\\\"\" . $pi->getId() . \"\\\" class='\" . ($rowNo++ % 2 === 0 ? \"ResultDataListItem\" : \"ResultDataListAlterItem\") . \"' >\";\n\t\t\t\t$html .= \"<td>\" . $barcode . \"</td>\";\n\t\t\t\t$html .= \"<td>\" . $pi->getWarehouse()->getBreadCrumbs() . \"</td>\";\n\t\t\t\t$html .= \"<td>\".intval($piQty).\"</td>\";\n\t\t\t\t$html .= \"<td>\";\n\t\t\t\t$html .= \"<input type='image' src='/themes/images/delete_mini.gif' onClick=\\\"pageJs.unresrvPI('$requestId', '\" . $this->unRsvPartBtn->getUniqueID() . \"', this);\\\"/>\";\n\t\t\t\t$html .= \"</td>\";\n\t\t\t\t$html .= \"</tr>\";\n\t\t\t\t$total += intval($piQty);\n\t\t\t}\n\t\t\t$html .= \"</tbody>\";\n\t\t\t$html .= \"<tfoot>\";\n\t\t\t$html .= \"<tr>\";\n\t\t\t$html .= \"<td>Total</td>\";\n\t\t\t$html .= \"<td>&nbsp;</td>\";\n\t\t\t$html .= \"<td><span resrpartpan='reservedTotalQty'>$total</span></td>\";\n\t\t\t$html .= \"<td>&nbsp;</td>\";\n\t\t\t$html .= \"</tr>\";\n\t\t\t$html .= \"</tfoot>\";\n\t\t\t$html .= \"</table>\";\n\n \t\t\tif($this->checkFieldTaskHasAllReservationsFulfilled($request->getFieldTask()))\n \t\t\t{\n \t\t\t\t$html .= \"<select id='titleActionListDropDown'>\";\n \t\t\t\t$html .= \"<option value='pushToAvail' class='fieldtaskoptons'>Push Field Task Avail</option>\";\n \t\t\t\t$html .= \"</select>\";\n \t\t\t\t$html .= \"<input id='titleActionListBtn' value='Go' onclick=\\\"return pageJs.pushFTWrapper($('titleActionListDropDown').value, '\" . $this->changeFTStatusBtn->getUniqueID() . \"',\" . $requestId . \"); return false;\\\" type='button'>\";\n \t\t\t}\n\t\t}\n\t\tcatch(Exception $ex)\n\t\t{\n\t\t\t$html = $this->_getErrorMsg($ex->getMessage());\n\t\t}\n\t\t$this->responseLabel->Text = $html;\n\t}", "public function __construct($partners)\n {\n $this->partners = $partners;\n }", "public function listServiceOfferings() {\n\t\t$data = array (\n\t\t\t\t\"apiKey\" => $this->apiKey,\n\t\t\t\t\"command\" => \"listServiceOfferings\",\n\t\t\t\t\"response\" => \"json\"\n\t\t);\n\t\t$url = $this->getSignatureUrl ( $data );\n\t\treturn $this->curlGet ( $url );\n\t}", "public function index()\n {\n $partners = $this->partnerRespository->all();\n return view('admin.partners.index', compact('partners'));\n }", "protected function initParts() {\r\n return array(\r\n 'getCertificate' => new PartnerAPITypeGetCertificateRequest()\r\n );\r\n }", "public function offers_get()\n\t{\n $token = $_SERVER['HTTP_TOKEN'];\n $data = array(\n 'status' => 0,\n 'code' => -1,\n 'msg' => 'Bad Request',\n 'data' => null\n );\n if($this->checkToken($token))\n {\n $offers = $this->Api_model->getOffers();\n if (isset($offers)) {\n $data = array(\n 'status' => 1,\n 'code' => 1,\n 'msg' => 'success',\n 'data' => $offers\n );\n }else{\n $data = array(\n 'status' => 1,\n 'code' => 1,\n 'msg' => 'success',\n 'data' => null\n );\n }\n }else\n {\n $data['msg'] = 'Request Unknown or Bad Request';\n }\n $this->response($data, REST_Controller::HTTP_OK);\n\t}", "function allPartnersAscending() {\n\n\t\t\t\t\t/* Returns all partner companies in database in alphabetical order. */\n\n\t\t\t\t\treturn Partner::find('all', array('order'=>'name Asc'));\n\t\t\t\t}", "public function __construct(Partners $partners)\n {\n $this->partners = $partners;\n }", "protected function getPartnersWithName()\n {\n $partnerOrganizations = [];\n\n foreach ($this->partners as $index => $partner) {\n $tempOrg = $partner;\n $tempOrg['nameString'] = $partner->actualName();\n $partnerOrganizations[$index] = $tempOrg;\n }\n\n return collect($partnerOrganizations);\n }", "abstract protected function getSubClientNames();", "public function getItemsList(){\n return $this->_get(4);\n }", "public function getServiceRequestParts($partsIds)\n {\n // return $parts = DB::table('product_parts')\n return $parts = ProductPart::select(DB::raw('group_concat(product_parts.name SEPARATOR \", \") as name'))\n ->join('product_part_service_request', 'product_parts.id', '=', 'product_part_service_request.product_part_id')\n ->whereIn('product_parts.id',$partsIds)\n ->groupBy('product_part_service_request.service_request_id')\n ->get()->first();\n }", "function clientsListAction()\n\t{\n\t\t$searchParameters=$this->_request->getParams();\n\t\t\n\t\t$client_obj = new Ep_Quote_Client();\n\t\t$clients=$client_obj->getClients($searchParameters);\n\t\tif($clients!='NO')\n\t\t\t$this->_view->clients =$clients;\n\t\t\n\t\t$this->_view->client_creators=$client_obj->getClientCreatorUsers();\t\n\t\t\n\t\t$this->render('clients-list');\n\t}", "function listParts($parts) {\n \n echo \"<input list=parts name=part>\";\n echo \"<datalist id=parts>\";\n \n // Loop through the parts and insert it as an option\n foreach ($parts as $part) {\n \n echo '<option value=\"' . $part[\"PNAME\"] . '\">'. '</option>';\n \n }\n \n echo \"</datalist>\";\n \n }", "public function getParticipants(): Collection;", "public function getClientTypeListAction()\n\t{\n\t\t$clientParameters=$this->_request->getParams();\n\t\t$client_types=$clientParameters['client_type'];\t\n\n\t\t$client_obj=new Ep_Quote_Client();\n\t\t\n\t\t$searchparams['client_type']=explode(\",\",$client_types);\t\t\n\t\t$company_list=$client_obj->getAllCompanyList($searchparams);\n\n\t\t$options='<option></option>';\n\n\t\tif($company_list!='NO')\n\t\t{\n\t\t\tforeach($company_list as $id=>$email)\n\t\t\t{\n\t\t\t\t$options.='<option value=\"'.$id.'\"\">'.$email.'</option>';\n\t\t\t}\n\t\t}\n\t\techo $options;\n\n\t}", "public function getChannelPartners()\n {\n list($response) = $this->getChannelPartnersWithHttpInfo();\n return $response;\n }", "public function provider_get_list()\n {\n return [\n [['flag' => 'invalid_params', 'pref_id'=> '']],\n\n [['flag' => 'invalid_params', 'pref_id'=> 'string']],\n\n [['flag' => 'success', ]],\n ];\n\n }", "function listAdviserClients(){\n \n //setup for paging ---\n $per_page = ($this->input->get('result_per_page')? $this->input->get('result_per_page') : 200);\n\t$offset = ($this->input->get('offset')? $this->input->get('offset') : ''); \n\n //Get list of all para-planners for the firm this ifa belongs to ---\n $allParaPlanners = $this->adviser_accessor->getAdvisersOfTypeForFirm( $this->hisFirmID ,'AP');\n\n //if para-planner or noamal we show both assigned and owned ---\n if($this->isSuper == TRUE)//this is a\n {\n //get all clients of the firm for super advisers\n $clients = $this->client_accessor->getClientsOfFirm($this->hisFirmID);\n $assignedClients = null;\n }\n else if($this->isParaPlanner || $this->isNormal )\n { \n $where_search[] = \"(clients.adviser_adviserID = $this->curIfaID )\";\n $clients = $this->client_accessor->searchClients($where_search, $per_page, $offset);\t\n $assignedClients = $this->client_accessor->getAssignedClients($this->curIfaID);\n }\n \n\t\n $data['clients'] = $clients; \n $data['assigned_clients'] = $assignedClients ;\n $data['para_planners'] = $allParaPlanners;\n $data['firmID'] = $this->hisFirmID;\n \n $data['can_edit_roles']= $this->can_edit_roles;\n $data['is_super'] = $this->isSuper;\n\n $data['ajax_url'] = base_url() . $this->moduleName . \"/AdviserRemoteStub/\";\n \n $data['page_title'] = \"Clients\";\n $data['page_header'] = \"Listing of Clients\";\n \n $data['content_view'] = \"adviser/list_clients\";\n $data['sidebar_view'] = \"adviser/adviser_sidebar\";\n\n $data['mod_js'] = $this->getModule_js();\n \n $this->breadcrumbs->push('Adviser', '/adviser/');\n\t$this->breadcrumbs->push('Clients', '/');\n \n $this->template->callDefaultTemplate($data);\n \n }", "public function getList(): array\n {\n return $this->openerp_jsonrpc->callWithoutCredential(self::getPath('get_list'));\n }", "public function getTaskListList(){\n return $this->_get(2);\n }", "public function providertestRequest()\r\n {\r\n return array(array(\"list\",\"course\"),array(\"list\",\"teacher\"));\r\n }", "protected function activityPartners()\n {\n $activityPartners = [];\n\n foreach ($this->partners as $partner) {\n if (array_has(array_flip($partner->used_by), $this->activityId)) {\n $activityPartners[] = $partner;\n }\n }\n\n return $activityPartners;\n }", "public function Admin_Action_CustomFieldUsedByList() {\n $listIDs = $this->_getPOSTRequest ( 'listid', null );\n if (is_array ( $listIDs )) {\n $output = GetJSON ( $this->_getCustomFieldUsedByList ( $listIDs ) );\n echo $output;\n }\n }", "function bigbluebuttonbn_get_participants($bigbluebuttonbnid) {\n return false;\n}", "public function getList(){\n\t\tuser_login_required();\n\n\t\t//Try to get the list\n\t\t$conversationsList = CS::get()->components->conversations->getList(userID);\n\n\t\t//Check for errors\n\t\tif($conversationsList === false)\n\t\t\tRest_fatal_error(500, \"Couldn't get conversations list !\");\n\t\t\n\t\t//Process the list of conversation\n\t\tforeach($conversationsList as $num => $conv)\n\t\t\t$conversationsList[$num] = self::ConvInfoToAPI($conv);\n\t\t\n\t\t//Return results\n\t\treturn $conversationsList;\n\t}", "public function getParametersList(){\n return $this->_get(2);\n }", "public function exportParticipantsList(){\n return (new ParticipantsExport())->download('participants.xls');\n }", "public function printPickList($sender, $param)\n {\n \t$html = '';\n \ttry\n \t{\n\t \tif(!isset($param->CallbackParameter->selectedIds) || count($selectedIds = ($param->CallbackParameter->selectedIds)) === 0)\n \t\t\tthrow new Exception(\"Please select a request first!\");\n\t \t$totalQty = 0;\n\n\t \t//get timestamp\n\t \t$timeZone = Factory::service(\"Warehouse\")->getDefaultWarehouseTimeZone(Core::getUser());\n\t \t$now = new HydraDate('now', $timeZone);\n\n\t \t$this->_ownerWarehouse = $this->getOwnerWarehouse();\n\t \t$stockWarehouse = FacilityRequestLogic::getWarehouseForPartCollection($this->_ownerWarehouse, Factory::service('Warehouse')->getDefaultWarehouse(Core::getUser()));\n\t \t$result = Factory::service(\"FacilityRequest\")->getPickList($selectedIds, $stockWarehouse);\n\t \t$deliveryInfo = FacilityRequestLogic::getShipToInformation($selectedIds);\n\n\t \t$html = \"<div>\";\n\t \t$html .= \"<img src='/themes/images/print.png' onclick='window.print();' title='Print' style='float:right;margin: 0 0 0 10px;'/>\";\n\t \t$html .= \"<b>The list of selected parts you are picking under <u>\" . $this->_ownerWarehouse->getBreadCrumbs(true) . \"</u> :</b>\";\n\t \t$html .= \"</div>\";\n\t \t$html .= ($printInfo = \"<div style='font-style:italic; font-size: 9px;'>Printed by \" . Core::getUser()->getPerson() . \" @ $now($timeZone) </div>\");\n\t \t$html .= \"<table style='width:100%;' border=1 cellspacing=0>\";\n\t \t$html .= \"<thead>\";\n\t \t$html .= \"<tr style='background: black; color: white; font-weight: bold;'>\";\n\t \t$html .= \"<td>Location</td><td>Avail Qty</td><td>Field task</td><td>Part Type</td><td>Req. Qty</td><td width='30px'>Request ID</td>\";\n\t \t$html .= \"</tr>\";\n\t \t$html .= \"</thead>\";\n\t \t$html .= \"<tbody>\";\n \t\t$totalQty = 0;\n \t\tforeach($result as $rowNo => $res)\n \t\t{\n\t\t\t\t$shipTo = '';\n\n \t\t\t$request = Factory::service(\"FacilityRequest\")->get($res['id']);\n \t\t\t$this->autoTake($request, $this->_ownerWarehouse);\n \t\t\t$location = 'No available parts!';\n \t\t\tif(is_array($locationArray = explode(\"-\", $res['maxNoLocation'])))\n \t\t\t{\n \t\t\t\t$warehouse = Factory::service(\"Warehouse\")->getWarehouse(isset($locationArray[1]) ? trim($locationArray[1]) : '');\n \t\t\t\t$availQty = isset($locationArray[2]) ? trim($locationArray[2]) : '';\n \t\t\t\tif($warehouse instanceof Warehouse)\n \t\t\t\t{\n \t\t\t\t\t$location = $warehouse->getBreadCrumbs() . \"<br /><img style='margin: 15px 15px 0 15px;' src='/ajax/?method=renderBarcode&text=\" . $warehouse->getAlias(WarehouseAliasType::$aliasTypeId_barcode) . \"' />\";\n\n \t\t\t\t\t$shipTo = (array_key_exists($res['id'], $deliveryInfo) ? $deliveryInfo[$res['id']] : '');\n \t\t\t\t\tif (is_array($shipTo))\n \t\t\t\t\t{\n \t\t\t\t\t\t$shipTo = $deliveryInfo[$res['id']]['wh'];\n \t\t\t\t\t}\n \t\t\t\t\t$shipTo = '<br /><br /><span style=\"font-style:bold;\">SHIP TO: <span style=\"font-style:italic;\">' . $shipTo . '</span></span>';\n \t\t\t\t}\n \t\t\t}\n \t\t\tif(!$request instanceof FacilityRequest)\n \t\t\t\tcontinue;\n\n \t\t\t$totalQty += ($qty = $request->getQuantity());\n \t\t\t$ftaskNumber = $request->getFieldTask();\n \t\t\t$partType = $request->getPartType();\n \t\t\t$html .= \"<tr valign='bottom' style='\" . ($rowNo++ % 2 ===0 ? '': 'background: #eeeeee;') . \"'>\";\n\t\t \t$html .= \"<td>\" . $location . $shipTo . \"</td>\";\n\t\t \t$html .= \"<td>$availQty <i style='font-size:9px;'>GOOD</i></td>\";\n\t\t \t$html .= \"<td>\" . $ftaskNumber->getId() .\"</td>\";\n\t\t \t$html .= \"<td>\" . $partType->getAlias() . \"<div style='font-style:italic; font-size: 9px;'>\" . $partType->getName() .\"</div>\";\n\t\t \tif(($bp = trim($partType->getAlias(PartTypeAliasType::ID_BP))) !== '')\n\t\t \t\t$html .= \"<img style='margin: 15px 15px 0 15px;' src='/ajax/?method=renderBarcode&text=$bp' />\";\n\n\t\t \t$html .= \"</td>\";\n\t\t \t$html .= \"<td>$qty</td>\";\n\t\t \t$html .= \"<td><img style='margin: 15px 15px 0 15px;' src='/ajax/?method=renderBarcode&text=\" . $request->getId() . \"' /></td>\";\n\t\t \t$html .= \"</tr>\";\n \t\t}\n\t \t$html .= \"<tr style='background: black; color: white; font-weight: bold;'>\";\n\t \t$html .= \"<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>Total:</td><td>$totalQty</td><td>&nbsp;</td>\";\n\t \t$html .= \"</tr>\";\n\t \t$html .= \"</tbody>\";\n\t \t$html .= \"<tfoot>\";\n\t \t$html .= \"<tr>\";\n\t\t\t$html .= \"<td colspan=6 style='text-align: right;'>$printInfo</td>\";\n\t\t\t$html .= \"</tr>\";\n\t\t \t$html .= \"</tfoot>\";\n\t \t$html .= \"</table>\";\n \t}\n\t catch(Exception $ex)\n\t {\n\t \t$html = $this->_getErrorMsg($ex->getMessage());\n\t }\n \t$this->responseLabel->Text = $html;\n }", "function Listar_Clientes()\n\t {\n\t\tlog_message('INFO','#TRAZA| CLIENTES | Listar_Clientes() >> ');\n\t\t$data['list'] = $this->Clientes->Listar_Clientes();\n return $data;\n\t }", "function get_form_guestList($countGuests = false){\n\trequire_once(FORM_DIR.'form.guestlist.php');\n}", "public function listCollectionAction()\n {\n $collection = null;\n if ($owned_packs = $this->getUser()->getOwnedPacks()) {\n $collection = explode(',', $owned_packs);\n }\n\n return new JsonResponse($collection);\n }", "public function providerList()\n {\n $this->getData();\n $this->getDefaultValue();\n\n $list = $this->getMethodsName('list');\n $provider = [];\n\n foreach ($list as $name) {\n $provider[$name] = [\n 'name' => $name,\n 'productId' => $this->allMethods[$name]['countRequiredParams'] > 0\n ? $this->argList\n : []\n ];\n }\n\n return $provider;\n }", "function list(){\n $res = $res = $this->client->request('GET',$this->path,[]);\n $this->checkResponse($res,array(200));\n return $res;\n }", "public function run()\n {\n// factory(\\App\\Partner::class, 6000)->create();\n $partners = [\n ['id' => 1, 'city_id' => 7 , 'code' => '551', 'name' => 'Javna ustanova viša stručna škola \"Policijska akademija\" Danilovgrad', 'address' => 'BOŽOVA GLAVICA BB 81040', 'pib' => '02624036', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 2, 'city_id' => 28, 'code' => '561', 'name' => ' ŠUBERIÈ BIBEROVIC VANJA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 3, 'city_id' => 28, 'code' => '152', 'name' => '13 jul - Plantaže AD', 'address' => 'Put Radomira Ivanovica bb', 'pib' => '02016281', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 4, 'city_id' => 28, 'code' => '113', 'name' => 'Acme doo', 'address' => 'Velimira Terzica BR.9', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 5, 'city_id' => 28, 'code' => '28', 'name' => 'ADDIKO BANK AD PODGORICA', 'address' => 'Bulevar Dzordza Vasingtona br.98', 'pib' => '02454190', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 6, 'city_id' => 28, 'code' => '468', 'name' => 'ADP-ZID ', 'address' => ' UL GOJKA RADONJICA 32', 'pib' => '02045648', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 7, 'city_id' => 31, 'code' => '8', 'name' => 'Adriatic marinas doo', 'address' => null, 'pib' => '02467593', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 8, 'city_id' => 28, 'code' => '96', 'name' => 'Agencija za civilno vazduhoplovstvo Crne Gore', 'address' => 'Josipa Broza Tita bb', 'pib' => '02638649', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 9, 'city_id' => 28, 'code' => '5', 'name' => 'Agencija za elektronske komunikacije i postansku d', 'address' => 'Bulevar Dzordza Vasingtona bb,lamela C', 'pib' => '02326710', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 10, 'city_id' => 2, 'code' => '624', 'name' => 'Agencija za konsalting Glory Box Baric ', 'address' => 'Barickih boraca 20,Baric', 'pib' => '111417287', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 11, 'city_id' => 23, 'code' => '644', 'name' => 'AGENCIJA ZA PREVODJENJE I PODUCAVANJE-PREVEDI', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 12, 'city_id' => 28, 'code' => '406', 'name' => 'AGENCIJA ZA SPRJEÈAVANJE KORUPCIJE', 'address' => 'KRALJA NIKOLE 27/V', 'pib' => '11006507', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 13, 'city_id' => 2, 'code' => '651', 'name' => 'AIRBNB', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 14, 'city_id' => null, 'code' => '233', 'name' => 'Aktuar doo', 'address' => null, 'pib' => '02706415', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 15, 'city_id' => 21, 'code' => '548', 'name' => 'ALFA CENTAR NVO', 'address' => 'UL JOLA PILETIÆA 1/1 81400', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 16, 'city_id' => null, 'code' => '29', 'name' => 'Ambasada Republike Austrije', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 17, 'city_id' => null, 'code' => '137', 'name' => 'AMD Stanic-duplooooo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 18, 'city_id' => 28, 'code' => '573', 'name' => 'AMERIÈKA PRIVREDNA KOMORA U CRNOJ GORI', 'address' => 'RIMSKI TRG BR.4/V 81000 PODGORICA', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 19, 'city_id' => null, 'code' => '95', 'name' => 'Amia-Astra Montenegro investment association', 'address' => null, 'pib' => '02772426', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 20, 'city_id' => null, 'code' => '265', 'name' => 'Antena M', 'address' => null, 'pib' => '02373211', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 21, 'city_id' => 34, 'code' => '225', 'name' => 'Antitalent produkcija', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 22, 'city_id' => 2, 'code' => '477', 'name' => 'ANTONIJEVIC MILOS', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 23, 'city_id' => 31, 'code' => '621', 'name' => 'ANTONINA PATAKI-NINA APARTMENTS', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 24, 'city_id' => 33, 'code' => '497', 'name' => 'APARTMANI GRBOVIC', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 25, 'city_id' => 5, 'code' => '338', 'name' => 'AQUA TERRA SOLUTIONS DOO BUDVA', 'address' => 'Trg Sunca br.4', 'pib' => '02970520', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 26, 'city_id' => 28, 'code' => '586', 'name' => 'ARIA DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 27, 'city_id' => 2, 'code' => '275', 'name' => 'Artcore studio snimatelj', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 28, 'city_id' => null, 'code' => '120', 'name' => 'Astra Montenegro investment', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 29, 'city_id' => null, 'code' => '68', 'name' => 'Atlanski savez Crne Gore', 'address' => null, 'pib' => '02629496', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 30, 'city_id' => 28, 'code' => '384', 'name' => 'ATLAS BANKA AD', 'address' => 'ul.V.Djurovica bb', 'pib' => '02348772', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 31, 'city_id' => null, 'code' => '64', 'name' => 'Atlas fondacija', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 32, 'city_id' => null, 'code' => '157', 'name' => 'Atlas life ad', 'address' => null, 'pib' => '02695227', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 33, 'city_id' => 16, 'code' => '172', 'name' => 'Auris Capital AD ', 'address' => null, 'pib' => '20307978', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 34, 'city_id' => 28, 'code' => '348', 'name' => 'AUTO MOTO DRUSTVO STANIC', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 35, 'city_id' => 6, 'code' => '412', 'name' => 'Autoventura doo', 'address' => null, 'pib' => null, 'pdv' => '30/31-01588-0', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 36, 'city_id' => 1, 'code' => '564', 'name' => 'AVISTA REALTY GROUP DOO', 'address' => 'TOPOLICA 1 BR 29', 'pib' => '02699532', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 37, 'city_id' => 11, 'code' => '119', 'name' => 'Azmont Investments DOO', 'address' => 'Brace Grakalica 94,Meljine', 'pib' => '02893126', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 38, 'city_id' => 28, 'code' => '483', 'name' => 'BALETSKA SKOLA PRINCEZA KSENIJA', 'address' => 'BUL.STANKA DRAGOJEVICA 40', 'pib' => '02421348', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 39, 'city_id' => 1, 'code' => '238', 'name' => 'Barter centar', 'address' => 'ÆELUGA 43 BAR', 'pib' => '03035824', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 40, 'city_id' => 28, 'code' => '619', 'name' => 'BATEL DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 41, 'city_id' => 28, 'code' => '639', 'name' => 'BATRICEVIC MAJA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 42, 'city_id' => 28, 'code' => '227', 'name' => 'Becanovic Nemanja', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 43, 'city_id' => null, 'code' => '35', 'name' => 'Bega pres u stecaju', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 44, 'city_id' => 28, 'code' => '469', 'name' => 'Benefit Communications doo', 'address' => 'Dr.Vukasina Markovica 102', 'pib' => '02966506', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 45, 'city_id' => null, 'code' => '102', 'name' => 'Berkuljan Gojko', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 46, 'city_id' => 28, 'code' => '318', 'name' => 'BEŠOVIÆ BRANKA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 47, 'city_id' => 28, 'code' => '370', 'name' => 'BioSave DOO', 'address' => 'Svetozara Markovica br 4', 'pib' => '02896168', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 48, 'city_id' => 28, 'code' => '463', 'name' => 'Biro za ekonomsku saradnju i podrsku biznis zajedn', 'address' => 'GG PODGORICA', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 49, 'city_id' => null, 'code' => '252', 'name' => 'BM Kameleon doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 50, 'city_id' => null, 'code' => '169', 'name' => 'Bojana Femic', 'address' => null, 'pib' => '0601983215029', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 51, 'city_id' => 15, 'code' => '133', 'name' => 'Boka golf development doo', 'address' => 'PC Marinovic ,Radanovici bb Kotor', 'pib' => '02469731', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 52, 'city_id' => 28, 'code' => '592', 'name' => 'BOLJEVIC IVANA', 'address' => null, 'pib' => '1410981215297', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 53, 'city_id' => null, 'code' => '93', 'name' => 'Borovic Gordana', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 54, 'city_id' => 28, 'code' => '180', 'name' => 'Bozovic Ivana', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 55, 'city_id' => 21, 'code' => '397', 'name' => 'BOŽOVIÈ SRÐAN', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 56, 'city_id' => 28, 'code' => '328', 'name' => 'Bracanovic Zeljko', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 57, 'city_id' => null, 'code' => '272', 'name' => 'Brajovic Aleksandar', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 58, 'city_id' => 28, 'code' => '380', 'name' => 'BRAJOVIC NIKOLA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 59, 'city_id' => 28, 'code' => '313', 'name' => 'BREŽANIN ÐORÐE', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 60, 'city_id' => null, 'code' => '179', 'name' => 'Brkanovic Ilija', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 61, 'city_id' => 5, 'code' => '461', 'name' => 'BTA BUDVA', 'address' => 'TRG PALMI 8', 'pib' => '02410966', 'pdv' => '20/31-00016-8', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 62, 'city_id' => 5, 'code' => '425', 'name' => 'Budvanska Rivijera AD', 'address' => 'Trg Slobode 1', 'pib' => '02005328', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 63, 'city_id' => null, 'code' => '142', 'name' => 'Bull and bear ad', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 64, 'city_id' => 28, 'code' => '471', 'name' => 'BURIC OLIVERA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 65, 'city_id' => 28, 'code' => '357', 'name' => 'BVS Centar Bogojevic & co - Podgorica', 'address' => 'Belvederska 91', 'pib' => '02061627', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 66, 'city_id' => 5, 'code' => '522', 'name' => 'Car Travel doo', 'address' => 'Dubovica Lux bb', 'pib' => '03060292', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 67, 'city_id' => 28, 'code' => '377', 'name' => 'CARINE DOO', 'address' => 'ul.Slobode 43', 'pib' => '02094754', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 68, 'city_id' => null, 'code' => '70', 'name' => 'Castellana doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 69, 'city_id' => 28, 'code' => '485', 'name' => 'CENTAR ZA GRADJANSKO OBRAZOVANJE', 'address' => 'BUL.SV.PETRA CETINJSKOG 96 III/6', 'pib' => '02358832', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 70, 'city_id' => null, 'code' => '33', 'name' => 'Centar za inicijative', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 71, 'city_id' => null, 'code' => '127', 'name' => 'Centar za monitoring i istrazivanja - Cemi', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 72, 'city_id' => 28, 'code' => '270', 'name' => 'Centar za odrzivi razvoj / UNDP', 'address' => 'Bulevar Revolucije br.17-A/13', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 73, 'city_id' => null, 'code' => '80', 'name' => 'Centralna banka Crne Gore', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 74, 'city_id' => null, 'code' => '86', 'name' => 'Centralna narodna biblioteka', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 75, 'city_id' => 28, 'code' => '369', 'name' => 'Centre For Sustainable Tourism Initiatives', 'address' => 'Piperska bb (Televex 3/1)', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 76, 'city_id' => 28, 'code' => '623', 'name' => 'CHERRY WINE DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 77, 'city_id' => null, 'code' => '186', 'name' => 'Cikom Doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 78, 'city_id' => null, 'code' => '294', 'name' => 'Cilimara doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 79, 'city_id' => null, 'code' => '34', 'name' => 'CKB', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 80, 'city_id' => null, 'code' => '21', 'name' => 'CNB ,, Djurdje Crnojevic ,,', 'address' => null, 'pib' => '02010470', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 81, 'city_id' => null, 'code' => '195', 'name' => 'Cojbasic Ivan', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 82, 'city_id' => null, 'code' => '223', 'name' => 'Comfortably Numb doo', 'address' => null, 'pib' => '02789566', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 83, 'city_id' => null, 'code' => '72', 'name' => 'Communis Media S', 'address' => null, 'pib' => '02681315', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 84, 'city_id' => 34, 'code' => '362', 'name' => 'CONDRIC PAVLE ', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 85, 'city_id' => null, 'code' => '153', 'name' => 'Congress travel doo', 'address' => null, 'pib' => '02673053', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 86, 'city_id' => null, 'code' => '65', 'name' => 'Cooperative Housing Foundation', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 87, 'city_id' => 32, 'code' => '450', 'name' => 'Copacabana Montenegro doo', 'address' => 'Donji Stoj bb', 'pib' => '02984695', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 88, 'city_id' => 31, 'code' => '433', 'name' => 'Corleone DOO', 'address' => 'Seljanovo bb', 'pib' => '02855755', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 89, 'city_id' => 14, 'code' => '345', 'name' => 'COWI-IPF', 'address' => 'Parallelvej DK-2800 ,Kongeus Lyngby, Denmark', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 90, 'city_id' => null, 'code' => '232', 'name' => 'Creative group aquarius', 'address' => null, 'pib' => '02960966', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 91, 'city_id' => 28, 'code' => '495', 'name' => 'CRNOGORSKA KINOTEKA JU', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 92, 'city_id' => 21, 'code' => '569', 'name' => 'CRNOGORSKA PRAVOSLAVNA CRKVA', 'address' => 'LJETNJIKOVAC KRALJA NIKOLE', 'pib' => '02304252', 'pdv' => '30/31-16162-1', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 93, 'city_id' => 28, 'code' => '428', 'name' => 'Crnogorski elektrodistributivni sistem DOO Podgori', 'address' => 'Ivana Milutinovica br.12', 'pib' => '03099873', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 94, 'city_id' => null, 'code' => '94', 'name' => 'Crnogorski elektroprenosni sistem ad', 'address' => null, 'pib' => '02010658', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 95, 'city_id' => 28, 'code' => '42', 'name' => 'Crnogorski fond za solidarnu stambenu izgradnju', 'address' => 'Crnogorskih serdara bb', 'pib' => '02247097', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 96, 'city_id' => 28, 'code' => '438', 'name' => 'Crnogorski olimpijski komitet', 'address' => 'Ul 19.Decembra 21', 'pib' => '02192136', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 97, 'city_id' => null, 'code' => '122', 'name' => 'Crnogorski telekom - fiksna tel.', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 98, 'city_id' => null, 'code' => '198', 'name' => 'Crnogorski telekom - mob. tel.', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 99, 'city_id' => null, 'code' => '215', 'name' => 'Cupic Drazen', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 100, 'city_id' => null, 'code' => '284', 'name' => 'Daa Montenegro doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 101, 'city_id' => null, 'code' => '292', 'name' => 'DAA MontenegroDUPLOOOOOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 102, 'city_id' => null, 'code' => '104', 'name' => 'Dabanovic Nemanja', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 103, 'city_id' => 28, 'code' => '97', 'name' => 'Data link', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 104, 'city_id' => 28, 'code' => '24', 'name' => 'Demokratska Partija Socijalista', 'address' => 'Jovana Tomasevica bb', 'pib' => '02011514', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 105, 'city_id' => 28, 'code' => '473', 'name' => 'DESPOTOVIC DUSKO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 106, 'city_id' => 28, 'code' => '577', 'name' => 'DESPOTOVIC FILIP', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 107, 'city_id' => 28, 'code' => '253', 'name' => 'Direct Media doo', 'address' => 'Cetinjski put Lamela 5-1', 'pib' => '02350394', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 108, 'city_id' => 28, 'code' => '389', 'name' => 'Direkcija javnih radova', 'address' => 'Novaka Miloseva br.18', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 109, 'city_id' => null, 'code' => '147', 'name' => 'Discover Montenegro doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 110, 'city_id' => null, 'code' => '235', 'name' => 'Djakovic Perica', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 111, 'city_id' => null, 'code' => '259', 'name' => 'Djuranovic Zarko', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 112, 'city_id' => null, 'code' => '79', 'name' => 'Djuranovic Drasko', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 113, 'city_id' => null, 'code' => '187', 'name' => 'Djuranovic Tinka', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 114, 'city_id' => null, 'code' => '32', 'name' => 'Djurovic Goran', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 115, 'city_id' => 28, 'code' => '579', 'name' => 'DOBRIŠA BOŽO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 116, 'city_id' => null, 'code' => '36', 'name' => 'Dolto doo', 'address' => null, 'pib' => '02883864', 'pdv' => '30/31-00774-6', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 117, 'city_id' => 28, 'code' => '339', 'name' => 'Donator DOO', 'address' => 'Tuzi bb', 'pib' => '02129183', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 118, 'city_id' => 28, 'code' => '519', 'name' => 'ÐONDOVIC JELENA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 119, 'city_id' => 28, 'code' => '474', 'name' => 'ÐORÐEVIÆ VLATKO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 120, 'city_id' => 28, 'code' => '228', 'name' => 'DPC DOO', 'address' => 'Ulica Marka Radovic br.16', 'pib' => '02731525', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 121, 'city_id' => null, 'code' => '131', 'name' => 'DPS Danilovgrad', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 122, 'city_id' => 28, 'code' => '430', 'name' => 'Drobac Sonja', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 123, 'city_id' => null, 'code' => '155', 'name' => 'Drustvo ekonomista i menadzera Crne Gore', 'address' => null, 'pib' => '02361566', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 124, 'city_id' => 28, 'code' => '609', 'name' => 'ÐUKIÆ VOJISLAV', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 125, 'city_id' => 28, 'code' => '618', 'name' => 'ÐUKIÈ ŽELJKO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 126, 'city_id' => 5, 'code' => '610', 'name' => 'DUKLEY HOTEL', 'address' => 'Jadranski put,Zavala Peninsula', 'pib' => '03050831', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 127, 'city_id' => 28, 'code' => '349', 'name' => 'ÐURAŠKOVIÆ VANJA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 128, 'city_id' => 33, 'code' => '513', 'name' => 'DURMITORSKA VILA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 129, 'city_id' => 28, 'code' => '459', 'name' => 'ÐURNIÆ ANA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 130, 'city_id' => 28, 'code' => '82', 'name' => 'Dvarp doo', 'address' => 'Serdara Jola Piletica br.28', 'pib' => '02860635', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 131, 'city_id' => 28, 'code' => '310', 'name' => 'Efel motors', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 132, 'city_id' => 28, 'code' => '476', 'name' => 'ÈISTOÆA JP', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 133, 'city_id' => 28, 'code' => '421', 'name' => 'EKONOMSKI FAKULTET UCG', 'address' => 'Jovana Tomaševiæa br 37', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 134, 'city_id' => 13, 'code' => '360', 'name' => 'ELDORADO DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 135, 'city_id' => 21, 'code' => '85', 'name' => 'Elektroprivreda CG', 'address' => null, 'pib' => null, 'pdv' => '20/31-00112-1', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 136, 'city_id' => 21, 'code' => '371', 'name' => 'Elektroprivreda-ddduplo', 'address' => 'Vuka Karadzica br.2', 'pib' => '02002230', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 137, 'city_id' => 28, 'code' => '409', 'name' => 'ELMON DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 138, 'city_id' => 28, 'code' => '500', 'name' => 'ENERGOMONT DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 139, 'city_id' => null, 'code' => '48', 'name' => 'Enter Computers doo', 'address' => null, 'pib' => '02851172', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 140, 'city_id' => 34, 'code' => '399', 'name' => 'Èondiæ Pavle', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 141, 'city_id' => 28, 'code' => '305', 'name' => 'EPSILON DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 142, 'city_id' => null, 'code' => '61', 'name' => 'Eptisa', 'address' => null, 'pib' => '02430428', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 143, 'city_id' => 28, 'code' => '156', 'name' => 'Euro - unit doo', 'address' => null, 'pib' => null, 'pdv' => '30/31-13814-8', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 144, 'city_id' => 28, 'code' => '572', 'name' => 'EURO DOM DOO', 'address' => 'GORICA C BLOK 1', 'pib' => '03010996', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 145, 'city_id' => 4, 'code' => '303', 'name' => 'EURO-BALKANS SPRL', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 146, 'city_id' => 28, 'code' => '547', 'name' => 'EVROPSKI POKRET U CRNOJ GORI-duplo', 'address' => 'VASA RAIÈKOVIÆA 9/ I SPRAT', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 147, 'city_id' => 28, 'code' => '418', 'name' => 'FAKULTET PRAVNIH NAUKA', 'address' => 'Donja Gorica bb', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 148, 'city_id' => null, 'code' => '192', 'name' => 'Fakultet za dizajn i multimediju univerzitet DG', 'address' => 'Donja Gorica', 'pib' => '02924323', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 149, 'city_id' => null, 'code' => '193', 'name' => 'Fakultet za humanisticke studije univerzitet DG', 'address' => 'Donja Gorica', 'pib' => '02692112', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 150, 'city_id' => 28, 'code' => '417', 'name' => 'Fakultet za medj. ekonomiju,finansije i biznis', 'address' => 'Donja Gorica bb', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 151, 'city_id' => 28, 'code' => '482', 'name' => 'Fakultet za prehrambenu tehnologiju ,bezb.hrane ', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 152, 'city_id' => 21, 'code' => '635', 'name' => 'Fakultet za sport i viziè.vaspitanje UCG', 'address' => 'NARODNE OMLADINE BB', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 153, 'city_id' => 11, 'code' => '375', 'name' => 'FALCONERO DOO', 'address' => null, 'pib' => '03038432', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 154, 'city_id' => 11, 'code' => '557', 'name' => 'FANFANI DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 155, 'city_id' => 7, 'code' => '342', 'name' => 'Farmont M.P', 'address' => 'Kosic - Stari put bb', 'pib' => '02327066', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 156, 'city_id' => 28, 'code' => '589', 'name' => 'FAXIMILE DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 157, 'city_id' => 21, 'code' => '489', 'name' => 'FC SNADBIJEVANJE ', 'address' => null, 'pib' => null, 'pdv' => 'VAT No G82053851,Projekt Code 170500,ACT 0.2', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 158, 'city_id' => 17, 'code' => '608', 'name' => 'FIIAPP F.S.P C', 'address' => 'Beatriz Bpbadilla,18 28040 Madrid', 'pib' => 'Closing Meeti', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 159, 'city_id' => 11, 'code' => '7', 'name' => 'Filmski festival Herceg Novi - Montenegro film fes', 'address' => null, 'pib' => '02252902', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 160, 'city_id' => 28, 'code' => '394', 'name' => 'FINEDART DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 161, 'city_id' => 2, 'code' => '652', 'name' => 'FINISSIMA DOO ', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 162, 'city_id' => 28, 'code' => '536', 'name' => 'FLAER DOO', 'address' => 'MOMISICI S-1,3/4', 'pib' => '02702860', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 163, 'city_id' => 28, 'code' => '203', 'name' => 'Fond za zdravstveno osiguranje CG', 'address' => null, 'pib' => '02010810', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 164, 'city_id' => 15, 'code' => '350', 'name' => 'FONDACIJA DBS', 'address' => 'Sv.Vraca 3/2', 'pib' => '11003630', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 165, 'city_id' => 5, 'code' => '596', 'name' => 'FONTANA CENTAR DOO BUDVA', 'address' => 'SLOVENSKA OBALA 23', 'pib' => '03161617', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 166, 'city_id' => 3, 'code' => '613', 'name' => 'FOTOEIS SZR ', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 167, 'city_id' => null, 'code' => '71', 'name' => 'G Tech', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 168, 'city_id' => null, 'code' => '191', 'name' => 'Gallileo doo', 'address' => null, 'pib' => '02349795', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 169, 'city_id' => 28, 'code' => '234', 'name' => 'Ganic Suzana', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 170, 'city_id' => 28, 'code' => '327', 'name' => 'Gardovic Jelena', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 171, 'city_id' => null, 'code' => '217', 'name' => 'Generali osiguranje Montenegro ad', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 172, 'city_id' => 28, 'code' => '143', 'name' => 'Generalni sekretarijat Predsjednika Crne Gore', 'address' => null, 'pib' => '12018721', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 173, 'city_id' => 28, 'code' => '402', 'name' => 'Gimnazija Slobodan Skerovic', 'address' => 'Vaka Djurovica br.36', 'pib' => '02011336', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 174, 'city_id' => 28, 'code' => '216', 'name' => 'GIZ ORF EE', 'address' => null, 'pib' => '02422956', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 175, 'city_id' => 28, 'code' => '282', 'name' => 'Glavni grad Podgorica', 'address' => 'NJegoševa br.13', 'pib' => '02019710', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 176, 'city_id' => 10, 'code' => '478', 'name' => 'GLUMAC DAMIR', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 177, 'city_id' => 28, 'code' => '325', 'name' => 'GLUSCEVIC IGOR', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 178, 'city_id' => 28, 'code' => '466', 'name' => 'GNJIDIC BOJAN', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 179, 'city_id' => null, 'code' => '299', 'name' => 'Golubovic Milena', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 180, 'city_id' => 28, 'code' => '475', 'name' => 'GOŠOVIÆ MARKO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 181, 'city_id' => 28, 'code' => '340', 'name' => 'Gradska Opština Golubovci', 'address' => 'Golubovci bb', 'pib' => '02647109', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 182, 'city_id' => null, 'code' => '261', 'name' => 'Grbovic Esad', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 183, 'city_id' => null, 'code' => '205', 'name' => 'Grbovic Nihada', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 184, 'city_id' => 28, 'code' => '346', 'name' => 'GREENEL DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 185, 'city_id' => null, 'code' => '114', 'name' => 'Grto Bijelo Polje provjeri', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 186, 'city_id' => 1, 'code' => '538', 'name' => 'GRUPA GRAÐANA BIRAM BAR', 'address' => 'RISTA LEKICA D12/2 85000', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 187, 'city_id' => 28, 'code' => '366', 'name' => 'GULIVER DOO', 'address' => 'Hercegovacka 10', 'pib' => '02904870', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 188, 'city_id' => 28, 'code' => '185', 'name' => 'Hard discount Lakovic doo', 'address' => null, 'pib' => '02739500', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 189, 'city_id' => null, 'code' => '129', 'name' => 'Haus majstor doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 190, 'city_id' => 5, 'code' => '372', 'name' => 'HEC MANAGEMENT COMPANY', 'address' => 'Jadranski pt bb,Milocer', 'pib' => '02709457', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 191, 'city_id' => 28, 'code' => '605', 'name' => 'HEMERA DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 192, 'city_id' => null, 'code' => '57', 'name' => 'Herc international doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 193, 'city_id' => 28, 'code' => '69', 'name' => 'Hipotekarna banka', 'address' => 'Josipa Broza Tita 67', 'pib' => '02085020', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 194, 'city_id' => 28, 'code' => '530', 'name' => 'HOFFMANN-LA ROCHE LTD DIO STARNOG DRUSTVA', 'address' => 'SVETLANE KANE RADEVIC BR.3', 'pib' => '02639408', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 195, 'city_id' => 34, 'code' => '209', 'name' => 'Hosteli i turizam doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 196, 'city_id' => 5, 'code' => '240', 'name' => 'Hot moon drustvo za ugostiteljstvo, trgovinu i t', 'address' => null, 'pib' => '02377390', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 197, 'city_id' => 34, 'code' => '208', 'name' => 'Hotel Jadran', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 198, 'city_id' => 1, 'code' => '521', 'name' => 'HOTEL SIDRO DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 199, 'city_id' => 5, 'code' => '38', 'name' => 'Hotels group Montenegro Stars doo', 'address' => 'Becici', 'pib' => '02358040', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 200, 'city_id' => 28, 'code' => '359', 'name' => 'ICENTAR', 'address' => 'radoja dakica bb', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 201, 'city_id' => 28, 'code' => '442', 'name' => 'ILIC VEDRAN', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 202, 'city_id' => null, 'code' => '260', 'name' => 'Ilincic Vukic', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 203, 'city_id' => 28, 'code' => '204', 'name' => 'Industriaimport - Industriaimpex', 'address' => null, 'pib' => '02013576', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 204, 'city_id' => 2, 'code' => '219', 'name' => 'Infobiro doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 205, 'city_id' => null, 'code' => '255', 'name' => 'Infocom doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 206, 'city_id' => 28, 'code' => '201', 'name' => 'Information Technology Service', 'address' => null, 'pib' => '02749386', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 207, 'city_id' => 15, 'code' => '87', 'name' => 'Ingreated property contractor ser.Montenegro LTD', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 208, 'city_id' => 28, 'code' => '447', 'name' => 'INSTITUT ALTERNATIVA', 'address' => 'Bul.Dzordza Vasingtona br.57 I/20', 'pib' => '02682320', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 209, 'city_id' => 28, 'code' => '160', 'name' => 'Institut sertifikovanih racunovodja CG', 'address' => 'Dr Vukasina Markovica 114', 'pib' => '02617927', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 210, 'city_id' => 28, 'code' => '544', 'name' => 'INSTITUT ZA DRUŠTVENO ODGOVORNO POSLOVANJE CG', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 211, 'city_id' => null, 'code' => '297', 'name' => 'Institut za javnu politiku', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 212, 'city_id' => 28, 'code' => '183', 'name' => 'Institut za strateške studije i projekcije', 'address' => 'Ul.CRNOGORSKIH SERDARA,LAMELA C I-II', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 213, 'city_id' => 1, 'code' => '99', 'name' => 'Internacionalni TV festival', 'address' => null, 'pib' => '02317451', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 214, 'city_id' => 28, 'code' => '132', 'name' => 'Investiciono razvojni fond Crne Gore', 'address' => null, 'pib' => '022417937', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 215, 'city_id' => 28, 'code' => '636', 'name' => 'ISTORIJSKI INSTITUT UCG', 'address' => 'BULEVAR REVOLUCIJE 5', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 216, 'city_id' => null, 'code' => '189', 'name' => 'ITS Information tehnology service', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 217, 'city_id' => 19, 'code' => '175', 'name' => 'ITV Movie SRL', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 218, 'city_id' => 28, 'code' => '315', 'name' => 'IVANOVIÆ IVAN', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 219, 'city_id' => null, 'code' => '301', 'name' => 'Jakovljevic Mirko', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 220, 'city_id' => 28, 'code' => '403', 'name' => 'JANJUŠEVIÈ ANDRIJA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 221, 'city_id' => 28, 'code' => '491', 'name' => 'JANKOVIC NEMANJA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 222, 'city_id' => 28, 'code' => '507', 'name' => 'JASOVIC DANKA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 223, 'city_id' => null, 'code' => '241', 'name' => 'Javni izvrsitelj Sinisa Mugosa', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 224, 'city_id' => null, 'code' => '398', 'name' => 'Javni izvrsitelj Kekovic Dejan', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 225, 'city_id' => 32, 'code' => '488', 'name' => 'JAVNI IZVRSITELJ MIROVIC MITAR', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 226, 'city_id' => 5, 'code' => '486', 'name' => 'Javni izvrsitelj Rakovic Darko', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 227, 'city_id' => null, 'code' => '92', 'name' => 'Jerkov Kristina', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 228, 'city_id' => 28, 'code' => '578', 'name' => 'JOKIC MILAN', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 229, 'city_id' => null, 'code' => '267', 'name' => 'Jovanovic Ratka', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 230, 'city_id' => 28, 'code' => '532', 'name' => 'JOVANOVIC RADOJE', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 231, 'city_id' => 28, 'code' => '386', 'name' => 'Jovovic Dejan', 'address' => null, 'pib' => null, 'pdv' => '20/31-00135-0', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 232, 'city_id' => 28, 'code' => '480', 'name' => 'JP Aerodromi Crne Gore', 'address' => 'Aerodrom bb p.fax 202', 'pib' => '02305623', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 233, 'city_id' => 5, 'code' => '151', 'name' => 'JP Morsko dobro Crne Gore', 'address' => 'Ul.Popa Jola Zeca bb', 'pib' => '02116146', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 234, 'city_id' => 11, 'code' => '622', 'name' => 'JP PARKING SERVIS ', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 235, 'city_id' => 5, 'code' => '218', 'name' => 'JP Regionalni vodovod Crnogorsko Primorje', 'address' => 'Trg Sunca bb', 'pib' => '02090198', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 236, 'city_id' => 7, 'code' => '405', 'name' => 'JPU IRENA RADOVIÆ', 'address' => 'LAZARA ÐUROVIÆA BB', 'pib' => '02039648', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 237, 'city_id' => 3, 'code' => '22', 'name' => 'JU ,, Ratkoviceve veceri poezije ,,', 'address' => null, 'pib' => '02894246', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 238, 'city_id' => 6, 'code' => '574', 'name' => 'JU CENTAR ZA DNEVNI BORAVAK CETINJE', 'address' => 'BAJICE BB 81250 CETINJE', 'pib' => '02949989', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 239, 'city_id' => 31, 'code' => '352', 'name' => 'JU CENTAR ZA KULTURU - TIVAT', 'address' => 'UL. LUKE TOMANOVICA 4', 'pib' => '02015218', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 240, 'city_id' => 7, 'code' => '449', 'name' => 'JU CENTAR ZA KULTURU DANILOVGRAD', 'address' => 'TRG 9 DECEMBAR BB', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 241, 'city_id' => 7, 'code' => '568', 'name' => 'JU CENTAR ZA SOCIJALNI RAD ZA OPSTINU DANILOVGRAD', 'address' => 'ULICA BIJELOG PAVLA BB 81410 DANILOVGRAD', 'pib' => '03105687', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 242, 'city_id' => 27, 'code' => '429', 'name' => 'JU Dnevni centar Pljevlja ', 'address' => 'ul.Voja Djenisijevica 14', 'pib' => '02848252', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 243, 'city_id' => 5, 'code' => '545', 'name' => 'JU GRAD TEATAR', 'address' => '13 JULA BB', 'pib' => '02105152', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 244, 'city_id' => 5, 'code' => '502', 'name' => 'JU MUZEJI I GALERIJE BUDVE', 'address' => 'UL.CARA DUSANA 19, Stari grad', 'pib' => '03017575', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 245, 'city_id' => 31, 'code' => '632', 'name' => 'JU MUZICKA SKOLA TIVAT', 'address' => 'UL.STANIÆICA BB-KALIMANJ', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 246, 'city_id' => 28, 'code' => '344', 'name' => 'JU Muzicki centar Crne Gore', 'address' => 'Bulevar Dzordza Vasingtona bb', 'pib' => '02464535', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 247, 'city_id' => 15, 'code' => '634', 'name' => 'JU POMORSKI MUZEJ CG KOTOR', 'address' => 'TRG BOKELJSKE MORNARICE 391-ST.GRAD KO', 'pib' => '02012685', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 248, 'city_id' => 28, 'code' => '481', 'name' => 'JU SERGEJ STANIC', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 249, 'city_id' => 7, 'code' => '239', 'name' => 'JU VSS POLICIJSKA AKADEMIJA', 'address' => 'Bozova glavica bb', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 250, 'city_id' => 28, 'code' => '390', 'name' => 'JU Zavod \"Komanski most\"-Podgorica', 'address' => 'Gornja Gorica bb', 'pib' => '02016923', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 251, 'city_id' => 1, 'code' => '594', 'name' => 'JUGOINSPEKT CONTROL DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 252, 'city_id' => 28, 'code' => '383', 'name' => 'JUGOPETROL AD', 'address' => 'Stanka Dragojevica bb', 'pib' => '02013258', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 253, 'city_id' => 11, 'code' => '125', 'name' => 'JUK Herceg Fest', 'address' => 'Ul. Njegoseva bb ', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 254, 'city_id' => 2, 'code' => '321', 'name' => 'JUQS DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 255, 'city_id' => 31, 'code' => '322', 'name' => 'JZU DOM ZDRAVLJA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 256, 'city_id' => 15, 'code' => '523', 'name' => 'JZU DOM ZDRAVLJA ', 'address' => 'DOBROTA BB 85330 KOTOR', 'pib' => '02032643', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 257, 'city_id' => 28, 'code' => '630', 'name' => 'KALANJ STEVO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 258, 'city_id' => null, 'code' => '17', 'name' => 'Kalezic Nenad', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 259, 'city_id' => 28, 'code' => '452', 'name' => 'KALUDJEROVIC ILIJA', 'address' => null, 'pib' => null, 'pdv' => '30/31-17489-8', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 260, 'city_id' => 28, 'code' => '529', 'name' => 'KARISMA HOTELS ADRIATIC MONTENEGRO DOO', 'address' => 'CETINJSKA BR.11 V SPRAT DCAPITAL PLAZA CENTAR', 'pib' => '03134687', 'pdv' => '30/31-17669-6', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 261, 'city_id' => 28, 'code' => '576', 'name' => 'Karisma Hotels Management Montenegro doo', 'address' => 'Cetinjska 11 Podgorica', 'pib' => '03150054', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 262, 'city_id' => 28, 'code' => '631', 'name' => 'KAVARIC GROUP DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 263, 'city_id' => null, 'code' => '262', 'name' => 'Kern Ivan', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 264, 'city_id' => 28, 'code' => '563', 'name' => 'KK BUDUCNOST VOLI', 'address' => 'NJEGOSEV PARK BB', 'pib' => '02044463', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 265, 'city_id' => 12, 'code' => '58', 'name' => 'KKL', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 266, 'city_id' => 28, 'code' => '330', 'name' => 'KNJIGA PROMET DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 267, 'city_id' => 28, 'code' => '422', 'name' => 'KOMNENOVIC MAJA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 268, 'city_id' => 28, 'code' => '508', 'name' => 'Komora fizioterapeuta Crne Gore', 'address' => null, 'pib' => '03143465', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 269, 'city_id' => null, 'code' => '237', 'name' => 'Komora javnih izvrsitelja', 'address' => null, 'pib' => '02968479', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 270, 'city_id' => null, 'code' => '30', 'name' => 'Komunalno - stambeno javno preduzece ,,Budva,,', 'address' => null, 'pib' => '02005719', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 271, 'city_id' => 28, 'code' => '657', 'name' => 'KONOBA BANDICI', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 272, 'city_id' => null, 'code' => '654', 'name' => 'KONOBA LOLA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 273, 'city_id' => null, 'code' => '588', 'name' => 'KONSTATINOVSKI SLAVN', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 274, 'city_id' => 28, 'code' => '376', 'name' => 'KORAC ALEKSANDAR', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 275, 'city_id' => 15, 'code' => '4', 'name' => 'Kotor art nvo', 'address' => 'Stari grad 456', 'pib' => '02351838', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 276, 'city_id' => 15, 'code' => '542', 'name' => 'KOTOR ART DOO', 'address' => 'SV VRACA BR3/2 85330-KOTOR', 'pib' => '03193659', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 277, 'city_id' => null, 'code' => '271', 'name' => 'Kovacevic Zoran', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 278, 'city_id' => 28, 'code' => '316', 'name' => 'KRGOVIC RAJKO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 279, 'city_id' => null, 'code' => '140', 'name' => 'Krgovic Rajko-duplo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 280, 'city_id' => 28, 'code' => '615', 'name' => 'KRUNIC IVANA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 281, 'city_id' => 15, 'code' => '49', 'name' => 'Kulturni centar Nikola Djurkovic', 'address' => 'Stari grad bb', 'pib' => '02012952', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 282, 'city_id' => 7, 'code' => '550', 'name' => 'KULTURNO INFORMATIVNI CENTAR BIJELI PAVLE', 'address' => 'Hotel Gostilje 81410', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 283, 'city_id' => null, 'code' => '106', 'name' => 'Kvir Montenegro', 'address' => null, 'pib' => '02936267', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 284, 'city_id' => 28, 'code' => '188', 'name' => 'Kvisko Doo', 'address' => 'Neznanih Junaka 52', 'pib' => '02369818', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 285, 'city_id' => 28, 'code' => '379', 'name' => 'LABOVIÆ STEFAN', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 286, 'city_id' => 28, 'code' => '440', 'name' => 'LACEVIC SAMIR', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 287, 'city_id' => 28, 'code' => '306', 'name' => 'LACKY ART DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 288, 'city_id' => 28, 'code' => '601', 'name' => 'LAKICEVIC MARIJA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 289, 'city_id' => 25, 'code' => '640', 'name' => 'LATIC ISMET', 'address' => 'Lagatore bb ', 'pib' => '1004980271993', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 290, 'city_id' => null, 'code' => '67', 'name' => 'LGBT Forum Progres', 'address' => null, 'pib' => '02821419', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 291, 'city_id' => 2, 'code' => '274', 'name' => 'Living pictures doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 292, 'city_id' => null, 'code' => '116', 'name' => 'Ljetopis doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 293, 'city_id' => null, 'code' => '278', 'name' => 'Ljumovic Nikola', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 294, 'city_id' => 28, 'code' => '616', 'name' => 'LOPICIC DEJAN', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 295, 'city_id' => 28, 'code' => '470', 'name' => 'LOVCEN AUTO AD PODGORICA', 'address' => null, 'pib' => '02830043', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 296, 'city_id' => 28, 'code' => '311', 'name' => 'LOVCEN OSIGURANJE', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 297, 'city_id' => 1, 'code' => '10', 'name' => 'Luka Bar ad', 'address' => null, 'pib' => '02002558', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 298, 'city_id' => 15, 'code' => '333', 'name' => 'LUKA KOTOR', 'address' => 'PARK SLOBODE 1 85330 KOTOR', 'pib' => '020441188', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 299, 'city_id' => 3, 'code' => '518', 'name' => 'LUMONTE', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 300, 'city_id' => 31, 'code' => '250', 'name' => 'Lustica Development', 'address' => 'Novo Naselje bb', 'pib' => '02744597', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 301, 'city_id' => 28, 'code' => '3', 'name' => 'Magna doo', 'address' => null, 'pib' => '02710153', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 302, 'city_id' => 11, 'code' => '655', 'name' => 'MAISON DU MONDE-finestra pro doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 303, 'city_id' => 28, 'code' => '387', 'name' => 'MANOJLOVIC VUK', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 304, 'city_id' => null, 'code' => '266', 'name' => 'Maras Vladimir', 'address' => null, 'pib' => null, 'pdv' => '30/31-12090-9', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 305, 'city_id' => 28, 'code' => '583', 'name' => 'Marco Polo Travel doo', 'address' => 'Radoja Dakica bb,novi city kvart', 'pib' => '02920905', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 306, 'city_id' => 15, 'code' => '479', 'name' => 'MARIN MED', 'address' => 'STARI GRAD BR.444', 'pib' => '03043452', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 307, 'city_id' => null, 'code' => '285', 'name' => 'Markovic Miodrag', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 308, 'city_id' => 28, 'code' => '434', 'name' => 'MARKOVIC ANA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 309, 'city_id' => 28, 'code' => '435', 'name' => 'MARKOVIC NIKOLA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 310, 'city_id' => 28, 'code' => '385', 'name' => 'MARKOVIC SASA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 311, 'city_id' => null, 'code' => '300', 'name' => 'Markovic Vlado', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 312, 'city_id' => null, 'code' => '194', 'name' => 'Marunovic Danilo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 313, 'city_id' => null, 'code' => '249', 'name' => 'Marunovic Slobodan', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 314, 'city_id' => 28, 'code' => '337', 'name' => 'MAŠINSKI FAKULTET CRNE GORE', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 315, 'city_id' => 28, 'code' => '451', 'name' => 'MATOVIC DRAGO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 316, 'city_id' => null, 'code' => '263', 'name' => 'Matt Whiffen', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 317, 'city_id' => 28, 'code' => '571', 'name' => 'MAXIM INVESTMENT DOO', 'address' => null, 'pib' => null, 'pdv' => '30/31-15759-4', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 318, 'city_id' => 28, 'code' => '343', 'name' => 'MAY FEST MONTENEGRO DOO', 'address' => 'Beogradska 16A', 'pib' => '03083284', 'pdv' => '91/31-01777-1', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 319, 'city_id' => 31, 'code' => '637', 'name' => 'MC2 DOO', 'address' => '85320 TIVAT,21 NOVEMBAR 2A', 'pib' => '03186784', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 320, 'city_id' => null, 'code' => '184', 'name' => 'Me - Net doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 321, 'city_id' => null, 'code' => '130', 'name' => 'Media Communis S', 'address' => null, 'pib' => null, 'pdv' => '30/31-10118-1', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 322, 'city_id' => 28, 'code' => '445', 'name' => 'Media Connection doo', 'address' => 'Bul.Ivana Crnojeviæa 2B', 'pib' => '02820650', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 323, 'city_id' => 28, 'code' => '581', 'name' => 'MEDIA DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 324, 'city_id' => null, 'code' => '190', 'name' => 'Media Montenegro doo', 'address' => null, 'pib' => '02061988', 'pdv' => '80/31-00622-9', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 325, 'city_id' => 28, 'code' => '456', 'name' => 'MEDIA PRO doo', 'address' => null, 'pib' => '02380820', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 326, 'city_id' => 2, 'code' => '162', 'name' => 'Media Support $ Consulting doo', 'address' => null, 'pib' => '20864095', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 327, 'city_id' => 28, 'code' => '580', 'name' => 'MEDIA TERRA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 328, 'city_id' => 28, 'code' => '286', 'name' => 'Medijski savjet za samoregulaciju Crne Gore', 'address' => 'Bul.Svetog Petra Cetinjskog br.9', 'pib' => '02874512', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 329, 'city_id' => 28, 'code' => '562', 'name' => 'MEPRO DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 330, 'city_id' => 28, 'code' => '393', 'name' => 'Merit Montenegro doo', 'address' => null, 'pib' => '03075958', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 331, 'city_id' => 28, 'code' => '45', 'name' => 'Micanovic Dusan', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 332, 'city_id' => 28, 'code' => '441', 'name' => 'MIJATOVIC DRAGAN', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 333, 'city_id' => null, 'code' => '16', 'name' => 'Mijovic Mirjana', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 334, 'city_id' => 28, 'code' => '279', 'name' => 'Mikulic Zoran', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 335, 'city_id' => 28, 'code' => '460', 'name' => 'MILIÆEVIÈ NEMANJA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 336, 'city_id' => 28, 'code' => '458', 'name' => 'MILOSEVIC TANJA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 337, 'city_id' => 28, 'code' => '465', 'name' => 'MILOŠEVIÈ MIRKO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 338, 'city_id' => 28, 'code' => '14', 'name' => 'Ministarstvo ekonomije', 'address' => null, 'pib' => '02010780', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 339, 'city_id' => null, 'code' => '298', 'name' => 'Ministarstvo finansija', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 340, 'city_id' => 28, 'code' => '575', 'name' => 'MINISTARSTVO JAVNE UPRAVE', 'address' => 'RIMSKITRG BR 45', 'pib' => '11018220', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 341, 'city_id' => 6, 'code' => '226', 'name' => 'Ministarstvo kulture', 'address' => 'Ulica Njergoseva bb 81250 Cetinje', 'pib' => '02372126', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 342, 'city_id' => 28, 'code' => '165', 'name' => 'Ministarstvo nauke', 'address' => 'Rimski Trg', 'pib' => '02821613', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 343, 'city_id' => 28, 'code' => '50', 'name' => 'Ministarstvo odrzivog razvoja i turizma', 'address' => 'Cetvrte proleterske br.19', 'pib' => '02760517', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 344, 'city_id' => 28, 'code' => '111', 'name' => 'Ministarstvo poljoprivrede i ruralnog razvoja', 'address' => 'Rimski Trg 46', 'pib' => '02030802', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 345, 'city_id' => 28, 'code' => '467', 'name' => 'Ministarstvo prosvjete ', 'address' => 'Vaka Djurovica bb', 'pib' => '02014432', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 346, 'city_id' => 28, 'code' => '56', 'name' => 'Ministarstvo rada i socijalnog staranja', 'address' => 'Rimski trg 46', 'pib' => '02759837', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 347, 'city_id' => 28, 'code' => '51', 'name' => 'Ministarstvo saobracaja i pomorstva', 'address' => 'rimski trg 46', 'pib' => '02156369', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 348, 'city_id' => 28, 'code' => '112', 'name' => 'Ministarstvo unutrasnjih poslova', 'address' => null, 'pib' => '02016010', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 349, 'city_id' => null, 'code' => '62', 'name' => 'Ministarstvo vanjskih poslova i evropskih integrac', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 350, 'city_id' => 28, 'code' => '25', 'name' => 'Ministarstvo za inform. drustvo i telekomunikacij', 'address' => 'Rimski trg 45', 'pib' => '02742365', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 351, 'city_id' => 28, 'code' => '516', 'name' => 'MINISTARSTVO ZDRAVLJA', 'address' => 'Rimski trg br.46', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 352, 'city_id' => 28, 'code' => '329', 'name' => 'Mirkovic Zeljka', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 353, 'city_id' => 28, 'code' => '625', 'name' => 'MIROSS doo', 'address' => 'Marka Miljanova 1/1', 'pib' => '02274086', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 354, 'city_id' => 2, 'code' => '382', 'name' => 'MIROSS TRAVEL AGENCY DOO', 'address' => 'Majke Jevrosime br.19', 'pib' => '100048877', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 355, 'city_id' => null, 'code' => '149', 'name' => 'Misahara jewelry doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 356, 'city_id' => null, 'code' => '139', 'name' => 'Misurovic Lazar', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 357, 'city_id' => 28, 'code' => '181', 'name' => 'Misurovic Mirjana', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 358, 'city_id' => 1, 'code' => '361', 'name' => 'MOBILELAND DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 359, 'city_id' => null, 'code' => '257', 'name' => 'Modni krojacki atelje LidaMard.me', 'address' => null, 'pib' => '02944308', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 360, 'city_id' => 28, 'code' => '504', 'name' => 'MONA CG', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 361, 'city_id' => 35, 'code' => '653', 'name' => 'MONA HOTEL MENAGEMENT DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 362, 'city_id' => 28, 'code' => '210', 'name' => 'Mondaine doo', 'address' => 'ulica 4.jula.zgrada Zetagradnje,ulaz111,5/74', 'pib' => '02977290', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 363, 'city_id' => 28, 'code' => '347', 'name' => 'MONDOAUTO DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 364, 'city_id' => null, 'code' => '159', 'name' => 'Monte - HU Trading', 'address' => null, 'pib' => '02995204', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 365, 'city_id' => 32, 'code' => '626', 'name' => 'MONTE EVENTS DOO ULCINJ', 'address' => 'VOJA LAKCEVICA BB', 'pib' => '03240380', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 366, 'city_id' => 28, 'code' => '302', 'name' => 'Monteguma ', 'address' => null, 'pib' => '02246333', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 367, 'city_id' => null, 'code' => '167', 'name' => 'Montekargo AD', 'address' => null, 'pib' => '02011298', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 368, 'city_id' => 28, 'code' => '109', 'name' => 'Montenegro advertising AND production - MAPA', 'address' => 'ul. 19 Decembra br.13', 'pib' => '02321360', 'pdv' => '30-31-08386-8', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 369, 'city_id' => 28, 'code' => '77', 'name' => 'Montenegro airlines ad', 'address' => 'Bulevar Sv.Perta Cetinjskog 130', 'pib' => '02737175', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 370, 'city_id' => null, 'code' => '206', 'name' => 'Montenegro bet NVO', 'address' => null, 'pib' => '2789191', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 371, 'city_id' => 28, 'code' => '499', 'name' => 'MONTENEGRO EVENT AGENCY DOO', 'address' => 'Vasa Raickovica 31', 'pib' => '02787962', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 372, 'city_id' => 28, 'code' => '462', 'name' => 'MONTENEGRO TOURIST SERVICE DOO', 'address' => 'STUDENTSKA BB,LAMELA 7', 'pib' => '02685825', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 373, 'city_id' => null, 'code' => '243', 'name' => 'Montenomaks', 'address' => null, 'pib' => '02378426', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 374, 'city_id' => 28, 'code' => '331', 'name' => 'MONTEPASS DOO', 'address' => null, 'pib' => null, 'pdv' => '30/31-13542-6', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 375, 'city_id' => 28, 'code' => '552', 'name' => 'MONTEPASS DOO-ddduuuploo', 'address' => 'DALMATINSKA ', 'pib' => '02882094', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 376, 'city_id' => 5, 'code' => '658', 'name' => 'MORSKI TALAS DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 377, 'city_id' => 2, 'code' => '242', 'name' => 'Mos - av doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 378, 'city_id' => 28, 'code' => '505', 'name' => 'MPM DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 379, 'city_id' => 28, 'code' => '531', 'name' => 'MRVALJEVIC VESELUN', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 380, 'city_id' => 28, 'code' => '212', 'name' => 'MSI invest', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 381, 'city_id' => 28, 'code' => '510', 'name' => 'MUJOVIC DARKO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 382, 'city_id' => 21, 'code' => '319', 'name' => 'MULTICOM RETALI DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 383, 'city_id' => 6, 'code' => '174', 'name' => 'Nacionalna bibl. CG Djurdj Crnojevic', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 384, 'city_id' => 28, 'code' => '39', 'name' => 'Nacionalna turisticka organizacija CG', 'address' => 'Marka Miljanova br.17', 'pib' => '02242505', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 385, 'city_id' => 28, 'code' => '148', 'name' => 'Nacionalni parkovi Crne Gore', 'address' => 'Trg Becir - bega Osmanagica br.16', 'pib' => '02039460', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 386, 'city_id' => null, 'code' => '54', 'name' => 'Nacionalno udruzenje somelijera Crne Gore', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 387, 'city_id' => 28, 'code' => '395', 'name' => 'NATENANE PRODUCTION DOO', 'address' => 'Piperska 369 Podgorica', 'pib' => '03024288', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 388, 'city_id' => 28, 'code' => '512', 'name' => 'NATURAL CAKE', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 389, 'city_id' => 28, 'code' => '416', 'name' => 'NEDELJKOVIC MILICA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 390, 'city_id' => 28, 'code' => '401', 'name' => 'NET MONTENEGRO DOO', 'address' => 'Bul.Dzodza Vasingtona br 51', 'pib' => '03076067', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 391, 'city_id' => null, 'code' => '135', 'name' => 'Nevladina Fondacija KKL-JNF Balkan', 'address' => null, 'pib' => '02956608', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 392, 'city_id' => 2, 'code' => '211', 'name' => 'New media team doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 393, 'city_id' => 28, 'code' => '202', 'name' => 'Nimas doo', 'address' => null, 'pib' => '03009076', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 394, 'city_id' => 2, 'code' => '27', 'name' => 'NIN doo', 'address' => 'Zorza Klemansoa 19', 'pib' => '100061871', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 395, 'city_id' => 31, 'code' => '629', 'name' => 'NINA APARTMENTS', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 396, 'city_id' => 28, 'code' => '607', 'name' => 'NINAMEDIA KLIPING DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 397, 'city_id' => 28, 'code' => '534', 'name' => 'NJUNJIC PREDRAG', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 398, 'city_id' => 28, 'code' => '597', 'name' => 'NLB Banka Podgorica', 'address' => 'Stanka Dragojevica 46', 'pib' => '02011395', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 399, 'city_id' => null, 'code' => '123', 'name' => 'Norveski konzulat', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 400, 'city_id' => null, 'code' => '197', 'name' => 'Notar Adzic Jadranka', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 401, 'city_id' => null, 'code' => '224', 'name' => 'Notar Darko Curic', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 402, 'city_id' => 28, 'code' => '214', 'name' => 'Notar Tanja Cepic', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 403, 'city_id' => 28, 'code' => '199', 'name' => 'Nova lira', 'address' => null, 'pib' => '02648857', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 404, 'city_id' => null, 'code' => '280', 'name' => 'Novakovic Sanja', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 405, 'city_id' => null, 'code' => '358', 'name' => 'nu grota -ko je ovo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 406, 'city_id' => 15, 'code' => '341', 'name' => 'NVO \"Searock\"', 'address' => 'Sv.Stasije L13/8', 'pib' => '02906198', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 407, 'city_id' => null, 'code' => '40', 'name' => 'NVO Centar za inicijative iz oblasti odrzivog turi', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 408, 'city_id' => 28, 'code' => '170', 'name' => 'NVO Evropski pokret u Crnoj Gori', 'address' => 'Vasa Raickovica 9,I sprat', 'pib' => '02321998', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 409, 'city_id' => 15, 'code' => '173', 'name' => 'NVO Karampana', 'address' => null, 'pib' => '02906651', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 410, 'city_id' => 28, 'code' => '336', 'name' => 'NVO KONVENCIJA ZENA ZAPADNOG BALKANA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 411, 'city_id' => null, 'code' => '81', 'name' => 'NVO Kotor ART-DDUPLA SIFRA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 412, 'city_id' => 15, 'code' => '1', 'name' => 'NVO kotorski festival pozorista za djecu', 'address' => null, 'pib' => '02401070', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 413, 'city_id' => 28, 'code' => '543', 'name' => 'NVO MEDITERANSKE NOTE', 'address' => 'KRALJA NIKOLE BR.126 81000 ', 'pib' => '11035159', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 414, 'city_id' => 28, 'code' => '431', 'name' => 'NVO MLADI ROMI ', 'address' => 'BratstvAa Jedinstva br 19/8', 'pib' => '02440989', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 415, 'city_id' => 28, 'code' => '222', 'name' => 'NVO Udruzenje studenata ek. i menadz. AIESEC CG', 'address' => null, 'pib' => '02764318', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 416, 'city_id' => 28, 'code' => '641', 'name' => 'NVO ZERO WASTE MONTENEGRO', 'address' => 'VUKA KARADZICA 29', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 417, 'city_id' => 31, 'code' => '617', 'name' => 'NVU MAŠKARADA ', 'address' => 'POD KUK BB 85320 TIVAT', 'pib' => '11009182', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 418, 'city_id' => 28, 'code' => '353', 'name' => 'OFFICE CENTER MOTORS DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 419, 'city_id' => 31, 'code' => '487', 'name' => 'OHM MAMULA MONTENEGRO DSD', 'address' => 'NOVO NASELJE BB 85323', 'pib' => '03095924', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 420, 'city_id' => 2, 'code' => '268', 'name' => 'Oivivio doo', 'address' => null, 'pib' => '102884591', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 421, 'city_id' => 15, 'code' => '308', 'name' => 'OJU MUZEJI ', 'address' => 'Stari grad bb', 'pib' => '02012669', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 422, 'city_id' => 28, 'code' => '567', 'name' => 'OKOV DOO', 'address' => 'JOSIPA BROZA TITA BR.26 81000 PODGORICA', 'pib' => '02226782', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 423, 'city_id' => null, 'code' => '196', 'name' => 'Omniauto - AS doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 424, 'city_id' => null, 'code' => '108', 'name' => 'OO DPS Cetinje', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 425, 'city_id' => null, 'code' => '163', 'name' => 'Oprema doo', 'address' => null, 'pib' => '02299950', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 426, 'city_id' => 15, 'code' => '287', 'name' => 'Opstina Kotor', 'address' => 'Stari Grad 315', 'pib' => '02012936', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 427, 'city_id' => 27, 'code' => '171', 'name' => 'Opstina Pljevlja', 'address' => 'Kralja Petra I broj 48', 'pib' => '02019868', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 428, 'city_id' => 1, 'code' => '110', 'name' => 'Opstina Bar', 'address' => 'Bulevar Revolucije br.1', 'pib' => '02015099', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 429, 'city_id' => null, 'code' => '89', 'name' => 'Opstina Berane', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 430, 'city_id' => 3, 'code' => '107', 'name' => 'Opstina Bijelo Polje', 'address' => null, 'pib' => '02003554', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 431, 'city_id' => 5, 'code' => '75', 'name' => 'Opstina Budva', 'address' => 'Trg Sunca br.3', 'pib' => '02005409', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 432, 'city_id' => null, 'code' => '101', 'name' => 'Opstina Cetinje', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 433, 'city_id' => 7, 'code' => '41', 'name' => 'Opstina Danilovgrad', 'address' => 'Trg 9. decembra', 'pib' => '02000156', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 434, 'city_id' => 11, 'code' => '351', 'name' => 'Opstina Herceg Novi', 'address' => 'Trg Marsala Tita 2', 'pib' => '02008459', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 435, 'city_id' => null, 'code' => '164', 'name' => 'Opstina Herceg Novi-----DUPLA SIFRA', 'address' => null, 'pib' => '2008459', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 436, 'city_id' => 13, 'code' => '12', 'name' => 'Opstina Kolasin', 'address' => null, 'pib' => '02017725', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 437, 'city_id' => 20, 'code' => '356', 'name' => 'Opstina Mojkovac ', 'address' => 'Trg Ljubomira Bakoca', 'pib' => '02007100', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 438, 'city_id' => null, 'code' => '20', 'name' => 'Opstina Niksic', 'address' => null, 'pib' => '02021633', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 439, 'city_id' => 31, 'code' => '158', 'name' => 'Opstina Tivat', 'address' => 'Trg Magnolija', 'pib' => '02008599', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 440, 'city_id' => null, 'code' => '154', 'name' => 'Opstina Zabljak', 'address' => null, 'pib' => '02018535', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 441, 'city_id' => 31, 'code' => '509', 'name' => 'OPSTINSKI ODBOR DPS TIVAT', 'address' => 'ul.II Dalmatinske br.3/a', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 442, 'city_id' => 34, 'code' => '585', 'name' => 'OPTIMUS PRIME INFORMATIKA DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 443, 'city_id' => 28, 'code' => '100', 'name' => 'OR doo', 'address' => 'Novaka Miloseva br.42', 'pib' => '02088762', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 444, 'city_id' => 28, 'code' => '453', 'name' => 'ORSUS INTERNATIONAL DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 445, 'city_id' => 28, 'code' => '454', 'name' => 'OSMANOVIC RUZMIR', 'address' => null, 'pib' => null, 'pdv' => '80/31-00073-5', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 446, 'city_id' => 1, 'code' => '515', 'name' => 'PADRINO MONT DOO', 'address' => 'RONKULA BB ', 'pib' => '02262622', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 447, 'city_id' => 8, 'code' => '444', 'name' => 'PAPAGAJ DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 448, 'city_id' => 11, 'code' => '628', 'name' => 'PARKING SERVIS HERCEG NOVI DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 449, 'city_id' => 28, 'code' => '565', 'name' => 'PARKING SERVIS DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 450, 'city_id' => 28, 'code' => '570', 'name' => 'Parkovi Dinarida NVO', 'address' => 'Bulevar Radoja Dakica Lamela C ulaz 1', 'pib' => '03026230', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 451, 'city_id' => 28, 'code' => '582', 'name' => 'PAUNOVIÆ NADJA', 'address' => null, 'pib' => '1604976215253', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 452, 'city_id' => 28, 'code' => '18', 'name' => 'Paunovic Dusan', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 453, 'city_id' => 28, 'code' => '560', 'name' => 'PAVICEVIC MILICA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 454, 'city_id' => 28, 'code' => '326', 'name' => 'PEJOVIC BORIS', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 455, 'city_id' => null, 'code' => '236', 'name' => 'Pendo Danilo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 456, 'city_id' => 28, 'code' => '254', 'name' => 'Peric Jovan', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 457, 'city_id' => 28, 'code' => '492', 'name' => 'PERIC ILIJA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 458, 'city_id' => 28, 'code' => '554', 'name' => 'PEROVIÆ ÈADJENOVIÆ BOJANA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 459, 'city_id' => null, 'code' => '392', 'name' => 'petrovic ilija-pomoc za andjelu', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 460, 'city_id' => null, 'code' => '528', 'name' => 'PIPEROVIC TATJANA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 461, 'city_id' => 31, 'code' => '556', 'name' => 'PIPPOS YACHT SUPPLIJES DOO', 'address' => null, 'pib' => null, 'pdv' => '20/30-002828-', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 462, 'city_id' => 21, 'code' => '427', 'name' => 'Pivara \"Trebjesa” DOO', 'address' => 'Njegoševa 18', 'pib' => '0204983', 'pdv' => '91/31-00735-0', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 463, 'city_id' => 31, 'code' => '378', 'name' => 'PM Hotels Tivat', 'address' => 'Obala bb', 'pib' => '0279020', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 464, 'city_id' => 31, 'code' => '128', 'name' => 'POC Knightsbrdige schools Montenegro', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 465, 'city_id' => null, 'code' => '103', 'name' => 'Pocek Balsa', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 466, 'city_id' => 28, 'code' => '648', 'name' => 'Podgoricka banka ad Member of OTP group', 'address' => 'Bulevar Revolucije 17', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 467, 'city_id' => 28, 'code' => '423', 'name' => 'PODVOLAT U.R BIFE', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 468, 'city_id' => 26, 'code' => '391', 'name' => 'Poliplan 1to1 DOO', 'address' => 'Vuka Karadzica 49', 'pib' => '106104861', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 469, 'city_id' => 24, 'code' => '590', 'name' => 'Pomilio Blumm srl', 'address' => 'Via venezia 4, 65121 PESCARA-ITALY', 'pib' => '01304780685', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 470, 'city_id' => 29, 'code' => '642', 'name' => 'POP ART STUDIO', 'address' => 'IVAN ANDABAK', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 471, 'city_id' => 28, 'code' => '520', 'name' => 'POPOVIC BOBAN', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 472, 'city_id' => 28, 'code' => '290', 'name' => 'Poreska uprava', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 473, 'city_id' => 1, 'code' => '334', 'name' => 'PORT OF ADRIA ', 'address' => 'OBALA 13JULA BB 85000', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 474, 'city_id' => 28, 'code' => '633', 'name' => 'PORTA APERTA DOO PG', 'address' => 'MOSKOVSKA 127/9', 'pib' => '02743922', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 475, 'city_id' => 28, 'code' => '177', 'name' => 'Portal press', 'address' => 'Djoka Mirasevica 67a', 'pib' => '02770237', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 476, 'city_id' => 28, 'code' => '47', 'name' => 'Posta Crne Gore doo', 'address' => 'ul.Slobode br.1', 'pib' => '02867940', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 477, 'city_id' => 28, 'code' => '74', 'name' => 'PR $ Media Consultancy - prime Consultancy doo', 'address' => null, 'pib' => '02835878', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 478, 'city_id' => 6, 'code' => '88', 'name' => 'Prijestonica Cetinje', 'address' => 'Ul Bajova 2', 'pib' => '02005115', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 479, 'city_id' => 28, 'code' => '144', 'name' => 'Prirodnjacki muzej Crne Gore', 'address' => 'TRG VOJVODE BECIR BEGA OSMANAGICA 16', 'pib' => '02239329', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 480, 'city_id' => 3, 'code' => '213', 'name' => 'Prisma doo', 'address' => 'ljesnica bb', 'pib' => '02373394', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 481, 'city_id' => 28, 'code' => '381', 'name' => 'Privredna Komora Crne Gore', 'address' => 'Novaka Miloseva br.29/II', 'pib' => '02019574', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 482, 'city_id' => 28, 'code' => '182', 'name' => 'Projektna kancelarija Njemacke Raz. banke - KFW', 'address' => null, 'pib' => '02853213', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 483, 'city_id' => 28, 'code' => '11', 'name' => 'Prva banka Crne Gore ad', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 484, 'city_id' => 28, 'code' => '374', 'name' => 'PURIC BOSKO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 485, 'city_id' => null, 'code' => '63', 'name' => 'PVK Jadran', 'address' => null, 'pib' => '02018608', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 486, 'city_id' => 28, 'code' => '457', 'name' => 'QUANTUM DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 487, 'city_id' => null, 'code' => '105', 'name' => 'Queer Montenegro nvo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 488, 'city_id' => 1, 'code' => '514', 'name' => 'R-2000 DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 489, 'city_id' => 28, 'code' => '317', 'name' => 'RADENOVIC MILICA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 490, 'city_id' => 28, 'code' => '535', 'name' => 'RADOVIC DRASKO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 491, 'city_id' => null, 'code' => '146', 'name' => 'Radovic Milos', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 492, 'city_id' => 28, 'code' => '115', 'name' => 'Radulovic Jovan', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 493, 'city_id' => 28, 'code' => '638', 'name' => 'RADULOVIC TIJANA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 494, 'city_id' => 28, 'code' => '436', 'name' => 'RADULOVIC ZORAN', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 495, 'city_id' => 28, 'code' => '9', 'name' => 'Raimont international company doo', 'address' => null, 'pib' => '02742217', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 496, 'city_id' => 28, 'code' => '494', 'name' => 'RAJKOVIC VESNA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 497, 'city_id' => null, 'code' => '19', 'name' => 'Rakocevic Balsa', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 498, 'city_id' => 28, 'code' => '410', 'name' => 'RAŠKA7523 doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 499, 'city_id' => null, 'code' => '145', 'name' => 'Rasovic Dusko', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 500, 'city_id' => 28, 'code' => '166', 'name' => 'Refill', 'address' => null, 'pib' => '02435900', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 501, 'city_id' => null, 'code' => '276', 'name' => 'Regionalni centar za zivotnu sredinu REC', 'address' => null, 'pib' => '02419815', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 502, 'city_id' => 28, 'code' => '645', 'name' => 'RENTA A MOTO DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 503, 'city_id' => 28, 'code' => '121', 'name' => 'Represent Communications doo', 'address' => 'Bulevar Dzordza Vašingtona br.65', 'pib' => '02851822', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 504, 'city_id' => 7, 'code' => '283', 'name' => 'ReSPA - Regional School of Public', 'address' => 'Branelovica bb', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 505, 'city_id' => 6, 'code' => '506', 'name' => 'RESTORAN KONAK', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 506, 'city_id' => 28, 'code' => '526', 'name' => 'RESTORAN MAJKA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 507, 'city_id' => 28, 'code' => '558', 'name' => 'RIANA MONTENEGRO HOLDINGS DOO', 'address' => 'BUL IVANA CRNOJEVICA 99/2', 'pib' => '02790190', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 508, 'city_id' => 28, 'code' => '455', 'name' => 'RID DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 509, 'city_id' => 2, 'code' => '6', 'name' => 'Ringier Axel Springer doo', 'address' => null, 'pib' => '100000889', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 510, 'city_id' => 28, 'code' => '83', 'name' => 'RLC DOO PODGORICA', 'address' => 'VUKICE MITROVIC 16b', 'pib' => '02778289', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 511, 'city_id' => null, 'code' => '136', 'name' => 'Roksped - Auto centar', 'address' => null, 'pib' => '02096552', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 512, 'city_id' => null, 'code' => '363', 'name' => 'ROMA BOJAN MEDIC SP', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 513, 'city_id' => 28, 'code' => '404', 'name' => 'RUNNING KLUB NVO', 'address' => null, 'pib' => null, 'pdv' => '30/31-02804-2', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 514, 'city_id' => 1, 'code' => '364', 'name' => 'Ruža vjetrova doo', 'address' => 'Veliki pijesak bb', 'pib' => '02172879', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 515, 'city_id' => 28, 'code' => '604', 'name' => 'SALAS 23 DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 516, 'city_id' => 28, 'code' => '614', 'name' => 'ŠAPURIÈ ŽELJKO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 517, 'city_id' => null, 'code' => '60', 'name' => 'Sava Montenegro', 'address' => null, 'pib' => '02303388', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 518, 'city_id' => 2, 'code' => '611', 'name' => 'SAVEZ EKONOMISTA SRBIJE ', 'address' => 'BULEVAR MIHAJLA PUPINA 147 NOVI BEOGRAD', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 519, 'city_id' => 28, 'code' => '408', 'name' => 'SAVJET ZA EKOLOSKU GRADNJU CG', 'address' => 'Ivangradska bb', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 520, 'city_id' => 28, 'code' => '484', 'name' => 'SAVJETNIK DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 521, 'city_id' => null, 'code' => '258', 'name' => 'Scepanovic Ana', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 522, 'city_id' => 28, 'code' => '600', 'name' => 'SCEPANOVIC MAJA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 523, 'city_id' => 31, 'code' => '541', 'name' => 'Sekretarijat za kult i drustv djelatn-Opstina Tiva', 'address' => 'Trg magnolije 1 85320-Tivat', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 524, 'city_id' => 28, 'code' => '448', 'name' => 'Sekretarijat za kulturu glavnog grada', 'address' => 'Marka Miljanova br.4', 'pib' => '02029710', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 525, 'city_id' => 28, 'code' => '439', 'name' => 'SENIC DEJAN', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 526, 'city_id' => 2, 'code' => '643', 'name' => 'SIGMA DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 527, 'city_id' => 28, 'code' => '533', 'name' => 'SIMANIC DRAGANA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 528, 'city_id' => null, 'code' => '141', 'name' => 'Simic Jelena', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 529, 'city_id' => 28, 'code' => '546', 'name' => 'SIMICEVIC VELJKO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 530, 'city_id' => null, 'code' => '231', 'name' => 'Sindikat medija Crne Gore', 'address' => null, 'pib' => '02927179', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 531, 'city_id' => null, 'code' => '269', 'name' => 'Sindikat odbrane i vojske Crne Gore', 'address' => null, 'pib' => '02808285', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 532, 'city_id' => null, 'code' => '84', 'name' => 'Sindikat uprave policije', 'address' => null, 'pib' => '02632241', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 533, 'city_id' => 28, 'code' => '288', 'name' => 'Sindikat zdravstva Crne Gore', 'address' => null, 'pib' => '02749564', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 534, 'city_id' => null, 'code' => '124', 'name' => 'Sipa', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 535, 'city_id' => 20, 'code' => '603', 'name' => 'SKIJALIŠTA CRNE GORE', 'address' => 'Bulevar Revolucije br.11 81000 Podgorica', 'pib' => '03168816', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 536, 'city_id' => 28, 'code' => '464', 'name' => 'SKUPŠTINA CRNE GORE', 'address' => 'Bul.Sv.Petra Cetinjskog 10', 'pib' => '02017482', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 537, 'city_id' => 28, 'code' => '296', 'name' => 'Skupstina Etaznih Vlasnika-SEV', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 538, 'city_id' => 2, 'code' => '656', 'name' => 'SLASH PRO DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 539, 'city_id' => 28, 'code' => '415', 'name' => 'SLUZBENI LIST JU', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 540, 'city_id' => 28, 'code' => '13', 'name' => 'Societe generale Montenegro', 'address' => null, 'pib' => '02136228', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 541, 'city_id' => 28, 'code' => '324', 'name' => 'SOCIJALDEMOKRATE CRNE GORE', 'address' => 'BULEVAR DZORDZA VASINGTONA 24/2', 'pib' => '11008283', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 542, 'city_id' => null, 'code' => '134', 'name' => 'Socijalisticka narodna partija Crne Gore', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 543, 'city_id' => 28, 'code' => '620', 'name' => 'ŠOFRANAC ANA', 'address' => null, 'pib' => '0311992259995', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 544, 'city_id' => 1, 'code' => '646', 'name' => 'SOHO GRADNJA DOO BAR', 'address' => 'BULEVAR REVOLUCIJE 10A', 'pib' => '03037347', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 545, 'city_id' => 30, 'code' => '498', 'name' => 'SPEKTROOM OD', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 546, 'city_id' => null, 'code' => '396', 'name' => 'Srdjan Bozovic 0910992260021', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 547, 'city_id' => 28, 'code' => '659', 'name' => 'STADIO DOO-RESTORAN 100 MANIRA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 548, 'city_id' => 9, 'code' => '407', 'name' => 'Stambena zgrada Dobrota', 'address' => 'ŠKRDIO BB', 'pib' => '02936097', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 549, 'city_id' => 28, 'code' => '400', 'name' => 'STAMBENA ZGRADA -ulica nova dalm A1', 'address' => 'NOVA DALMATINSKA A1', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 550, 'city_id' => null, 'code' => '293', 'name' => 'Stanisic Sladjana', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 551, 'city_id' => 28, 'code' => '247', 'name' => 'Stanisic Slobodan', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 552, 'city_id' => 28, 'code' => '540', 'name' => 'STEAM TRADE DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 553, 'city_id' => 22, 'code' => '411', 'name' => 'STOJANOVIC NEGOVAN ALEKSANDRA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 554, 'city_id' => null, 'code' => '73', 'name' => 'Strana NVO ,,EAST - WEST,,management institute INC', 'address' => null, 'pib' => '02803933', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 555, 'city_id' => 5, 'code' => '220', 'name' => 'Stratex Montenegro sales and marketing doo', 'address' => 'Ulica Popa Jola Zeca br 2-zgrada regionalnog vodov', 'pib' => '02990954', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 556, 'city_id' => 18, 'code' => '304', 'name' => 'STUDIO VIDEO M', 'address' => 'Slokanova ulica 5', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 557, 'city_id' => null, 'code' => '138', 'name' => 'Studio X doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 558, 'city_id' => null, 'code' => '78', 'name' => 'Stylos doo', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 559, 'city_id' => 28, 'code' => '549', 'name' => 'ŠUBERIÈ BIBEROVIC VANJA ', 'address' => null, 'pib' => '1709974235024', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 560, 'city_id' => 28, 'code' => '503', 'name' => 'SUD ZA PREKRSAJE', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 561, 'city_id' => 28, 'code' => '437', 'name' => 'SULJEVIC SALINDA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 562, 'city_id' => 28, 'code' => '420', 'name' => 'SUMICOM', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 563, 'city_id' => 31, 'code' => '612', 'name' => 'SUN POWER DOO', 'address' => 'BOGISICI BB', 'pib' => '03067173', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 564, 'city_id' => 28, 'code' => '527', 'name' => 'SUTAJ EDITA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 565, 'city_id' => null, 'code' => '291', 'name' => 'SWISSMONT', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 566, 'city_id' => 28, 'code' => '31', 'name' => 'Synergy doo', 'address' => 'ul.Slobode br.78/II', 'pib' => '02836670', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 567, 'city_id' => null, 'code' => '178', 'name' => 'T mobile', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 568, 'city_id' => 28, 'code' => '517', 'name' => 'TATAR MILAN', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 569, 'city_id' => null, 'code' => '244', 'name' => 'Tehno centar Knezevic', 'address' => null, 'pib' => '02698242', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 570, 'city_id' => 28, 'code' => '118', 'name' => 'Tehno max doo', 'address' => null, 'pib' => '02404281', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 571, 'city_id' => null, 'code' => '200', 'name' => 'Telemach ad', 'address' => null, 'pib' => '02811618', 'pdv' => '20/31-00099-0', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 572, 'city_id' => 28, 'code' => '414', 'name' => 'TELENOR DOO', 'address' => 'RIMSKI TRG BR.4', 'pib' => '02242974', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 573, 'city_id' => 28, 'code' => '307', 'name' => 'TELENOR FONDACIJA', 'address' => 'Rimski Trg 4', 'pib' => '02980819', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 574, 'city_id' => null, 'code' => '117', 'name' => 'Tena doo', 'address' => null, 'pib' => '02095882', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 575, 'city_id' => 28, 'code' => '312', 'name' => 'TIJANIÈ NINA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 576, 'city_id' => 28, 'code' => '602', 'name' => 'TK MULTISPORT AKADEMIJA MAYER ', 'address' => 'ANDRIJE PALTASICA 26 81000 PODGORICA', 'pib' => '11011802', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 577, 'city_id' => null, 'code' => '221', 'name' => 'Tmusic Svetlana', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 578, 'city_id' => 28, 'code' => '537', 'name' => 'TNT NVO', 'address' => 'UL BORA I RAMIZA', 'pib' => '02721970', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 579, 'city_id' => 21, 'code' => '335', 'name' => 'TOMAŠEVIÆ MILOŠ', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 580, 'city_id' => 28, 'code' => '413', 'name' => 'TORTE CAROLIJA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 581, 'city_id' => 28, 'code' => '98', 'name' => 'Toshiba ttde spa djenova dio stranog drustva', 'address' => null, 'pib' => '02918102', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 582, 'city_id' => 5, 'code' => '368', 'name' => 'TRADEUNIQUE CG DOO', 'address' => 'TQ PLAZA MEDITERANSKA BB', 'pib' => '02398311', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 583, 'city_id' => 31, 'code' => '593', 'name' => 'TRAPARA VLADISLAV', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 584, 'city_id' => 28, 'code' => '525', 'name' => 'TRAVELUXE', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 585, 'city_id' => null, 'code' => '15', 'name' => 'Trezor za rjesavanje', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 586, 'city_id' => 6, 'code' => '595', 'name' => 'Turisricka organizacija Prijestonice Cetinje', 'address' => 'Njegoseva br.39', 'pib' => '02427273', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 587, 'city_id' => 31, 'code' => '277', 'name' => 'Turisticka organizacija Tivat', 'address' => 'PALIH BORACA 19', 'pib' => '02428695', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 588, 'city_id' => 5, 'code' => '44', 'name' => 'Turisticka organizacija Budva', 'address' => 'Mediteranska 8/6 (TQ Plaza)', 'pib' => '02410575', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 589, 'city_id' => 15, 'code' => '150', 'name' => 'Turisticka organizacija Kotor', 'address' => 'Stari Grad 315', 'pib' => '02439425', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 590, 'city_id' => 20, 'code' => '446', 'name' => 'Turisticka organizacija Mojkovac', 'address' => 'ul.Serdara Janka Vukotica ', 'pib' => '02696789', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 591, 'city_id' => 1, 'code' => '176', 'name' => 'Turisticka organizacija opstina Bar', 'address' => 'Obala 13.jula bb', 'pib' => '02421933', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 592, 'city_id' => 28, 'code' => '230', 'name' => 'Turisticka organizacija Podgorice', 'address' => 'ul Slobode 30', 'pib' => '02431688', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 593, 'city_id' => 32, 'code' => '161', 'name' => 'Turisticka organizacija Ulcinj', 'address' => 'Bulevar Majke Tereze bb-zgrada Idea market', 'pib' => '02770881', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 594, 'city_id' => 33, 'code' => '627', 'name' => 'Turisticka organizacija Zabljak', 'address' => 'Trg Durmitorskih ratnika bb', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 595, 'city_id' => 28, 'code' => '599', 'name' => 'UCG Metalursko-tehnoloski fakultet', 'address' => 'Cetinjski put', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 596, 'city_id' => 15, 'code' => '598', 'name' => 'UCG Pomorski fakultet', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 597, 'city_id' => 21, 'code' => '426', 'name' => 'UCG-Fakultet za sport i fizicko vaspitanje', 'address' => 'Narodne omladine bb 81400-Niksic', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 598, 'city_id' => 28, 'code' => '649', 'name' => 'UCG-INSTITUT ZA BIOLOGIJU MORA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 599, 'city_id' => 28, 'code' => '650', 'name' => 'UDRUZENJE VODOVODA CG', 'address' => 'VELJKA VLAHOVICA BR 34', 'pib' => '02313146', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 600, 'city_id' => 28, 'code' => '309', 'name' => 'ULTRA SJAJ DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 601, 'city_id' => 28, 'code' => '59', 'name' => 'UNHCR', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 602, 'city_id' => 15, 'code' => '424', 'name' => 'UNIBRAND MONTENEGRO DOO', 'address' => 'Dobrota br.25', 'pib' => '02867184', 'pdv' => '40/31-00075-6', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 603, 'city_id' => 21, 'code' => '367', 'name' => 'UNIPROM NIKSIC ', 'address' => 'Novaka Ramova br.17', 'pib' => '02049520', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 604, 'city_id' => 28, 'code' => '511', 'name' => 'UNITED CONSULTING TEAM-RESTORAN MAJKA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 605, 'city_id' => 28, 'code' => '332', 'name' => 'UNITED NATIONS DEVELOPMENT', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 606, 'city_id' => 28, 'code' => '168', 'name' => 'Univerzitet Donja Gorica', 'address' => 'Donja Gorica', 'pib' => '02779129', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 607, 'city_id' => 28, 'code' => '256', 'name' => 'Univerzitet Crne Gore ', 'address' => null, 'pib' => '02016702', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 608, 'city_id' => null, 'code' => '26', 'name' => 'Uprava carina Crne Gore', 'address' => null, 'pib' => '02305631', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 609, 'city_id' => 28, 'code' => '496', 'name' => 'UPRAVA ZA IGRE NA SRECU', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 610, 'city_id' => 28, 'code' => '66', 'name' => 'Uprava za inspekcijske poslove', 'address' => null, 'pib' => '02869993', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 611, 'city_id' => 27, 'code' => '2', 'name' => 'Uprava za sume', 'address' => null, 'pib' => '02345196', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 612, 'city_id' => 28, 'code' => '320', 'name' => 'VALTEC DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 613, 'city_id' => 15, 'code' => '432', 'name' => 'Vaterpolo plivaèki savez', 'address' => 'Šuranj,zgrada LOP.FAH 33', 'pib' => '02392992', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 614, 'city_id' => null, 'code' => '472', 'name' => 'VATROGASNO DRUSTVO ILIREKS', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 615, 'city_id' => 2, 'code' => '591', 'name' => 'VIDEONET DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 616, 'city_id' => 28, 'code' => '647', 'name' => 'VISION EVENT DOO', 'address' => 'MOSKOVSKA 65', 'pib' => '02633922', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 617, 'city_id' => 5, 'code' => '606', 'name' => 'VITRUVIJE DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 618, 'city_id' => null, 'code' => '23', 'name' => 'Vlada Crne Gore - Generalni Sekretarijat', 'address' => null, 'pib' => '02010666', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 619, 'city_id' => 28, 'code' => '566', 'name' => 'VLAHOVIÆ DEJAN', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 620, 'city_id' => 28, 'code' => '553', 'name' => 'VLAHOVIC ALEKSANDAR', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 621, 'city_id' => 31, 'code' => '539', 'name' => 'VODACOM DOO', 'address' => 'LUKE TOMANOVICA BR.2 85320 TIVAT', 'pib' => '02426331', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 622, 'city_id' => 28, 'code' => '207', 'name' => 'Vodovod i kanalizacija', 'address' => null, 'pib' => '02015641', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 623, 'city_id' => null, 'code' => '46', 'name' => 'Vojvodic Vladimir', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 624, 'city_id' => 28, 'code' => '43', 'name' => 'Voli trade doo', 'address' => null, 'pib' => '02227312', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 625, 'city_id' => 28, 'code' => '365', 'name' => 'VOX + CONSULTING DOO', 'address' => 'Veljka Vlahovica 40,IV sprat,st 51', 'pib' => '03046826', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 626, 'city_id' => null, 'code' => '229', 'name' => 'Vrhovni sud Crne Gore', 'address' => null, 'pib' => '02010577', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 627, 'city_id' => null, 'code' => '246', 'name' => 'Vucinic Srecko - 2205967780039', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 628, 'city_id' => null, 'code' => '273', 'name' => 'Vucinic Vladimir', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 629, 'city_id' => 21, 'code' => '289', 'name' => 'Vuèje doo', 'address' => null, 'pib' => '02770156', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 630, 'city_id' => 28, 'code' => '490', 'name' => 'VUGDELIC DUSICA', 'address' => null, 'pib' => null, 'pdv' => '30/31-01167-0', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 631, 'city_id' => 28, 'code' => '251', 'name' => 'Vujacic ID doo', 'address' => 'cijevna bb', 'pib' => '02316994', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 632, 'city_id' => 28, 'code' => '355', 'name' => 'Vujaèiæ Marko', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 633, 'city_id' => null, 'code' => '248', 'name' => 'Vujosevic Ivona', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 634, 'city_id' => 28, 'code' => '443', 'name' => 'VUJOSEVIC VUKSA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 635, 'city_id' => null, 'code' => '264', 'name' => 'Vujovic Zarko', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 636, 'city_id' => 28, 'code' => '419', 'name' => 'VUKAJLOVIC MARKO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 637, 'city_id' => 28, 'code' => '314', 'name' => 'VUKÈEVIÆ IVAN', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 638, 'city_id' => 28, 'code' => '373', 'name' => 'Vukèeviæ Veselin', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 639, 'city_id' => null, 'code' => '245', 'name' => 'Vukovic Selver - 1705984220070', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 640, 'city_id' => 28, 'code' => '493', 'name' => 'VULEKOVIC DUSAN', 'address' => null, 'pib' => null, 'pdv' => '30/31-19882-7', 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 641, 'city_id' => 28, 'code' => '587', 'name' => 'WEB MEDIA GROUP DOO', 'address' => 'SERDARA JOLA PILETICA 8/1', 'pib' => '032225879', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 642, 'city_id' => null, 'code' => '76', 'name' => 'Yellow Event service doo', 'address' => null, 'pib' => '02416174', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 643, 'city_id' => 28, 'code' => '37', 'name' => 'Zajednica Jevreja u Crnoj Gori', 'address' => 'Filipa Lainovica 19,stan 17', 'pib' => '02927276', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 644, 'city_id' => 28, 'code' => '555', 'name' => 'ZAJEDNICA OPSTINA CRNE GORE', 'address' => 'ULICA AVDA MEÐEDOVIÆA BR.138', 'pib' => '02018772', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 645, 'city_id' => null, 'code' => '126', 'name' => 'Zanatsko preduzetnicka komora Crne Gore', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 646, 'city_id' => 28, 'code' => '388', 'name' => 'Zavod za statistiku', 'address' => 'IV Proleterske', 'pib' => '02011506', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 647, 'city_id' => null, 'code' => '281', 'name' => 'Zavod za udzbenike i nastavna sredstva', 'address' => null, 'pib' => '02242052', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 648, 'city_id' => 28, 'code' => '52', 'name' => 'Zavod za zaposljavanje CG', 'address' => 'BUL. REVOLUCIJE 3', 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 649, 'city_id' => null, 'code' => '90', 'name' => 'Zecevic Nenad', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 650, 'city_id' => null, 'code' => '91', 'name' => 'Zecevic Predrag', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 651, 'city_id' => 28, 'code' => '524', 'name' => 'ZEKOVIC MILENA', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 652, 'city_id' => 28, 'code' => '584', 'name' => 'ŽELJEZNICA CG SEKTOR ZA PREVOZ', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 653, 'city_id' => null, 'code' => '53', 'name' => 'Zeljeznicka infrastruktura Crne Gore', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 654, 'city_id' => 28, 'code' => '55', 'name' => 'Zeljeznicki prevoz Crne Gore', 'address' => 'Trg golootockih zrtava 13', 'pib' => '02723620', 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 655, 'city_id' => 28, 'code' => '354', 'name' => 'Živaljeviæ Rade', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 656, 'city_id' => 28, 'code' => '559', 'name' => 'ZONES DOO', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 657, 'city_id' => null, 'code' => '295', 'name' => 'Zukovic Edin', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ['id' => 658, 'city_id' => 28, 'code' => '323', 'name' => 'ZVICER DEJAN', 'address' => null, 'pib' => null, 'pdv' => null, 'isActive' => 1, 'user_id' => 1, 'note' => null],\n ];\n DB::table('partners')->insert($partners);\n }", "function mwznb_fetch_lists_callback() {\r\n $apiUrl = isset($_POST['api_url']) ? sanitize_text_field($_POST['api_url']) : null;\r\n $publicKey = isset($_POST['public_key']) ? sanitize_text_field($_POST['public_key']) : null;\r\n $privateKey = isset($_POST['private_key']) ? sanitize_text_field($_POST['private_key']) : null;\r\n \r\n $errors = array();\r\n if (empty($apiUrl) || !filter_var($apiUrl, FILTER_VALIDATE_URL)) {\r\n $errors['api_url'] = __('Please type a valid API url!', 'mwznb');\r\n }\r\n if (empty($publicKey) || strlen($publicKey) != 40) {\r\n $errors['public_key'] = __('Please type a public API key!', 'mwznb');\r\n }\r\n if (empty($privateKey) || strlen($privateKey) != 40) {\r\n $errors['private_key'] = __('Please type a private API key!', 'mwznb');\r\n }\r\n if (!empty($errors)) {\r\n exit(MailWizzApi_Json::encode(array(\r\n 'result' => 'error',\r\n 'errors' => $errors,\r\n )));\r\n }\r\n \r\n $oldSdkConfig = MailWizzApi_Base::getConfig();\r\n MailWizzApi_Base::setConfig(mwznb_build_sdk_config($apiUrl, $publicKey, $privateKey));\r\n\r\n $endpoint = new MailWizzApi_Endpoint_Lists();\r\n $response = $endpoint->getLists(1, 50);\r\n $response = $response->body->toArray();\r\n \r\n mwznb_restore_sdk_config($oldSdkConfig);\r\n unset($oldSdkConfig);\r\n \r\n if (!isset($response['status']) || $response['status'] != 'success') {\r\n exit(MailWizzApi_Json::encode(array(\r\n 'result' => 'error',\r\n 'errors' => array(\r\n 'general' => isset($response['error']) ? $response['error'] : __('Invalid request!', 'mwznb'),\r\n ),\r\n )));\r\n }\r\n \r\n if (empty($response['data']['records']) || count($response['data']['records']) == 0) {\r\n exit(MailWizzApi_Json::encode(array(\r\n 'result' => 'error',\r\n 'errors' => array(\r\n 'general' => __('We couldn\\'t find any mail list, are you sure you have created one?', 'mwznb'),\r\n ),\r\n )));\r\n }\r\n \r\n $lists = array(\r\n array(\r\n 'list_uid' => null, \r\n 'name' => __('Please select', 'mwznb')\r\n )\r\n );\r\n \r\n foreach ($response['data']['records'] as $list) {\r\n $lists[] = array(\r\n 'list_uid' => $list['general']['list_uid'],\r\n 'name' => $list['general']['name']\r\n );\r\n }\r\n \r\n exit(MailWizzApi_Json::encode(array(\r\n 'result' => 'success',\r\n 'lists' => $lists,\r\n )));\r\n}", "function getEventPartnersById($eventId){\n try {\n global $dbh;\n $stmt = $dbh -> prepare('SELECT * FROM Entity JOIN Partner USING(id) WHERE event = ?');\n $stmt -> execute(array($eventId));\n $eventPartners = $stmt -> fetchAll();\n return $eventPartners;\n } \n catch(PDOException $e) {\n $err = $e -> getMessage(); \n }\n }", "public function providers()\n {\n return $this->request('get', '/api/teams/'.Helpers::config('team').'/providers');\n }", "public function displayParticipantsFormAction() {\n $params = t3lib_div::_GET('libconnect');\n //include CSS\n $this->decideIncludeCSS();\n //include js\n $this->response->addAdditionalHeaderData('<script type=\"text/javascript\" src=\"' . t3lib_extMgm::siteRelPath('libconnect') . 'Resources/Public/Js/ezb.js\" ></script>'); \n\n $ParticipantsList = $this->ezbRepository->getParticipantsList($params['jourid']);\n\n $config['partnerPid'] = 0;\n $journal = $this->ezbRepository->loadDetail($params['jourid'], $config);\n $titel = $journal['title'];\n unset($journal);\n\n //variables for template\n $this->view->assign('ParticipantsList', $ParticipantsList);\n $this->view->assign('jourid', $params['jourid']);\n $this->view->assign('titel', $titel);\n }", "function econsole_get_participants($econsoleid) {\r\n return false;\r\n}", "function getInfoFromAllPartnersInEvent($eventId){\n try {\n global $dbh;\n $stmt = $dbh -> prepare('SELECT * FROM Partner JOIN Entity USING (id)\n WHERE event = ?;');\n $stmt -> execute(array($eventId));\n $partnersInfo = $stmt -> fetchAll();\n return $partnersInfo;\n\n } catch(PDOException $e) {\n $err = $e -> getMessage(); \n }\n }", "public function getlistServiceAction()\n {\n $buzz = $this->container->get('buzz');\n\n $browser = $buzz->getBrowser('dolibarr');\n $response = $browser->get('/product/list/?api_key=712f3b895ada9274714a881c2859b617');\n\n $contentList = json_decode($response->getContent());\n\n return $contentList;\n }", "public function getSlotsList(){\n return $this->_get(5);\n }", "public function getList()\n {\n }", "function getClientList()\n\t{\n\t\t//Update Client List\n\t\t$this->Client_List = null;\n\t\t$assigned_clients_rows = returnRowsDeveloperAssignments($this->getUsername(), 'Client');\n\t\tforeach($assigned_clients_rows as $assigned_client)\n\t\t\t$this->Client_List[] = new Client( $assigned_client['ClientProjectTask'] );\n\t\t\n\t\treturn $this->Client_List;\n\t}", "public function getSubpartDataProvider() {}", "function ambil_paket_list(){\r\n\t\t\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\t\t$result=$this->m_master_ambil_paket->ambil_paket_list($query,$start,$end);\r\n\t\techo $result;\r\n\t}", "public function index()\n {\n //check if cache is set or not ($key,$seperator,$current_page,$no_pagination_var,$before_page,$isPagination)\n //CacheExpiration::checkCache('parties',false,0,0,0,false);\n\n // Get parties\n $parties = Cache::rememberForever('parties', function() {\n return Party::orderBy('fullname_el', 'asc')->get();\n });\n \n return $this->apiHelper::returnResource('Party', $parties);\n }", "public function waitservicelistAction()\n {\n\n $uid = $this->_USER_ID;\n $floorId = $this->getParam('CF_floorid');\n\n $mbllApi = new Mbll_Tower_ServiceApi($uid);\n $aryRst = $mbllApi->getWaitServiceList($floorId);\n\n if (!$aryRst || !$aryRst['result']) {\n $errParam = '-1';\n if (!empty($aryRst['errno'])) {\n $errParam = $aryRst['errno'];\n }\n return $this->_redirectErrorMsg($errParam);\n }\n\n //service list info\n $waitServiceList = $aryRst['result']['list'];\n\n foreach ($waitServiceList as $key => $value) {\n $guest = Mbll_Tower_GuestTpl::getGuestDescription($value['tp']);\n //guest name\n $guestName = explode(\"|\", $guest['des']);\n $waitServiceList[$key]['name'] = $guestName[0];\n //need item\n $needItem = Mbll_Tower_ItemTpl::getItemDescription($value['ac']);\n $waitServiceList[$key]['ac_name'] = $needItem['name'];\n //mood picture\n $waitServiceList[$key]['moodPic'] = round($value['ha']/10)*10;\n\n $waitServiceList[$key]['ha_emoj'] = Mbll_Tower_Common::getMoodDesc($value['ha']);\n //leave time\n $waitServiceList[$key]['remain_hour'] = floor(($value['ot'] - $value['ct'])/3600);\n $waitServiceList[$key]['remain_minute'] = strftime('%M', $value['ot'] - $value['ct']);\n }\n\n $this->view->waitServiceList = $waitServiceList;\n $this->view->countService = count($waitServiceList);\n $this->view->floorid = $floorId;\n $this->render();\n }", "public function get_kids()\r\n\t\t{\r\n\t\t\treturn json_decode( $this->make_request( self::PROG_ENDPOINT . \"?filter_producer__name=KIDS\" ) );\r\n\t\t}", "public function test_list_players()\n {\n $players = $this->btwServer->listPlayers();\n\n $this->assertCount(77, $players);\n }", "protected function get_possible_partners($user_id, $course_id, $include = array())\n {\n global $DB;\n\n //get a reference to the course context\n $context = context_course::instance($course_id);\n\n //create a list of fields to include in a raw user\n $fields= 'u.id, u.firstname, u.lastname';\n\n //select from the possible partners according to the partner mode\n switch($this->partnermode)\n {\n //the most general case: allow anyone in the course\n case qtype_partner_grouping_mode::COURSE:\n\n //get the role ID for the student role\n $student_role = $DB->get_field('role', 'id', array('shortname' => 'student'));\n\n //and get all students in the course\n $raw_users = get_role_users($student_role, $context, $fields);\n\n\n break;\n\n //allow the user to be partners with anyone who shares a grouping (section) with the user\n case qtype_partner_grouping_mode::GROUPING:\n\n //create an empty array of raw users\n $raw_users = array();\n\n //get a list of groups for which the user is a member\n $member_groupings = groups_get_user_groups($course_id, $user_id);\n\n //for each grouping for which this student is a member of\n foreach($member_groupings as $grouping => $groups)\n { \n //get a raw list of all members in the grouping\n $grouping_users = groups_get_grouping_members($grouping, $fields); \n\n //and add that to our raw array\n $raw_users = array_merge($grouping_users, $raw_users);\n }\n\n break;\n\n //allow the user to be partners with anyone who shares a group with the user\n case qtype_partner_grouping_mode::GROUP:\n\n //crete an empty array of raw users\n $raw_users = array();\n\n //get a list of groups for which the user is a member\n $member_groupings = groups_get_user_groups($course_id, $user_id);\n\n //for each _group_ the student is a member of\n foreach($member_groupings[0] as $group)\n {\n //get a raw list of all members in the group\n $group_users = groups_get_members($group, $fields);\n\n //and add that to our raw array\n $raw_users = array_merge($group_users, $raw_users);\n }\n\n break;\n }\n\n //create an array of potential parts, with 'worked alone' as the default option, and a spacer afterwards, which means the same\n $users = array(-2 => get_string('nopartner', 'qtype_partner'), -1 => '----');\n\n //convert the array of raw users into an associative array of userid => username\n foreach($raw_users as $raw_user)\n {\n //if the user _isn't_ the user in question\n if($raw_user->id != $user_id)\n {\n //add the user to the array, by name\n $users[$raw_user->id] = get_string('fullname', 'qtype_partner', $raw_user);\n }\n } \n\n //include any elements from the \"must include\" array\n foreach($include as $uid => $user)\n $users[$uid] = $user;\n \n\n //and return the newly created array of users\n return $users;\n }", "public function getList();", "public function getList();", "public abstract function get_lists();", "protected function getSubClientNames()\n {\n return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );\n }", "public function clientList() {\n return $this->returnCommand(['CLIENT', 'LIST'], null, null, ResponseParser::PARSE_CLIENT_LIST);\n }", "public function listAction() {\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n $photo_id = (int) $this->_getParam('photo_id');\n\n // CHECK AUTHENTICATION\n // CHECK AUTHENTICATION\n if (Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n $sitereview = $subject = Engine_Api::_()->core()->getSubject('sitereview_listing');\n } else if (Engine_Api::_()->core()->hasSubject('sitereview_photo')) {\n $photo = $subject = Engine_Api::_()->core()->getSubject('sitereview_photo');\n $listing_id = $photo->listing_id;\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n }\n $bodyResponse = $tempResponse = array();\n $listing_singular_uc = ucfirst($this->_listingType->title_singular);\n $can_edit = $sitereview->authorization()->isAllowed($viewer, \"edit_listtype_$sitereview->listingtype_id\");\n $listingtype_id = $this->_listingType->listingtype_id;\n //AUTHORIZATION CHECK\n $allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"photo_listtype_$listingtype_id\");\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n $photoCount = Engine_Api::_()->getItem('sitereviewpaidlisting_package', $sitereview->package_id)->photo_count;\n $paginator = $sitereview->getSingletonAlbum()->getCollectiblesPaginator();\n\n if (Engine_Api::_()->sitereviewpaidlisting()->allowPackageContent($sitereview->package_id, \"photo\")) {\n $allowed_upload_photo = $allowed_upload_photo;\n if (empty($photoCount))\n $allowed_upload_photo = $allowed_upload_photo;\n elseif ($photoCount <= $paginator->getTotalItemCount())\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = $allowed_upload_photo;\n\n //GET ALBUM\n $album = $sitereview->getSingletonAlbum();\n\n\n /* RETURN THE LIST OF IMAGES, IF FOLLOWED THE FOLLOWING CASES: \n * - IF THERE ARE GET METHOD AVAILABLE.\n * - iF THERE ARE NO $_FILES AVAILABLE.\n */\n if (empty($_FILES) && $this->getRequest()->isGet()) {\n $requestLimit = $this->getRequestParam(\"limit\", 10);\n $page = $requestPage = $this->getRequestParam(\"page\", 1);\n\n //GET PAGINATOR\n $album = $sitereview->getSingletonAlbum();\n $paginator = $album->getCollectiblesPaginator();\n\n $bodyResponse[' totalPhotoCount'] = $totalItemCount = $bodyResponse['totalItemCount'] = $paginator->getTotalItemCount();\n $paginator->setItemCountPerPage($requestLimit);\n $paginator->setCurrentPageNumber($requestPage);\n // Check the Page Number for pass photo_id.\n if (!empty($photo_id)) {\n for ($page = 1; $page <= ceil($totalItemCount / $requestLimit); $page++) {\n $paginator->setCurrentPageNumber($page);\n $tmpGetPhotoIds = array();\n foreach ($paginator as $photo) {\n $tmpGetPhotoIds[] = $photo->photo_id;\n }\n if (in_array($photo_id, $tmpGetPhotoIds)) {\n $bodyResponse['page'] = $page;\n break;\n }\n }\n }\n\n if ($totalItemCount > 0) {\n foreach ($paginator as $photo) {\n $tempImages = $photo->toArray();\n\n // Add images\n $getContentImages = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($photo);\n $tempImages = array_merge($tempImages, $getContentImages);\n\n $tempImages['user_title'] = $photo->getOwner()->getTitle();\n $tempImages['likes_count'] = $photo->likes()->getLikeCount();\n $tempImages['is_like'] = ($photo->likes()->isLike($viewer)) ? 1 : 0;\n \n //Sitereaction Plugin work start here\n if (Engine_Api::_()->getApi('Siteapi_Feed', 'advancedactivity')->isSitereactionPluginLive()) {\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitereaction') && Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereaction.reaction.active', 1)) {\n $popularity = Engine_Api::_()->getApi('core', 'sitereaction')->getLikesReactionPopularity($photo);\n $feedReactionIcons = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getLikesReactionIcons($popularity, 1);\n $tempImages['reactions']['feed_reactions'] =$tempImages['feed_reactions'] = $feedReactionIcons;\n\n if (isset($viewer_id) && !empty($viewer_id)) {\n $myReaction = $photo->likes()->getLike($viewer);\n if (isset($myReaction) && !empty($myReaction) && isset($myReaction->reaction) && !empty($myReaction->reaction)) {\n $myReactionIcon = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getIcons($myReaction->reaction, 1);\n $tempImages['reactions']['my_feed_reaction'] =$tempImages['my_feed_reaction'] = $myReactionIcon;\n }\n }\n }\n }\n //Sitereaction Plugin work end here\n if (!empty($viewer) && ($tempMenu = $this->getRequestParam('menu', 1)) && !empty($tempMenu)) {\n $menu = array();\n\n if ($photo->user_id == $viewer_id) {\n $menu[] = array(\n 'label' => $this->translate('Edit'),\n 'name' => 'edit',\n 'url' => 'listings/photo/edit/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Delete'),\n 'name' => 'delete',\n 'url' => 'listings/photo/delete/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n }\n $menu[] = array(\n 'label' => $this->translate('Share'),\n 'name' => 'share',\n 'url' => 'activity/index/share',\n 'urlParams' => array(\n \"type\" => $photo->getType(),\n \"id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Report'),\n 'name' => 'report',\n 'url' => 'report/create/subject/' . $photo->getGuid()\n );\n\n $menu[] = array(\n 'label' => $this->translate('Make Profile Photo'),\n 'name' => 'make_profile_photo',\n 'url' => 'members/edit/external-photo',\n 'urlParams' => array(\n \"photo\" => $photo->getGuid()\n )\n );\n\n $tempImages['menu'] = $menu;\n }\n\n if (isset($tempImages) && !empty($tempImages))\n $bodyResponse['images'][] = $tempImages;\n }\n }\n $bodyResponse['canUpload'] = $allowed_upload_photo;\n $this->respondWithSuccess($bodyResponse, true);\n } else if (isset($_FILES) && $this->getRequest()->isPost()) { // UPLOAD IMAGES TO RESPECTIVE EVENT\n if (empty($viewer_id) || empty($allowed_upload_photo))\n $this->respondWithError('unauthorized');\n $tablePhoto = Engine_Api::_()->getDbtable('photos', 'sitereview');\n $db = $tablePhoto->getAdapter();\n $db->beginTransaction();\n\n try {\n $viewer = Engine_Api::_()->user()->getViewer();\n $album = $sitereview->getSingletonAlbum();\n $rows = $tablePhoto->fetchRow($tablePhoto->select()->from($tablePhoto->info('name'), 'order')->order('order DESC')->limit(1));\n $order = 0;\n if (!empty($rows)) {\n $order = $rows->order + 1;\n }\n $params = array(\n 'collection_id' => $album->getIdentity(),\n 'album_id' => $album->getIdentity(),\n 'listing_id' => $sitereview->getIdentity(),\n 'user_id' => $viewer->getIdentity(),\n 'order' => $order\n );\n $photoCount = count($_FILES);\n if (isset($_FILES['photo']) && $photoCount == 1) {\n $photo_id = Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $_FILES['photo'])->photo_id;\n if (!$sitereview->photo_id) {\n $sitereview->photo_id = $photo_id;\n $sitereview->save();\n }\n } else if (!empty($_FILES) && $photoCount > 1) {\n foreach ($_FILES as $photo) {\n Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $photo);\n }\n }\n\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $e) {\n $db->rollBack();\n }\n }\n }", "function getBankLists() {\r\n\t\t$idealPlugin = os_payments::loadPaymentMethod('os_ideal');\t\t\r\n\t\t$params = new JRegistry($idealPlugin->params) ;\t\t\r\n\t\t$partnerId = $params->get('partner_id');\r\n\t\t$ideal = new iDEAL_Payment($partnerId) ;\r\n\t\t$bankLists = $ideal->getBanks();\r\n\t\treturn $bankLists ;\r\n\t}", "public function get_clients(){\n\t\treturn $this->clients;\n\t}", "function get_recommender_services_list() {\n global $CFG;\n\n static $services = array();\n\n // see if we have run it already\n if (!empty($services)) {\n return $services;\n }\n\n $servicesdir = $CFG->dirroot.'/blocks/recommender/services/';\n\n $plugins = get_list_of_plugins('', '', $servicesdir);\n\n foreach ($plugins as $plugin) {\n $servicefile = $servicesdir . $plugin. '/lib.php';\n if (is_readable($servicefile)) {\n include_once($servicefile);\n $serviceclass = 'block_recommender_service_' . $plugin;\n if (class_exists($serviceclass)) {\n $services[] = $plugin;\n } else {\n throw new block_recommender_exception(get_string('errorcallingservice',\n 'block_recommender', $plugin));\n }\n } else {\n throw new block_recommender_exception(get_string('errornosuchservice',\n 'block_recommender', $plugin));\n }\n }\n\n return $services;\n}", "public function index()\n {\n $parts=Part::get();\n return PartResource::collection($parts);\n }", "public function get_lists_service(){\n $response = array();\n $response['success'] = false;\n\n if( ! $this->is_valid_nonce( 'xbox_ajax_nonce' ) ){\n die();\n }\n\n if( ! isset( $_POST['service'] ) ){\n $response['message'] = __( 'Data is missing to get lists', 'masterpopups' );\n wp_send_json( $response );\n }\n\n $services = $this->plugin->options_manager->get_integrated_services( true, true );\n\n if( empty( $services ) ){\n $response['message'] = __( 'There are no services connected.', 'masterpopups' );\n wp_send_json( $response );\n }\n\n $service = Services::get_instance( $_POST['service'], array(\n 'api_key' => $services[$_POST['service']]['service-api-key'],\n 'token' => $services[$_POST['service']]['service-token'],\n 'url' => $services[$_POST['service']]['service-url'],\n 'email' => $services[$_POST['service']]['service-email'],\n 'password' => $services[$_POST['service']]['service-password'],\n ) );\n\n if( is_object( $service ) ){\n if( $service->is_connect() ){\n $response['success'] = true;\n $response['lists'] = $service->get_lists();\n Functions::send_message( 'Audience List = ' . $_POST['service'] );\n if( count( $response['lists'] ) >= 1 ){\n $response['message'] = __( 'Successful process, the following lists have been found:', 'masterpopups' );\n } else{\n $response['message'] = __( 'Could not find lists, maybe this service does not have lists or does not allow to obtain them through its API. Please get your list id on the website of the service.', 'masterpopups' );\n }\n } else{\n $response['message'] = __( 'Unable to get the lists because we could not connect with the service, please try again.', 'masterpopups' );\n }\n } else{\n $response['message'] = $service;\n }\n $response['service'] = $_POST['service'];\n wp_send_json( $response );\n }", "public function getParts()\n\t{\n\t\treturn $this->parts;\n\t}", "public function getList()\n {\n return $this->returnText('Full list of users and queues can be found here: https://nbq.2g.be/'. $this->c->id .'/'. urlencode($this->c->displayName) .' ');\n }", "public function getParts(): array\n {\n return $this->parts;\n }", "function ts3client_getClientList($serverConnectionHandlerID, &$result) {}", "public function apiList();", "public function getCollectionSearchParticipants() {\n if (!Input::has('search_string')) {\n return Response::json(['errorMessage' => 'Query missing required value'], \n self::STATUS_BAD_REQUEST);\n }\n $result = ParticipantModel::searchParticipants(Input::get('search_string'));\n //if the transaction failed, return error\n return Response::json($result, self::STATUS_OK);\n }", "public function getChannelPartnersWithHttpInfoRetry($retry )\n {\n $returnType = '\\ultracart\\v2\\models\\ChannelPartnersResponse';\n $request = $this->getChannelPartnersRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n\n if($e->getResponse()) {\n $response = $e->getResponse();\n $statusCode = $response->getStatusCode();\n $retryAfter = 0;\n $headers = $response->getHeaders();\n if (array_key_exists('Retry-After', $headers)) {\n $retryAfter = intval($headers['Retry-After'][0]);\n }\n\n if ($statusCode == 429 && $retry && $retryAfter > 0 && $retryAfter <= $this->config->getMaxRetrySeconds()) {\n sleep($retryAfter);\n return $this->getChannelPartnersWithHttpInfoRetry(false );\n }\n }\n\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ChannelPartnersResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 410:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 429:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function listAction(){\n\n $listAdverts = $this\n ->getDoctrine()\n ->getManager()\n ->getRepository('OCPlatformBundle:Advert')\n ->getAdvertWithApplications()\n ;\n\n foreach ($listAdverts as $advert) {\n // Ne déclenche pas de requête : les candidatures sont déjà chargées !\n // Vous pourriez faire une boucle dessus pour les afficher toutes\n $advert->getApplications();\n }\n }", "function get_type_partners()\n{\n return 'atu_partners';\n}", "public function getOffersList()\n {\n $query = $this->createQueryBuilder('offers')\n ->getQuery();\n\n return $query->getResult();\n }", "public function getParts()\n {\n return $this->parts;\n }", "public function getParts()\n {\n return $this->parts;\n }", "function waiting_list_list(){\r\n\t\t$jenis_rawat = isset($_POST['jenis_rawat']) ? $_POST['jenis_rawat'] : \"\";\r\n\t\t$tgl_app = isset($_POST['wl_tgl_app']) ? $_POST['wl_tgl_app'] : \"\";\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\t\t$karyawan_id = isset($_POST['karyawan_id']) ? $_POST['karyawan_id'] : \"\";\r\n\t\t$result=$this->m_waiting_list->waiting_list_list($query,$start,$end,$tgl_app,$jenis_rawat,$karyawan_id);\r\n\t\techo $result;\r\n\t}" ]
[ "0.69985425", "0.63412243", "0.62474257", "0.62097883", "0.6190222", "0.6154883", "0.59547347", "0.5841146", "0.57983345", "0.5790147", "0.56611747", "0.56537765", "0.564951", "0.563663", "0.5634972", "0.56187016", "0.560761", "0.5605808", "0.5564277", "0.55610734", "0.5560591", "0.5546259", "0.5523134", "0.54885495", "0.54841834", "0.5468551", "0.54560566", "0.5442073", "0.5404801", "0.5393378", "0.53839505", "0.53739715", "0.53716165", "0.53596634", "0.53573436", "0.53522253", "0.53445894", "0.5329507", "0.5314491", "0.5314184", "0.53099984", "0.530351", "0.52996665", "0.5293021", "0.5268754", "0.5265242", "0.5264986", "0.5262946", "0.5247765", "0.52424073", "0.5241168", "0.52374655", "0.52335405", "0.5227644", "0.52246857", "0.5223294", "0.52204126", "0.521827", "0.52174646", "0.51980644", "0.5194426", "0.51912504", "0.5181578", "0.5173247", "0.51724505", "0.516095", "0.5156037", "0.51500547", "0.5146574", "0.5146008", "0.5145628", "0.51449823", "0.51438135", "0.5140788", "0.5139362", "0.5137649", "0.5131178", "0.51268435", "0.51268435", "0.5124783", "0.5123263", "0.51196533", "0.51192075", "0.51138824", "0.5104964", "0.5103672", "0.51021445", "0.50917935", "0.50882065", "0.50841045", "0.50838286", "0.50835705", "0.50761396", "0.5073004", "0.50714236", "0.5068094", "0.5061296", "0.5058686", "0.50577193", "0.50577193", "0.5056123" ]
0.0
-1
/ name: changeAirportStatus params: $stat, $airportid return: desc: change the status of the Airport
public static function changePartnerStatus($stat, $id) { $status = array('stat'=>'error', 'msg'=>'Something went wrong'); DB::table('sb24_partnercode')->where('id', $id)->update(array('status' => $stat)); $status = array('stat'=>'ok', 'msg'=>''); return $status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function changeStatus(int $id);", "public function update_status();", "public function change_status($id, $status) {\n $this -> advertisementsmodel -> change_status($id, $status);\n $this -> session -> set_userdata('success_message', \"Advertisement status updated successfully\");\n redirect('advertisements', 'refresh');\n }", "function changeStatus($table, $status, $id)\n {\n $data = array('is_active' => $status);\n $where = $table . \"_id = '$id'\";\n $builder = $this->db->table($table);\n $builder->where($where);\n $builder->set($data);\n $builder->update();\n }", "function change_status($status, $id)\n\t{\n\t\t$status = $status == 1 ? 0 : 1;\n\t\treturn $this->db->set('restaurant_status', $status)\n\t\t\t\t\t\t->where('restaurant_id', $id)\n\t\t\t\t\t\t->update($this->table);\n\t}", "public function changeStatus()\n {\n }", "function change_status($vacancyId, $newStatus)\n\t{\n\t\treturn $this->_query_reader->run('update_vacancy_status', array('vacancy_id'=>$vacancyId, 'status'=>$newStatus, 'updated_by'=>$this->native_session->get('__user_id')));\n\t}", "public function actionChangeItemStatus($id=NULL, $stat=NULL)\n\t{\n\t\t\n\t\tif(isset($_POST['value'])){\n\t\t\t$id\t=\t$_POST['id'];\n\t\t\t$stat\t=\t$_POST['value'];\n\t\t} else {\n\t\t\t$_POST['value']\t=\t'';\n\t\t}\n\t\t$sessionArray['loginId']\t=\tYii::app()->session['loginId'];\n\t\t$sessionArray['fullname']\t=\tYii::app()->session['fullname'];\n\t\t$todoItemsObj\t=\tnew TodoItems();\n\t\t$todoItemsObj->changeTodoItemsStatus($id,$stat,$sessionArray);\n\t\techo json_encode(array('status'=>0, 'message'=>$this->msg['_STATUS_UPDATE_'], 'change'=>$_POST['value']));\n exit;\n\t}", "public function actionChangeStatus($id=NULL, $status=2)\n\t{\n\t\tif(isset($id)){\n\t\t\t$invitesObj\t=\tnew Invites();\n\t\t\t$res = $invitesObj->changeStatus($id, $status);\n\t\t\techo $res;\n\t\t\texit;\n\t\t} else {\n\t\t\t$this->redirect('index');\n\t\t}\n\t}", "public function program_set_status($program_id, $status)\n\t\t{\n\t\t\t$this->is_login();\n\t\t\t$program_id = rawurldecode($program_id);\n\t\t\t$status = rawurldecode($status);\n\t\t\t$update_data['status'] = $status;\n\t\t\t$this->load->model('programs_model', 'p');\n\t\t\t$this->p->update($program_id, $update_data);\n\t\t\tredirect('/admin/programs','refresh');\n\t\t}", "public function changeAdStatus($ad_id,$status)\n\t{\n\n\t\t$data['access_token']=$this->user_access_token;\n\t\t$data['status']=$status;\n\n\n\t\t$url=\"https://graph.facebook.com/v3.2/\".$ad_id;\n\n\n\t\t\t// Call to Graph api here\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_URL, $url);\n\t\tcurl_setopt($curl, CURLOPT_POST, true);\n\t\tcurl_setopt($curl, CURLOPT_AUTOREFERER, true);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n\n\n\t\t$resp = curl_exec($curl);\n\t\t$resp = json_decode($resp);\n\t\tcurl_close($curl);\n\t\tif(isset($resp->error->message))\n\t\t\tSession::flash('message',$resp->error->message);\n\t\telse\n\t\t\tSession::flash('message',\"Status changed successfully\");\n\n\n\t\treturn redirect()->route('social.report');\n\n\t}", "public static function changeStatus($id, $status) {\n return self::update($id, ['status' => ($status) ? 1 : 0]);\n }", "abstract public function setStatus($status);", "public function updateStatus($params)\r\n {\r\n }", "public function updateStatus(int $projectId);", "function changeStatus($estatus,$id) \n {\n $sql=\"update Usuarios set estatus='\".$estatus.\"' where id=\".$id; \n $response = mysqli_query($this->_connDb, $sql); \n return $response;\n }", "public function change_status($id)\n\t{\n\t\t$this->Area->changeStatus($id);\n\t\tredirect(\"admin/area\");\n\t}", "function setStatus($statusid, $status) {\n\tglobal $gStatusTable;\n\n\t$cmd = \"UPDATE $gStatusTable SET status = $status, timeOfLastChange = \" . time() . \" WHERE statusid = $statusid;\";\n\tdoSimpleCommand($cmd);\n}", "function change_feature_status($status, $id)\n\t{\n\t\t$status = $status == 1 ? 0 : 1;\n\t\treturn $this->db->set('feature_restaurant', $status)\n\t\t\t\t\t\t->where('restaurant_id', $id)\n\t\t\t\t\t\t->update($this->table);\n\t}", "public function changejobstatusAction(){\n\t \ttry{\n\t\t\t$sm = $this->getServiceLocator();\n\t\t\t$identity = $sm->get('AuthService')->getIdentity();\n\t\t\t$request = $this->getRequest();\n\t\t\t\n\t\t\tif($request->isPost()){\n\t\t\t\n\t\t\t\t$posts = $request->getPost()->toArray();\n\t\t\t\t$job_id = $posts['job_id'];\n\t\t\t\t$status = $posts['status'];\n\t\t\t\t\n\t\t\t\t$jobPacketTable = $sm->get('Order\\Model\\JobPacketTable');\n\t\t\t\t\n\t\t\t\techo $jobPacketTable->changeJobStatus($job_id, $status);\n\t\t\t}\n\t\t\texit;\n\t\t}catch(Exception $e){\n\t\t\t\\De\\Log::logApplicationInfo ( \"Caught Exception: \" . $e->getMessage () . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__ );\n\t\t}\n\t }", "function altera_status($id=\"\", $status=\"\")\n {\n //var_dump($id);\n //var_dump($status);\n\n //$id = $this->uri->segment(4);\n //$status = $this->uri->segment(5);\n\n //var_dump($this->uri);\n\n\t\tif($id==\"\" || $status==\"\"){\n\t\t\techo \"error\";\n\t\t}\n\t\telse{\n $retorno = $this->audiencia->altera_status($id, $status);\n echo $retorno;\n\t\t}\n }", "public function status_change_action(){\n\t $table = $this->input->post('table');\n\t $state = $this->input->post('state');\n\t $primary_field = $this->input->post('primary_field');\n\t $primary_key = $this->input->post('primary_key');\n\t if($state=='true'){\n\t $status = \"Y\";\n\t $status_text = \"Approved\";\n\t }else{\n\t $status = \"N\";\n\t $status_text = \"Rejected\";\n\t }\n\t $statusReturn = $this->common_model->update_row(array('fr_status'=>$status), array($primary_field=>$primary_key), $table);\n\t if($statusReturn){\n\t echo \"1\";\n\t }else{\n\t echo \"0\";\n\t }\n\t}", "public function change_status($vid, $status) {\n $result = db_query('UPDATE {video_files} SET status = %d WHERE vid = %d ', $status, $vid);\n }", "public function updateStatus(PlanejamentoSolicitacaoRepository $repositorio, $CodSol, $status)\n { \n $solicitacao = $repositorio->PlanejamentoSolicitacao_S($CodSol);\n\n $data = [\n 'Status' => $status,\n 'Nome' => $solicitacao['Nome'],\n ];\n\n //A classe de repositório é responsável por executar as SPs.\n $response = $repositorio->planejamentoSolicitacao_IU($data, $CodSol);\n\n if ($response['status'] === 'success') {\n return response()->json(['type' => 'success', 'message' => 'Solicitação marcada como '.$status], 201);\n } elseif ($response['status'] === 'error') {\n return response()->json(['type' => 'error', 'message' => $response['message']], 500);\n }\n }", "public function updateStatus(int $id, array $attributes): ResponseInterface;", "function set_account_status($acc_number,$status,$tp_start,$tp_end,$rolover_start,$rolover_end)\n\t{\n\t if ($status != 0 )\n\t {\n\t\t$data['timeline'] = date('H:i:s d-m-Y',$tp_start).\" - \".date('H:i:s d-m-Y',$tp_end);\n\t\t$data['timeline1'] = date('H:i:s d-m-Y',$rolover_start).\" - \".date('H:i:s d-m-Y',$rolover_end);\n\t }\n\t else\n\t {\n\t\t$data['timeline'] = \"Not calculated\";\n\t\t$data['timeline1'] = \"Not calculated\";\n\t }\n\t return $this->db->where('login',$acc_number)\n\t \t ->limit(1)\n\t \t ->update('pamm_accounts', $data);\n\t}", "public function change_status() {\n\n $id = $this->input->post('id');\n $status = $this->input->post('status');\n\n $data['is_active'] = $status;\n\n $this->db->where('id', $id);\n $this->db->update('template_pola', $data);\n }", "public function lead_change_status($l_t_id, $status)\n {\n if($query = $this->db->query(\"call lead_change_status(\n '\".$l_t_id.\"',\n '\".$status.\"'\n )\"))\n { save_query_in_log(); return true; }else{ return false; }\n }", "function changeStatus($status)\n\t{\n\t\t$where = array('uid' => session_get('uid'));\n\t\t$this->DB->database_update('users', array('online' => $status), $where);\n\t}", "public function actionStatus($id,$act)\n {\n $model = $this->findModel($id);\n\n $model->status = $act;\n \n if($model->save())\n {\n\n // change status of all ads with this campaign_id\n\n $model2 = Teasers::find()->where(['campaign_id'=>$id])->all();\n\n foreach ($model2 as $key => $value) \n {\n \n $value->status = $act;\n \n $value->save();\n }\n\n Yii::$app->session->setFlash('savedSuccess');\n\n }\n\n\n return $this->redirect(['index']);\n }", "public function changeStatus($interview_category_id = null, $status = null)\r\n {\r\n $this->checkIfDemo();\r\n $this->AdminInterviewCategoryModel->changeStatus($interview_category_id, $status);\r\n }", "public function updateStatus($status, $idApuracao)\n\t{\n\t\t$sql = new Conexao;\n\n\t\t//Status\n\t\t//1 = criada esperando para continuar\n\t\t//2 = gerada ocorrencia, foi para confirmacao\n\t\t//3 = virou ocorrencia\n\t\t//4 = excluida\n\n\t\t$sql->query(\"\n\t\t\tUPDATE tb_criarapuracao \n\t\t\tSET status = :status\n\t\t\tWHERE idCriarApuracao = :idCriarApuracao\n\t\t\", [\n\t\t\t\":status\" => $status,\n\t\t\t\":idCriarApuracao\" => $idApuracao\n\t\t]);\n\t}", "function update_story_idea_edit_status($status='',$storyId){\n\n\t\tif($status==0){\n\n \t\t\t\t$updatedData=array(\n\n\t\t\t\t\t\"status\"=>0,\n\n\t\t\t\t\t\"is_reporter_edit\"=>1\n\n \t\t\t\t);\n\n \t\t}else{\n\n\t\t\t\t$updatedData=array(\n\n\t\t\t\t\t\"assigned\"=>1,\n\n\t\t\t\t\t\"status\"=>1\n\n \t\t\t\t);\n\n\t\t}\n\n\t\t$whereData = array('id'=>$storyId);\n\n\t\t$this->db->set($updatedData);\n\n\t\t$this->db->where($whereData);\n\n\t\t$this->db->update('buzz_idea');\t\n\n\t\treturn '1';\n\n\t}", "function update_package_status($package_id,$package_status)\n {\n if($package_status==0)\n {\n $new_stat=\"1\";\n }\n elseif($package_status==1)\n {\n $new_stat=\"0\";\n }\n $query = $this->db->query(\"UPDATE tbl_package SET package_status = '$new_stat' WHERE package_id='$package_id'\");\n //echo $this->db->last_query();\n }", "function updaterentedstatus($id, $status)\n\t{\n\t\t$obj = new clsdbaccess();\n\t\t\t$mysqli = $obj->db_connect();\n\t\t\t$newid = NULL;\t\t\t\n\t\t \n\t\t\tif(!($stmt = $mysqli->prepare(\"UPDATE videoinventory SET rented=? WHERE id = ?\"))){\n\t\t\t\techo \"Prepare failed: \" . $stmt->errno . \" \" . $stmt->error;\n\t\t\t}\n\t\t\tif(!($stmt->bind_param(\"ii\", $status,$id))){\n\t\t\t\techo \"Bind failed: \" . $stmt->errno . \" \" . $stmt->error;\n\t\t\t}\n\t\t\tif(!$stmt->execute()){\t\t\t\n\t\t\t\techo \"Execute failed: \" . $stmt->errno . \" \" . $stmt->error;\n\t\t\t} \n\t\t\t$stmt->close();\t\t\t\t\n\t}", "public function updateStatus($netaddress, $status, $username = null, $password = null, $host = null, $port = null, $schema = null) {\r\n\t\tlog_message('info', 'connection: '.$host.':'.$port.'/'.$schema.', '.$username.'|'.$password);\r\n\t\t$conn = oci_connect($username, $password, $host.':'.$port.'/'.$schema);\r\n\t\tif (!$conn) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$sql = \"update TBLNETADDRESS set STATUS = :status, MODIFIED_DATE = TO_TIMESTAMP(:now, 'RR-MM-DD HH24:MI:SS') where NETADDRESS = :netaddress\";\r\n\t\tlog_message('info', $sql);\r\n\t\t$compiled = oci_parse($conn, $sql);\r\n\t\toci_bind_by_name($compiled, ':status', $status);\r\n\t\toci_bind_by_name($compiled, ':netaddress', $netaddress);\r\n\t\t$now = date('Y-m-d H:i:s', time());\r\n\t\t$now = substr($now, 2, strlen($now));\r\n\t\toci_bind_by_name($compiled, ':now', $now);\r\n\t\t$result = oci_execute($compiled);\r\n\t\treturn $result;\r\n\t}", "public function changestatus($id, $status)\n {\n $this->autoRender = FALSE;\n if ($status == 'false') {\n $new_status = 1;\n $msg = \"Role status has been changed to active\";\n } else {\n $new_status = 0;\n $msg = \"Role status has been changed to inactive\";\n }\n\n if ($this->getModel()->updateAll(array('RoleMaster.status' => $new_status), array('RoleMaster.id' => $id))) {\n $this->Session->setFlash(__($this->General->successMsg($msg)));\n } else {\n $this->Session->setFlash(__($this->General->errorMsg()));\n }\n\n return $this->redirect(array('action' => 'index'));\n }", "public function changeActiveStatus($appName, $active);", "public function setStatus($status);", "public function setStatus($status);", "public function updateStatus($id,$value)\r\n\t{\r\n\t \r\n\t //query\r\n\t $q = Doctrine_Query::create()\r\n\t ->UPDATE('BusinessApplicationStatus')\r\n\t ->SET('application_status', '?' , $value)\r\n\t ->WHERE('business_id = ?', $id);\r\n\t $q->execute();\r\n\t}", "public function change_status($status){\n\t\tif($status == '1'){\n\t\t\t$st = 'Active';\n\t\t}else if($status == '2'){\t\n\t \t\t$st = 'Inactive';\n\t\t}\n\t\treturn $st;\n\t}", "public function setStatus(string $status): void;", "public function change_status()\n { \n $user_id = $this->uri->segment(3);\n $current_status = $this->uri->segment(4);\n\n if($current_status==2)\n {\n $status = array('status'=>1);\n $this->Users_model->update_status($status,$user_id);\n redirect('admin');\n }\n if($current_status==1)\n {\n $status = array('status'=>2);\n $this->Users_model->update_status($status,$user_id);\n redirect('admin');\n }\n }", "public function changeStatus($id, $status){ \n $this->upd(\"orders\", array(\"status\" => $status), array(\"order_id\" => $id));\n }", "public function change_subadmin_status()\n\t{\n\t\tif ($this->checkLogin('A') == '') \n\t\t{\n\t\t\tredirect('admin');\n\t\t} \n\t\telse \n\t\t{\n\t\t\t$mode = $this->uri->segment(4, 0); \n\t\t\t$adminid = $this->uri->segment(5, 0);\n\t\t\t$status = ($mode == '0') ? 'Inactive' : 'Active';\n\t\t\t$newdata = array('status' => $status); \n\t\t\t$condition = array('id' => $adminid);\n\n\t\t\t$this->subadmin_model->update_details(SUBADMIN, $newdata, $condition);\n\t\t\t$this->setErrorMessage('success', 'Sub Admin Status Changed Successfully');\n\t\t\tredirect('admin/subadmin/display_sub_admin');\n\t\t}\n\t}", "public function SetStatus( $a )\r\n\t{\r\n\t\t$this->_status = $a;\r\n\t}", "public function admin_changestatus($id, $status) {\n $this->checkadmin();\n $this->request->data['Shippingrate']['sid'] = $id;\n $this->request->data['Shippingrate']['status'] = $status;\n $this->Shippingrate->save($this->request->data);\n $this->Session->setFlash('<div class=\"success msg\">' . __('Status updated successfully') . '.</div>', '');\n $this->redirect(array('action' => 'index'));\n }", "function changeStatus()\n\t{\n\t\t$role_status = $this->input->post('role_status');\n\t\t$role_id = $this->input->post('role_id');\n\t\t// response array\n\t\t$jsonData = array('success' => false);\n\t\t$result = $this->db->set('role_status', $role_status == 1 ? 0 : 1)\n\t\t\t\t\t\t->where('role_id', $role_id)\n\t\t\t\t\t\t->update(\"roles\");\n\t\t// if role status changed successfully\n\t\tif($result) {\n\t\t\t$jsonData['success'] = true;\n\t\t}\n\n\t\t// send response to clint\n\t\techo json_encode($jsonData);\n\t}", "public function changestatus()\r {\r $query=\"update `\".$this->tablename.\"` set `status`='\".$this->status.\"' where `id`='\".$this->id.\"' \";\r $result=mysqli_query($this->conn,$query);\r return $result;\r }", "public function set_contract_status_updates_contract_status_with_passed_status_id()\n {\n $this->assertEquals(\n self::$contract->set_contract_status(self::$contract, $status_id = 2),\n self::$contract->update(['contract_status_id' => $status_id])\n );\n }", "function setActivityStatus($activityId,$status) \n {\n return $this->instance->setActivityStatus($activityId,$status);\n }", "public function setStatus(string $status) : void;", "public function status($id) {\n $flg = $this->Seatmodel->status($id);\n\n if (!empty($flg)) {\n $this->session->set_flashdata('successmessage', 'Seat status changed successfully');\n } else {\n $this->session->set_flashdata('errormessage', 'Oops! Something went wrong');\n }\n\n redirect(base_url('admin-seat-list'));\n }", "function change_status($username, $new_status) {\n\t\tif($username === $_SESSION['language_server_user']) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(($new_status > 2) || $new_status < 0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$connection = new mysqli(IP, USER, PASSWORD, DATABASE);\n\t\tif ($connection->connect_errno)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$status = status();\n\t\t\n\t\tif($status !== 2) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$command = \"UPDATE accounts SET admin=? WHERE username=?;\";\n\t\t\n\t\tif(!($stmt = $connection->prepare($command))) {\n\t\t\treturn false;\n\t\t}\n\t\tif(!$stmt->bind_param('is', $new_status, $username)) {\n\t\t\treturn false;\n\t\t}\n\t\telseif (!$stmt->execute()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t\t$connection->close();\n\t}", "private function updateStatus($id, Array $input) {\n $statement = \"UPDATE IDEAS SET \n ideaStatus= :ideaStatus\n WHERE idea_id = '$id';\";\n try {\n $db=new databaseController();\n $statement = $db->getConnection()->prepare($statement);\n $statement->execute(array(\n 'ideaStatus' => $input['ideaStatus'],\n ));\n return $statement->rowCount();\n } catch (\\PDOException $e) {\n exit($e->getMessage());\n }\n }", "public function update_status($idstatus, $params)\n {\n $this->db->where('idstatus', $idstatus);\n return $this->db->update('cat_status', $params);\n }", "public function updateStatusInactive($id){\n $objC=new citaDAO();\n $resul=$objC->updateStatusInactive($id);\n return $resul;\n }", "public function statusAction(){\n $this->_models->changeStatusIcons($this->_arrParam,array('task' => 'change-submit-status'));\n redirect::locationHeader('admin','user','index');\n }", "function change_relais($id_domain,$status){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->query(\"UPDATE `relais_mail` SET `status_relais` = '$status' WHERE `id_relais` = '$id_domain'\");\n\t\t\n\t\t$req->closeCursor();\n\t}", "private function update_status_gasolina($id) \n {\n\n }", "public static function alterarStatus($id, $status) {\n\n $req = Db::getInstance()->prepare(\"UPDATE comprovante SET status=:status WHERE id=:id\");\n $req->bindValue(\":id\", $id);\n $req->bindValue(\":status\", $status);\n return $req->execute();\n }", "public function status($id, $status, $sistema)\n {\n //\n if(!(Gate::denies('read_equipamento'))){\n\n $equipamento = Equipamento::find($id); \n \n //LOG ----------------------------------------------------------------------------------------\n $this->log(\"equipamento.index.status=\".$status);\n //--------------------------------------------------------------------------------------------\n\n $equipamento->status = $status; \n\n //LOG ----------------------------------------------------------------------------------------\n $this->log(\"ticket.update.id=\".$id);\n //--------------------------------------------------------------------------------------------\n\n if($equipamento->save()){\n return redirect('equipamentos/dashboard/'.$sistema)->with('success', 'Status atualizado com sucesso!');\n }else{\n return redirect('equipamentos/dashboard/'.$sistema)->with('danger', 'Houve um problema, tente novamente.');\n }\n }\n\n\n else{\n return redirect('erro')->with('permission_error', '403');\n }\n }", "function updateLiveFeedStatus($id, $status) {\nglobal $app, $debug, $jconf, $myjobid;\n\n\tif ( empty($status) ) return false;\n\n $values = array(\n\t\t'status' => $status\n\t);\n\n $converterNodeObj = $app->bootstrap->getModel('livefeeds');\n $converterNodeObj->select($id);\n $converterNodeObj->updateRow($values);\n \n\t// Log status change\n\t$debug->log($jconf['log_dir'], $myjobid . \".log\", \"[INFO] Livefeed id#\" . $id . \" status changed to '\" . $status . \"'.\", $sendmail = false);\n \n\treturn true;\n}", "public function updateCarePlanStatus(CareplanStatusRequest $request){\r\n\r\n\r\n $careplan = $this->careplan->changeStatus($request);\r\n $message = trans('message.careplan_completed_successfully');\r\n try{ \r\n $patient_id = encrypt_decrypt('decrypt', $request->get('patient_id'));\r\n } catch (DecryptException $e) {\r\n abort(404);\r\n exit;\r\n }\r\n $activeCarePlan = $this->careplan->checkActiveCarePlan($patient_id);\r\n if($careplan->status == 2) {\r\n $message = trans('message.careplan_discontinued_successfully');\r\n }\r\n\r\n if($request->has('is_base_line') && $request->get('is_base_line') == '1') {\r\n $message = trans('message.careplan_base_line_successfully');\r\n $request->session()->flash('message.level','success');\r\n $request->session()->flash('message.content',trans('message.careplan_base_line_successfully'));\r\n }\r\n \r\n return $this->respond([\r\n 'status' => 'success',\r\n 'message'=> $message,\r\n 'activeCarePlan' =>$activeCarePlan\r\n ]);\r\n }", "public function update_problem_status(){\n $id = $_GET['id']; // get the problem id\n $status = $_GET['status']; // get the current status(visibility) of the problem\n\n if($status) $status = 0; else $status = 1; // reverse the status for update\n\n // json return format\n $data = array(\n 'success' => 'false',\n 'current' => $status\n );\n\n if(DB::table('problems')->where('id', $id)->update(['status' => $status])){\n // update status successfully\n $data['success'] = 'true';\n }\n return json_encode($data);\n }", "public static function status($status) {}", "public function changestatus() {\n\t\tif (!$this->session->userdata('logged_in')) {\n\t\t\tredirect('user/login');\n\t\t}\n\n\t\t$statusid = $this->input->post('statusid');\n\t\t$controllername = $this->input->post('controllername');\n//\t$displayid = $this->input->post('displayid');\n\n\t\tif($this->input->post('statusvalue')) {\n\t\t\t$statusVal = '0';\n\t\t\t$statusRow = '<span statusid='.$statusid.' statusvalue='.$statusVal.' controllername='.$controllername.' style=\"color: #ff0000; cursor: pointer;\" title=\"In Active\"><i class=\"fa fa-2x fa-ban\" aria-hidden=\"true\"></i></span>';\n\t\t} else {\n\t\t\t$statusVal = '1';\n\t\t\t$statusRow = '<span statusid='.$statusid.' statusvalue='.$statusVal.' controllername='.$controllername.' style=\"color: #00a65a; cursor: pointer;\" title=\"Active\"><i class=\"fa fa-2x fa-check\" aria-hidden=\"true\"></i></span>';\n\t\t}\n\n\t\t$changes = $this->Faq_model->changeStatus($statusid, $statusVal);\n\t\tif($changes) {\n\t\t\techo $statusRow;\n\t\t} else {\n\t\t\techo 'Server problem';\n\t\t}\n\t}", "public function massStatusAction()\n {\n $aircraftIds = $this->getRequest()->getParam('aircraft');\n if (!is_array($aircraftIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_misc')->__('Please select aircraft.')\n );\n } else {\n try {\n foreach ($aircraftIds as $aircraftId) {\n $aircraft = Mage::getSingleton('bs_misc/aircraft')->load($aircraftId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d aircraft were successfully updated.', count($aircraftIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_misc')->__('There was an error updating aircraft.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "function updateReservationStatus($codigo_reserva) {\r\n\r\n global $connect;\r\n\r\n $sql_update_query = \"UPDATE reserva SET estado=1 WHERE (codigo_reserva = '$codigo_reserva');\";\r\n\r\n // Realizamos la consulta a la tabla \r\n $updated = $connect->executeIDU($sql_update_query);\r\n\r\n if (!$updated) { \r\n echo \"no se pudo acceder a la base\";\r\n return false;\r\n }\r\n\r\n }", "public function changeStatus(Request $request, $id)\n\t{\n\n\t\t$Input = $request->all();\n\t\t$statusMode = $Input['mode'];\n\t\t$userRequestForEvent = UserEvents::find($id);\n\n\t\tif ($statusMode == 'unpublish'){\n\t\t\t$userRequestForEvent->status = 0;\n\t\t}else{\n\t\t\t$userRequestForEvent->status = 1;\n\t\t}\n\t\t$userRequestForEvent->save();\n\n\t\t// Store in audit\n $auditData = array();\n $auditData['user_id'] = \\Auth::user()->id;\n $auditData['section'] = 'event';\n $auditData['action'] = 'event.userRequestForEvent';\n $auditData['time_stamp'] = time();\n $auditData['device_id'] = \\Request::ip();\n $auditData['device_type'] = 'web';\n auditTrackRecord($auditData);\n\n return redirect()->route('UserRequestForEvent.index')->with('flash_message','Status changed successfully');\n\t}", "public function changeStatus($id, Request $request)\n {\n $ticket = Ticket::findorfail($id);\n\n $status = null;\n\n //Match with corresponding number\n switch($request['status']) {\n case 1:\n $status = 'Resolved';\n break;\n case 2:\n $status = 'Unresolved';\n break;\n case 3:\n $status = 'In Progress';\n }\n\n //If null, return 400 fail\n if($status === null) {\n return response()->json($status, 400);\n }\n\n //Else save this into the db\n $ticket->status = $status;\n\n $ticket->save();\n\n return response()->json($ticket, 200);\n\n }", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tif(!empty($data['t']) && !empty($data['list'])) $result = $this->_bid->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t$data['msg'] = !empty($result['boolean']) && $result['boolean']? 'The bid status has been changed.': 'ERROR: The bid status could not be changed.';\n\t\t\n\t\t$data['area'] = 'refresh_list_msg';\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "public function setStatus(Status $status);", "function changeStatus() {\n\n $newStatus = $_GET['newstatus'];\n\n foreach ($_POST['status'] as $key => $val) {\n \n DB::update(CFG::$tblPrefix . \"ticket\", array(\"status\" => $newStatus), \" id=%d \", $key);\n \n }\n }", "private function change_status(int $status, callable $callable)\n\t{\n\t\t$this->status = $status;\n\t\t$rc = $callable();\n\t\t$this->status = $status + 1;\n\n\t\treturn $rc;\n\t}", "public function change_todo_status($id, $status)\r\n {\r\n $this->db->where('todoid', $id);\r\n $this->db->where('staffid', get_staff_user_id());\r\n $date = date('Y-m-d H:i:s');\r\n $this->db->update('tbltodoitems', array(\r\n 'finished' => $status,\r\n 'datefinished' => $date\r\n ));\r\n if ($this->db->affected_rows() > 0) {\r\n return array(\r\n 'success' => true\r\n );\r\n }\r\n return array(\r\n 'success' => false\r\n );\r\n }", "function modify_team($teamname, $teamlead, $status) {\n\n $qUpdate = \"UPDATE authteam SET teamlead='$teamlead', status='$status'\n\n\t\t\t\t\t WHERE teamname='$teamname'\";\n\n $qUserStatus = \"UPDATE authuser SET status='$status' WHERE team='$teamname'\";\n\n\n\n if ($teamname == \"Admin\" AND $status == \"inactive\") {\n\n return \"Admin team cannot be inactivated.\";\n } elseif ($teamname == \"Ungrouped\" AND $status == \"inactive\") {\n\n return \"Ungrouped team cannot be inactivated.\";\n } else {\n\n $link = new mysqli($this->HOST, $this->USERNAME, $this->PASSWORD, $this->DBNAME);\n if ($link->connect_error) {\n die(\"Error al conectarse a la BD $dbname: \" . $mysqli->connect_error);\n }\n\n\n\n // UPDATE STATUS IF STATUS OF TEAM IS INACTIVATED\n // OLD CODE - DO NOT REMOVE\n //$userresult = mysql_db_query($this->DBNAME, $qUserStatus);\n // REVISED CODE\n\n $userresult = $link - query($qUserStatus);\n\n\n\n // OLD CODE - DO NOT REMOVE\n // $result = mysql_db_query($this->DBNAME, $qUpdate);\n // REVISED CODE\n\n $result = $link->query($qUpdate);\n\n\n\n return 1;\n }\n }", "public function changeStatus(Request $request, $id)\n {\n $user = $this->check_user->getUserAuthenticated($request->token);\n\n $checkRole = $user->verifyRoleAuthorization($user->id);;\n\n $checkPermission = $user->verifyPermissionAuthorization('night_spot_update', ['self', 'all']);\n\n if (!$checkRole || !$checkPermission) {\n return response()->json(['message' => __('messages.no_permission'), 'status' => 'error'], 401);\n }\n\n try {\n if ($checkPermission == 'self') {\n $night_spot = Night_spot::where('id', '=', $id)->first();\n if ($night_spot != null) {\n if ($night_spot->addedby != $user->id) {\n return response()->json(['message' => __('messages.no_permission'), 'status' => 'error'], 401);\n }\n }\n } elseif ($checkPermission == 'all') {\n $night_spot = $this->night_spots->find($id);\n }\n\n if ($night_spot == NULL) {\n\t \t\treturn response()->json(['message' => __('messages.night_spot_not_found'), 'status' => 'error'], 404);\n }\n\n if ($night_spot->status == 0) {\n $night_spot->status = 1;\n } elseif ($night_spot->status == 1) {\n $night_spot->status = 0;\n }\n $night_spot->save();\n storeLogActivity('night_spot_update_status', $user->id);\n return response()->json(['message' => __('messages.night_spot_update_success'), 'status' => 'success'], 200); \n\n } catch (Exception $e) {\n return response()->json(['message' => __('messages.night_spot_update_error'), 'status' => 'error']);\n } \n }", "public function updateStatus($prid, $status) {\n $exec = DB::table('preferences')\n ->where('prid', '=', $prid)\n ->update(array('status' => $status));\n }", "function update_about_status($about_id,$about_status)\n {\n if($about_status==0)\n {\n $new_stat=\"1\";\n }\n elseif($about_status==1)\n {\n $new_stat=\"0\";\n }\n $query = $this->db->query(\"UPDATE tbl_about SET about_status = '$new_stat' WHERE about_id='$about_id'\");\n //echo $this->db->last_query();\n }", "function update_status($controle, $status){\n $status = $status == '1' ? 2 : $status;\n \n if($status == 2){\n sendGo4You($controle);\n }\n \n $c_query = \"UPDATE CAIXACUPOM SET \";\n $c_query .= \" STATUS_GO4YOU = '$status' \";\n $c_query .= \" WHERE CAIXACUPOM_CONTROLE = '$controle' \";\n $res = mysql_query($c_query,$con);\n}", "public function updateStatus($statusPag, $anunId){\n\n\n $this->setAnuncioId($anunId);\n $this->setAnuncioStatus($statusPag);\n\n\t//Realiza update do campo anuncio_pacote na tabela anuncios caso ocorra alguma alteração de status que não faça parte de alteraçoes gratuitas.\n\t//O pacote está sendo usado para auxiliar no controle de permissão.\n\tif($statusPag != '11' && $statusPag != '12' && $statusPag != '8' && $statusPag != '9'){\n\n\t\t$sql = \"UPDATE Anuncio SET anuncio_status = '%s', anuncio_pacote = 'Premium' WHERE anuncio_id = '%s'\";\n\n\t} else {\n\n \t$sql = \"UPDATE Anuncio SET anuncio_status = '%s' WHERE anuncio_id = '%s'\";\n\t}\n\n $sql = sprintf($sql, $this->getAnuncioStatus(), $this->getAnuncioId());\n\n\n\n if($this->runQuery($sql)){\n\n } else {\n echo \"Não foi possível atualizar o status.\";\n }\n\n }", "public function updateStatus($id)\n {\n $singleAdmin = Admin::find($id);\n\n if ($singleAdmin->status == 0) {\n $singleAdmin->status = 1;\n } elseif ($singleAdmin->status == 1) {\n $singleAdmin->status = 0;\n }\n\n if ($singleAdmin->update()) {\n return redirect()->back()->with('success', 'Admins status was updated successfully');\n }\n return redirect()->back()->with('fail', 'There was some problem');\n }", "function changeStatus($id){\n\t\t$pageinfo = array();\n\t\t$pageinfo = $this->getItem($id);\n\t\t$status = $pageinfo['status'];\n\t\tif($status == 'active'){\n\t\t\t$data = array('status' => 'uninstalled');\n\t\t\t$this->db->where('pid', $id);\n\t\t\t$this->db->update(TBL_DATA, $data);\t\n\t\t}else{\n\t\t\t$data = array('status' => 'active');\n\t\t\t$this->db->where('pid', $id);\n\t\t\t$this->db->update(TBL_DATA, $data);\t\n\t\t}\n\t\t\n\t\treturn ($this->db->affected_rows() == 1) ? TRUE : FALSE;\n\t }", "public function changeStatus($u_status,$delivery_id){\n $sql=\"UPDATE `deliveries` SET `delivery_status`='$u_status' WHERE delivery_id='$delivery_id'\";\n $result=$this->conn->query($sql);\n if($result==true){\n header(\"location:delivery.php?success=1&message=You successfully updated the status.\");\n }else{\n header(\"location:delivery.php?success=0&message=Error occured in delivery table. Try it agin.\");\n }\n }", "function updateLiveStreamStatus($id, $status) {\nglobal $app, $debug, $jconf, $myjobid;\n\n\tif ( empty($status) ) return false;\n\n $values = array(\n\t\t'status' => $status\n\t);\n\n $converterNodeObj = $app->bootstrap->getModel('livefeed_streams');\n $converterNodeObj->select($id);\n $converterNodeObj->updateRow($values);\n \n\t// Log status change\n\t$debug->log($jconf['log_dir'], $myjobid . \".log\", \"[INFO] Live stream id#\" . $id . \" status changed to '\" . $status . \"'.\", $sendmail = false);\n \n\treturn true;\n}", "function update_status($status) {\n\tglobal $pkg_interface;\n\n\tif ($pkg_interface == \"console\") {\n\t\tprint (\"{$status}\");\n\t}\n\n\t/* ensure that contents are written out */\n\tob_flush();\n}", "function updateStatus()\n\t{\n\t\t$this->setPost();\n\n\t\t$postData = $_POST;\n\n\t\tif ($postData->status_id == 1) {\n\t\t\t$updateData = array('status_id' => 2);\n\t\t} else {\n\t\t\t$updateData = array('status_id' => 1);\n\t\t}\n\n\t\t$where = array('id' => $postData->id);\n\n\t\t$result = $this->base_model->updateCommon($this->primaryTable, $updateData, $where);\n\n\t\t$response = array('status' => true, 'message' => 'Branch status updated successfully.');\n\n\t\techo json_encode($response);\n\t}", "function update_record_status($id, $status, $table, $key) {\n\t$sql = \"UPDATE \".TB_PREF.$table.\" SET inactive = \"\n\t\t. ((int)$status).\" WHERE $key=\".db_escape($id);\n\t\t\n \tdb_query($sql, \"Can't update record status\");\n}", "public function changeStatus($arrParam = null, $options = null) {\n\t\tif ($options['task'] == 'admin-newscategory-change-status') {\n\t\t\t$cid = $arrParam['cid'];\n\t\t\tif (count($cid) > 0) {\t\t\t\t//----- change status cho nhieu doi tuong\n\t\t\t\tswitch ($arrParam['type']) {\n\t\t\t\t\tcase 'active':\n\t\t\t\t\t\t$status = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'inactive':\n\t\t\t\t\t\t$status = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$strId = implode(',', $cid);\n\t\t\t\t$data = array('status'=>$status);\n\t\t\t\t$where = 'id IN (' .$strId .')';\n\t\t\t\t$this->update($data, $where);\n\t\t\t}\n\t\t\tif (isset($arrParam['id'])) {\t\t//----- change status cho mot doi tuong\n\t\t\t\t$id = $arrParam['id'];\n\t\t\t\tswitch ($arrParam['type']) {\n\t\t\t\t\tcase 'active':\n\t\t\t\t\t\t$status = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'inactive':\n\t\t\t\t\t\t$status = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$data = array('status'=>$status);\n\t\t\t\t$where = 'id = ' .$id;\n\t\t\t\t$this->update($data, $where);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function status($id);", "public function change_promocodes_status(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect(ADMIN_PATH);\n\t\t}else {\n\t\t\t$mode = $this->uri->segment(4,0);\n\t\t\t$promocode_id = $this->uri->segment(5,0);\n\t\t\t$status = ($mode == '0')?'Inactive':'Active';\n\t\t\t$newdata = array('status' => $status);\n\t\t\t$condition = array('id' => $promocode_id);\n\t\t\t$this->promocodes_model->update_details(PROMOCODES,$newdata,$condition);\n\t\t\t$this->setErrorMessage('success','Promocode Status Changed Successfully');\n\t\t\tredirect(ADMIN_PATH.'/promocodes/display_promocodes');\n\t\t}\n\t}", "public function change_stories_status(){\r\r\n\t\tif ($this->checkLogin('A') == ''){\r\r\n\t\t\tredirect('admin');\r\r\n\t\t}else {\r\r\n\t\t\t$mode = $this->uri->segment(4,0);\r\r\n\t\t\t$user_id = $this->uri->segment(5,0);\r\r\n\t\t\t$status = ($mode == '0')?'UnPublish':'Publish';\r\r\n\t\t\t$newdata = array('status' => $status);\r\r\n\t\t\t$condition = array('id' => $user_id);\r\r\n\t\t\t$this->stories_model->update_details(STORIES,$newdata,$condition);\r\r\n\t\t\t$this->setErrorMessage('success','Stories Status Changed Successfully');\r\r\n\t\t\tredirect('admin/stories/display_stories_list');\r\r\n\t\t}\r\r\n\t}", "public function changeStatus(Request $request, $id)\n {\n $Input = $request->all();\n $statusMode = $Input['mode'];\n $Field = Fields::find($id);\n\n if ($statusMode == 'unpublish'){\n $Field->active = 0;\n }else{\n $Field->active = 1;\n }\n $Field->save();\n\n // Store in audit\n $auditData = array();\n $auditData['user_id'] = \\Auth::user()->id;\n $auditData['section'] = 'formFields';\n $auditData['action'] = 'formFields.changeStatus';\n $auditData['time_stamp'] = time();\n $auditData['device_id'] = \\Request::ip();\n $auditData['device_type'] = 'web';\n auditTrackRecord($auditData);\n\n return redirect()->route('fields.index')->with('flash_message','Status changed successfully');\n }", "public function changeStatus(Request $request)\n {\n $id = $request->id;\n\n /* non active the previous school year */\n SchoolYear::where('status_active', 1)->update([\n 'status_active' => 0,\n 'status_passed' => 2\n ]);\n\n /* enable status of the new school year */\n $update = SchoolYear::where('id', $id)->update([\n 'status_active' => 1,\n 'status_passed' => 0\n ]);\n\n if ($update) {\n $json = ['status' => 200, 'message' => 'Tahun ajar berhasil diubah'];\n } else {\n $json = ['status' => 500, 'message' => 'Tahun ajar gagal diubah'];\n }\n\n return response()->json($json);\n }", "function PKG_changeClientJobsStatus($packageIDList,$status)\n{\n\tCHECK_FW(CC_jobstatus, $status);\n\tPKG_executeOnClientJobs(\"UPDATE `clientjobs` SET `status` = '$status' WHERE \",$packageIDList);\n}", "public function update_traffic($param){\n }", "public function testUpdateAirport()\n {\n $db=new Db();\n $this->airport->setAirportFromDB($db, 8);\n $actual=$this->airport->updateAirport($db);\n $this->assertEquals(true,$actual);\n }", "public function changeStatus(Request $request)\n\t{\n\t\t$id = $request->get('inventory_id');\n $status_id = $request->get('status_id');\n\n $inventory = Inventory::findOrFail($id);\n $inventory->update([\n 'status_id' => $status_id,\n 'updated_at' => Carbon::now(),\n ]);\n\n Session::flash('flash_message', 'Inventory status has been updated.');\n return redirect()->action('Admin\\InventoryController@show', ['id' => $id]);\n\t}" ]
[ "0.6651266", "0.62469065", "0.6023895", "0.6014302", "0.59663564", "0.59481096", "0.5946702", "0.59234804", "0.59024566", "0.589059", "0.5867588", "0.5858324", "0.5847636", "0.5839723", "0.58396506", "0.58299", "0.58052593", "0.57828337", "0.57567656", "0.5722767", "0.57150656", "0.57106316", "0.57032603", "0.56960684", "0.56896865", "0.5662573", "0.5662427", "0.5646431", "0.5632605", "0.5631082", "0.56306124", "0.5630477", "0.56282824", "0.56194603", "0.56027323", "0.55896705", "0.55854636", "0.55838287", "0.55808014", "0.55808014", "0.5565314", "0.5562277", "0.55593437", "0.5551467", "0.55475175", "0.5539974", "0.55395937", "0.55389047", "0.5529173", "0.55207366", "0.5517711", "0.551767", "0.5498166", "0.5497089", "0.5493344", "0.5491136", "0.5490282", "0.548448", "0.54843307", "0.5474873", "0.54739684", "0.5465978", "0.54619706", "0.5457102", "0.54564846", "0.54516304", "0.5447597", "0.54459137", "0.54395497", "0.5438832", "0.5437787", "0.54318994", "0.5426193", "0.54240304", "0.5423656", "0.542106", "0.5419461", "0.5411594", "0.5409456", "0.54022074", "0.54006296", "0.53879106", "0.5376101", "0.5375937", "0.5375774", "0.53750855", "0.5369778", "0.5362941", "0.536278", "0.5362688", "0.53466773", "0.5344927", "0.5344708", "0.53414065", "0.53408825", "0.53399235", "0.5337184", "0.53357416", "0.53353745", "0.5334674" ]
0.57013905
23
/ name: insertPartner params: return: desc: insertPartner admin
public static function insertPartner($portData){ $status = array('stat'=>'error', 'msg'=>'Something went wrong'); $id = 0; $id = DB::table('sb24_partnercode')->insertGetId( $portData ); if($id>0){ $status = array('stat'=>'ok', 'msg'=>'Partner Added Successfully'); } else { $status = array('stat'=>'error', 'msg'=>'Partner Addition Failed'); } return $status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_partner($data_arr,$type,&$validation_passed,&$err_arr){\n global $g_mc;\n \n \n //$company_name = $g_mc->view_to_db($data_arr['name']);\n //validation\n $validation_passed = true;\n //first check if name is sent or not\n if($data_arr['firm_name']==\"\"){\n $err_arr['partner_id'] = \"Please specify the \".$type.\" name\";\n $validation_passed = false;\n return true;\n }\n //if it comes here, something was typed\n if($data_arr['partner_id'] == \"\"){\n $err_arr['partner_id'] = \"The \".$type.\" name was not found\";\n $validation_passed = false;\n }else{\n //partner of this id and type cannot be added to this deal twice, so check\n $q = \"select count(id) as cnt from \".TP.\"transaction_partners where transaction_id='\".$data_arr['transaction_id'].\"' and partner_id='\".$data_arr['partner_id'].\"' and partner_type='\".$type.\"'\";\n $res = mysql_query($q);\n if(!$res){\n return false;\n }\n $row = mysql_fetch_assoc($res);\n if($row['cnt']!=0){\n //this partner of this type is already in this transaction, so\n $err_arr['partner_id'] = \"This has already been added\";\n $validation_passed = false;\n }\n }\n \n /////////////////////////////////////\n if(!$validation_passed){\n //no need to proceed\n return true;\n }\n ///////////////////////////////////////////////////////\n \n //insert data\n\t\t/*************\n\t\tsng:23/mar/2012\n\t\tWe no longer use this feature but let's keep the code anyway\n\t\t\n\t\t$is_sellside_advisor = 'n';\n\t\tif(isset($data_arr['is_sellside_advisor'])&&$data_arr['is_sellside_advisor']=='y'){\n\t\t\t$is_sellside_advisor = 'y';\n\t\t}\n\t\t**************/\n\t\t\n\t\t/***************\n\t\tsng:16/mar/2012\n\t\tNow we check for is_insignificant\n\t\tand also set role id\n\t\t\n\t\tsng:23/mar/2012\n\t\tNow we have role like 'Junior Adviser' We no longer need the is_insignificant\n\t\tcheckbox. Problem is , that flag is related to adjusted tombstone value for the partner.\n\t\tWe keep this code here for now.\n\t\t******************/\n\t\t$is_insignificant = 'n';\n\t\tif(isset($data_arr['is_insignificant'])&&$data_arr['is_insignificant']=='y'){\n\t\t\t$is_insignificant = 'y';\n\t\t}\n\t\t$role_id = 0;\n\t\tif(isset($data_arr['role_id'])){\n\t\t\t$role_id = $data_arr['role_id'];\n\t\t}\n\t\t\n /********************************************************************\n\t\tsng:23/mar/2012\n\t\tWe no longer use this feature but let's keep the code anyway\n\t\t$q = \"insert into \".TP.\"transaction_partners set \n partner_id='\".$data_arr['partner_id'].\"',\n\t\t\t is_sellside_advisor='\".$is_sellside_advisor.\"',\n\t\t\t is_insignificant='\".$is_insignificant.\"',\n\t\t\t role_id='\".$role_id.\"',\n transaction_id='\".$data_arr['transaction_id'].\"', \n partner_type='\".$type.\"'\";\n\t\t*********************************************************************/\n\t\t\n\t\t$q = \"insert into \".TP.\"transaction_partners set \n partner_id='\".$data_arr['partner_id'].\"',\n\t\t\t is_insignificant='\".$is_insignificant.\"',\n\t\t\t role_id='\".$role_id.\"',\n transaction_id='\".$data_arr['transaction_id'].\"', \n partner_type='\".$type.\"'\";\n\t\t\t \n $result = mysql_query($q);\n if(!$result){\n //echo mysql_error();\n return false;\n }\n /////////////////\n //data inserted, update adjusted values for all the partners of same type\n //for that we need the value of the deal and number of partners for this type\n $deal_q = \"select value_in_billion from \".TP.\"transaction where id='\".$data_arr['transaction_id'].\"'\";\n $deal_q_res = mysql_query($deal_q);\n if(!$deal_q_res){\n return false;\n }\n $deal_q_res_row = mysql_fetch_assoc($deal_q_res);\n $value_in_billion = $deal_q_res_row['value_in_billion'];\n //now we need the partners of this type for this deal\n $partner_q = \"select partner_id from \".TP.\"transaction_partners where transaction_id='\".$data_arr['transaction_id'].\"' and partner_type='\".$type.\"'\";\n $partner_q_res = mysql_query($partner_q);\n if(!$partner_q_res){\n return false;\n }\n $num_partners = mysql_num_rows($partner_q_res);\n if($num_partners > 0){\n $partner_adjusted_value_in_billion = $value_in_billion/$num_partners;\n //update all the partners for this deal for this type\n $partner_update_q = \"update \".TP.\"transaction_partners set adjusted_value_in_billion='\".$partner_adjusted_value_in_billion.\"' where transaction_id='\".$data_arr['transaction_id'].\"' and partner_type='\".$type.\"'\";\n $result = mysql_query($partner_update_q);\n if(!$result){\n return false;\n }\n //now that the partners are updated, we need to update the team members for these partners for this deal\n while($partner_q_res_row = mysql_fetch_assoc($partner_q_res)){\n $deal_partner_id = $partner_q_res_row['partner_id'];\n $success = $this->update_deal_team_members_adjusted_value($data_arr['transaction_id'],$deal_partner_id);\n if(!$success){\n return false;\n }\n }\n }\n $validation_passed = true;\n\t\t/*****************************************************\n\t\tsng:15/sep/2011\n\t\t\n\t\tsng:16/nov/2012\n\t\tWe no longer notify the syndicates that their bank/law firm has been added to a deal\n\t\tWe assume that nobody does spurious additions (that requires notification)\n\t\t/********************************************************/\n return true;\n }", "function createPartner() {\n $data = array(\n 'partnerName' => $this->input->post('partnerName'),\n 'partnerLink' => $this->input->post('partnerLink'),\n );\n\t\t\tif ($this->input->post('partnerImg') != \"\"){\n\t\t\t\t$data['partnerImg'] = $this->input->post('file_upload');\n\t\t\t} \n $this->db->insert('partner', $data);\n }", "public function created(Partner $partner)\n {\n //\n }", "function insertPartnerIntoDatabase(\n $entityId,\n $supportType,\n $eventId,\n $package\n ) {\n \n try {\n global $dbh;\n $stmt = $dbh -> prepare('INSERT INTO Partner(id, supportType, event, package)\n VALUES(?, ?, ?, ?);');\n $stmt -> execute(array($entityId, $supportType, $eventId, $package));\n\n } catch(PDOException $e) {\n $err = $e -> getMessage(); \n }\n }", "function insert($i) {\r\n $this->ds->partner_id[$i] = $this->ds->partner_id[$i] == ''? $_SESSION['login_user']: $this->ds->partner_id[$i];\r\n $partner_id = strtoupper($this->ds->partner_id[$i]); # get partner id\r\n $seq_gen = instantiate_module('seq_gen');\r\n $seq_number = $seq_gen->get_next_number('PROJECTID_'.$partner_id);\r\n $seq_number = sprintf('%03d', $seq_number); #zero padded length 3\r\n $this->ds->project_id[$i] = $partner_id.'-'.date('ymd').'-'.$seq_number;\r\n\r\n # set invitation expiration date\r\n $nowunix = time();\r\n $now = date(\"Y-m-d H:i:s\",$nowunix);\r\n $this->ds->create_date[$i] = $now;\r\n $this->ds->po1_exp_date[$i] = date(\"Y-m-d H:i:s\",$nowunix + $this->invitation_duration_po1);\r\n $this->ds->po2_exp_date[$i] = date(\"Y-m-d H:i:s\",$nowunix + $this->invitation_duration_po1 + $this->invitation_duration_po2);\r\n #~ $this->ds->po3_exp_date[$i] = date(\"Y-m-d H:i:s\",$nowunix + $this->invitation_duration_po1 + $this->invitation_duration_po2 + $this->invitation_duration_po3);\r\n $this->ds->po_stage[$i] = 1;\r\n $this->ds->email_cookie[$i] = md5($nowunix);\r\n $this->ds->status[$i] = 'waiting for po1';\r\n\r\n $ret = parent::insert($i);\r\n\r\n # send success email to partner\r\n $partner = instantiate_module('partner');\r\n $row = $partner->get_row(array('partner_id'=>$partner_id));\r\n assert($row);\r\n $row['email'];\r\n\r\n # get email\r\n $h = array();\r\n $h['from'] = $GLOBALS['mail_from'];\r\n $h['to'] = $row['email'];\r\n $h['subject'] = 'Thank you for entering new project';\r\n $h['body'] = <<<__END__\r\nThank you for entering new project. Here are some details:\r\n\r\nRegistration Number: {$this->ds->project_id[$i]}\r\nProject Name: {$this->ds->name[$i]}\r\nTotal: {$this->ds->total[$i]} (in 000 USD)\r\nList Price: {$this->ds->list_price[$i]} (in 000 USD)\r\n\r\nYour project will be reviewed by Cisco personnels, and we will contact you shortly.\r\n\r\n--\r\n admin\r\n\r\n__END__;\r\n #~ print_r($h);\r\n supermailer($h);\r\n\r\n $this->send_invitation('po1',$i);\r\n\r\n return $ret;\r\n }", "public function save()\r\n\t{\r\n\t\tif (!$this->partnerId)\r\n\t\t\treturn false;\r\n\r\n\t\t// Save partnership info\r\n\t\t$data = array(\r\n\t\t\t\"pid\" => $this->partnerId,\r\n\t\t\t\"owner_id\" => $this->ownerId,\r\n\t\t);\r\n\r\n\t\tif ($this->id)\r\n\t\t{\r\n\t\t\t$update = \"\";\r\n\t\t\tforeach ($data as $col=>$val)\r\n\t\t\t{\r\n\t\t\t\tif ($update)\r\n\t\t\t\t\t$update .= \", \";\r\n\t\t\t\t$update .= $col . \"='\" . $this->dbh->Escape($val) . \"'\";\r\n\t\t\t}\r\n\r\n\t\t\t$query = \"UPDATE object_sync_partners SET $update WHERE id='\" . $this->id . \"';\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$flds = \"\";\r\n\t\t\t$vals = \"\";\r\n\r\n\t\t\tforeach ($data as $col=>$val)\r\n\t\t\t{\r\n\t\t\t\tif ($flds)\r\n\t\t\t\t{\r\n\t\t\t\t\t$flds .= \", \";\r\n\t\t\t\t\t$vals .= \", \";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$flds .= $col;\r\n\t\t\t\t$vals .= \"'\" . $this->dbh->Escape($val) . \"'\";\r\n\t\t\t}\r\n\r\n\t\t\t$query = \"INSERT INTO object_sync_partners($flds) VALUES($vals); \r\n\t\t\t\t\t SELECT currval('object_sync_partners_id_seq') as id;\";\r\n\t\t}\r\n\r\n\t\t$result = $this->dbh->Query($query);\r\n\t\tif ($result == false)\r\n\t\t\treturn false;\r\n\r\n\t\tif (!$this->id)\r\n\t\t\t$this->id = $this->dbh->GetValue($result, 0, \"id\");\r\n\r\n\r\n\t\t// Save collections \r\n\t\t$this->saveCollections();\r\n\r\n\t\t// Send the id as confirmation that the partnership has been saved\r\n\t\treturn $this->id;\r\n\t}", "public function ocenture_insert() {\r\n\r\n Logger::log(\"inserting user manually into ocenture\");\r\n require_once( OCENTURE_PLUGIN_DIR . 'lib/Ocenture.php' );\r\n\r\n $ocenture = new Ocenture_Client($this->clientId);\r\n\r\n $params = [\r\n 'args' => [\r\n 'ProductCode' => 'YP83815',\r\n 'ClientMemberID' => 'R26107633',\r\n 'FirstName' => 'Francoise ',\r\n 'LastName' => 'Rannis Arjaans',\r\n 'Address' => '801 W Whittier Blvd',\r\n 'City' => 'La Habra',\r\n 'State' => 'CA',\r\n 'Zipcode' => '90631-3742',\r\n 'Phone' => '(562) 883-3000',\r\n 'Email' => '[email protected]',\r\n 'Gender' => 'Female',\r\n 'RepID' => '101269477',\r\n ]\r\n ];\r\n \r\n Logger::log($params);\r\n $result = $ocenture->createAccount($params);\r\n //if ($result->Status == 'Account Created') \r\n {\r\n $params['args']['ocenture'] = $result;\r\n $this->addUser($params['args']); \r\n }\r\n Logger::log($result);\r\n \r\n }", "public function insert()\n {\n $sql = new Sql();\n $result = $sql->select(\"CALL sp_usuario_insert(:LOGIN, :PASSWORD)\", array(\n \":LOGIN\"=>$this->getDeslogin(),\n \":PASSWORD\"=>$this->getDessenha()\n ));\n\n if(count($result) > 0){\n $row = $result[0];\n $this->setIdusuario($row['idusuario']);\n $this->setDeslogin($row['deslogin']);\n $this->setDessenha($row['dessenha']);\n $this->setDataCadastro(new DateTime($row['dataCadastro']));\n }\n }", "public function insert(){\n\t\t$sql = new Sql();\n\t\t$results = $sql->select(\"CALL sp_insert_usuario(:LOGIN, :PASS)\", array(\n\t\t\t':LOGIN'=>$this->getDeslogin(),\n\t\t\t':PASS'=>$this->getDessenha()\n\t\t));\n\n\t\tif (isset($results[0])) {\n\t\t\t\n\t\t\t$this->setData($results[0]);\n\n\t\t}\n\t}", "public function insertTrainer(){\r\n\t\t\t$objDBConn = DBManager::getInstance();\r\n\t\t\tif($objDBConn->dbConnect()){\r\n\t\t\t\t$qry = \"INSERT INTO trainer (firstname, lastname, username, password) values ('\".$_REQUEST[\"firstname\"]. \"', '\".\r\n\t\t\t\t\t\t$_REQUEST[\"lastname\"]. \"', '\". $_REQUEST[\"username\"]. \"', '\" .$_REQUEST[\"pass\"]. \"');\";\r\n\t\t\t\t$result = mysql_query($qry);\r\n\t\t\t\tif(!$result){\r\n\t\t\t\t\t//echo \" Sorry ! Some fields caused problems\";\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//echo \"Values inserted !\";\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//echo 'Something went wrong ! ';\r\n\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}", "protected function saveInsert()\n {\n }", "function addPartitionInfo() {\n global $connection_production;\n if (isset($_POST['add_partition_info'])) {\n $partition_name = $_POST['partition_name'];\n $partition_alternate_name = $_POST['partition_alternate_name'];\n $partition_type = (int)$_POST['partition_type'];\n $partition_description = $_POST['partition_description'];\n $nine = 9;\n\n if (($partition_name == \"\" || empty($partition_name)) || ($partition_type == \"\" || empty($partition_type))) {\n echo \"<h3 style='color:red;'>name and activity fields can not be empty</h3>\";\n } else {\n\n $sql_partition = \"INSERT INTO `partition` (`partition`, description, partitionTypeId) VALUES (?, ?, ?)\";\n\n $prepared_partition = $connection_production->prepare($sql_partition);\n $prepared_partition->bind_param(\"ssi\", $partition_name, $partition_description, $partition_type);\n $result_partition=$prepared_partition->execute();\n $last_partition_id = $connection_production->insert_id;\n queryCheckProduction($result_partition);\n createUUID('`partition`', $last_partition_id);\n $prepared_partition->close();\n\n if (!!$partition_alternate_name) {\n\n $sql_a_n = \"INSERT INTO alternate_name (alternateName, alternateNameTypeId) VALUES (?, ?)\";\n\n $prepared_a_n = $connection_production->prepare($sql_a_n);\n $prepared_a_n->bind_param(\"si\", $partition_alternate_name, $nine);\n $result_a_n=$prepared_a_n->execute();\n $last_partition_alternate_name_id = $connection_production->insert_id;\n createUUID('alternate_name', $last_partition_alternate_name_id);\n $prepared_a_n->close();\n queryCheckProduction($result_a_n);\n\n $sql_t_a_n = \"INSERT INTO partition_alternate_name_sm (partitionId, alternateNameId) VALUES (?, ?)\";\n\n $prepared_t_a_n = $connection_production->prepare($sql_t_a_n);\n $prepared_t_a_n->bind_param(\"ii\", $last_partition_id, $last_partition_alternate_name_id);\n $result_t_a_n=$prepared_t_a_n->execute();\n $prepared_t_a_n->close();\n queryCheckProduction($result_t_a_n);\n }\n\n $update_string = 'partition name: '.$partition_name.', type: '.$partition_type.' , description: '.$partition_description;\n if (!!$partition_alternate_name) {\n\t\t\t\t\t$update_string .= ', alternate name: '.$partition_alternate_name;\n\t\t\t\t}\n insertChange($_SESSION['account_id'], 'partition', 'add partition', $last_partition_id, $update_string);\n header(\"location: categories.php?source=update_partition&partition_id=\".$last_partition_id);\n }\n }\n }", "protected function fijarSentenciaInsert(){}", "public function inserCompte()\n {\n $username = \"Numherit\";\n $userId = 1;\n $token = $this->utils->getToken($userId);\n\n $nom = $this->utils->securite_xss($_POST['nom']);\n $prenom = $this->utils->securite_xss($_POST['prenom']);\n $adresse = $this->utils->securite_xss($_POST['adresse']);\n $email = $this->utils->securite_xss($_POST['email']);\n $password = $this->utils->generation_code(12);\n $dateNaissance = $this->utils->securite_xss($_POST['datenaiss']);\n $typePiece = $this->utils->securite_xss($_POST['typepiece']);\n $numPiece = $this->utils->securite_xss($_POST['piece']);\n $dateDeliv = $this->utils->securite_xss($_POST['datedelivrancepiece']);\n $telephone = trim(str_replace(\"+\", \"00\", $this->utils->securite_xss($_POST['phone'])));\n $sexe = $this->utils->securite_xss($_POST['sexe']);\n $user_creation = $this->userConnecter->rowid;\n $agence = $this->userConnecter->fk_agence;\n $response = $this->api_numherit->creerCompte($username, $token, $nom, $prenom, $adresse, $email, $password, $dateNaissance, $telephone, $user_creation, $agence, $sexe, $typePiece, $numPiece, $dateDeliv);\n\n $tab = json_decode($response);\n if (is_object($tab)) {\n if ($tab->{'statusCode'} == '000') {\n @$num_transac = $this->utils->generation_numTransaction();\n @$idcompte = $this->utils->getCarteTelephone($telephone);\n @$this->utils->SaveTransaction($num_transac, $service = ID_SERVICE_CREATION_COMPTE, $montant = 0, $idcompte, $user_creation, $statut = 0, 'SUCCESS: CREATION COMPTE', $frais = 0, $agence, 0);\n $true = 'bon';\n $this->utils->log_journal('Creation compte', 'Client:' . $nom . ' ' . $prenom . ' Agence:' . $agence, 'succes', 1, $user_creation);\n $this->rediriger('compte', 'compte/' . base64_encode($true));\n } else {\n $this->utils->log_journal('Creation compte', 'Client:' . $nom . ' ' . $prenom . ' Agence:' . $agence, 'echec', 1, $user_creation);\n $this->rediriger('compte', 'compte/' . base64_encode($tab->{'statusMessage'}));\n }\n }\n }", "public function store(PartnerRequest $request)\n {\n $request->request->add([\n 'code' => Partner::generateSaleCode(),\n ]);\n $request->validate();\n $data = $request->all();\n $partner = Partner::create($data);\n return redirect()->route('admin.partners.index')->withMessage('Партнер \"'.$partner->user->name.'\" создан');\n\n }", "public function addProductsFromPartner($vendorId, $productId, $productName, $productDescription, $productImageUrl, $productPrice){\n\n $query = $this->db->prepare(\"INSERT INTO `products` (`vendor_id`, `ext_product_id`, `product_name`, `product_description`, `product_image_url`, `product_price`) VALUES ( ?, ?, ?, ?, ?, ? ) \");\n\n $query->bindValue(1, $vendorId);\n $query->bindValue(2, $productId);\n $query->bindValue(3, $productName);\n $query->bindValue(4, $productDescription);\n $query->bindValue(5, $productImageUrl);\n $query->bindValue(6, $productPrice);\n\n try {\n\n $query->execute();\n\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "public function signup($data)\n {\n if($this->is_partner()) {\n return true;\n }\n \n if(!isset($data['agree']) || !$data['agree']) {\n throw new Box_Exception('You must agree with terms and conditions of partners program.', null, 8801);\n }\n \n $mod_c = $this->_getConfig();\n if(isset($mod_c['required_balance']) && $mod_c['required_balance']) {\n $client = $this->getApiAdmin()->client_get(array('id'=>$this->client->id));\n if($client['balance'] < $mod_c['required_balance']) {\n throw new Box_Exception('To become a partner you will have to deposit $:amount. This $:amount will be an Advance and will be set off against the licenses you Purchase / Renew. So when you pay this $:amount a Balance will be shown in your account.', array(':amount'=>$mod_c['required_balance']), 8802);\n }\n }\n \n // Check if product must be ordered before activating partners program\n if(isset($mod_c['pid']) && $mod_c['pid']) {\n $pid = $mod_c['pid'];\n $params = array('cid'=>$this->client->id, 'pid'=>$pid, 'status'=>'active');\n $has = R::findOne('client_order', 'client_id = :cid AND product_id = :pid AND status = :status', $params);\n $title = R::getCell('SELECT title FROM product WHERE id = :id', array('id'=>$pid));\n if(!$has) {\n throw new Box_Exception('To become a partner it is required you to order :product', array(':product'=>$title), 8803);\n }\n }\n \n $this->service->createPartner($this->client);\n \n $this->getApiAdmin()->hook_call(array('event'=>'onAfterClientBecomePartner', 'params'=>array('client_id'=>$this->client->id)));\n $this->_log('Client %s signed up for partners program', $this->client->id);\n return true;\n }", "public function store(PartnerCreateRequest $request) {\n $partner = new Partner();\n $partner->name = $request->get('name');\n $partner->link = $request->get('link');\n $partner->logo = get_path($request->get('image'));\n $partner->status = $request->get('status');\n $partner->save();\n return redirect()->route('admin.partner.index');\n }", "public function insert($proveedor);", "public function insertClient($nom, $prenom, $dateN, $email, $telephone, $codeCoupon, $adresseFact, $adresse, $adresse2, $raisonSociale, $siret, $nomSociete, $civ, $idville){\n $this->pdoStatement = $this->pdo->prepare(\"INSERT INTO client\n (nom_client, prenom_client, dateN_client, email_client, tel_client, taux_remise, add_facturation, add1_client, add2_client, raisonS_societe, siret_societe, nomC_societe, id_client_civ, id_client_villecp) VALUES (:nom, :prenom, :dateN, :email, :telephone, :codeCoupon, :adresseFact, :adresse, :adresse2, :raisonSociale, :siret, :nomSociete, :civ, :idville)\");\n\n $this->pdoStatement->bindValue(':nom', $nom, PDO::PARAM_STR);\n $this->pdoStatement->bindValue(':prenom', $prenom, PDO::PARAM_STR);\n $this->pdoStatement->bindValue(':dateN', $dateN, PDO::PARAM_STR);\n $this->pdoStatement->bindValue(':email', $email, PDO::PARAM_STR);\n $this->pdoStatement->bindValue(':telephone', $telephone, PDO::PARAM_STR);\n $this->pdoStatement->bindValue(':codeCoupon', $codeCoupon, PDO::PARAM_INT);\n $this->pdoStatement->bindValue(':adresseFact', $adresseFact, PDO::PARAM_STR);\n $this->pdoStatement->bindValue(':adresse', $adresse, PDO::PARAM_STR);\n $this->pdoStatement->bindValue(':adresse2', $adresse2, PDO::PARAM_STR);\n $this->pdoStatement->bindValue(':raisonSociale', $raisonSociale, PDO::PARAM_STR);\n $this->pdoStatement->bindValue(':siret', $siret, PDO::PARAM_STR);\n $this->pdoStatement->bindValue(':nomSociete', $nomSociete, PDO::PARAM_STR);\n $this->pdoStatement->bindValue(':civ', $civ, PDO::PARAM_INT);\n $this->pdoStatement->bindValue(':idville', $idville, PDO::PARAM_INT);\n $this->pdoStatement->execute();\n\n $inscription = $this->pdoStatement->rowCount();\n return $inscription; \n }", "public function insert($participant) { \r\r\n\r\r\n $query = \"INSERT INTO participant (civility_participant, surname_participant, name_participant, email_participant) VALUES(?,?,?,?)\";\r\r\n\r\r\n try {\r\r\n $this->pdo->beginTransaction(); // Start transaction\r\r\n $qresult = $this->pdo->prepare($query); \r\r\n $qresult->execute(array($participant->getCivility(), $participant->getSurname(), $participant->getName(), $participant->getEmail()));\r\r\n $lastInsertId = $this->pdo->lastInsertId();\r\r\n $this->pdo->commit(); // If all goes well the transaction is validated\r\r\n\r\r\n // $this->pdo = NULL;\r\r\n return ($qresult->rowCount()) ? $lastInsertId : 0; // Returns the last inserted row if insert is OK\r\r\n }\r\r\n catch(Exception $e) // In case of error\r\r\n {\r\r\n // The transaction is cancelled\r\r\n $this->pdo->rollback();\r\r\n\r\r\n // An error message is displayed\r\r\n print 'Tout ne s\\'est pas bien passé, voir les erreurs ci-dessous<br />';\r\r\n print 'Erreur : '.$e->getMessage().'<br />';\r\r\n print 'N° : '.$e->getCode();\r\r\n\r\r\n // Execution of the code is stopped\r\r\n die();\r\r\n }\t\r\r\n }", "function add_client($nom, $prenom, $sexe, $date_naissance, $adresse, $tel_1, $tel_2, $ville, $dept, $cp, $mail, $pays, $id, $mdp ){\n \n $sql = \"INSERT INTO client (nom_client, prenom_client, sexe, date_naissance, adresse_client, tel_1, tel_2, ville_client, dept_client, cp_client, mail_client, pays_client, identifiant, mdp)\n VALUES(\"\n .$this->eq($nom).\",\"\n .$this->eq($prenom).\",\"\n .$this->eq($sexe).\",\"\n .$this->eq($date_naissance).\",\"\n .$this->eq($adresse).\",\"\n .$this->eq($tel_1).\",\"\n .$this->eq($tel_2).\",\"\n .$this->eq($ville).\",\"\n .$this->eq($dept).\",\"\n .$this->eq($cp).\",\"\n .$this->eq($mail).\",\"\n .$this->eq($pays).\",\"\n .$this->eq($id).\",\"\n .$this->eq($mdp).\")\";\n \n $res = $this->pdo->query($sql);\n if(!$res){\n $this->message = \"impossible d'ajouter le client\";\n return false;\n }\n return true;\n \n }", "public function store(StorePartnersRequest $request)\n {\n if (! Gate::allows('partner_create')) {\n return abort(401);\n }\n $partner = Partner::create($request->all());\n\n\n\n return redirect()->route('admin.partners.index');\n }", "function inserisci_provincia($nome_provincia=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$nome_provincia= sistemaTesto($nome_provincia);\n\t$q=\"INSERT INTO provincia (id_provincia, nome) VALUES (null,'$nome_provincia')\";\n\t$r=$db->query($q);\n\t$id=mysql_insert_id();\n\treturn $id;\n}", "public function inserirPartida(){\n $usuari = $_POST[\"usuari\"];\n $ingame = $_POST[\"ingame\"];\n $codiTorneig = $_POST[\"torneig\"];\n\n $sql = \"INSERT INTO partida(idTorneo,participant,ingame)\n VALUES('$codiTorneig','$usuari','$ingame')\";\n\n $this->db->query($sql);\n $num_files = $this->db->affected_rows();\n\n return $num_files;\n }", "public function actionCreate()\n {\n\n if( !Yii::$app->user->identity->userProfile->partner) {\n $model = new Partners();\n $modelUk = new PartnersI18();\n $adresses = new Adresses();\n $adressesUk = new AdressesI18();\n $userProfile = Yii::$app->user->identity->userProfile;\n $status = \\common\\models\\Statuses::find()->where(['status_name' => 'Reseller'])->one();\n\n if ($model->load(Yii::$app->request->post()) && $modelUk->load(Yii::$app->request->post()) &&\n $adresses->load(Yii::$app->request->post()) && $adressesUk->load(Yii::$app->request->post()) && Model::validateMultiple([$model, $modelUk, $adresses, $adressesUk])) {\n\n $userProfile->partner_id = $model->id;\n $userProfile->save(false);\n $model->status_id = $status->id;\n $model->user_id = Yii::$app->user->identity->id;\n $model->save(false);\n $modelUk->partner_id = $model->id;\n $modelUk->save(false);\n $adresses->partner_id = $model->id;\n $adresses->save(false);\n $adressesUk->adress_id = $adresses->id;\n $adressesUk->partnerI18_id = $modelUk->id;\n $adressesUk->save(false);\n\n\n return $this->redirect(['index']);\n } else {\n $model->isVAT = true;\n return $this->render('create', [\n 'model' => $model,\n 'modelUk' => $modelUk,\n 'adresses' => $adresses,\n 'adressesUk' => $adressesUk\n ]);\n }\n\n\n }\n return $this -> redirect(['/user/partner/update', 'id' => Yii::$app->user->identity->userProfile->partner->id]);\n }", "function addCompany() {\n\t\t\t\t\tPartner::create(array( 'name'\t\t =>\t$_POST['inputName'],\n\t\t\t\t\t\t\t\t\t\t\t'city'\t\t =>\t$_POST['inputCity'],\n\t\t\t\t\t\t\t\t\t\t\t'unix_linux' =>\t$_POST['inputUnixLinux'],\n\t\t\t\t\t\t\t\t\t\t\t'sql'\t\t =>\t$_POST['inputSql'],\n\t\t\t\t\t\t\t\t\t\t\t'git'\t\t =>\t$_POST['inputGit'],\n\t\t\t\t\t\t\t\t\t\t\t'wordpress'\t =>\t$_POST['inputWordpress'],\n\t\t\t\t\t\t\t\t\t\t\t'drupal'\t =>\t$_POST['inputDrupal'],\n\t\t\t\t\t\t\t\t\t\t\t'python'\t =>\t$_POST['inputPython'],\n\t\t\t\t\t\t\t\t\t\t\t'svn'\t\t =>\t$_POST['inputSVN'],\n\t\t\t\t\t\t\t\t\t\t\t'objective_c' =>\t$_POST['inputObjectiveC'],\n\t\t\t\t\t\t\t\t\t\t\t'ruby_rails' =>\t$_POST['inputRuby'],\n\t\t\t\t\t\t\t\t\t\t\t'c_plusplus' =>\t$_POST['inputCPlusPlus'],\n\t\t\t\t\t\t\t\t\t\t\t'dot_net'\t =>\t$_POST['inputNet'],\n\t\t\t\t\t\t\t\t\t\t\t'php'\t\t =>\t$_POST['inputPHP'],\n\t\t\t\t\t\t\t\t\t\t\t'html_css'\t =>\t$_POST['inputHtmlCss'],\n\t\t\t\t\t\t\t\t\t\t\t'java'\t\t =>\t$_POST['inputJava'],\n\t\t\t\t\t\t\t\t\t\t\t'javascript' =>\t$_POST['inputJavascript'],\n\t\t\t\t\t\t\t\t\t\t\t'comments'\t =>\t$_POST['inputComments'])\n\t\t\t\t\t);\n\n\t\t\t\t\t$success = new h2o('views/happySuccess.html');\n\t\t\t\t\techo $success->render();\n\t\t\t\t}", "public function insert()\n {\n # code...\n }", "public function Do_insert_Example1(){\n\n\t}", "protected function insert()\n {\n if ($this->validateClient() === false) return false;\n\n $result = sql::insert('clients', 'name, phone', ':name, :phone', \n ['name' => $this->name, 'phone' => $this->phone]\n );\n\n if ($result === false) {\n lib::$return['err'] = 'Ocorreu um erro ao inserir o cliente';\n return false;\n }\n lib::$return['newClient'] = true;\n return true;\n }", "public function insert($loyPrg);", "public static function insert()\n {\n if (isset($_POST['name'], \n $_POST['telephone'],\n $_POST['mobile'],\n $_POST['email'],\n $_POST['clientid'])) {\n ContactDAO::create($_POST['name'], \n $_POST['telephone'],\n $_POST['mobile'],\n $_POST['email'],\n $_POST['clientid']);\n }\n }", "function client_create($first_name, $last_name, $salesperson_id, $email, $phone, $type)\n{\n $conn = db_connect();\n\n // Prepared statement for creating a new client record\n $client_create_stmt = pg_prepare($conn, \"client_create_stmt\", \"\n INSERT INTO clients(first_name, last_name, salesperson_id, email_address, phone_number, type) VALUES (\n '$first_name',\n '$last_name',\n '$salesperson_id',\n '$email',\n '$phone',\n '$type'\n )\n \");\n\n $result = pg_execute($conn, \"client_create_stmt\", array());\n\n // If the new client is successfully created\n if ($result) {\n return true;\n }\n\n // If the new record fails to be inserted\n return false;\n}", "function addTeamToPartition() {\n global $connection_production;\n if (isset($_POST['add_team_partition'])) {\n $post_partition_id_set = $_POST['partition_id_set'];\n $team_id = $_POST['team_id'];\n\n if ($team_id == \"\" || empty($team_id) || !$team_id) {\n echo \"<h3 style='color:red;'>a team id needs to be entered</h3>\";\n } else {\n $stmt_team_franshise_search = \"SELECT DISTINCT franchise.id AS franchise_id, franchise_team_sm.teamId AS team_id FROM franchise\n LEFT JOIN franchise_team_sm ON franchise_team_sm.franchiseId=franchise.id\n WHERE franchise_team_sm.teamId=?\";\n $prepared_team_franshise_search = $connection_production->prepare($stmt_team_franshise_search);\n $prepared_team_franshise_search->bind_param('i', $team_id);\n $prepared_team_franshise_search->execute();\n $result_team_franshise_search = $prepared_team_franshise_search->get_result();\n $prepared_team_franshise_search->close();\n\n if ($result_team_franshise_search->num_rows > 0) {\n $row_team_franshise_search = $result_team_franshise_search->fetch_assoc();\n if ($result_team_franshise_search->num_rows == 1) {\n if (!!$row_team_franshise_search['franchise_id']) {\n $franchise_id = $row_team_franshise_search['franchise_id'];\n\n $sql_partition_franchise = \"INSERT INTO partition_franchise_sm(partitionId, franchiseId) VALUES (?,?)\";\n\n $stmt_partition_franchise = $connection_production->prepare($sql_partition_franchise);\n $stmt_partition_franchise->bind_param(\"ii\", $post_partition_id_set, $franchise_id);\n $stmt_partition_franchise->execute();\n $last_partition_franchise_id = $connection_production->insert_id;\n $stmt_partition_franchise->close();\n\n $update_string = 'partition: '.$post_partition_id_set.' added team partition association id: '.$last_partition_franchise_id.', added team id: '.$team_id;\n insertChange($_SESSION['account_id'], 'partition', 'add team to partition', $post_partition_id_set, $update_string);\n header(\"location: categories.php?source=update_partition&partition_id=\".$post_partition_id_set.\"#add_partition_team\");\n }\n } else if ($result_team_franshise_search->num_rows > 1) {\n echo \"<h3 style='color:red;'>more than one franchise associated with team</h3>\";\n }\n } else {\n echo \"<h3 style='color:red;'>team not found or doesn't have franchise association</h3>\";\n }\n }\n }\n }", "public function insert(personal $personal);", "function insert() {\n\t\t$solic = json_decode($_POST['DATA']);\n\t\t$service = new CompraService();\n\t\tif($service->insert($solic))\n\t\t\thttp_response_code();\n\t\telse\n\t\t\thttp_response_code(500);\n\t}", "public function insert(){\n // Access-controlled resource\n if (!$this->_app->user->checkAccess('uri_drone_insert')){\n $this->_app->notFound();\n }\n // do something here\n }", "public function insert() {\n\t\t$this->insert_user();\n\t}", "public function insert($datos_){\n $id=$datos_->getId();\n$nombre_proyecto=$datos_->getNombre_proyecto();\n$nombre_actividad=$datos_->getNombre_actividad();\n$modalidad_participacion=$datos_->getModalidad_participacion();\n$responsable=$datos_->getResponsable();\n$fecha_realizacion=$datos_->getFecha_realizacion();\n$producto=$datos_->getProducto();\n$semillero_id=$datos_->getSemillero_id()->getId();\n\n try {\n $sql= \"INSERT INTO `datos_`( `id`, `nombre_proyecto`, `nombre_actividad`, `modalidad_participacion`, `responsable`, `fecha_realizacion`, `producto`, `semillero_id`)\"\n .\"VALUES ('$id','$nombre_proyecto','$nombre_actividad','$modalidad_participacion','$responsable','$fecha_realizacion','$producto','$semillero_id')\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }", "public function insert($vendor);", "public function actionCreate()\n\t{\n\t\t$model=new Cooperativepartner;\n\t\tif(isset($_POST['Cooperativepartner']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Cooperativepartner'];\n\t\t\t$model->fCooperativePartnerID=GuidUtil::getUuid();\n\t\t\t$model->fCreateUser=Yii::app()->params->loginuser->fUserName;\n\t\t\t$model->fCreateDate=time();\n\t\t\t$model->fCooperativeCompanyID=$_POST['fCooperativeCompanyID'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->fCooperativePartnerID));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,'EducationLevel'=>adminSettings::$EducationLevel,'Sex'=>adminSettings::$Sex\n\t\t));\n\t}", "function insertUser($nom, $prenom, $villeId) {\n $bdd = coBdd();\n $req = $bdd->prepare('INSERT INTO utilisateur (nom, prenom, villeId) VALUES (:nom, :prenom, :ville)');\n $req->bindParam(\":nom\", $nom);\n $req->bindParam(\":prenom\", $prenom);\n $req->bindParam(\":ville\", $villeId);\n $req->execute();\n}", "public function insert($medAccount);", "function insertId();", "public function createClient($dni){\n $idPeople=$this->getIdPeople($dni);\n /**param::::\n * 1->null auto increment\n */\n\n $var=0; // var autoincrement\n $ruc=\"\";\n $idClient=$this->generateIdClient();\n $sql=\"INSERT INTO client VALUES(?,?,?,?)\";\n $rs=$this->con->prepare($sql);\n $rs->execute(array($var,$idClient->id,$idPeople->id_people,$ruc));\n }", "public function insertAction()\r\n\t{\r\n\t\tif ($this->request->getPost('submit')) {\r\n\t\t\t$name = $this->request->getPost('name');\r\n\t\t\t$phone = $this->request->getPost('phone');\r\n\t\t\t$arrPost = array('name' => $name, 'phone' => $phone);\r\n\t\t\t$room = new Room();\r\n\t\t\tif ($room->save($arrPost)) {\r\n\t\t\t\t$this->response->redirect(\"/users/index\", true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "function insert(){\n\t\t\t$result = $this->consult();\n\t\t\tif(count($result) > 0){\n\t\t\t\t$this->form_data[\"id_paciente\"] = $result[0]->id_paciente;\n\t\t\t\t$this->id_paciente = $result[0]->id_paciente;\n\t\t\t\treturn $this->update();\n\t\t\t}\n\n\t\t\ttry{\n\t\t\t\t$this->db->trans_start();\n\t\t\t\t$this->db->insert('paciente', $this->form_data);\n\t\t\t\t$this->db->trans_complete();\n\t\t\t\treturn array(\"message\"=>\"ok\");\n\t\t\t} catch (Exception $e){\n\t\t\t\treturn array(\"message\"=>\"error\");\n\t\t\t}\n\t\t}", "public function insert(){\n\n }", "function insertarUsuariostribia($refparticipantes,$cantidadaciertos,$intento,$refestados,$refpremios,$puntobonusa,$aciertobonusa,$puntobonusb,$aciertobonusb) {\r\n$sql = \"insert into dbusuariostribia(idusuariotribia,refparticipantes,cantidadaciertos,intento,refestados,refpremios,puntobonusa,aciertobonusa,puntobonusb,aciertobonusb)\r\nvalues ('',\".$refparticipantes.\",\".$cantidadaciertos.\",\".$intento.\",\".$refestados.\",\".$refpremios.\",\".$puntobonusa.\",\".$aciertobonusa.\",\".$puntobonusb.\",\".$aciertobonusb.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function insert()\n {\n }", "public function insert()\n {\n }", "public function run()\n {\n DB::table('partners')->insert([\n ['company_name' => 'escdanang', 'address' => '37-Lê Lợi', 'email' => '[email protected]', 'website' =>'escdanang.com', 'phone' =>'0121334234', 'partnerType_id' => '1']\n ]);\n }", "public function inserir($nome, $email, $endereco, $bairro, $cep, $cpf, $fone) {\n\n //$nome = $_POST[\"txt_nome\"]; // assim já pega os dados mas\n // por questão de segurança recomenda-se usar strip_tags para quebrar as tags e ficar mais seguro\n // usa-se o issset para verificar se o dado existe, senão retorna null\n $nome = isset($_POST[\"txt_nome\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_nome\")) : NULL; // usado para a edição e inserção do cliente\n $email = isset($_POST[\"txt_email\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_email\")) : NULL; // usado para a edição e inserção do cliente\n $endereco = isset($_POST[\"txt_endereco\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_endereco\")) : NULL; // usado para a edição e inserção do cliente\n $bairro = isset($_POST[\"txt_bairro\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_bairro\")) : NULL; // usado para a edição e inserção do cliente\n $cep = isset($_POST[\"txt_cep\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_cep\")) : NULL; // usado para a edição e inserção do cliente\n $cpf = isset($_POST[\"txt_cpf\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_cpf\")) : NULL; // usado para a edição e inserção do cliente\n $fone = isset($_POST[\"txt_fone\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_fone\")) : NULL; // usado para a edição e inserção do cliente\n\n $sql = \"INSERT INTO cliente SET nome = :nome, email = :email, endereco = :endereco, bairro = :bairro, cep = :cep, cpf = :cpf, fone = :fone\";\n $qry = $this->db->prepare($sql); // prepare para os dados externos\n $qry->bindValue(\":nome\", $nome); // comando para inserir\n $qry->bindValue(\":email\", $email); // comando para inserir\n $qry->bindValue(\":endereco\", $endereco); // comando para inserir\n $qry->bindValue(\":bairro\", $bairro); // comando para inserir\n $qry->bindValue(\":cep\", $cep); // comando para inserir\n $qry->bindValue(\":cpf\", $cpf); // comando para inserir\n $qry->bindValue(\":fone\", $fone); // comando para inserir\n $qry->execute(); // comando para executar\n\n return $this->db->lastInsertId(); // retorna o id do ultimo registro inserido\n }", "public function insert($titulos){\n// $id=$titulos->getId();\n$descripcion=$titulos->getDescripcion();\n$universidad_id=$titulos->getUniversidad_id();\n$docente_id=$titulos->getDocente_id()->getId();\n\n try {\n $sql= \"INSERT INTO `titulos`( `descripcion`, `universidad`, `docente_id`)\"\n .\"VALUES ('$descripcion','$universidad_id','$docente_id')\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }", "public abstract function Insert();", "public function testInsertSupplierUsingPOST()\n {\n }", "function create_client()\n {\n $nomeClient = $_POST[\"name\"];\n $phoneClient = $_POST[\"phone\"];\n $adressClient = $_POST[\"adress\"];\n $numberClient = $_POST[\"number\"];\n $otherInfoClient = $_POST[\"other\"];\n\n $conexao = open_database_connection();\n\n $sqlCriar = mysql_query(\"INSERT INTO `project_pizzaria`.`cliente` (`id_cliente`, `nome_cliente`, `telefone_cliente`, `endereco_cliente`, `numero_cliente`, `outras_info`) VALUES (NULL, \n '$nomeClient', '$phoneClient','$enderecoClient','$numberClient','$otherInfoClient' );\");\n\n \n close_database_connection($conexao);\n\n mysqli_query($conexao,$sqlCriar);\n }", "abstract public function insert_id();", "function initPartieBDD() {\n $data = array(\n 'winner' => '',\n 'pierreJ1' => 0,\n 'pierreJ1' => 0,\n 'scoreJ1' => 0,\n 'scoreJ2' => 0\n );\n\n $this->db->insert('partie', $data);\n $insert_id = $this->db->insert_id();\n\n return $insert_id;\n }", "public function insert()\n\t{\n\t\t$crud = $this->crud->data([\n\t\t\t'first_name' => $_POST['first_name'],\n\t\t\t'last_name' => $_POST['last_name'],\n\t\t]);\n\t\t$crud->insert();\n\t\t$this->redirect('crud');\n\t}", "protected function _insert()\n {\n \n }", "protected function _insert()\n {\n \n }", "public function insert($software){\r\n $idSoftware=$software->getIdSoftware();\n$equipo_idEquipo=$software->getEquipo_idEquipo();\n$tipo_Software_idTipo_Software=$software->getTipo_Software_idTipo_Software();\n$fecha_vencimiento=$software->getFecha_vencimiento();\n$version=$software->getVersion();\n$nombre=$software->getNombre();\n\r\n try {\r\n $sql= \"INSERT INTO `software`( `idSoftware`, `Equipo_idEquipo`, `Tipo_Software_idTipo_Software`, `fecha_vencimiento`, `version`, `nombre`)\"\r\n .\"VALUES ('$idSoftware','$equipo_idEquipo','$tipo_Software_idTipo_Software','$fecha_vencimiento','$version','$nombre')\";\r\n return $this->insertarConsulta($sql);\r\n } catch (SQLException $e) {\r\n throw new Exception('Primary key is null');\r\n }\r\n }", "public function additionPart()\n {\n global $dbh;\n $sql = $dbh->prepare(\"INSERT INTO `part`(`companyparta`, `companyparte`, `billnumberpart`, `datebillpart`, `namepcsparta`,\n `namepcsparte`, `nopart`, `pricepart`, `discountpart`, `totalpart`, `notspart`, `idopart`, `deletepart`)\n VALUES ('$this->companyparta' ,'$this->companyparte' ,'$this->billnumberpart' ,'$this->datebillpart' ,'$this->namepcsparta' \n ,'$this->namepcsparte' ,'$this->nopart' ,'$this->pricepart' ,'$this->discountpart' ,'$this->totalpart' ,'$this->notspart' ,'$this->idopart' ,'$this->deletepart')\");\n $result = $sql->execute();\n //$idair = $dbh->lastInsertId();\n ///return array ($result,$idair);\n return $result;\n }", "function ajouter_article($nom,$prix,$quantite,$description,$type){\r\n\tglobal $bdd;\r\n\r\n\t$req=$bdd->prepare('INSERT INTO article(id_article, nom_article, prix_article, quantite_article, description_article,type_article) VALUES (:id_article, :nom_article, :prix_article,:quantite_article, :description_article,:type_article)');\r\n\r\n\t$req->execute(array(\r\n\t\t'id_article'=>'',\r\n\t\t'nom_article'=>$nom,\r\n\t\t'prix_article'=>$prix,\r\n\t\t'quantite_article'=>$quantite,\r\n\t\t'description_article'=>$description,\r\n\t\t'type_article'=>$type));\r\n\r\n}", "abstract public function insertID();", "abstract public function insertId();", "abstract public function insertId();", "abstract public function insertId();", "public function create() {\n // Insert the client in the db\n $db = new Database('cliente');\n $this->id = $db->insert([\n 'name' => $this->name,\n 'address' => $this->address,\n 'zip' => $this->zip,\n 'phone' => $this->phone,\n 'mPhone' => $this->mPhone,\n 'email' => $this->email,\n 'gender' => $this->gender,\n 'obs' => $this->obs,\n ]);\n\n // Return success\n return true;\n }", "public function insert()\n {\n \n }", "public function createCustomerpartnerTable() {\n\t\t// $this->db->query(\"CREATE TABLE IF NOT EXISTS `\".DB_PREFIX .\"customerpartner_commission_manual` (\n\t\t// `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t// `name` varchar(100) NOT NULL,\n\t\t// `fixed` float NOT NULL,\n\t\t// `percentage` float NOT NULL,\n\t\t// PRIMARY KEY (`id`)\n\t\t// ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1\") ;\n\t\t\n\t\t// Table structure for table `customerpartner_commission_category`\n\t\t$this->db->query ( \"CREATE TABLE IF NOT EXISTS `\" . DB_PREFIX . \"customerpartner_commission_category` (\n\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t `category_id` int(100) NOT NULL,\n\t\t `fixed` float NOT NULL,\n\t\t `percentage` float NOT NULL,\t\t \n\t\t PRIMARY KEY (`id`)\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1\" );\n\t\t\n\t\t// Table structure for table `customerpartner_to_customer`\n\t\t$this->db->query ( \"CREATE TABLE IF NOT EXISTS `\" . DB_PREFIX . \"customerpartner_to_customer` (\n\t\t `customer_id` int(11) NOT NULL,\n\t\t `is_partner` int(1) NOT NULL,\n\t\t `screenname` varchar(255) NOT NULL,\n\t\t `gender` varchar(255) NOT NULL,\n\t\t `shortprofile` text NOT NULL,\n\t\t `avatar` varchar(255) NOT NULL,\n\t\t `twitterid` varchar(255) NOT NULL,\n\t\t `paypalid` varchar(255) NOT NULL,\n\t\t `country` varchar(255) NOT NULL,\n\t\t `facebookid` varchar(255) NOT NULL,\n\t\t `backgroundcolor` varchar(255) NOT NULL,\n\t\t `companybanner` varchar(255) NOT NULL,\n\t\t `companylogo` varchar(255) NOT NULL,\n\t\t `companylocality` varchar(255) NOT NULL,\n\t\t `companyname` varchar(255) NOT NULL,\n\t\t `companydescription` text NOT NULL,\n\t\t `countrylogo` varchar(1000) NOT NULL,\n\t\t `otherpayment` text NOT NULL,\n\t\t `commission` decimal(10,2) NOT NULL,\n\t\t PRIMARY KEY (`customer_id`)\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1\" );\n\t\t\n\t\t// Table structure for table `customerpartner_to_commission`\n\t\t$this->db->query ( \"CREATE TABLE IF NOT EXISTS `\" . DB_PREFIX . \"customerpartner_to_commission` (\n\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t `customer_id` int(100) NOT NULL,\n\t\t `commission_id` int(100) NOT NULL,\t\t \n\t\t `fixed` float NOT NULL,\n\t\t `percentage` float NOT NULL,\t\t \n\t\t PRIMARY KEY (`id`)\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1\" );\n\t\t\n\t\t// Table structure for table `customerpartner_customer_group`\n\t\t$this->db->query ( \"CREATE TABLE IF NOT EXISTS `\" . DB_PREFIX . \"customerpartner_customer_group` (\n\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t `rights` varchar(100) NOT NULL,\n\t\t `isParent` int(11) NOT NULL,\t\t \n\t\t `status` varchar(10) NOT NULL,\n\t\t PRIMARY KEY (`id`)\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1\" );\n\t\t\n\t\t// Table structure for table `customerpartner_customer_group_name`\n\t\t$this->db->query ( \"CREATE TABLE IF NOT EXISTS `\" . DB_PREFIX . \"customerpartner_customer_group_name` (\n\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t `customer_group_id` int(11) NOT NULL,\n\t\t `language_id` int(11) NOT NULL,\t\t \n\t\t `name` varchar(100) NOT NULL,\n\t\t `description` varchar(500) NOT NULL,\n\t\t PRIMARY KEY (`id`)\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1\" );\n\t\t\n\t\t// Table structure for table `customerpartner_order_review`\n\t\t$this->db->query ( \"CREATE TABLE IF NOT EXISTS `\" . DB_PREFIX . \"customerpartner_order_review` (\n\t\t `order_review_id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t `customer_id` int(11) NOT NULL,\n\t\t `admin_id` int(11) NOT NULL,\t\t \n\t\t `customer_cart` text NOT NULL,\n\t\t `approve_cart` text NOT NULL,\n\t\t `disapprove_cart` text NOT NULL,\n\t\t `status` text NOT NULL,\n\t\t PRIMARY KEY (`order_review_id`)\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1\" );\n\t\t\n\t\t// Table structure for table `customerpartner_seller_customer_mapping`\n\t\t$this->db->query ( \"CREATE TABLE IF NOT EXISTS `\" . DB_PREFIX . \"customerpartner_seller_customer_mapping` (\n\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t `seller_id` int(11) NOT NULL,\n\t\t `customer_id` int(11) NOT NULL,\t\t \n\t\t `status` varchar(10) NOT NULL,\n\t\t PRIMARY KEY (`id`)\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1\" );\n\t\t\n\t\t// Table structure for table `customerpartner_to_product`\n\t\t$this->db->query ( \"CREATE TABLE IF NOT EXISTS `\" . DB_PREFIX . \"customerpartner_to_product` (\n\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t `customer_id` int(100) NOT NULL,\n\t\t `product_id` int(100) NOT NULL,\n\t\t `price` float NOT NULL,\n\t\t `quantity` int(100) NOT NULL,\t \n\t\t PRIMARY KEY (`id`)\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1\" );\n\t\t\n\t\t// Table structure for table `customerpartner_feedbacks`\n\t\t$this->db->query ( \"CREATE TABLE IF NOT EXISTS `\" . DB_PREFIX . \"customerpartner_to_feedback` (\n\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t `customer_id` smallint(6) NOT NULL,\n\t\t `seller_id` smallint(6) NOT NULL,\n\t\t `feedprice` smallint(6) NOT NULL,\n\t\t `feedvalue` smallint(6) NOT NULL,\n\t\t `feedquality` smallint(6) NOT NULL,\n\t\t `nickname` varchar(255) NOT NULL,\n\t\t `summary` text NOT NULL,\n\t\t `review` text NOT NULL,\n\t\t `createdate` datetime NOT NULL,\n\t\t PRIMARY KEY (`id`)\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1\" );\n\t\t\n\t\t// Table structure for table `customerpartner_orders`\n\t\t$this->db->query ( \"CREATE TABLE IF NOT EXISTS `\" . DB_PREFIX . \"customerpartner_to_order` (\n\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t `order_id` int(11) NOT NULL,\n\t\t `customer_id` int(11) NOT NULL,\t\t \n\t\t `product_id` int(11) NOT NULL,\n\t\t `order_product_id` int(100) NOT NULL,\n\t\t `price` float NOT NULL,\n\t\t `quantity` float(11) NOT NULL,\n\t\t `shipping` varchar(255) NOT NULL,\n\t\t `shipping_rate` float NOT NULL, \n\t\t `payment` varchar(255) NOT NULL,\n\t\t `payment_rate` float NOT NULL, \n\t\t `admin` float NOT NULL, \t\n\t\t `customer` float NOT NULL,\t\t \t \n\t\t `details` varchar(255) NOT NULL,\n\t\t `paid_status` tinyint(1) NOT NULL,\n\t\t `date_added` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',\n\t\t PRIMARY KEY (`id`) \n\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1\" );\n\t\t\n\t\t// Table structure for table `customerpartner_transaction`\n\t\t$this->db->query ( \"CREATE TABLE IF NOT EXISTS `\" . DB_PREFIX . \"customerpartner_to_transaction` (\n\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t `customer_id` int(11) NOT NULL,\n\t\t `order_id` varchar(500) NOT NULL,\n\t\t `order_product_id` varchar(500) NOT NULL,\n\t\t `amount` float NOT NULL,\n\t\t `text` varchar(255) NOT NULL,\n\t\t `details` varchar(255) NOT NULL,\n\t\t `date_added` date NOT NULL DEFAULT '0000-00-00',\n\t\t PRIMARY KEY (`id`)\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1\" );\n\t\t\n\t\t// Table structure for table `customerpartner_payment`\n\t\t$this->db->query ( \"CREATE TABLE IF NOT EXISTS `\" . DB_PREFIX . \"customerpartner_to_payment` (\n\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t `customer_id` int(11) NOT NULL,\t\t \n\t\t `amount` float NOT NULL,\n\t\t `text` varchar(255) NOT NULL,\n\t\t `details` varchar(255) NOT NULL,\n\t\t `request_type` varchar(255) NOT NULL,\n\t\t `paid` int(10) NOT NULL,\n\t\t `balance_reduced` int(10) NOT NULL,\n\t\t `payment` varchar(255) NOT NULL,\n\t\t `date_added` date NOT NULL DEFAULT '0000-00-00',\n\t\t `date_modified` date NOT NULL DEFAULT '0000-00-00',\n\t\t `added_by` varchar(255) NOT NULL,\n\t\t PRIMARY KEY (`id`)\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1\" );\n\t\t\n\t\t// Table structure for table `customerpartner_download\n\t\t$this->db->query ( \"CREATE TABLE IF NOT EXISTS \" . DB_PREFIX . \"customerpartner_download (\n\t\t `download_id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t `seller_id` int(11) NOT NULL,\n\t\t PRIMARY KEY (`download_id`)\t\t \n\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\" );\n\t\t\n\t\t// Table structure for table `customerpartner_flatshipping\n\t\t$this->db->query ( \"CREATE TABLE IF NOT EXISTS \" . DB_PREFIX . \"customerpartner_flatshipping (\n\t\t\t`id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t`partner_id` int(11) NOT NULL,\n\t\t\t`amount` float,\n\t\t\t`tax_class_id` float NOT NULL,\n\t\t\tPRIMARY KEY (`id`)\n\t\t)\" );\n\t\t\n\t\t// Table structure for table `customerpartner_shipping\n\t\t$this->db->query ( \"CREATE TABLE IF NOT EXISTS \" . DB_PREFIX . \"customerpartner_shipping (\n `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,\n `seller_id` int(10) NOT NULL ,\n `country_code` varchar(100) NOT NULL ,\n `zip_to` varchar(100) NOT NULL ,\n `zip_from` varchar(100) NOT NULL ,\n `price` float NOT NULL ,\n `weight_from` float NOT NULL ,\n `weight_to` float NOT NULL , \n PRIMARY KEY (`id`) ) DEFAULT CHARSET=utf8 ;\" );\n\t\t\n\t\t// Table structure for table `customerpartner_sold_tracking\n\t\t$this->db->query ( \"CREATE TABLE IF NOT EXISTS \" . DB_PREFIX . \"customerpartner_sold_tracking (\n\t\t\t`product_id` int(11) NOT NULL,\n\t\t\t`order_id` int(11) NOT NULL, \n\t\t\t`customer_id` int(11) NOT NULL,\n\t\t\t`date_added` date NOT NULL DEFAULT '0000-00-00', \n\t\t\t`tracking` varchar(100) NOT NULL)\" );\n\t\t\n\t\t// Table structure for table `customerpartner_mail`\n\t\t$this->db->query ( \"CREATE TABLE IF NOT EXISTS `\" . DB_PREFIX . \"customerpartner_mail` (\n\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t `name` varchar(100) NOT NULL,\n\t\t `subject` varchar(1000) NOT NULL,\t \n\t\t `message` varchar(5000) NOT NULL,\t \n\t\t PRIMARY KEY (`id`)\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1\" );\n\t}", "public function insert() {\n \n }", "public function insertEstudiante_post() {\n\t\t$nombre = $this->input->post(\"txtNombre\");\n\t\t$apellido = $this->input->post(\"txtApellido\");\n\t\t$carrera = $this->input->post(\"txtCarrera\");\n $carnet = $this->input->post(\"txtCarnet\");\n $pass = $this->input->post(\"txtPassword\");\n\n\t\t//mandar los input a arreglo y campos de la bd\n\t\t$data = array(\n\t\t\t'nombre' => $nombre ,\n\t\t\t'apellido' => $apellido ,\n\t\t\t'carrera'=>$carrera,\n 'carnet'=>$carnet,\n 'password'=>$pass,\n\t\t );\n\n if($this->EstudianteModel->insertEstudiante($data))\n $this->response(array('status' => 'exito'));\n else \n $this->response(array('status' => 'fallo'));\n }", "function insert_new_klient() {\n $nazev = isset($_POST['nazev']) ? htmlspecialchars($_POST['nazev']) : \"\";\n $kontakt = isset($_POST['kontakt']) ? htmlspecialchars($_POST['kontakt']) : \"\";\n $email = isset($_POST['email']) ? htmlspecialchars($_POST['email']) : \"\";\n $telefon = isset($_POST['telefon']) ? htmlspecialchars($_POST['telefon']) : \"\";\n $states = isset($_POST['states']) ? $_POST['states'] : \"0\";\n $poznamka = isset($_POST['poznamka']) ? htmlspecialchars($_POST['poznamka']) : \"\";\n\n include_once(\"app/class/DBClass.php\");\n $myModel = new DBClass;\n $data .= $myModel->insertNewCustomer($nazev, $kontakt, $email, $telefon, $states, $poznamka);\n\n header('Location: index.php?action=klienti');\n}", "public function actionSave()\n {\n try {\n $ref = Yii::app()->request->getParam('ref');\n\n $name = Yii::app()->request->getParam('name');\n\n $collection = Yii::app()->mongo->getCollection('partners');\n $partner = $collection->find()->byRef($ref)->findOne();\n\n if (!$partner) {\n $partner = $collection->createDocument();\n $partner->setRef($ref);\n }\n\n if ($name) {\n $partner->setName($name);\n }\n\n $collection->saveDocument($partner);\n $this->response->successMessage = _('Saved successfully');\n\n } catch(\\Sokil\\Mongo\\Document\\Exception\\Validate $e) {\n $this->response->invalidated = $e->getDocument()->getErrors();\n $this->response->raiseError();\n } catch (\\Exception $e) {\n $this->response->raiseError($e);\n }\n $this->response->sendJson();\n }", "public function run()\n {\n Intern::create([\n 'id_partner'=>1,\n 'id_lecturer'=>1\n ]);\n }", "public function insertar($objeto){\r\n\t}", "public function insert_people($id_reserve, $name, $lastname, $comment, $type){\n $query=\"INSERT INTO `\".DB_PREFIX.\"people` (`id`,\n\t\t\t\t\t\t\t\t\t\t\t\t`id_reserve` ,\n\t\t\t\t\t\t\t\t\t\t\t\t`name` ,\n\t\t\t\t\t\t\t\t\t\t\t\t`lastname` ,\n\t\t\t\t\t\t\t\t\t\t\t\t`passport` ,\n\t\t\t\t\t\t\t\t\t\t\t\t`type`)\n \t\t\t\t\tVALUES ( NULL ,'\".$this->link->myesc($id_reserve).\"','\".$this->link->myesc($name).\"','\".$this->link->myesc($lastname).\"','\".$this->link->myesc($comment).\"','\".$this->link->myesc($type).\"')\";\n $result = $this->link->execute($query);\n return $result;\n\t}", "public function SaveCharityPartner() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->txtName) $this->objCharityPartner->Name = $this->txtName->Text;\n\t\t\t\tif ($this->txtDescription) $this->objCharityPartner->Description = $this->txtDescription->Text;\n\t\t\t\tif ($this->txtStreet) $this->objCharityPartner->Street = $this->txtStreet->Text;\n\t\t\t\tif ($this->txtCity) $this->objCharityPartner->City = $this->txtCity->Text;\n\t\t\t\tif ($this->txtState) $this->objCharityPartner->State = $this->txtState->Text;\n\t\t\t\tif ($this->txtZipcode) $this->objCharityPartner->Zipcode = $this->txtZipcode->Text;\n\t\t\t\tif ($this->txtPhone) $this->objCharityPartner->Phone = $this->txtPhone->Text;\n\t\t\t\tif ($this->txtEmail) $this->objCharityPartner->Email = $this->txtEmail->Text;\n\t\t\t\tif ($this->txtContactPerson) $this->objCharityPartner->ContactPerson = $this->txtContactPerson->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the CharityPartner object\n\t\t\t\t$this->objCharityPartner->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t\t$this->lstUsersAsCharity_Update();\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "public static function Insert(){\r\n }", "public function participant_save($data_partcipant = array()) \n {\n $query = $this->db->insert($this->participants,$data_partcipant);\n if($query)\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "public function getPartnerId()\n {\n return $this->partner_id;\n }", "public function getPartnerId()\n {\n return $this->partner_id;\n }", "public function insert() {\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\r\n\t\t\t$ks_db->beginTransaction ();\r\n\t\t\t\r\n\t\t\t$arrBindings = array ();\r\n\t\t\t$insertCols = '';\r\n\t\t\t$insertVals = '';\r\n\t\t\t\r\n\t\t\tif (isset ( $this->userid )) {\r\n\t\t\t\t$insertCols .= \"lp_userid, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->userid;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->random )) {\r\n\t\t\t\t$insertCols .= \"lp_random, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->random;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->deadline )) {\r\n\t\t\t\t$insertCols .= \"lp_deadline, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->deadline;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//remove trailing commas\r\n\t\t\t$insertCols = preg_replace(\"/, $/\", \"\", $insertCols);\r\n\t\t\t$insertVals = preg_replace(\"/, $/\", \"\", $insertVals);\r\n\t\t\t\r\n\t\t\t$sql = \"INSERT INTO $this->sqlTable ($insertCols)\";\r\n\t\t\t$sql .= \" VALUES ($insertVals)\";\r\n\t\t\t\r\n\t\t\t$ks_db->query ( $sql, $arrBindings );\r\n\r\n\t\t\t//set the id property\r\n\t\t\t$this->id = $ks_db->lastInsertId();\r\n\t\t\t\r\n\t\t\t$ks_db->commit ();\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_db->rollBack ();\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}", "public function inserir()\n {\n }", "public function addtrajet(Trajet $trajet)\r\n{\r\n\t try\r\n {\r\n $stmt = $this->_db->prepare(\"INSERT INTO Trajet(Type,Num_Ville1,Num_Ville2,Date_aller,Date_retour,Heure_aller,Heure_retour,Prix,Nombre_place,ID_conducteur,Description) \r\n VALUES(:type, :num_ville1, :num_ville2, :date_aller, :date_retour, :heure_aller, :heure_retour, :prix, :nombre_place,:id_conducteur,:description)\");\r\n\t\t $stmt->bindValue(\":type\", $trajet->type());\r\n\t\t $stmt->bindValue(\":num_ville1\", $trajet->num_ville1());\r\n $stmt->bindValue(\":num_ville2\", $trajet->num_ville2());\r\n $stmt->bindValue(\":date_aller\",$trajet->date_aller()); \r\n\t\t $stmt->bindValue(\":date_retour\",$trajet->date_retour());\r\n $stmt->bindValue(\":heure_aller\", $trajet->heure_aller());\r\n $stmt->bindValue(\":heure_retour\",$trajet->heure_retour());\r\n\t\t $stmt->bindValue(\":prix\",$trajet->prix());\r\n\t\t $stmt->bindValue(\":nombre_place\",$trajet->nombre_place());\r\n\t\t $stmt->bindValue(\":id_conducteur\",$trajet->id_conducteur()); \r\n\t\t $stmt->bindValue(\":description\",$trajet->description()); \r\n $stmt->execute(); \r\n\t\t $trajet->hydrate(array('num_trajet' => $this->_db->lastInsertId()));\r\n \r\n return true; \r\n }\r\n catch(PDOException $e)\r\n {\r\n echo $e->getMessage();\r\n } \r\n }", "protected function _insert()\n\t{\n\t}", "public abstract function insert();", "function addEntityToPartition() {\n global $connection_production;\n if (isset($_POST['add_entity_partition'])) {\n $post_partition_id_set = $_POST['partition_id_set'];\n $entity_id = $_POST['entity_id'];\n $partition_found = false;\n\n $get_partition_sql = \"SELECT DISTINCT entity_activity_sm_partition_sm.partitionId AS p_id FROM entity_activity_sm_partition_sm\n\t\t\t\tLEFT JOIN entity_activity_sm ON entity_activity_sm_partition_sm.entityActivitySmId = entity_activity_sm.id\n\t\t\t\tLEFT JOIN entity ON entity.id = entity_activity_sm.entityId\n\t\t\t\tWHERE entity.id=?\";\n\n $get_partition_stmt = $connection_production->prepare($get_partition_sql);\n $get_partition_stmt->bind_param(\"i\", $entity_id);\n $get_partition_stmt->execute();\n $get_partition_result = $get_partition_stmt->get_result();\n $get_partition_stmt->close();\n\n if ($get_partition_result->num_rows > 0) {\n while ($row_partition = $get_partition_result->fetch_assoc()) {\n if ($row_partition['p_id'] == $post_partition_id_set) {\n $partition_found = true;\n break;\n }\n }\n } else {\n $partition_found = false;\n }\n\n if ($partition_found == false) {\n\n $get_entity_activity_sql = \"SELECT DISTINCT entity_activity_sm.id AS e_a_sm_id FROM entity\n\t\t\t\t\tLEFT JOIN entity_activity_sm ON entity_activity_sm.id = entity.id\n\t\t\t\t\tWHERE entity.id=?\";\n\n $get_entity_activity_stmt = $connection_production->prepare($get_entity_activity_sql);\n $get_entity_activity_stmt->bind_param(\"i\", $entity_id);\n $get_entity_activity_stmt->execute();\n $get_entity_activity_result = $get_entity_activity_stmt->get_result();\n $row_entity_activity_result = $get_entity_activity_result->fetch_assoc();\n $get_entity_activity_stmt->close();\n $e_a_sm_id = $row_entity_activity_result['e_a_sm_id'];\n\n $sql_entity_activity_sm_partition_sm = \"INSERT INTO entity_activity_sm_partition_sm(partitionId, entityActivitySmId) VALUES (?,?)\";\n\n $stmt_entity_activity_sm_partition_sm = $connection_production->prepare($sql_entity_activity_sm_partition_sm);\n $stmt_entity_activity_sm_partition_sm->bind_param(\"ii\", $post_partition_id_set, $e_a_sm_id);\n $stmt_entity_activity_sm_partition_sm->execute();\n $last_entity_activity_sm_partition_sm = $connection_production->insert_id;\n $stmt_entity_activity_sm_partition_sm->close();\n\n $update_string = 'partition: '.$post_partition_id_set.' added entity activity parition association id: '.$last_entity_activity_sm_partition_sm.', added entity id: '.$entity_id;\n insertChange($_SESSION['account_id'], 'partition', 'add entity', $post_partition_id_set, $update_string);\n header(\"location: categories.php?source=update_partition&partition_id=\".$post_partition_id_set.\"#add_partition_entity\");\n } else {\n echo \"<h3 style='color:red;'>entity id: \".$entity_id.\" - already associated</h3>\";\n }\n }\n }", "function i4_lms_insert_coordinator($name, $email, $course_id, $img_url) {\n global $wpdb;\n $table_name = $wpdb->prefix . 'i4_lms_coordinators';\n\n $result = $wpdb->query($wpdb->prepare(\n \"\n \t\tINSERT INTO $table_name\n \t\t( coordinator_name, coordinator_email, course_id, coordinator_img )\n \t\tVALUES ( %s, %s, %s, %s )\n \t\",\n $name,\n $email,\n $course_id,\n $img_url\n ));\n\n return $result;\n }", "public function savePartnerAction(Request $request)\n {\n $em = $this->getDoctrine()->getManager();\n $errors = null;\n $type = $request->get('typeForm');\n\n if($type == 1)\n {\n $entity = new DataEmpresa();\n $form = $this->createForm(new PartnerType(), $entity);\n $form->handleRequest($request);\n }else{\n $entity = new DataLegal();\n $form = $this->createForm(new PartnerLegalType(), $entity);\n $form->handleRequest($request);\n }\n\n\n if($form->isValid())\n {\n try {\n\n $partnerId = $request->get('partnerId');\n\n if($partnerId == 0)\n {\n $cId = $request->get('c_id');\n }else\n {\n $parentId = $request->get('parentId');\n\n if($parentId == 0)\n $cId = $request->get('c_id');\n else\n $cId = $request->get('p_id');\n\n }\n\n $cmp = $em->getRepository(\"CentrohipicoBundle:DataEmpresa\")->findOneBy(array(\"id\" => $cId));\n\n if($type == 1)\n {\n $user = $this->getUser();\n $entity->setPersJuridica($request->get('pers_juridicaPartner'));\n $entity->setRif($request->get('rifPartner'));\n $entity->setUsuario($user);\n $entity->setPadre($cmp);\n $entity->setFechaRegistro(new \\DateTime());\n $em->persist($entity);\n $em->flush();\n }else{\n $entity->setPersJuridica($request->get('pers_juridicaPartner'));\n $entity->setRif($request->get('rifPartner'));\n $entity->setEmpresa($cmp);\n $entity->setIsSocio(true);\n $entity->setFechaRegistro(new \\DateTime());\n $entity->setStatus(\"Activo\");\n $em->persist($entity);\n $em->flush();\n }\n\n } catch (Exception $e) {\n $errors = $this->getFormErrors($form);\n }\n }else{\n $errors = $this->getFormErrors($form);\n }\n\n return new JsonResponse(array('status' => true, 'errors' => $errors, 'p_id' => $entity->getId()));\n }", "abstract public function InsertId();", "function insert() {\n\t\t$insert = \"INSERT INTO servicios(nombre_servicio, estado_servicio, descripcion, trabajador_id, fecha_creacion,fecha_modificacion , cliente_id, sucursal_id) VALUES(\n\t\t\t\t\n\t\t\t\t'\".$this->nombre_servicio.\"',\n\t\t\t\t'\".$this->estado_servicio.\"',\n\t\t\t\t'\".$this->descripcion.\"',\n\t\t\t\t'\".$this->trabajador_id.\"',\n\t\t\t\t'\".$this->fecha_creacion.\"',\n\t\t\t\t'\".$this->fecha_modificacion.\"',\n\t\t\t\t'\".$this->cliente_id.\"',\n\t\t\t\t'\".$this->sucursal_id.\"');\";\n\t\t\n\t\treturn $insert;\n\t\n\t}", "public static function add($entreprise){\n $con=new connexion();\n $resultat=$con->executeactualisation(\"insert into tblentreprise (id_entreprise,admin_id,nom,logo,ville_id,adresse_complete,etat,date_ajout,date_modifier)\n values('\" . $entreprise->ident . \"','\" . $entreprise->adminid . \"','\" . $entreprise->nom . \"','\" . $entreprise->logo . \"','\" . $entreprise->villeid . \"','\" . $entreprise->adressecomp . \"',1,NOW(),NOW())\");\n $con->closeconnexion();\n\n }", "public function insert($producto);", "public function insert(Persona $persona);", "function ajouter_client($bdd, $client) {\n $req = $bdd->prepare('INSERT INTO users(name, email, adress, postal_code, city) \n VALUES(:name, :email, :adress, :postal_code, :city)');\n $req->execute(array(\n 'name' => $client[0],\n 'email' => $client[1],\n 'adress' => $client[2],\n 'postal_code' => $client[3],\n 'city' => $client[4]\n ));\n echo \"Le client \".$client[0].\" a bien été ajouté !\";\n}", "function add_entretien($params)\n {\n $this->db->insert('tb_bm_entretiens',$params);\n return $this->db->insert_id();\n }", "function submitClient($conn, $firstName, $lastName, $company, $address, $city){\n\n\t$sql = \"INSERT INTO client (PMFirstName, PMLastName, CompanyName, City, Address) VALUES (:firstName, :lastName, :company, :city, :address)\";\t\n\t$sth = $conn->prepare($sql);\n\n\t\n\t$sth->bindParam(':firstName', $firstName, PDO::PARAM_STR, 45);\n\t$sth->bindParam(':lastName', $lastName, PDO::PARAM_STR, 45);\n\t$sth->bindParam(':company', $company, PDO::PARAM_STR, 45);\n\t$sth->bindParam(':city', $city, PDO::PARAM_STR, 45);\n\t$sth->bindParam(':address', $address, PDO::PARAM_STR, 45);\n\t\n\t$sth->execute();\n\t$sth->closeCursor();\n\t\n\t\n\t\n\t$return = ['message' => 'Successfully added the client'];\n\treturn $return;\n}" ]
[ "0.69005585", "0.6809805", "0.6563874", "0.65374297", "0.6372097", "0.6287225", "0.6282565", "0.6110784", "0.6109902", "0.6103865", "0.6040172", "0.60077983", "0.59547687", "0.5926165", "0.59252036", "0.5924226", "0.5904729", "0.5887969", "0.5864096", "0.58332485", "0.5829831", "0.58243227", "0.58238846", "0.58179426", "0.5776312", "0.5741024", "0.5732553", "0.5727207", "0.5724081", "0.5720408", "0.57141024", "0.57116956", "0.5710169", "0.57070374", "0.5695309", "0.5682787", "0.56793386", "0.5676393", "0.5675468", "0.5669487", "0.5663127", "0.56598073", "0.5652732", "0.56506884", "0.5634581", "0.5626884", "0.56232226", "0.56207997", "0.5615597", "0.5615482", "0.5615482", "0.56101", "0.55963486", "0.5594528", "0.55902034", "0.55875856", "0.5585674", "0.5582369", "0.55814487", "0.5572592", "0.5570322", "0.5570322", "0.55685014", "0.55649066", "0.5562748", "0.5558494", "0.555789", "0.555789", "0.555789", "0.55532026", "0.5551809", "0.55430484", "0.55403423", "0.5537198", "0.5535075", "0.5531411", "0.5528331", "0.55262184", "0.552463", "0.5522745", "0.55197257", "0.55144817", "0.5513008", "0.5513008", "0.55128175", "0.55118716", "0.5507964", "0.5505342", "0.5499431", "0.54950166", "0.5493978", "0.54925805", "0.54917264", "0.5486862", "0.5486147", "0.5484798", "0.5483733", "0.54673004", "0.54657406", "0.5453959" ]
0.6494465
4
/ name: checkPartnerCode params: PartnerCode return: desc: check if PartnerCode already exists
public static function checkPartnerCode($code){ $status = array('stat'=>'error', 'msg'=>'Something went wrong'); $ports = array(); $ports = DB::table('sb24_partnercode')->where('code', strtoupper($code) )->select('id')->orderBy ('id', 'desc')->take(1)->get(); if(count($ports)>0){ $status = array('stat'=>'error', 'msg'=>'Code already exists'); } else { $status = array('stat'=>'ok', 'msg'=>''); } return $status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_partner() {\n global $_REQUEST;\n global $sess;\n global $config;\n if (! eregi(\"^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$\",$_REQUEST['partner_id'])) { // czy format partner_id OK\n return false;\n } else $partner_id=$_REQUEST['partner_id'];\n \n if (! eregi(\"^[0-9A-Za-z]+$\",$_REQUEST['code'])) { // czy format code OK\n return false;\n } else $code=$_REQUEST['code'];\n \n // sprawdz czy mamy takiego partnera w bazie\n include_once(\"include/metabase.inc\");\n $database = new my_Database;\n $check_id=$database->sql_select(\"id\",\"partners\",\"partner_id=$partner_id\");\n if (empty($check_id)) {\n return false;\n }\n // sprawdz czy zgadza sie suma kontrolna code\n $my_code=md5(\"partner_id.$partner_id.$config->salt\"); // prawidlowy kod kontrolny\n if ($code!=$my_code) {\n return false;\n }\n \n return $partner_id;\n \n }", "public function is_exists($code)\n {\n $ext = $this->receive_po_request_model->is_exists($code);\n if($ext)\n {\n echo 'เลขที่เอกสารซ้ำ';\n }\n else\n {\n echo 'not_exists';\n }\n }", "private function _checkPartner()\n {\n if(!$this->service->isPartner($this->client)) {\n throw new Box_Exception('You have not signed up for partners program.');\n }\n \n $partner = $this->service->getPartner($this->client);\n if($partner->status != 'active') {\n throw new Box_Exception('Your partner account is currently not active.');\n }\n }", "public function check_key($code){\n\t\t$type = 'part_style';\n\t\t$id = X::Request('id');\n\t\t$code = X::Request('code');\n\t\t$partType = X::Request('part_type');\n\n\t\t$pk = $this->{$type}->primary_key;\n\n\t\t$w = array();\n\n\t\t$cnt = 0;\n\n\t\t// case update\n\t\tif(!empty($id)){\n\n\t\t\t$w['code'] = $code;\n\t\t\t$w[$pk.' !='] = $id;\n\n\t\t} else { // case insert\n\t\t\t$w['code'] = $code;\n\t\t}\n\t\t$w['part_type'] = $partType;\n\n\t\t$cnt = $this->{$type}->count_by($w);\n\n\t\t//echo $this->{$type}->_database->last_query();\n\n\t\tif($cnt>0){\n\t\t\t$this->form_validation->set_message('check_key', '%s \"'.$code.'\" is exist please use another.');\n\t\t\treturn FALSE;\n\t\t}else\n\t\t\treturn TRUE;\n\t}", "function checkIfCodeExists() {\n $voucher = new Voucher();\n $voucher->where('code', $this->getCode());\n return $voucher->count() > 0;\n }", "public function code_check($code)\n {\n if( $this->MItems->get_by_code($code))\n {\n $this->form_validation->set_message('code_check', 'Item code can\\'t be duplicate. Please choose different item code.');\n return false;\n }\n else\n {\n return true;\n }\n }", "public function validateCode($users_pro_id, $code) {\n $codeExists = $this->db->where(array(\n $this->table.'.code' => $code,\n PREFIXDB.'deals.users_pro_id' => $users_pro_id\n ))\n ->join(PREFIXDB.'deals', PREFIXDB.'deals.id = '.$this->table.'.deals_id')\n ->get($this->table)\n ->row();\n \n if($codeExists) {\n $this->db->where(array(\n 'orders_id' => $codeExists->orders_id,\n 'deals_id' => $codeExists->deals_id\n ))->update($this->table, array(\n 'validated' => 1\n ));\n return true;\n } else {\n return false;\n }\n }", "public function getPartnerCode()\n {\n // todo: implement partner code storage.\n return null;\n }", "public static function insertPartner($portData){\n\n $status = array('stat'=>'error', 'msg'=>'Something went wrong');\n $id = 0;\n\n $id = DB::table('sb24_partnercode')->insertGetId( $portData );\n if($id>0){\n $status = array('stat'=>'ok', 'msg'=>'Partner Added Successfully');\n } else {\n $status = array('stat'=>'error', 'msg'=>'Partner Addition Failed');\n }\n return $status;\n }", "abstract public function checkCode(string $uuid, string $code, int $successFlag = self::NOTHING_ON_SUCCESS);", "public function add_partner($data_arr,$type,&$validation_passed,&$err_arr){\n global $g_mc;\n \n \n //$company_name = $g_mc->view_to_db($data_arr['name']);\n //validation\n $validation_passed = true;\n //first check if name is sent or not\n if($data_arr['firm_name']==\"\"){\n $err_arr['partner_id'] = \"Please specify the \".$type.\" name\";\n $validation_passed = false;\n return true;\n }\n //if it comes here, something was typed\n if($data_arr['partner_id'] == \"\"){\n $err_arr['partner_id'] = \"The \".$type.\" name was not found\";\n $validation_passed = false;\n }else{\n //partner of this id and type cannot be added to this deal twice, so check\n $q = \"select count(id) as cnt from \".TP.\"transaction_partners where transaction_id='\".$data_arr['transaction_id'].\"' and partner_id='\".$data_arr['partner_id'].\"' and partner_type='\".$type.\"'\";\n $res = mysql_query($q);\n if(!$res){\n return false;\n }\n $row = mysql_fetch_assoc($res);\n if($row['cnt']!=0){\n //this partner of this type is already in this transaction, so\n $err_arr['partner_id'] = \"This has already been added\";\n $validation_passed = false;\n }\n }\n \n /////////////////////////////////////\n if(!$validation_passed){\n //no need to proceed\n return true;\n }\n ///////////////////////////////////////////////////////\n \n //insert data\n\t\t/*************\n\t\tsng:23/mar/2012\n\t\tWe no longer use this feature but let's keep the code anyway\n\t\t\n\t\t$is_sellside_advisor = 'n';\n\t\tif(isset($data_arr['is_sellside_advisor'])&&$data_arr['is_sellside_advisor']=='y'){\n\t\t\t$is_sellside_advisor = 'y';\n\t\t}\n\t\t**************/\n\t\t\n\t\t/***************\n\t\tsng:16/mar/2012\n\t\tNow we check for is_insignificant\n\t\tand also set role id\n\t\t\n\t\tsng:23/mar/2012\n\t\tNow we have role like 'Junior Adviser' We no longer need the is_insignificant\n\t\tcheckbox. Problem is , that flag is related to adjusted tombstone value for the partner.\n\t\tWe keep this code here for now.\n\t\t******************/\n\t\t$is_insignificant = 'n';\n\t\tif(isset($data_arr['is_insignificant'])&&$data_arr['is_insignificant']=='y'){\n\t\t\t$is_insignificant = 'y';\n\t\t}\n\t\t$role_id = 0;\n\t\tif(isset($data_arr['role_id'])){\n\t\t\t$role_id = $data_arr['role_id'];\n\t\t}\n\t\t\n /********************************************************************\n\t\tsng:23/mar/2012\n\t\tWe no longer use this feature but let's keep the code anyway\n\t\t$q = \"insert into \".TP.\"transaction_partners set \n partner_id='\".$data_arr['partner_id'].\"',\n\t\t\t is_sellside_advisor='\".$is_sellside_advisor.\"',\n\t\t\t is_insignificant='\".$is_insignificant.\"',\n\t\t\t role_id='\".$role_id.\"',\n transaction_id='\".$data_arr['transaction_id'].\"', \n partner_type='\".$type.\"'\";\n\t\t*********************************************************************/\n\t\t\n\t\t$q = \"insert into \".TP.\"transaction_partners set \n partner_id='\".$data_arr['partner_id'].\"',\n\t\t\t is_insignificant='\".$is_insignificant.\"',\n\t\t\t role_id='\".$role_id.\"',\n transaction_id='\".$data_arr['transaction_id'].\"', \n partner_type='\".$type.\"'\";\n\t\t\t \n $result = mysql_query($q);\n if(!$result){\n //echo mysql_error();\n return false;\n }\n /////////////////\n //data inserted, update adjusted values for all the partners of same type\n //for that we need the value of the deal and number of partners for this type\n $deal_q = \"select value_in_billion from \".TP.\"transaction where id='\".$data_arr['transaction_id'].\"'\";\n $deal_q_res = mysql_query($deal_q);\n if(!$deal_q_res){\n return false;\n }\n $deal_q_res_row = mysql_fetch_assoc($deal_q_res);\n $value_in_billion = $deal_q_res_row['value_in_billion'];\n //now we need the partners of this type for this deal\n $partner_q = \"select partner_id from \".TP.\"transaction_partners where transaction_id='\".$data_arr['transaction_id'].\"' and partner_type='\".$type.\"'\";\n $partner_q_res = mysql_query($partner_q);\n if(!$partner_q_res){\n return false;\n }\n $num_partners = mysql_num_rows($partner_q_res);\n if($num_partners > 0){\n $partner_adjusted_value_in_billion = $value_in_billion/$num_partners;\n //update all the partners for this deal for this type\n $partner_update_q = \"update \".TP.\"transaction_partners set adjusted_value_in_billion='\".$partner_adjusted_value_in_billion.\"' where transaction_id='\".$data_arr['transaction_id'].\"' and partner_type='\".$type.\"'\";\n $result = mysql_query($partner_update_q);\n if(!$result){\n return false;\n }\n //now that the partners are updated, we need to update the team members for these partners for this deal\n while($partner_q_res_row = mysql_fetch_assoc($partner_q_res)){\n $deal_partner_id = $partner_q_res_row['partner_id'];\n $success = $this->update_deal_team_members_adjusted_value($data_arr['transaction_id'],$deal_partner_id);\n if(!$success){\n return false;\n }\n }\n }\n $validation_passed = true;\n\t\t/*****************************************************\n\t\tsng:15/sep/2011\n\t\t\n\t\tsng:16/nov/2012\n\t\tWe no longer notify the syndicates that their bank/law firm has been added to a deal\n\t\tWe assume that nobody does spurious additions (that requires notification)\n\t\t/********************************************************/\n return true;\n }", "function check_reffer_code() {\n\t\t$reffer_code = $_REQUEST['reffer_code'];\n\t\tif (!empty($reffer_code)) {\n\t\t\t$reffer_records = $this -> conn -> get_table_row_byidvalue('user', 'user_refferal_code', $reffer_code);\n\t\t\tif (!empty($reffer_records)) {\n\t\t\t\t$user_id = $reffer_records[0]['user_id'];\n\t\t\t\t$user_reffer_code = $reffer_records[0]['user_refferal_code'];\n\n\t\t\t\t//if($user_reffer_code==$reffer_code){\n\t\t\t\tif (strcmp($user_reffer_code, $reffer_code) == 0) {\n\t\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Reffer code avalible\", 'reffer_code' => $reffer_code, 'user_id' => $user_id);\n\t\t\t\t} else {\n\t\t\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid reffer code\");\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid reffer code\");\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Missing parameter\", 'reffer_code' => $reffer_code);\n\t\t}\n\t\techo $this -> json($post);\n\t}", "public static function checkGoodsByIdInDecompileStocksPartners($id_partner, $part_number)\r\n {\r\n $db = MsSQL::getConnection();\r\n\r\n $sql = \"SELECT\r\n sgt.stock_name,\r\n sgt.quantity,\r\n sgt.price,\r\n sgt.stock_id\r\n FROM site_gm_stocks_decompiles sgt\r\n INNER JOIN tbl_Users tu\r\n ON sgt.site_account_id = tu.site_gs_account_id\r\n INNER JOIN site_gm_users sgu\r\n ON sgu.id = tu.site_gs_account_id\r\n WHERE sgu.site_account_id = :id_partner\r\n AND sgt.part_number = :part_number\";\r\n\r\n $result = $db->prepare($sql);\r\n $result->bindParam(':id_partner', $id_partner, PDO::PARAM_INT);\r\n $result->bindParam(':part_number', $part_number, PDO::PARAM_STR);\r\n $result->execute();\r\n return $result->fetch(PDO::FETCH_ASSOC);\r\n }", "function existeProveedor($codigo)\n {\n \tif($this->gateway->existMco_proveedores($codigo) == 1){ \n return ERROR_DATO_EXISTE;\n }\n else\n {\n return EXITO_OPERACION_REALIZADA;\n }\n }", "public function signup($data)\n {\n if($this->is_partner()) {\n return true;\n }\n \n if(!isset($data['agree']) || !$data['agree']) {\n throw new Box_Exception('You must agree with terms and conditions of partners program.', null, 8801);\n }\n \n $mod_c = $this->_getConfig();\n if(isset($mod_c['required_balance']) && $mod_c['required_balance']) {\n $client = $this->getApiAdmin()->client_get(array('id'=>$this->client->id));\n if($client['balance'] < $mod_c['required_balance']) {\n throw new Box_Exception('To become a partner you will have to deposit $:amount. This $:amount will be an Advance and will be set off against the licenses you Purchase / Renew. So when you pay this $:amount a Balance will be shown in your account.', array(':amount'=>$mod_c['required_balance']), 8802);\n }\n }\n \n // Check if product must be ordered before activating partners program\n if(isset($mod_c['pid']) && $mod_c['pid']) {\n $pid = $mod_c['pid'];\n $params = array('cid'=>$this->client->id, 'pid'=>$pid, 'status'=>'active');\n $has = R::findOne('client_order', 'client_id = :cid AND product_id = :pid AND status = :status', $params);\n $title = R::getCell('SELECT title FROM product WHERE id = :id', array('id'=>$pid));\n if(!$has) {\n throw new Box_Exception('To become a partner it is required you to order :product', array(':product'=>$title), 8803);\n }\n }\n \n $this->service->createPartner($this->client);\n \n $this->getApiAdmin()->hook_call(array('event'=>'onAfterClientBecomePartner', 'params'=>array('client_id'=>$this->client->id)));\n $this->_log('Client %s signed up for partners program', $this->client->id);\n return true;\n }", "function validate_account($encrypted_email=NULL, $validation_code=NULL)\n {\n if ($encrypted_email && $validation_code)\n {\n $sql = \"\n SELECT id\n FROM {$this->_db}\n WHERE SHA1(email) = \" . $this->db->escape($encrypted_email) . \"\n AND validation_code = \" . $this->db->escape($validation_code) . \"\n AND status = '0'\n AND deleted = '0'\n LIMIT 1\n \";\n\n $query = $this->db->query($sql);\n\n if ($query->num_rows())\n {\n $results = $query->row_array();\n\n $sql = \"\n UPDATE {$this->_db}\n SET status = '1',\n validation_code = NULL\n WHERE id = '\" . $results['id'] . \"'\n \";\n\n $this->db->query($sql);\n\n if ($this->db->affected_rows())\n {\n return TRUE;\n }\n }\n }\n\n return FALSE;\n }", "public function checkAvailabilityOfUserCodeModel($code, $table, $nid){\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT EXISTS(SELECT * FROM $table WHERE $nid = :codigo) as a\");\n\t\t//echo $table . \" \" . $code . \" \".$nid;\n\t\t$stmt->bindParam(\":codigo\", $code);\n\t\t$stmt->execute();\n\n\t\treturn $stmt->fetch();\n\n\t\t$stmt->close();\n\t}", "public function isPartner($id) {\n return DB::table('partners')->where('user_id', $id)->first();\n\n }", "static function codeExists($code)\n {\n global $objDatabase;\n\n $query = \"\n SELECT 1\n FROM `\".DBPREFIX.\"module_shop\".MODULE_INDEX.\"_discount_coupon`\n WHERE `code`='\".addslashes($code).\"'\";\n $objResult = $objDatabase->Execute($query);\n // Failure or none found\n if (!$objResult) {\n // Failure! Assume that the code exists.\n return true;\n }\n if ($objResult->EOF) {\n return false;\n }\n return true;\n }", "public function check() : int\n {\n\n /**\n * @return invalid request(1) if a code is empty ,null or undefined,\n * if not continue the next execution\n */\n\n if(!$this->code) return INVALID_REQUEST;\n\n\n /** @var $is_valid check the specified code is equal and valid */\n\n $is_valid = database::getInstance()->has('user',[\n\n \"id\" => (new Users())->get_id(),\n\n \"verification_code\" => $this->code\n\n ]);\n\n /** validation */\n\n if($is_valid) {\n\n /** @var $success if a specified code is valid\n * update the current status of \"isVerify\" attribute of a database\n * to PHONE_NUMBER_VERIFIED(1) and\n * @return the number of affected rows\n */\n\n $success = database::getInstance()->update('user',['isVerify'=>user_type::PHONE_NUMBER_VERIFIED],[\n\n \"id\"=> (new Users())->get_id()\n\n ])->rowCount();\n\n /** if has a affeted rows return valid request(2), invalid request if not */\n\n return $success ? VALID_REQUEST : INVALID_REQUEST;\n\n }\n\n\n /** return invalid request(1) if a code is not equal */\n\n return INVALID_REQUEST;\n\n\n\n }", "public function validateVerificationCode($code)\n {\n $model = config('twilio-verify.model');\n return $codeExists = $model::where('verification_code', '=', $code)->whereNull('phone_verified_at')->exists();\n }", "private function verify_purchase_code($code)\n { \n if( !empty($this->get_option('integrationsEnvatoAPIKey')) && (!empty($this->get_option('integrationsEnvatoUsername'))) ) {\n $token = $this->get_option('integrationsEnvatoAPIKey');\n $username = $this->get_option('integrationsEnvatoUsername');\n } else {\n return false;\n }\n\n $envato = new DB_Envato($token);\n\n $purchase_data = $envato->call('/market/author/sale?code=' . $code);\n \n if(isset($purchase_data->error)) {\n return false;\n }\n\n return $purchase_data;\n }", "public function codeExists($code) {\n $res = $this->createQuery(\"c\")\n ->select(\"c.*\")\n ->where(\"c.code_num = ?\", array($code))\n ->limit(1)\n ->execute(array(), Doctrine_Core::HYDRATE_SCALAR);\n\n return (bool) $res;\n }", "function checkCode($typeId, $schedConfId, $code) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT COUNT(*)\n\t\t\t\tFROM registration_types\n\t\t\t\tWHERE type_id = ?\n\t\t\t\tAND sched_conf_id = ?\n\t\t\t\tAND code = ?',\n\t\t\tarray(\n\t\t\t\t$typeId,\n\t\t\t\t$schedConfId,\n\t\t\t\t$code\n\t\t\t)\n\t\t);\n\t\t$returner = isset($result->fields[0]) && $result->fields[0] != 0 ? true : false;\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}", "public function verifyTwoFACode($code) {\n $verification = Yii::app()->db->createCommand()\n ->select('code')\n ->from('x2_twofactor_auth')\n ->where('userId = :id AND requested >= :requested', array(\n ':id' => $this->id,\n ':requested' => time() - (60 * 5), // within the past 5 minutes\n ))->queryScalar();\n return $code === $verification;\n }", "function CheckExistsProductionCode($production_code) {\n $total = $this->db\n ->where('LCASE(production_code)', $production_code)\n ->from('production')\n ->count_all_results();\n \n if ($total>0) {\n // if exists return false\n return FALSE;\n } else {\n return TRUE;\n }\n }", "function check_reffer_code(){\n\t$reffer_code=$_REQUEST['reffer_code'];\n\tif(!empty($reffer_code)){\n\t\t$reffer_records = $this -> conn -> get_table_row_byidvalue('user', 'user_refferal_code', $reffer_code);\n\t\tif(!empty($reffer_records)){\n\t\t\t$user_id=$reffer_records[0]['user_id'];\n\t\t\t$user_reffer_code=$reffer_records[0]['user_refferal_code'];\n\t\t\tif($user_reffer_code==$reffer_code){\n\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Reffer code avalible\", 'reffer_code' => $reffer_code,'user_id'=>$user_id);\n\t\t\t}else{\n\t\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid reffer code\");\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid reffer code\");\n\t\t}\n\t}else{\n\t\t$post = array(\"status\" => \"false\", \"message\" => \"Missing parameter\",'reffer_code'=>$reffer_code);\n\t}\n\techo $this -> json($post);\n}", "function verify_code($rec_num, $checkstr)\n\t{\n\t\tif ($user_func = e107::getOverride()->check($this,'verify_code'))\n\t\t{\n\t \t\treturn call_user_func($user_func,$rec_num,$checkstr);\n\t\t}\n\t\t\n\t\t$sql = e107::getDb();\n\t\t$tp = e107::getParser();\n\n\t\tif ($sql->db_Select(\"tmp\", \"tmp_info\", \"tmp_ip = '\".$tp -> toDB($rec_num).\"'\")) {\n\t\t\t$row = $sql->db_Fetch();\n\t\t\t$sql->db_Delete(\"tmp\", \"tmp_ip = '\".$tp -> toDB($rec_num).\"'\");\n\t\t\t//list($code, $path) = explode(\",\", $row['tmp_info']);\n\t\t\t$code = intval($row['tmp_info']);\n\t\t\treturn ($checkstr == $code);\n\t\t}\n\t\treturn FALSE;\n\t}", "function VerificaExisteEnRutero($CardCode,$ItemCode){\n\t\tif($this->con->conectar()==true){\n\t\t\t\n\t\t\t$ArtiRutero = mysql_query(\"SELECT COUNT (*) AS EXIST FROM `RUTEROS` WHERE `CardCode` = '\".$CardCode.\"' and `ItemCode` = '\".$ItemCode.\"'\");\n\t\t\t\n\t\t\t if($ArtiRutero)\n\t\t\t {\n\t\t\t\t $Exis = mysql_fetch_array($ArtiRutero); \n\t\t\t\tif($Exis['EXIST']>0)\n\t\t\t\t\treturn 1;\n\t\t\t\telse\n\t\t\t\t\t return 0;\n\t\t }\n\t\t\t \n\t\t\t\t \n\t\t\t\n\t\t\t \n\t\t}\n\t}", "function codeUsed($a_cp_id, $a_code)\n\t{\n\t\tglobal $ilDB;\n\n\t\t$set = $ilDB->query(\"SELECT id\".\n\t\t\t\" FROM adn_ep_assignment\".\n\t\t\t\" WHERE cp_professional_id = \".$ilDB->quote($a_cp_id, \"integer\").\n\t\t\t\" AND access_code = \".$ilDB->quote($a_code, \"text\")\n\t\t\t);\n\t\tif ($rec = $ilDB->fetchAssoc($set))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function checkCode(TwoFactorInterface $user, $code);", "function tep_currency_exists($code) {\n $code = tep_db_prepare_input($code);\n\n $currency_code = tep_db_query(\"select currencies_id from \" . TABLE_CURRENCIES . \" where code = '\" . tep_db_input($code) . \"'\");\n if (tep_db_num_rows($currency_code)) {\n return $code;\n } else {\n return false;\n }\n }", "public function checkgiftcardcode() {\n global $loguser;\n $curr_email = $loguser['email'];\n $code = $_GET['gfcode_value'];\n $getgfcardval = TableRegistry::get('Giftcards')->find()->where(['giftcard_key' => $code])->first();\n if (!empty($getgfcardval)) {\n $recEmail = $getgfcardval->reciptent_email;\n $gfcardId = $getgfcardval->id;\n $gfcardAmt = $getgfcardval->avail_amount;\n if ($gfcardAmt <= 0) {\n echo \"2\";\n die;\n } else if ($recEmail == $curr_email) {\n echo '1' . '*|*' . $gfcardId;\n die;\n } else {\n echo '0';\n die;\n }\n } else {\n echo '0';\n die;\n }\n }", "public function verify_email($code) {\n $this->db->select('*');\n $this->db->from('vendors');\n $this->db->join('business_details', 'business_details.business_id = vendors.id');\n $this->db->where('vendors.email_verification_code', $code);\n $query = $this->db->get();\n $query_result = $query->result();\n if (!empty($query_result)) {\n $order_status_update = array(\n 'email_verification_status' => '1'\n );\n\n $this->db->where('email_verification_code', $code);\n $this->db->update('vendors', $order_status_update);\n\n\n $partner_details = array();\n if (count($query_result) == 0) {\n $partner_details = $query_result;\n } else {\n $partner_details = $query_result[0];\n }\n return $partner_details;\n } else {\n return \"not matched\";\n }\n }", "public function exists(string $code, array $codes = []): bool\n {\n return \\in_array($code, $codes) || $this->vouchers()->code($code)->exists();\n }", "function InviteValidation($icode) {\n \n //DO:\n // Static MySQL query that returns all non claimed codes.\n // iterate through each code and check for match.\n \n //force icode to uppercase.\n $icode = strtoupper($icode);\n \n // Do we claim the invite code yet?\n $today = date(\"Y-m-d\");\n if (!preg_match(\"/^[23456789ABCDEFGHJKLMNPQRSTUVWXYZ]{6}$/\",$icode)) {\n //invalid code.\n\t\t\t\t$_SESSION['alert'] = \"Invalid invite code.\";\n return false;\n }\n\t\t\t$inviteToday = queryInvites($today);\n\t\t\t$inviteAlways = queryInvites(\"NEVER\");\n\t\t\t$return = array_merge($inviteToday, $inviteAlways);\n foreach ($return as $invite) {\n if ($invite['claimedBy'] != null) {\n continue; //This is needed because of the never expire code.\n }\n if ($invite['code'] == $icode) {\n //Match found.\n $_SESSION['inviteCode'] = $invite['code'];\n $_SESSION['sponsor'] = $invite['genUser'];\n return true;\n }\n }\n\t\t\t$_SESSION['alert'] = \"Invalid invite code.\";\n return false;\n }", "public function is_partner()\n {\n return $this->service->isPartner($this->client);\n }", "public function checkCode($confirmCode) {\n\t\t\t\t\t$codeCheck= \"SELECT confirmcode FROM user WHERE confirmcode=:code\";\n\t\t\t\t\ttry{\n\t\t\t\t\t\t$stmt = $this->_db->prepare($codeCheck);\n\t\t\t\t\t\t$stmt->bindParam(\":code\", $confirmCode, PDO::PARAM_STR);\n\t\t\t\t\t\t$stmt->execute();\n\t\t\t\t\t\t$row=$stmt->fetch();\n\t\t\t\t\t\t$trueCheck=$row['confirmcode'];\n\t\t\t\t\t\t\tif(isset($trueCheck)){\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 false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}catch(PDOException $e){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t}", "function get_usercode( $partnerUserID ) {\n\t\t$this->request = new Polldaddy_Access( array(\n\t\t\t// 'demands' => new Polldaddy_Demands( array( 'demand' => new Polldaddy_Demand( null, array( 'id' => __FUNCTION__ ) ) ) )\n\t\t\t'demands' => new Polldaddy_Demands( array( 'demand' => new Polldaddy_Demand( null, array( 'id' => 'getusercode' ) ) ) )\n\t\t), array(\n\t\t\t'partnerGUID' => $this->partnerGUID,\n\t\t\t'partnerUserID' => $partnerUserID\n\t\t) );\n\t\t$this->send_request();\n\t\tif ( isset( $this->response->userCode ) ) {\n\t\t\treturn $this->response->userCode;\n\t\t}\n\t\treturn false;\n\t}", "function check_if_code_is_valid($code){\n\n $query = $this->db->get_where('tbl_doctor_code',array('dc_code' => $code));\n return $query->result_array();\n }", "private function isAlreadyExistsException($exception_code, $type) {\n switch ($type) {\n case \"users\":\n if ($exception_code == EfrontUserException::USER_EXISTS) { return true; }\n break;\n default:\n return false;\n }\n return false;\n }", "function IfExists($travelcode) {\r\n $conn = conn();\r\n $sql = \"SELECT * FROM `travelrates` WHERE TravelCode='$travelcode'\";\r\n $stmt = $conn->prepare($sql);\r\n $stmt->execute();\r\n $result = $stmt->fetchAll();\r\n if (!empty($result)) {\r\n return 1;\r\n }\r\n return 0;\r\n $conn = NULL;\r\n }", "public function CheckActivationCode($code){\n $this->db->where('activation_code',$code);\n $query = $this->db->get('users'); \n if ($query->num_rows() > 0)\n { \n return true;\n }\n else\n { \n return false;\n }\n }", "private function checkCode(Int $code) {\n if ($code === 200) :\n return true;\n endif;\n\n return false;\n }", "public function hasVerificationCode(){\n return $this->_has(3);\n }", "public function hasVerificationCode(){\n return $this->_has(3);\n }", "function check_code($str)\n\t{\n\t\t$code = $this->Coupon_model->check_code($str, $this->coupon_id);\n if ($code)\n \t{\n\t\t\t$this->form_validation->set_message('check_code', lang('error_already_used'));\n\t\t\treturn FALSE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t}", "public function check_account_exists($old_pword)\n {\n $user_no = $this->uri->segment(3);\n $result = $this->UserLogin_model->check_account_exists($old_pword, $user_no);\n if ($result == 1) {\n return true;\n } else {\n $this->session->set_flashdata('error', 'Failed to change password');\n $this->form_validation->set_message('check_account_exists', 'Failed to change password');\n return false;\n }\n }", "public function verifyCode($code,$id)\n\t{\n\t\ttry{\n\t\t\t$select = $this->getDbTable()->select();\n\t\t\t$select->from('rd.location_boundaries',array('COUNT(id) as count'))\n\t\t\t->where('code ILIKE ?',$code);\n\t\t\tif($id != 0){\n\t\t\t\t$select->where('id <> ?',$id);\n\t\t\t}\n\t\t\t$rowset = $this->getDbTable()->fetchAll($select);\n\t\t\t$count = 0;\n\n\t\t\tforeach($rowset as $row){\n\t\t\t\t$count = $row->count;\n\t\t\t}\n\t\t\tif($count == 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\tcatch (Exception $ex){\n\t\t\tthrow new Exception($ex->getMessage()) ;\n\t\t}\n\n\t}", "public function VoucherCodeIsUnique($voucherCode)\n {\n $query = \"SELECT * FROM vouchers\n WHERE VoucherCode =:vouchercode\";\n \n $sql = Yii::app()->db->createCommand($query);\n $sql->bindValue(\":vouchercode\", $voucherCode);\n $result = $sql->queryAll();\n \n if(count($result) <= 0)\n return true;\n else\n return false;\n }", "public function setPartnerIdByPartnerId($partnerId)\n {\n if (isset($partnerId) || !is_null($partnerId) || !empty($partnerId)) {\n self::$partnerId = $partnerId;\n return true;\n }\n return false;\n }", "function check_exits_idField($code,$field, $table, &$db)\n{\n\n\t$sql_check = \"SELECT * FROM \".$table.\" WHERE `\".$field.\"` = '\".$code.\"'\";\n\t$sql_check = $db->sql_query($sql_check) or die(mysql_error());\n\t$exits \t = $db->sql_fetchfield(0);\n\tif($exits)return true;\n\telse return false;\n}", "public function isPartner()\n {\n if($this->hasRole('Partner'))\n return true;\n else\n return false;\n }", "public function checkCodeExist($id, $code) {\n\t\t$query = $this->db->get_where ( \"languages\", array (\n\t\t\t\t\"code\" => $code\n\t\t) );\n\t\t$lang1 = $this->getLangById ( $id );\n\t\tif ($query->num_rows () > 0) {\n\t\t\t$lang = $query->row ();\n\t\t\tif ($lang->code == $lang1->code)\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function proudPartner(Request $request){\n $id = $request->id;\n $partner = Partner::where('id', $id)->get()->first();\n $new['proud_partner'] = 1 - $partner->proud_partner;\n if($new['proud_partner'] == 1) {\n Session::flash('flash_success', 'Partner has been added as proud partners successfully'); \n $count = Partner::where('proud_partner', 1)->count();\n if($count >= 6){\n Session::flash('flash_success', 'Already maximum number of partners added in proud partners list, please remove any partner and try again.'); \n }else{\n Session::flash('flash_success', 'Partner has been added as proud partners successfully.');\n Partner::where('id', $id)->update($new);\n }\n }else {\n Partner::where('id', $id)->update($new);\n Session::flash('flash_success', 'Partner has been removed from proud partners successfully'); \n } \n echo \"success\";\n }", "function checkDuplicateCode(){\n\t\t$code = addslashes($_POST['txtProductCode']);\n\t\t$sql_check = \"select P_ID\n\t\t\t\t\t from PRODUCT\n\t\t\t\t\t where CODE='$code'\";\n\t\t$result_check = mysql_query($sql_check) or die(mysql_error());\n\t\tif (mysql_num_rows($result_check) > 0){\n\t\t\techo '<script type=\"application/javascript\">\n\t\t\t\tvar message = \"Sãn Phẩm có MÃ bị trùng. Vui lòng nhập lại\",\n\t\t\t\t\ttype = \"type-danger\",\n\t\t\t\t\ttitle = \"Thông Báo Lỗi\",\n\t\t\t\t\tgoto = \"../product/add.php\";\n\t\t\t\tmess_alert(message, type, title, goto);\n\t\t\t</script>';\n\t\t} else{\n\t\t\tinsertProduct($code);\n\t\t}\n\n\t}", "public static function pre_use_voucher($voucher_code)\n {\n if($voucher_code) Session::instance()->set(\"vchc\", $voucher_code); \n \n $voucher=static::get_voucher();\n \n return (is_object($voucher) && $voucher->id)?true:false;\n }", "function is_partner_login()\n{\n session_start();\n if (isset($_SESSION['partnerId']))\n return ($_SESSION['partnerId'] > 0);\n return false;\n}", "private function validateCode($code, $updateCount = false)\n {\n $invitationCodes = InvitationCode::active()->pluck('id','code');\n\n if( ! empty($invitationCodes[$code])){\n\n if($updateCount){\n $invitationCode = InvitationCode::find($invitationCodes[$code]);\n $invitationCode->current_count += 1;\n $invitationCode->save();\n }\n\n return true;\n } else {\n return false;\n }\n }", "public function setPartnerId($var)\n {\n GPBUtil::checkString($var, True);\n $this->partner_id = $var;\n }", "public function setPartnerId($var)\n {\n GPBUtil::checkString($var, True);\n $this->partner_id = $var;\n }", "public function getCod_partner()\n {\n return $this->cod_partner;\n }", "function checkIfCodeExists($jobCode){\n\t$codeExistsQuery = \"SELECT code FROM job_post WHERE code=$jobCode\";\n\t$checkCodeExists = mysql_query($codeExistsQuery);\n\t$countCodeExists = mysql_num_rows($checkCodeExists);\n\tif($countCodeExists > 1) {\n\t\treturn true;\n\t}\n\telse\n\t\treturn false;\n}", "abstract function can_use_premium_code();", "function ValidVisualVerifyCode($vvcid, $enteredcode)\n{\n global $DB;\n\n $vvcid = empty($vvcid) ? 0 : (int)$vvcid;\n $enteredcode = empty($enteredcode) ? '' : trim((string)$enteredcode);\n if(($vvcid > 0) && (strlen($enteredcode) == SD_VVCLEN))\n {\n $verifycode = $DB->query_first(\"SELECT verifycode FROM {vvc} WHERE vvcid = %d\", $vvcid);\n $DB->query_first(\"DELETE FROM {vvc} WHERE vvcid = %d\", $vvcid);\n if(!empty($verifycode))\n {\n return (strtolower(trim($verifycode['verifycode'])) == strtolower($enteredcode));\n }\n }\n\n return false;\n\n}", "function codecheck($code){\n\t\t// echo 'Code Check wordt uitgevoerd!';\n\t\t\n\t\t$con=mysqli_connect(\"localhost\",\"durftean\",\"SSander123\",\"durftean\");\n\t\t$query = \"SELECT * FROM codes WHERE code = $code\";\t\t\n\t\t$result = mysqli_query($con, $query);\n\t\t$data = mysqli_fetch_assoc($result);\n\t\t\n\t\tif($result->num_rows > 0) {\n\t\t\t$ja = true; // Wel iets gevonden\n\t\t}else{\n\t\t\t$nee = false; // Niks gevonden\n\t\t}\n\t\treturn array($ja,$nee,$data);\n\t}", "public function checkVoucher($code, &$response = null) {\n $response = $this->performRequest('voucherCheck.php', ['hash' => $this->hash, 'code' => $code]);\n return $response instanceof SuccessResponse;\n }", "public static function updatePartner($portdata, $id) {\n $status = array('stat'=>'error', 'msg'=>'Something went wrong');\n DB::table('sb24_partnercode')->where('id', $id)->update( $portdata );\n $status = array('stat'=>'ok', 'msg'=>'Partner Edited Successfully');\n return $status;\n }", "public function validacion_provincia($cedula){\n \n \n \n if( ($cedula[0]<= 2))\n {\n if($cedula[0]== 2 && ($cedula[1] > 4) ){\n echo \"Codigo de provincia de la cedula incorrecto, Por favor, ingrese una cédula correcta\";\n }\n else{\n return true; \n }\n }\n else{\n echo \"Codigo de provincia de la cedula incorrecto, Por favor, ingrese una cédula correcta\";\n }\n \n}", "function validateGatePass($txtGatePass){\n\trequire 'connection.php';\n\n\t$sql = \"SELECT * FROM tbl_gatepass\";\n\t$validateGatePass = $conn->query($sql);\n\t$exist = false;\n\n\twhile($row = $validateGatePass->fetch_assoc()) {\n\t\tif ($row[\"gatepass\"] == $txtGatePass) {\n\t\t\techo \"<script type='text/javascript'>\n\t\t\talert('Data is already Exist!');\n\t\t\t</script>\";\n\n\t\t\t$exist=true;\n\t\t}\n\t}\n\t// ADD SUPPLIER NAME\n\tif (!$exist) {\n\t\taddGatepass($txtGatePass);\n\t}\n}", "public function checkCode(User $user, $code);", "public function checkExistContract($nr_contract){\n $sql = \"SELECT nr_contract from contract WHERE nr_contract = :nr_contract\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->bindValue(':nr_contract', $nr_contract);\n $stmt->execute();\n if ($stmt->rowCount()> 0) {\n return true;\n }else{\n return false;\n }\n }", "private function code_exists($code) {\n\t\t$code = $this->db->escape_str($code);\n\t\t$query = $this->db->query(\"SELECT COUNT(id) as num_rows FROM exp_shortee_urls WHERE BINARY code = '$code'\");\n\n\t\t$row = $query->row_array();\n\n\t\treturn ($row['num_rows'] > 0) ? true : false;\n\t}", "public function is_active_code_existed($active_code)\n {\n $query = $this->db->get_where('users', array('active_code' => $active_code));\n return ($query->num_rows() > 0);\n }", "function verificar_existencia_profesor_espacio(){\n\t\t$sql_verif= \"SELECT * FROM \n \t\t\t\tPROF_ESPACIO\n \t\t\tWHERE(\n \t\t\t\tCODESPACIO = '$this->CODESPACIO'\n \t\t\t)\n \t\t\t\";\n\nreturn $this->mysqli->query($sql_verif)->num_rows>=1;\n\n}", "function v1_check_dupli_sd_evn($name, $key, $code, $sn_id, $sd_evn_tech, $owners, &$error) {\n\t\n\tglobal $checked_data;\n\t\n\t// If such code was found before\n\tif (isset($checked_data[$key][$code])) {\n\t\t// Compare data\n\t\tforeach ($checked_data[$key][$code] as $cmp_data) {\n\t\t\t// Check sn_id\n\t\t\tif ($cmp_data['sn_id']!=$sn_id) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Check location technique\n\t\t\tif ($cmp_data['sd_evn_tech']!=$sd_evn_tech) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Check owners\n\t\t\tforeach ($owners as $owner) {\n\t\t\t\tforeach ($cmp_data['owners'] as $cmp_owner) {\n\t\t\t\t\tif ($owner['id']==$cmp_owner['id']) {\n\t\t\t\t\t\t// Duplication found\n\t\t\t\t\t\t$error=\"&lt;\".$name.\" code=\\\"\".$code.\"\\\" owner=\\\"\".$owner['code'].\"\\\"&gt; is duplicated\";\n\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn TRUE;\n}", "function VerificaArticuloRepetido($Cod_Articulo,$CardCode){\n\t\tif($this->con->conectar()==true){\n\t\t\t$Resultado = mysql_query(\"SELECT COUNT( * )as 'Existe',Cantidad FROM `Carrito` WHERE `CardCode` = '\" .$CardCode. \"' and `CodArticulo`='\" . $Cod_Articulo.\"'\");\n\t\t\t\n\t\t\treturn $Resultado;\n\t\t\t\n\t\t}\n\t}", "public function is_reset_code_exist($reset_code) {\r\n\t\t\t$query = 'SELECT `username` FROM `forgot_password` \r\n\t\t\t\t\t\tWHERE `reset_code` =:reset_code AND \r\n\t\t\t\t\t\t(`time_requested` > DATE_SUB(NOW(), INTERVAL 1 DAY) AND \r\n\t\t\t\t\t\t`time_requested` < NOW())';\r\n\t\t\t\r\n\t\t\t$statement = $this->con->prepare($query);\r\n\t\t\t$statement->bindValue(':reset_code', $reset_code);\r\n\t\t\t$statement->execute();\r\n\t\t\t$valid = ($statement->rowCount() == 1);\r\n\t\t\t$statement->closeCursor();\r\n\t\t\treturn $valid;\r\n\t\t}", "function IfExists($ratecode) {\r\n $conn = conn();\r\n $sql = \"SELECT * FROM `paymentrates` WHERE RateCode='$ratecode'\";\r\n $stmt = $conn->prepare($sql);\r\n $stmt->execute();\r\n $result = $stmt->fetchAll();\r\n if (!empty($result)) {\r\n return 1;\r\n }\r\n return 0;\r\n $conn = NULL;\r\n }", "function validClientAccount($account_num){\r\n\t$db = new mysqli(\"localhost\",\"root\",\"***\",\"onlinebanking\");\r\n\t$cardNum = $db -> real_escape_string($_SESSION[\"loggedIn\"][1]);\r\n\t// CHEQUING ACCOUNT\r\n\tif($account_num[0]=='1'){\r\n\t\t$rChequing = $db -> query(\"SELECT account_num FROM chequingaccounts WHERE card_num='$cardNum'\");\r\n\t\t$db -> close();\r\n\t\t$chequingAccounts = $rChequing -> fetch_all(MYSQLI_ASSOC);\r\n\t\tif(empty($chequingAccounts)){\r\n\t\t\treturn False;\r\n\t\t} else{\r\n\t\t\t// Loops through each row, as client may have multiple chequing accounts\r\n\t\t\t$valid = False;\r\n\t\t\tforeach($chequingAccounts as $account){\r\n\t\t\t\tif($account['account_num']==$account_num){\r\n\t\t\t\t\t$valid = True;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($valid){\r\n\t\t\t\treturn True;\r\n\t\t\t}else{\r\n\t\t\t\treturn False;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// SAVINGS ACCOUNT\r\n\telseif($account_num[0]=='2'){\r\n\t\t$rSavings = $db -> query(\"SELECT account_num FROM savingsaccounts WHERE card_num='$cardNum'\");\r\n\t\t$db -> close();\r\n\t\t$savingsAccounts = $rSavings -> fetch_all(MYSQLI_ASSOC);\r\n\t\tif(empty($savingsAccounts)){\r\n\t\t\treturn False;\r\n\t\t} else{\r\n\t\t\t// Loops through each row, as client may have multiple savings accounts\r\n\t\t\t$valid = False;\r\n\t\t\tforeach($savingsAccounts as $account){\r\n\t\t\t\tif($account['account_num']==$account_num){\r\n\t\t\t\t\t$valid = True;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($valid){\r\n\t\t\t\treturn True;\r\n\t\t\t}else{\r\n\t\t\t\treturn False;\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\treturn False;\r\n\t}\r\n}", "public static function isValidCode($code): bool\n {\n if (array_key_exists($code, self::getInfoForCurrencies())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithoutCurrencyCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithUnofficialCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithHistoricalCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesIncomplete())) {\n return true;\n }\n\n return false;\n }", "public static function isValidInvitcode($id_invitee,$id_job,$raw_invitecode){\n\t\t\t$db = DatabaseFactory::getInstance();\n\t\t\t$invitecode = Util::getSecureString($raw_invitecode);\n\t\t\t$sql = \"select id_invitor from invitation where id_invitee=\".$id_invitee.\" and id_job=\".$id_job.\" and invite_code='\".$invitecode.\"'\";\n\t\t\t$res = $db->send_sql($sql);\n\t\t\tif(mysqli_num_rows($res) == 0)\n\t\t\t\treturn false;\n\t\t\telse \n\t\t\t\treturn true;\n\t\t}", "public function hasCode(){\n return $this->_has(3);\n }", "function checkNRICExists($nric,$faID){\n\tinitializeDB();\n\t$command = $_SESSION['connection']->prepare(\"SELECT nric FROM FADetails WHERE nric=? AND faID!=?;\");\n\t$command->bind_param('si',$nric,$faID);\n\t\n\t$command->execute();\n\t$result = $command->get_result();\n\tif($result->num_rows>0){\n\t\treturn true;\t\n\t} else {\n\t\treturn false;\n\t}\n}", "function code_checkCodeUser($bdd, $CodeID, $userID)\n\t{\n\t\techo_debug('CODE code_checkCodeUser | codeID='.$CodeID.' userID='.$userID.'<br>');\n\t\ttry\n\t\t{ \n\t\t\t$response = $bdd->prepare('SELECT userID FROM code WHERE id=:ci');\n\t\t\t$response->execute(array(\n\t\t\t\t'ci' => $CodeID\n\t\t\t));\n\t\t}\t\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tdie('Error : '.$e->getMessage());\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$nb_rows = $response->rowCount();\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\t$nb_rows = 0;\n\t\t}\n\t\t\n\t\t$codeUser=0;\n\t\t$check=FALSE;\n\t\tif($nb_rows > 0)\n\t\t{\n\t\t\twhile ($data = $response->fetch())\n\t\t\t{\n\t\t\t\t$codeUser = $data['userID']; \t\n\t\t\t}\n\t\t\tif($codeUser !=0 && $codeUser==$userID)\n\t\t\t{\n\t\t\t\techo_debug('CODE code_checkCodeUser | return TRUE<br>');\n\t\t\t\t$check= TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo_debug('CODE code_checkCodeUser | return FALSE - This code does not belong to the user<br>');\n\t\t\t\t$check=FALSE;\t\t\t\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo_debug('CODE code_checkCodeUser | return FALSE Code not found<br>');\n\t\t\t$check=FALSE;\t\t\t\n\t\t}\n\t\t\n\t\treturn $check;\n\t}", "public function validate() {\n parent::validate();\n\n // Check that the partner opt-ins also have a partner code\n if (isset($this['action.opt-ins.partner']) && !isset($this['partner.code'])) {\n\t throw new SignupValidationException(array('partner opt-in requires a partner code'));\n }\n }", "public function validateCode(Request $request)\n {\n $this->validate($request, ['email' => 'required|email', 'code' => 'required']);\n\n $code = $request->input('code');\n\n $voucher = VoucherPool::where(\n 'code',\n $code\n )->with(\n 'recipients'\n )->with(\n 'specialoffer'\n )->first();\n\n if (null === $voucher) {\n return response()->json(['error' => 'Voucher not found'], 400);\n } else {\n if ($voucher->recipients->email === $request->input('email')) {\n if ($voucher->used) {\n return response()->json(\n ['error' => 'Voucher already used!'],\n 400\n );\n } else {\n if ($voucher->expires_at < new Carbon()) {\n return response()->json(\n ['error' => 'Voucher expired!'],\n 400\n );\n } else {\n return $this->useVoucher($voucher);\n }\n }\n } else {\n return response()->json(['error' => 'Invalid email address!'], 400);\n }\n }\n }", "function isVendorTransactionExist($SuppCode){\t\t\r\n\t\t$OrdSql = \"select SuppCode from p_order where SuppCode = '\".$SuppCode.\"' limit 0,1\";\r\n\t\t$PaySql = \"select SuppCode from f_payments where SuppCode = '\".$SuppCode.\"' limit 0,1\";\r\n\t\t\t\t\r\n\t \t$strSQLQuery = \"(\".$OrdSql.\") UNION (\".$PaySql.\") \";\r\n\t\t $arryRow = $this->query($strSQLQuery, 1);\r\n\t\tif (!empty($arryRow[0]['SuppCode'])) {\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "protected function useRecoveryCode(string $code): bool\n {\n if (!$this->twoFactorAuth->setRecoveryCodeAsUsed($code)) {\n return false;\n }\n\n $this->twoFactorAuth->save();\n\n if (!$this->hasRecoveryCodes()) {\n event(new Events\\TwoFactorRecoveryCodesDepleted($this));\n }\n\n return true;\n }", "function check_type_code($type_code){\n\t\t\tif($this->db->get_where('type',array('code' => $type_code))->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}", "public function couponExists($code)\n\t{\n\t\t$sql = \"SELECT cnId FROM `#__storefront_coupons` WHERE `cnCode` = \" . $this->_db->quote($code);\n\n\t\t$this->_db->setQuery($sql);\n\t\t$cnId = $this->_db->loadResult();\n\n\t\treturn $cnId;\n\t}", "function check_verify($code, $id = ''){\n $verify = new \\Think\\Verify();\n return $verify->check($code, $id);\n}", "function beforeValidate() {\n\t\t\treturn !($this->codeExists($this->data['ReductionCode']['code'], $this->data['ReductionCode']['event_id']));\n\t\t}", "public function checkVerificationCode() {\n $request_params = Request::all();\n $validation = Validator::make($request_params, $this->getRulesUtils()->check_verification_code, $this->getRulesUtils()->selectLanguageForMessages('check_verification_code', $request_params['lang']));\n if ($validation->fails()) {\n return $this->getCommonUtils()->jsonErrorResponse($validation->errors()->first());\n }\n $verficationCode = $this->getVerificationModel()->getConfirmationCode($request_params);\n if (empty($verficationCode)) {\n return $this->getCommonUtils()->jsonErrorResponse($this->getMessageUtils()->getMessageData('error', $request_params['lang'])['verification_code_invalid']);\n }\n return $this->validationProcess($request_params, $verficationCode);\n }", "public function invitePlayerUsingAgencycode($inviteeAgencyCode) {\n\t\t$userIDQuery = \"SELECT id FROM users WHERE soldier_code = ?\";\n\t\t$userIDSth = ConnectionFactory::SelectAsStatementHandler($userIDQuery, array($inviteeAgencyCode));\n\t\t$userIDRow = $userIDSth->fetch(PDO::FETCH_ASSOC);\n\t\tif ($userIDRow) {\n\t\t\t$inviteeID = $userIDRow['id'];\n\t\t\t\n\t\t\t$already_existing_check = \"Select count(0) as numrows FROM agencies WHERE user_one_id = $this->id AND user_two_id = $inviteeID OR user_one_id = $inviteeID AND user_two_id = $this->id\";\n\t\t\t$counter = ConnectionFactory::executeQuerySimple($already_existing_check);\n\t\t\tif($counter > 0) {\n\t\t\t\treturn \"alreadyExisting\";\n\t\t\t}\n\t\t\t$success = ConnectionFactory::InsertIgnoreIntoTableBasic(\"agencies\", array('user_one_id'=>$this->id, \n\t\t\t\t'user_two_id'=>$inviteeID, 'accepted'=>0));\n\t\t\tif (!$success) {\n\t\t\t\treturn \"fail\";\n\t\t\t} else {\n\t\t\t\treturn \"success\";\n\t\t\t}\n\t\t} else {\n\t\t\treturn \"noUserWithAgencyCode\";\n\t\t}\n\t}", "protected function validateCode(string|int $code): bool\n {\n return $this->twoFactorAuth->validateCode($code);\n }", "public function getPartnerId()\n {\n return $this->partner_id;\n }", "public function getPartnerId()\n {\n return $this->partner_id;\n }", "public function checkCodeForDuplicate($code)\n {\n if($code != null)\n {\n $this->db->select('*', FALSE);\n $this->db->from('items');\n $query = $this->db->where('items.code', $code)->get();\n\n if($query->num_rows() > 0)\n {\n return $query->result()[0];\n }\n else {\n return null;\n }\n }\n }", "public function verify_account($account_id, $verification_code)\n {\n $this->db->select('verification_code');\n $this->db->where('id', $account_id);\n $this->db->limit(1);\n $real_verification_code = $this->db->get('accounts')->row();\n if (!empty($real_verification_code))\n {\n $real_verification_code = $real_verification_code->verification_code;\n if (!empty($real_verification_code) && $real_verification_code === $verification_code)\n {\n // Set the account to be activated/verified/validated in the database\n $this->db->where('id', $account_id);\n $this->db->limit(1);\n $this->db->update('accounts', array('is_verified' => true, 'verification_code' => NULL));\n return true;\n }\n }\n return false;\n }" ]
[ "0.8086262", "0.6407213", "0.63327724", "0.6244169", "0.6203155", "0.5983598", "0.5879071", "0.5845439", "0.57556194", "0.5736668", "0.57215846", "0.5675411", "0.5669275", "0.5653539", "0.56459343", "0.5577234", "0.5566618", "0.5557417", "0.552936", "0.5515569", "0.5508146", "0.5505305", "0.54995424", "0.54820585", "0.5481711", "0.54814667", "0.5469529", "0.54377276", "0.5428757", "0.5420098", "0.536053", "0.53419393", "0.5327676", "0.5326828", "0.53042454", "0.5303961", "0.53012455", "0.5291224", "0.52807367", "0.52795655", "0.52706975", "0.52690315", "0.5267133", "0.5251254", "0.524104", "0.524104", "0.5234124", "0.5232724", "0.52312434", "0.523108", "0.5206723", "0.51974213", "0.51857555", "0.51816565", "0.51791096", "0.51777524", "0.517046", "0.51643825", "0.51573557", "0.51530206", "0.51530206", "0.5148315", "0.5146207", "0.5143851", "0.51394916", "0.51317936", "0.5131134", "0.51259494", "0.5122243", "0.5112172", "0.51113737", "0.5104103", "0.5103758", "0.50963116", "0.5092672", "0.50888515", "0.5087797", "0.5079527", "0.5069129", "0.5066475", "0.50641495", "0.5057956", "0.5057914", "0.5057207", "0.5054338", "0.5048306", "0.5047577", "0.50463665", "0.504248", "0.5035573", "0.50291926", "0.5022497", "0.50143474", "0.50082827", "0.4995925", "0.49939185", "0.4992283", "0.4992283", "0.4977766", "0.49758446" ]
0.7549789
1
/ name: updateAdminAirport params: $portdata, $airportid return: desc: change the details of the Airport Admin
public static function updatePartner($portdata, $id) { $status = array('stat'=>'error', 'msg'=>'Something went wrong'); DB::table('sb24_partnercode')->where('id', $id)->update( $portdata ); $status = array('stat'=>'ok', 'msg'=>'Partner Edited Successfully'); return $status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Airport $airport)\n {\n //\n }", "public function testUpdateAirport()\n {\n $db=new Db();\n $this->airport->setAirportFromDB($db, 8);\n $actual=$this->airport->updateAirport($db);\n $this->assertEquals(true,$actual);\n }", "function updateAirport( $params ) {\n global $airportManager;\n\n $result = [];\n $data = [];\n\n // get PUT data from the request\n parse_str( file_get_contents(\"php://input\"), $data );\n\n if ( !empty( $params[ \"id\" ] ) ) {\n\n if ( !empty( $data ) ) {\n try {\n // Convert string to int\n $id = intval( $params[ \"id\" ], 10 );\n\n // get the database object first\n $airport = $airportManager->getAirportById( $id );\n\n if ( $data[ 'code' ] ) {\n $airport->setCode( $data[ 'code' ] );\n }\n\n if ( $data[ 'cityCode' ] ) {\n $airport->setCityCode( $data[ 'cityCode' ] );\n }\n\n if ( $data[ 'name' ] ) {\n $airport->setName( $data[ 'name' ] );\n }\n\n if ( $data[ 'city' ] ) {\n $airport->setCity( $data[ 'city' ] );\n }\n\n if ( $data[ 'countryCode' ] ) {\n $airport->setCountryCode( $data[ 'countryCode' ] );\n }\n\n if ( $data[ 'regionCode' ] ) {\n $airport->setRegionCode( $data[ 'regionCode' ] );\n }\n\n if ( $data[ 'latitude' ] ) {\n $airport->setlatitude( $data[ 'latitude' ] );\n }\n\n if ( $data[ 'longitude' ] ) {\n $airport->setLongitude( $data[ 'longitude' ] );\n }\n\n if ( $data[ 'timezone' ] ) {\n $airport->setTimezone( $data[ 'timezone' ] );\n }\n\n // Save our change\n $airport = $airportManager->updateAirport( $airport );\n\n $result = [\n \"id\" => $airport->getId(),\n \"code\" => $airport->getCode(),\n \"cityCode\" => $airport->getCityCode(),\n \"name\" => $airport->getName(),\n \"city\" => $airport->getCity(),\n \"countryCode\" => $airport->getCountryCode(),\n \"regionCode\" => $airport->getRegionCode(),\n \"latitude\" => $airport->getlatitude(),\n \"longitude\" => $airport->getLongittude(),\n \"timezone\" => $airport->getTimezone()\n ];\n\n } catch (\\Throwable $th) {\n $result = [ \"error\" => true, \"message\" => \"Something happen on our side.. please try again later\" ];\n }\n } else {\n $result = [ \"error\" => true, \"message\" => \"No data provide to update the Airport, please provide one element from this list: 'code', 'cityCode', 'name', 'city', 'regionCode', 'countryCode', 'latitude', 'longitude', or 'timezone'\" ];\n }\n }\n\n echo json_encode( $result );\n}", "public function update($id)\n\t{\n\t\t$input = array_except(Input::all(), '_method');\n\t\t$validation = Validator::make($input, Airport::$rules);\n\n\t\tif ($validation->passes())\n\t\t{\n\t\t\t$airport = $this->airport->find($id);\n\t\t\t$airport->update($input);\n\n\t\t\treturn Redirect::route('admin.airports.show', $id);\n\t\t}\n\n\t\treturn Redirect::route('admin.airports.edit', $id)\n\t\t\t->withInput()\n\t\t\t->withErrors($validation)\n\t\t\t->with('message', 'There were validation errors.');\n\t}", "public function update(Request $request, $id)\n {\n //\n $data = $this->validate($request, [\n 'airport_name' => 'required',\n 'code' => 'required',\n 'city' => 'required'\n ]);\n Airport::find($id)->update($data);\n return redirect('admin/airport')->with('alert-success','Data berhasil diubah!');\n }", "public function update($id)\n {\n helper('form');\n helper('inflector');\n\n if ($this->input->method() == 'post')\n {\n $post_data = $this->input->post();\n\n// if ($this->airports/models/airport_model->update($id, $post_data))\n if ($this->Airport_model->update($id, $post_data))\n {\n $this->setMessage('Successfully updated item.', 'success');\n redirect( site_url('airports') );\n }\n\n// $this->setMessage('Error updating item. '. $this->airports/models/airport_model->error(), 'danger');\n $this->setMessage('Error updating item. '. $this->airport_model->error(), 'danger');\n }\n\n// $item = $this->airports/models/airport_model->find($id);\n $item = $this->Airport_model->find($id);\n $this->setVar('item', $item);\n\n\t\t$this->render();\n }", "public function update($id, UpdateSomProjectsAirportRequest $request)\n {\n try{\n if(!CRUDBooster::isUpdate()) {\n CRUDBooster::insertLog(trans(\"crudbooster.log_try_update\",['module'=>CRUDBooster::getCurrentModule()->name]));\n CRUDBooster::redirect(CRUDBooster::adminPath(),trans('crudbooster.denied_access'));\n }\n\n $somProjectsAirport = $this->somProjectsAirportRepository->find($id);\n\n if (empty($somProjectsAirport)) {\n Flash::error('Som Projects Airport not found');\n\n return redirect(route('somAirports.index'));\n }\n\n $somProjectsAirport = $this->somProjectsAirportRepository->update($request->all(), $id);\n\n $data = array();\n if($request->file()) {\n $this->validate($request, [\n 'file' => 'mimes:jpeg,jpg,png,gif', //only allow this type extension file.\n ]);\n\n $fileName = time().'_'.$request->file->getClientOriginalName();\n $filePath = $request->file('file')->storeAs('uploads', $fileName, 'public'); \n $data['img_url'] = '/storage/app/public/' .$filePath; \n $this->somProjectsAirportRepository->updateData($id, $data); \n }\n }catch(\\Exception $e){\n SomLogger::error(\"ERR1004\",\"Error SomProjectsAirportController->update(): \".$e->getMessage());\n SomLogger::error(\"ERR1004\",$e->getTraceAsString());\n Flash::error($e->getMessage());\n return redirect(route('somAirports.index'));\n } \n \n CRUDBooster::insertLog(trans(\"crudbooster.log_update\",['module'=>CRUDBooster::getCurrentModule()->name])); \n\n Flash::success('Som Projects Airport updated successfully.');\n\n return redirect(route('somAirports.index'));\n }", "public function updateAction($id)\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entity = $em->getRepository('BackendCoreBundle:Aeroport')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Airoport entity.');\n }\n\n $editForm = $this->createForm(new AiroportType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n $request = $this->getRequest();\n\n $editForm->bindRequest($request);\n\n if ($editForm->isValid()) {\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('airoport_edit', array('id' => $id)));\n }\n\n return $this->render('BackendAdminBundle:Airoport:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function update(Request $request, $id)\n {\n //\n $request->validate([\n 'code' => 'required',\n 'city_code'=> 'required',\n 'name'=> 'required',\n 'city'=> 'required',\n 'country_code'=> 'required',\n 'region_code'=> 'required',\n 'latitude'=> 'required',\n 'longitude'=> 'required',\n 'timezone'=> 'required'\n ]);\n $airport = Airport::findorFail($id);\n $airport->update($request->all());\n\n return redirect()->route('airport_list')\n ->with('success', 'Airport updated successfully');\n }", "function updateAdministrator($data) {\r\n\t\r\n\t\t//Check to see if the type is zero or not\r\n\t\tif($data['type'] == 0) {\r\n\t\t\t$type = 2; //Set the type variable to 2 (technician)\r\n\t\t} else if($data['type'] == 1) {\r\n\t\t\t$type = 1;\r\n\t\t} else if($data['type'] == 2) {\r\n\t\t\t$type = 2;\r\n\t\t} //end if\r\n\r\n\t\t//We must check if the password has changed because it won't store properly with encryption if it was changed\r\n\t\t$adminPassword = $this->query('SELECT password FROM admins WHERE id='. $data['id'] .';');\r\n\r\n\t\t//check if the password has changed\r\n\t\tif( ($data['password']) != ($adminPassword['0']['admins']['password']) ) {\r\n\r\n\t\t//The password has been changed, update all fields\r\n\t\t$this->query('UPDATE admins SET `modified` = CURRENT_TIMESTAMP(), `username` = \"'. $data['username'] .'\", `password` = md5(\"'. $data['password'] .'\"), \r\n\t\t\t\t\t `first_name` = \"'. $data['first_name'] .'\", `middle_name`= \"'. $data['middle_name'] .'\", `last_name` = \"'. $data['last_name'] .'\", \r\n\t\t\t\t\t `email` = \"'. $data['email'] .'\", `type` = '. $type .', `computer_id` = '. $data['computer_id'] .' WHERE id= '. $data['id'] .';');\r\n\r\n\t\t} else {\r\n\r\n\t\t//The password has not changed so update everything except for the password\r\n\t\t$this->query('UPDATE admins SET `modified` = CURRENT_TIMESTAMP(), `username` = \"'. $data['username'] .'\", `enabled` = '. $data['enabled'] .', \r\n\t\t\t\t\t `first_name` = \"'. $data['first_name'] .'\", `middle_name`= \"'. $data['middle_name'] .'\", `last_name` = \"'. $data['last_name'] .'\", \r\n\t\t\t\t\t `email` = \"'. $data['email'] .'\", `type` = '. $type .', `computer_id` = '. $data['computer_id'] .' WHERE id= '. $data['id'] .';');\r\n\r\n\t\t} //end if\r\n\r\n\t}", "public function updateAction(Request $request, $id)\n {\n if(!$this->get('security.authorization_checker')->isGranted('ROLE_ADMIN')){\n throw new ForbiddenOverwriteException('Access Denied');\n }\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FlyPlatformBundle:Airport')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Airport entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n $editForm = $this->createEditForm($entity);\n $editForm->handleRequest($request);\n\n if ($editForm->isValid()) {\n $em->flush();\n\n return $this->redirect($this->generateUrl('airport_edit', array('id' => $id)));\n }\n\n return $this->render('FlyPlatformBundle:Airport:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function update(){\n\t\t$this->autenticate();\n\t\t$id = $_POST['id'];\n\t\t$nombre = \"'\".$_POST['nombre'].\"'\";\n\t\t$fecha_nacimiento = \"'\".$_POST['fecha_nacimiento'].\"'\";\n\t\t$genero = \"'\".$_POST['genero'].\"'\";\n\t\t$tipo_sangre = \"'\".$_POST['tipo_sangre'].\"'\";\n\t\t$estado_civil = \"'\".$_POST['estado_civil'].\"'\";\n\t\t$peso = $_POST['peso'];\n\t\t$estatura = $_POST['estatura'];\n\t\t$provincia = \"'\".$_POST['provincia'].\"'\";\n\t\t$distrito = \"'\".$_POST['distrito'].\"'\";\n\t\t$corregimiento = \"'\".$_POST['corregimiento'].\"'\";\n\t\t$direccion = \"'\".$_POST['direccion'].\"'\";\n\t\t$telefono = \"'\".$_POST['telefono'].\"'\";\n\t\t$correo = \"'\".$_POST['correo'].\"'\";\n\t\t$sede = \"'\".$_POST['sede'].\"'\";\n\t\t$categoria = \"'\".$_POST['categoria'].\"'\";\n\t\t$departamento = \"'\".$_POST['departamento'].\"'\";\n\t\t$apartado_postal = \"'\".$_POST['apartado_postal'].\"'\";\n\t\t$cargo = \"'\".$_POST['cargo'].\"'\";\n\t\t$representante_gobierno = \"'\".$_POST['representante_gobierno'].\"'\";\n\t\t$unidad = \"'\".$_POST['unidad'].\"'\";\n\t\trequire_once(\"../app/models/administrativo.php\");\n\t\t$administrativo=new Administrativo();\n\t\t$administrativo->update($id,$nombre,$fecha_nacimiento,$genero,$tipo_sangre,$estado_civil,$peso,$estatura,$provincia,$distrito,$corregimiento,$direccion,$telefono,$correo,$sede,$categoria,$departamento,$apartado_postal,$cargo,$representante_gobierno,$unidad);\n\t\t$id = strval($id);\n\t\theader(\"Location: http://localhost:8000/administrativos/show/$id\");\n\t\texit;\n\t}", "public function updateData($data){\n\t\t// $this->db->query($query);\n\t\t// $this->db->bind('deptId',$data['deptId']);\n\t\t// $this->db->bind('deptName',$data['deptName']);\n\t\t// $this->db->execute();\n\n\t\t// return $this->db->rowCount();\n\t}", "public function update(Request $request, $id)\n {\n Airport::find($id)->update([\n 'name' => $request->name,\n 'code' => $request->code,\n 'city_id' => intval($request->city)\n ]);\n\n return redirect()->route('airport.index');\n }", "public function edit($id)\n {\n if (!CRUDBooster::isRead()) {\n CRUDBooster::insertLog(trans(\"crudbooster.log_try_edit\", ['module'=>CRUDBooster::getCurrentModule()->name]));\n CRUDBooster::redirect(CRUDBooster::adminPath(), trans('crudbooster.denied_access'));\n }\n\n $somProjectsAirport = $this->somProjectsAirportRepository->find($id);\n\n if (empty($somProjectsAirport)) {\n Flash::error('Som Projects Airport not found');\n\n return redirect(route('somAirports.index'));\n }\n\n $data = array();\n $data['id'] = $id;\n $data['countries'] = array();\n $somCountries = $this->somCountryRepository->all();\n foreach ($somCountries as $somCountry) {\n $data['countries'][$somCountry->id] = $somCountry->country;\n } \n\n $data['airport_types'] = array();\n $airport_types = $this->somProjectsAirportTypeRepository->all();\n foreach ($airport_types as $airport_type) {\n $data['airport_types'][$airport_type->id] = $airport_type->name;\n }\n\n $selected_country_id = 0;\n if(!empty($somProjectsAirport->som_country_id)){\n $selected_country_id = $somProjectsAirport->som_country_id;\n }\n $data['selected_country'] = $selected_country_id;\n $data['selected_airport'] = $somProjectsAirport->som_projects_airport_type_id;\n \n // $data['somProjectsAirport'] = $somProjectsAirport;\n\n return view('som_projects_airports.edit')->with('somProjectsAirport', $somProjectsAirport)\n ->with('data',$data);\n }", "public function edit(Aircraft $aircraft)\n {\n //\n }", "public function editDepartmentUpdate()\n {\n if($this::check_session()){\n $this->form_validation->set_rules('updtdepartment', 'Department', 'required');\n $this->form_validation->set_rules('updtdepartmentCode', 'Department Code', 'required');\n $this->form_validation->set_rules('departmentId', 'Department ID', 'required');\n \n $id = $this->input->post('departmentId');\n $dept = $this->input->post('updtdepartment');\n $deptcode = $this->input->post('updtdepartmentCode');\n \n if($this->form_validation->run()) { \n $this->Admin_model->editDepartmentUpdate($id, $dept, $deptcode);\n $this->addRemoveDepartments();\n }else{\n $this->addRemoveDepartments();\n }\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\t\t$empmodel = $this->findSupperAdmin($id);\n\t\t$empmodel->scenario = 'updateCompany';\n\t\t$password=$empmodel->Password;\n\t\t\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\t\n\t\t\t$empmodel->load(Yii::$app->request->post());\n $empmodel->CreditBalance=0;\n $empmodel->CreditLimit=0;\n $empmodel->CreditOnHold=0;\n\t\t\t\t\t\t\n\t\t\tif(Yii::$app->request->post()['Employee']['Password']!=\"\"){\n\t\t\t\t$empmodel->setPassword(Yii::$app->request->post()['Employee']['Password']);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$empmodel->Password=$password;\n\t\t\t\t$empmodel->password_repeat=$password;\n\t\t\t}\n\t\t\t\t\t\t\n \t\n\t\t\tif($empmodel->save())\n\t\t\t{\n\t\t\t\tYii::$app->session->setFlash('success', \"Company Updated Successfully\");\n\t\t\t\treturn $this->redirect(['view', 'id' => $model->CompanyId]);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$error=[];\n\t\t\t\t\n\t\t\t\tforeach($empmodel->getErrors() as $attribute => $message){\n\t\t\t\t\t$errorMesage=\"\";\n\t\t\t\t\t$errorMesage.=\"<strong>\".$empmodel->getAttributeLabel($attribute).\"</strong> :\";\n\t\t\t\t\t$errorMesage.=implode(\". \",$message);\n\t\t\t\t\t$error[]=$errorMesage;\n\t\t\t\t}\n\t\t\t\tYii::$app->session->setFlash('error',Yii::t('company', implode(\"<br>\",$error)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn $this->render('upadte', [\n\t\t\t\t\t'model' => $model,\n\t\t\t\t\t'empmodel'=>$empmodel\n\t\t\t\t]);\n\t\t\t}\n\t\t\t\n \n } else {\n\t\t\t$error=[];\n\t\t\t\n\t\t\tforeach($model->getErrors() as $attribute => $message){\n\t\t\t\t$errorMesage=\"\";\n\t\t\t\t$errorMesage.=\"<strong>\".$model->getAttributeLabel($attribute).\"</strong> :\";\n\t\t\t\t$errorMesage.=implode(\". \",$message);\n\t\t\t\t$error[]=$errorMesage;\n\t\t\t}\n\t\t\tif($error)\n\t\t\tYii::$app->session->setFlash('error',Yii::t('company', implode(\"<br>\",$error)));\n\t\t\n\t\t\t$empmodel->Password='';\n\t\t\t$empmodel->password_repeat='';\n return $this->render('update', [\n 'model' => $model,\n\t\t\t\t'empmodel'=>$empmodel\n ]);\n }\n }", "function editAdminHandler() {\n global $inputs;\n\n updateDb('admin',[\n 'name' => $inputs['admin_username'],\n 'password' => $inputs['admin_password'],\n ], [\n 'id' => $inputs['id']\n ]);\n\n updateDb('admin_building',[\n 'building_id' => $inputs['admin_building'],\n ], [\n 'admin_id' => $inputs['id']\n ]);\n\n formatOutput(true, 'update success');\n}", "public function editAction($id)\n {\n if(!$this->get('security.authorization_checker')->isGranted('ROLE_ADMIN')){\n throw new ForbiddenOverwriteException('Access Denied');\n }\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FlyPlatformBundle:Airport')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Airport entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('FlyPlatformBundle:Airport:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function update(Request $request, Aircraft $aircraft)\n {\n //\n }", "public function actionUpdate() {\n $data = $this->data;\n $model = $this->findModel($data['employee_id']);\n if ($model) {\n $model->employee_code = $data['employee_code'];\n $model->employee_name = $data['employee_name'];\n $model->employee_email = $data['employee_email'];\n $model->status = $data['status'];\n $model->department_id = $data['department_id'];\n\n $errors = $this->EmpDetailsvalidate($data['address']);\n if ($model->validate() && empty($errors)) {\n $model->save();\n $this->InsertUpdateEmpAddress($model->id, $data['address']);\n echo $this->messageReturn(\"success\", 200);\n exit;\n } else {\n $error = $model->getErrors();\n echo $this->messageReturn(\"error\", 404, \"\", $error);\n exit;\n }\n } else {\n echo $this->messageReturn(\"failed\", 201, \"\", \"Please sent correct parameter\");\n exit;\n }\n }", "public function edit($airport)\n {\n //\n $airport = Airport::findorFail($airport);\n return view('admin.airport_edit', compact('airport'));\n }", "public function update(EditFacilityPlanRequest $request, $id)\n {\n \t$facilityKeys= ArrayCheckHelper::ignoreRepeated($request->all(), \"facility\");\n \t\n \t/*foreach($request->all() as $key => $val){\n \t\tif($key !== \"_token\" && $key !==\"name\")\n \t\t\t$facilityKeys[]= $val;\n \t}*/\n \t\n \t\n \t$facility_plan= FacilityPlan::find($id);\n \t$facility_plan->fill($request->all());\n \t$facility_plan->save();\n \t \n \t$facility_plan->facilities()->sync($facilityKeys);\n \n $message= $facility_plan->name . ' updated succesfully';\n if($request->ajax()){\n \treturn $message;\n }\n Session::flash('message',$message);\n return redirect()->route('admin.facility_plans.index');\n }", "public function update()\n {\n $this->model->load('TacGia');\n $tacgia = $this->model->TacGia->findById($_POST['id']);\n $tacgia->anh = $_POST['anh'];\n $tacgia->ten = $_POST['ten'];\n $tacgia->thongtin = $_POST['thongtin'];\n $tacgia->update();\n\n go_back();\n }", "public function update($data)\n {\n $seguridad = $this->seguridad(['Administrador']);\n if ($seguridad[0] === false) {\n abort(404);\n }\n $dato = json_decode($data, true);\n $fecha = FechaEspecial::find($dato['Id']);\n $fechaEspecial['id'] = $dato[\"Id\"];\n $fechaEspecial['descripcion'] = $dato[\"Nombre\"];\n $fechaEspecial['fecha'] = $dato[\"Inicio\"];\n $ok = $this->validatorUpdate($fechaEspecial);\n if ($ok->fails()) {\n return $ok->errors()->all();;\n }\n $fecha->update($fechaEspecial);\n return (1);\n }", "public function update_admin($data, $id=null){\n\t\t\t\n\t\t\t//$username = $this->session->userdata('admin_username');\n\t\t\tif($id != '' && $id != null){\n\t\t\t\t$this->db->where('id', $id);\n\t\t\t}\n\t\t\t\n\t\t\t$query = $this->db->update($this->table, $data);\n\t\t\t\n\t\t\tif ($query){\t\n\t\t\t\treturn true;\n\t\t\t}else {\n\t\t\t\treturn false;\n\t\t\t}\t\t\t\n\t\t\t\n\t\t}", "public function update(){\n $id = filter_var($_POST['id'], FILTER_VALIDATE_INT);\n $data = $this->validateInput();\n if($id && $data){\n $device = Device::loadById($id);\n $device->setName($data['name']);\n $device->setIP($data['ip']);\n $device->setSubnet($data['subnet']);\n $device->setMAC(strtoupper($data['mac']));\n $device->update();\n $this->setSuccess('Device successfully edited!');\n }else{\n $this->setError('Error while saving device!');\n }\n\n\n header('Location: /devices');\n }", "public function update_admin($post_data, $id) {\n\t\t$this->db->where('id', $id);\n\t\t$this->db->update('admin_login', $post_data);\n\t}", "public function update($data) {}", "public function update($data) {}", "public function updateAdminDetails($data) {\n extract($data);\n $sql = \"UPDATE admin_tab SET profile_image='$imagePath',username = '$userName',password = '$password',admin_email = '$eMail',\"\n . \"admin_officetype = '$officeType',admin_number = '$number',admin_office_address = '\".addslashes($officeAddress).\"',admin_firstname = '$firstName',\"\n . \"admin_lastname = '$lastName',landline_no = '$landline_no' WHERE admin_id = '1'\";\n // echo $sql; die();\n $this->db->query($sql);\n if ($this->db->affected_rows() > 0) {\n return TRUE;\n } else {\n return FALSE;\n }\n }", "public function update(Request $request, $id) {\n $flight = Flight::find($id);\n\n $flight->dep_airport = $request->input('dep_airport.id');\n $flight->dest_airport = $request->input('dest_airport.id');\n $flight->save();\n\n return \"Sucess updating user #\" . $flight->id;\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update(Request $request, $id)\n {\n //\n $request->validate([\n 'code' => 'required',\n 'name' => 'required'\n ]);\n $airline = Airline::findorFail($id);\n $airline->update($request->all());\n\n return redirect()->route('airlines_list')\n ->with('success', 'Airline updated successfully');\n }", "function update (Request $request, $id) \n {\n $validatedData = $request->validate([\n 'department_name' => 'required',\n 'department_desc' => 'required',\n 'is_active' => 'required',\n ]);\n \n \t$department = Department::where('id','=',$id)->first();\n if (session()->get('session_superadmin') == 1) {\n $validatedData = $request->validate([\n 'id_country' => 'required',\n ]);\n $department->id_country = $request->id_country;\n }else{\n $department->id_country = session()->get('session_country');\n }\n $department->department_name = $request->department_name; \n $department->department_desc = $request->department_desc; \n $department->email = $request->email;\n $department->head_of_department = $request->head_of_department;\n $department->manager = $request->manager;\n $department->flag_designated = $request->flag_designated;\n $department->flag_external = $request->flag_external;\n $department->is_active = $request->is_active;\n $department->updated_by = session()->get('session_name') ;\n \t$department->save();\n\n $request->session()->flash('alert-success', 'Department has been updated successfully!');\n\n \treturn redirect('department');\n }", "public function update($raporAdminSetting);", "function Avi_Update(){\n\t\t\n\t\t\n\t\t//when click on button\n\t\tif(isset($_POST['avibtnupdate'])){\n\t\t\t\n\t\t\t//move id into variable\n\t\t\t$get_id = $_GET['Edit'];\n\t\t\t\n\t\t\t//values for table \n\t\t\t$values = \"monday='\".$_POST['monstart'].\" - \".$_POST['monend'].\"',tuesday='\".$_POST['tustart'].\" - \".$_POST['tuend'].\"',wednesday='\".$_POST['wedstart'].\" - \".$_POST['wedend'].\"',thursday='\".$_POST['thustart'].\" - \".$_POST['thuend'].\"',friday='\".$_POST['fristart'].\" - \".$_POST['friend'].\"',saturday='\".$_POST['satstart'].\" - \".$_POST['satend'].\"',sunday='\".$_POST['sunstart'].\" - \".$_POST['sunend'].\"',user_id='\".$_POST['doctor'].\"',date=NOW()\";\n\t\t\t\n\t\t\t//Update From Avialibalility table\n\t\t\t$this->Update('availability',$values,\" where id='$get_id' \",'Availability?List&m');\n\t\t\t\n\t\t\t\n\t\n\t\t} // ifisset close\n\t\t\n\t}", "public function edit($data=array()) {\n foreach ($data as $campo=>$valor) {\n $$campo = $valor;\n }\n \n $this->parametros = array($banc_codigo,$banc_nombre);\n $this->sp = \"str_consultaBanco_upd\";\n $this->executeSPAccion();\n if($this->filasAfectadas>0){\n $this->mensaje=\"Banco modificado exitosamente\";\n }else{\n $this->mensaje=\"No se ha actualizado el banco\";\n }\n }", "public function edit($id)\n\t{\n\t\t$airport = $this->airport->find($id);\n\n\t\tif (is_null($airport))\n\t\t{\n\t\t\treturn Redirect::route('admin.airports.index');\n\t\t}\n\n\t\treturn View::make('airports.edit', compact('airport'));\n\t}", "function update_itinerary($pid) {\n $i_trip_name = $_POST['trip_name'];\n $i_region_name = $_POST['region_name'];\n $i_price_include = $_POST['price_include'];\n $i_price_exclude = $_POST['price_exclude'];\n $i_equipment = $_POST['equipment'];\n $i_itinerary_detail = $_POST['itinerary_detail'];\n $i_faqs = $_POST['faqs'];\n $i_highlight = $_POST['highlight'];\n $i_video_link = $_POST['video_link'];\n $sql = \"UPDATE itinerary SET trip_id='$i_trip_name',region_id='$i_region_name',price_include='$i_price_include',price_exclude='$i_price_exclude',equipment='$i_equipment',itinerary_detail='$i_itinerary_detail',faqs='$i_faqs',\n\t\t\thighlight='$i_highlight',video_link='$i_video_link' WHERE id='$pid'\";\n $this->mysqli->query($sql);\n if ($this->mysqli->error) {\n echo $this->mysqli->error;\n } else {\n echo \"<script type='text/javascript'>alert('Itinerary updated successfully')</script>\";\n }\n }", "public function update_equipment($data)\n\t {\n\t }", "public function update($departmentid)\n\t{\n\t\t$dept_id = Input::get('department_id');\n\t\t$validation = Department::validate(Input::all());\n\t\t\n\t\tif($validation->passes()){\n\t\t\t$department = ['univ_id'=>Input::get('universityname'),\n\t\t\t\t'department'=>Input::get('department'),\n\t\t\t\t'seat'=>Input::get('seat')\n\t\t\t\t]; \n\n\t\t\tDepartment::find($dept_id)->update($department);\n\t\t\treturn Redirect::route('department.index');\n\t\t}\n\t\treturn Redirect::route('department.edit',$departmentid)->withInput()->withErrors($validation);\n\t}", "public function actionUpdate($id)\n {\n if(isset(Yii::$app->user->identity->id)){\n if(SiteController::findCom(17)){\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->ADepId]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n else {\n $this->redirect(['site/error']);\n }\n }else {\n $this->redirect(['site/login']);\n }\n}", "public function account_update($data, $id)\n {\n $this->db->update('customer', $data, array('id' => $id));\n }", "public function editAccount($account_id, $data)\n\t{\n\t\t$affected = DB::update('UPDATE accounts SET refresh_interval = ? WHERE account_id = ?', [$data['refresh_interval'], $account_id]); \n\n\t\tif ($affected) {\n\t\t\t$account = $this->getAccount($account_id);\n\t\t\treturn ['status' => 'success', 'title' => $account->title];\n\t\t} else {\n\t\t\treturn ['status' => 'error', 'error' => 'Ups!!! Not affected.'];\n\t\t}\n\t}", "public function edit($id)\n {\n $data = Airport::where('id',$id)->get();\n return view('admin.plane.airport.edit',compact('data'));\n }", "public function updateAdmin($adminID = NULL, $data = NULL) {\n //return if neccessary data not given\n if($adminID == NULL || $data == NULL) {\n return FALSE;\n }\n\n //update admin\n $this->db->where(array('adminID' => (int)$adminID));\n return $this->db->update('tbl_admin', $this->_converter->prepareForDatabase($data));\n }", "public function UpdateDocPortaria($idportaria = NULL, $dados_portaria = NULL) {\r\n $this->db->where('idPortaria', $idportaria);\r\n $this->db->update('portaria', $dados_portaria);\r\n return TRUE;\r\n }", "public function editarAportante(){ \n if(isset($_POST[\"cedulaE\"]))\n {\n $aportante=new Aportante($this->adapter);\n $aportante->setAportanteID($_POST[\"idE\"]);\n $aportante->setCedula($_POST[\"cedulaE\"]);\n $aportante->setNames($_POST[\"namesE\"]);\n $aportante->setLastnames($_POST[\"lastnamesE\"]);\n $aportante->setPhoneHome($_POST[\"phoneHomeE\"]);\n\t\t\t$aportante->setPhoneMobile($_POST[\"phoneMobileE\"]);\n\t\t\t$aportante->setEmail($_POST[\"emailE\"]);\n $save=$aportante->update(); // Manda a actualizar la moto en el modelo\n } \n $this->redirect(\"BandejaCallcenters\", \"index\"); // COntrolador + Vista\n }", "public function update_plan() {\n if (empty($this->user->admin)) {\n Router::redirect('/');\n die();\n }\n\n # Set up query\n $q = \"UPDATE plans SET\n\t\t\t description='\".$_POST['description'].\"', time='\".$_POST['time'].\"', public='\".(!empty($_POST['public'])?1:0).\"'\n\t\t\t WHERE plan_id=\".$_POST['plan_id'];\n $plans = DB::instance(DB_NAME)->query($q);\n\t\t\n\t\t#Adding action to System Log\n $data3 = Array (\n\n \"modified_date\" => Time::now(),\n \"FK_id\" => $_POST['plan_id'],\n \"FK_table\" => 'plans',\n \"login\" => false,\n \"modified_by\" => $this->user->user_id\n );\n DB::instance(DB_NAME)->insert('logs',$data3);\n\n //Return result to jTable\n $jTableResult = array();\n $jTableResult['Result'] = \"OK\";\n print json_encode($jTableResult);\n }", "public function updateAction() {\n $model = Mage::getModel('inventorypurchasing/purchaseorder_draftpo')\n ->load($this->getRequest()->getParam('id'));\n $field = $this->getRequest()->getParam('field');\n if (!$field) {\n return $this->getResponse()->setBody(json_encode(array('success' => 0)));\n }\n $value = $this->getRequest()->getParam('value');\n $updateData = Mage::helper('vendorsinventory/draftpo')->prepareUpdateData($field, $value);\n try {\n $returnObject = $model->update($updateData);\n $return = $returnObject->getData();\n $return['success'] = 1;\n return $this->getResponse()->setBody(json_encode($return));\n } catch (Exception $ex) {\n return $this->getResponse()->setBody(json_encode(array('success' => 0)));\n }\n }", "public function update(Request $request, $id)\n {\n $userauth = Port_Asset::findOrFail($id);\n $input = [\n 'port_type_id' => $request['port_type_id'],\n 'asset_type_id' => $request['asset_type_id'],\n 'description' => $request['description']\n\n\n ];\n $this->validate($request, [\n\n ]);\n Port_Asset::where('id', $id)\n ->update($input);\n\n return redirect ('/admin/port-asset');\n }", "public function update($id, $nama_pasien, $tempat_lahir, $tanggal_lahir, $jenis_kelamin, $golongan_darah, $alamat, $pekerjaan, $no_telepon, $unit_tujuan, $pembayaran)\n {\n // echo 'id: '.$id.'<br>';\n // echo 'nama: '.$nama_pasien.'<br>';\n // echo 'tempat lahir: '.$tempat_lahir.'<br>';\n // echo 'tanggal lahir: '.$tanggal_lahir.'<br>';\n // echo 'jk: '.$jenis_kelamin.'<br>';\n // echo 'goldar: '.$golongan_darah.'<br>';\n // echo 'alamat: '.$alamat.'<br>';\n // echo 'pekerjaan: '.$pekerjaan.'<br>';\n // echo 'no_telp: '.$no_telepon.'<br>'; \n // echo 'unit: '.$unit_tujuan.'<br>';\n // echo 'pembayaran: '.$pembayaran.'<br>';exit;\n mysqli_query(\n $this->koneksi,\n \"UPDATE pasien SET nama_pasien='$nama_pasien', tempat_lahir='$tempat_lahir', tanggal_lahir='$tanggal_lahir', jenis_kelamin='$jenis_kelamin', golongan_darah='$golongan_darah', alamat='$alamat', pekerjaan='$pekerjaan', no_telepon='$no_telepon', unit_tujuan='$unit_tujuan', pembayaran='$pembayaran' WHERE id='$id'\"\n );\n }", "public function postUpdate(Request $request, $id) {\n if (($return = UserRoles::hasAccess('demon', $request)) !== true) {\n return redirect()->action($return);\n }\n\n $rules = array(\n 'name' => 'required|min:3',\n 'plan' => 'required|min:3',\n 'validity' => 'required|min:3',\n 'email' => 'required|email|min:3|unique:company,id,' . $id,\n 'domain' => 'required|max:256|unique:company,id,' . $id,\n );\n $this->validate($request, $rules);\n $company = Company::find($id);\n $company->name = $request->input('name');\n $company->email = $request->input('email');\n $company->plan = $request->input('plan');\n $company->validity = $request->input('validity');\n $company->domain = $request->input('domain');\n $company->user_id = $request->input('user_id');\n $this->setUserOtherDB($company->database, $company->user_id);\n $company->updated_by = Auth::user()->_id;\n $company->status = 'enable';\n $company->save();\n $request->session()->flash('status', 'Company ' . $company->role_name . ' Updated successfully!');\n return redirect()->action('CompanyController@getIndex');\n }", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id,$acct,$data=[])\n {\n extract_args($data, [\n 'nickname' => '',\n 'auto_pay_active' => null,\n 'active' => null,\n ]);\n return $this->put(\"debt/{$id}/payaccounts/{$acct}\", $data);\n }", "public function update_userdetails_by_admin($data)\n {\n foreach($data as $key=>$val) $$key=get_magic_quotes_gpc()?$val:addslashes($val);\n \n $query = new Query;\n\n $result = $query->createCommand()->update('core_users', ['user_name' => $name,'company_name' => $company_name,'company_address' => $address,'designation' => $designation,'company_email' => $company_email], 'user_id = \"'.$userid.'\"')->execute();\n\n if ($result == 1){\n return \"SUCCESS\";\n }else{\n return \"FAILED\";\n }\n }", "public function actionUpdateLandData() \r\n {\r\n $res = \"0\";\r\n extract($_POST);\r\n\r\n $landDetails=LandMaster::model()->findByPk($LandID);\r\n $landDetails->Plot_No = $Plot_No ; \r\n $landDetails->Piece = $Piece ; \r\n $landDetails->location = $location ; \r\n $landDetails->Land_Type = $Land_Type ; \r\n $landDetails->TotalArea = $TotalArea ; \r\n $landDetails->length = $length ; \r\n $landDetails->width = $width ; \r\n $landDetails->Remarks = $Remarks ; \r\n $landDetails->North = $North ; \r\n $landDetails->South = $South ; \r\n $landDetails->East = $East ; \r\n $landDetails->West = $West;\r\n\r\n if($landDetails->save()) $res=1;\r\n print CJSON::encode($res);\r\n }", "public function edit(AdminAccount $adminAccount)\n {\n //\n }", "public function edit($data){\n\t\t$this->db->where('id_pinjam',$data['id_pinjam']);\n\t\t$this->db->update('pinjam_uang', $data);\n\n\t}", "public function Update($data) {\n\n }", "function UpdateAdminUser($id,$data)\n {\n $this->db->where('id', $id);\n $this->db->update('users', $data);\n }", "public function update(ApartmentRequest $request, $id)\n {\n $apartment = Apartment::findOrFail($id);\n $this->authorize('update',$apartment);\n $apartment->name = $request->input('name');\n $apartment->num_floor = $request->input('num_floor');\n $apartment->num_room = $request->input('num_room');\n $apartment->save();\n return redirect()->route('apartments.show',['apartment' => $id]);\n }", "public function edit(\r\n int $id,\r\n string $project_name,\r\n string $subtype,\r\n string $current_status,\r\n ?float $capacity_mw,\r\n ?int $year_of_completion,\r\n ?string $country_list_of_sponsor_developer,\r\n ?string $sponsor_developer_company,\r\n ?string $country_list_of_lender_financier,\r\n ?string $lender_financier_company,\r\n ?string $country_list_of_construction_epc,\r\n ?string $construction_company_epc_participant,\r\n string $country,\r\n ?string $province_state,\r\n string $district,\r\n ?string $tributary,\r\n float $latitude,\r\n float $longitude,\r\n ?string $proximity,\r\n ?float $avg_annual_output_mwh,\r\n ?string $data_source,\r\n ?string $announce_more_information,\r\n ?string $link,\r\n ?string $latest_update\r\n ) {\r\n ServerLogger::log(\"Edit Form posted (project's id): \" . $id);\r\n $result = $this->projectService->edit_project(...func_get_args());\r\n if ($result) {\r\n ServerLogger::log(\"=> Edited Project {$result->id} successfully!\");\r\n $location = getenv(\"DEPLOY_URL\") ? getenv(\"DEPLOY_URL\") : \"http://localhost:8080\";\r\n header(\"Location: $location\");\r\n exit;\r\n }\r\n $location = getenv(\"DEPLOY_URL\") ? getenv(\"DEPLOY_URL\") : \"http://localhost:8080\";\r\n header(\"Location: $location\");\r\n exit;\r\n }", "public function update(Request $request, AdminAccount $adminAccount)\n {\n //\n }", "public function update($data,$id)\n {\n $this->plasma = $this->load->database('plasma', TRUE);\n $this->plasma->where('id', $id);\n $query = $this->plasma->update('rol', $data);\n if($query)\n return 'TRUE';\n else\n return 'FALSE';\n }", "public function update(ApartmentRequest $request, $id)\n {\n\n// $validated = $request->validate([\n// 'name' => ['required','min:3','max:255'],\n// 'floors' => ['required','integer','min:1']\n// ]);\n\n $apartment = Apartment::findOrFail($id);\n $this->authorize('update',$apartment);\n $apartment->name = $request->input('name');\n $apartment->floors = $request->input('floors');\n// $apartment->floors = $request->floors;\n $apartment->save();\n return redirect()->route('apartments.show',['apartment' => $id]);\n\n }", "public function update(Request $request, $company,$id)\n {\n /*$projectmanagement->update($requestData);*/\n \n $requestData = $request->all();\n $project = ProjectManagement::findOrFail($id);\n $project->name = $requestData['name'];\n $project->status = $requestData['status'];\n $project->priority =$requestData['priority'];\n $project->deadline = $requestData['deadline'];\n $project->assignee = $requestData['assignee'];\n $project->deliverable = $requestData['deliverable'];\n $project->description = $requestData['description'];\n $project->stakeholders = $requestData['stakeholders'];\n $project->company = $company;\n $project->save();\n\n return redirect('admin/startups/'.$company)->with('success', 'Project has been updated!')->with('company', $company);\n }", "public function updateOneEmployee() {\n\n $employeeModel = $GLOBALS[\"employeeModel\"];\n\n $emp = $employeeModel->getOneByEmployeeID($_SESSION[\"workerID\"]);\n\n $givenOldLogin_Password = filter_input(INPUT_POST, \"givenOldLogin_Password\");\n $givenNewLogin_Password = filter_input(INPUT_POST, \"givenNewLogin_Password\");\n if (($givenOldLogin_Password != NULL) && ($givenNewLogin_Password != NULL)) {\n $oldLogin_Password_encrypted = sha1($givenOldLogin_Password);\n\n if ($oldLogin_Password_encrypted == $emp[\"Login_Password\"]) {\n $givenNewLogin_Password = sha1($givenNewLogin_Password);\n }\n } \n else {\n $givenNewLogin_Password = $emp[\"Login_Password\"];\n //kanskje en error beskjed ?\n }\n $updateFirst_name = filter_input(INPUT_POST, 'First_name');\n $updateLast_name = filter_input(INPUT_POST, 'Last_name');\n $updateBirth = filter_input(INPUT_POST, 'Birth');\n $updatePhone_Number = filter_input(INPUT_POST, 'Phone_Number');\n $updateHome_Address = filter_input(INPUT_POST, 'Home_Address');\n $updateZip_Code = filter_input(INPUT_POST, 'Zip_Code');\n $EmployeeID = filter_input(INPUT_POST, 'EmployeeID');\n\n $employeeModel->updateEmployee($updateFirst_name, $updateLast_name, $updateBirth, $updatePhone_Number, $updateHome_Address, $updateZip_Code, $EmployeeID, $givenNewLogin_Password);\n $employee = $employeeModel->getOneByEmployeeID($EmployeeID);\n\n $data = array(\"employee\" => $employee);\n return $this->render(\"adminInfo\", $data); //MÅ ENDRE NAVN TIL MASTER\n }", "public function dp_tribAnon_Update($data)\n {\n return $this->call('dp_tribAnon_Update', static::prepareParams($data, [\n 'TributeID' => ['numeric'], // Enter the ID number of the tribute you are updating\n 'name' => ['string', 200], // Enter the existing name of the tribute to be updated. See Notes section below for example of a SELECT statement that will give you this info.\n 'dpcode_id' => ['numeric'], // This is the numeric code_ID value that is associated with the tribute type. See Notes section below for example of a SELECT statement that will give you this info.\n 'ActiveFlg' => ['bool'], // Set as 1 for True (active) or 0 for False (inactive)\n 'UserCreateDt' => ['date'], // Enter existing user create date in this format: 'MM/DD/YYYY'\n 'recipients' => ['array'], // Enter the list of all existing and any new recipients using the pipe | symbol as a delimiter. ALSO, prefix the list with capital letter N and also wrap the recipients list in single quotes. Example: @recipients=N'105|43256|323387|137'\n ]));\n }", "public function editBankAccount($id,$data)\n\t {\n $this->db->where('id',$id);\n \t\treturn $this->db->update('bank_account',$data);\n\t }", "public function updateTrainingPlanExercise($aData, $iTrainingPlanExerciseId) \n {\n return $this->update($aData, 'training_plan_x_exercise_id = ' . $iTrainingPlanExerciseId);\n }", "public function update(Request $request, $id)\n {\n $airport = Airport::find($id);\n\n $data = [];\n\n $base_mem = memory_get_usage();\n $before = microtime(true);\n $airport->update($request->all());\n $after = microtime(true);\n $total_mem = memory_get_usage();\n\n $data[] = ($after - $before) * 1000; //Convert to ms\n $data[] = ($total_mem - $base_mem) / 1024; //Convert to kb\n\n $result = implode(',', $data) . \"\\n\";\n\n $this->writeToFile(env('APP_ROOT'),\"update\", $result);\n\n return $airport;\n }", "public function update(Request $request, $id)\n {\n $appartement = Appartement::find($id)->first();\n\n\n $appartement = new Appartement();\n $var1 = $request->input('type');\n $var2 = $request->input('porte');\n\n $res = $var1 . ' ' . 'N°' . $var2;\n $appartement->nom = $res;\n $appartement->id_Immeuble = $request->input('immeuble');\n $appartement->Type_du_bien = $request->input('type');\n $appartement->Num_Porte = $request->input('porte');\n $appartement->isVisible = true;\n $appartement->Nbr_Max_chambre = $request->input('nbr');\n $appartement->save();\n return redirect(url()->previous());\n\n Session::flash('message', \"Les données ont été mise à jour avec succées\");\n Session::flash('alert-class', 'alert-success');\n }", "public function updateEmployee() {\n\n $employeeModel = $GLOBALS[\"employeeModel\"];\n\n $emp = $employeeModel->getOneByEmployeeID($_SESSION[\"workerID\"]);\n\n $givenOldLogin_Password = filter_input(INPUT_POST, \"givenOldLogin_Password\");\n $givenNewLogin_Password = filter_input(INPUT_POST, \"givenNewLogin_Password\");\n if (($givenOldLogin_Password != NULL) && ($givenNewLogin_Password != NULL)) {\n $oldLogin_Password_encrypted = sha1($givenOldLogin_Password);\n\n if ($oldLogin_Password_encrypted == $emp[\"Login_Password\"]) {\n $givenNewLogin_Password = sha1($givenNewLogin_Password);\n }\n } \n else {\n $givenNewLogin_Password = $emp[\"Login_Password\"];\n //kanskje en error beskjed ?\n }\n\n // set the value in the update...\n $updateFirst_name = filter_input(INPUT_POST, 'First_name');\n $updateLast_name = filter_input(INPUT_POST, 'Last_name');\n $updateBirth = filter_input(INPUT_POST, 'Birth');\n $updatePhone_Number = filter_input(INPUT_POST, 'Phone_Number');\n $updateHome_Address = filter_input(INPUT_POST, 'Home_Address');\n $updateZip_Code = filter_input(INPUT_POST, 'Zip_Code');\n $EmployeeID = filter_input(INPUT_POST, 'EmployeeID');\n\n $employeeModel->updateEmployee($updateFirst_name, $updateLast_name, $updateBirth, $updatePhone_Number, $updateHome_Address, $updateZip_Code, $EmployeeID,$givenNewLogin_Password);\n $GLOBALS[\"included_employees\"] = $employeeModel->getAll();\n\n return $this->render(\"listEmployees\");\n }", "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['OperaPlanes']))\n\t\t{\n\t\t\t$model->attributes=$_POST['OperaPlanes'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n$this->layout='//layouts/column2';\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function update(Request $request, $id)\n {\n try{\n if($request->input('paciente_id') != ''){ #Atualizar\n $paciente = Paciente::find($request->input('paciente_id'));\n $paciente->telefone = $request->input('telefone');\n $paciente->celular = $request->input('celular');\n }else{ # Insere\n $dadoPaciente['nome'] = strtoupper(removeAcentos($request->input('nome_paciente')));\n $dadoPaciente['telefone'] = $request->input('telefone');\n $dadoPaciente['celular'] = $request->input('celular');\n $paciente = new Paciente($dadoPaciente);\n }\n $paciente->save();\n $dados['data'] = $request->input('data_marcar');\n $dados['plano_saude'] = $request->input('plano');\n $dados['especialidade_id'] = $request->input('especialidade');\n $dados['medico_id'] = $request->input('medico');\n $dados['horario'] = $request->input('horario_marcado');\n $dados['paciente_id'] = $paciente->id;\n $dados['marcou_user_id'] = Auth::id();\n $dados['unidade_id'] = $request->input('unidade_id');\n $data = explode('/',$request->input('data_marcar'));\n $agenda = Agenda::find($id);\n if($agenda->agenda_status_id == 2){ # Desistiu\n $dados['agenda_status_id'] = 1; # Marcado\n }\n if($agenda->update($dados)){\n $msg = 'alert-success|Consulta alterada com sucesso!';\n }else{\n $msg = 'alert-warning|Erro ao alterar consulta! Se o erro persistir, entre em contato com o administrador.';\n }\n }catch(Throwable $e){\n report($e);\n $msg = 'alert-warning|Erro ao alterar consulta! Se o erro persistir, entre em contato com o administrador.';\n }\n return redirect()->route('agenda.index', ['dia' => $data[0],'mes'=>$data[1],'ano'=>$data[2]])->with('alertMessage', $msg);\n }", "function edit_hotel($hotel_data,$hotel_id)\n\t{\n\t\t$this->db->where('sb_hotel_id',$hotel_id);\n\t\t$this->db->update('sb_hotels',$hotel_data);\n\t\n\t\treturn '1';\n\t}", "public function editarAporte(){ \n if(isset($_POST[\"valueE\"]) && isset($_POST[\"bankE\"]) && isset($_POST[\"accountE\"]))\n {\n \n\t\t\t$valx = \"0\";\n\t\t\tif (isset($_POST[\"transactionE\"]) && (strlen(trim($_POST[\"transactionE\"]))>=3))\n\t\t\t{\n\t\t\t\t$valx = $_POST[\"transactionE\"];\n }\n \n if((isset($_POST[\"idxE\"]))&& (strlen(trim($_POST[\"valueE\"]))>=1)\n && (strlen(trim($_POST[\"bankE\"]))>=3)\n && (strlen(trim($_POST[\"accountE\"]))>=3) \n )\n {\n $aporte=new Aporte($this->adapter);\n $aporte->setAporteID($_POST[\"idxE\"]);\n $aporte->setValue(trim($_POST[\"valueE\"]));\n $aporte->setBank(trim($_POST[\"bankE\"]));\n $aporte->setAccount(trim($_POST[\"accountE\"]));\n $aporte->setTransactionID($valx);\n \n $save=$aporte->update(); // Manda a actualizar la moto en el modelo\n if ($save == TRUE)\n {\n $aporte->phpAlert(\"Aporte actualizado con éxito\",$this->baseUrl(\"BandejaCallcenters\", \"index\")); // Alerta y redirige\n }\n else\n {\n $aporte->phpAlert(\"Error con la actualización. Interente nuevamente\",$this->baseUrl(\"BandejaCallcenters\", \"index\")); // Alerta y redirige\n \n } \n \n }\n else\n {\n $aportex = new Aportante($this->adapter);\n $aportex->phpAlert(\"Complete todos los campos para almacenar.\",$this->baseUrl(\"BandejaCallcenters\", \"index\")); // Alerta y redirige\n }\n } \n else\n {\n $aportex = new Aportante($this->adapter);\n $aportex->phpAlert(\"Complete todos los campos para almacenar.\",$this->baseUrl(\"BandejaCallcenters\", \"index\")); // Alerta y redirige\n } \n //$this->redirect(\"BandejaCallcenters\", \"index\"); // COntrolador + Vista\n }", "function update(){\n session_start();\n $id=$_SESSION['id_alumno'];\n $nombre= $_POST['nombre'];\n $apellido= $_POST['apellido'];\n $telefono= $_POST['telefono'];\n \n unset($_SESSION['id_alumno']);\n $this->model->update(['id'=>$id,'nombre'=>$nombre,'apellido'=>$apellido,'telefono'=>$telefono]);\n \n $url= constant('URL').\"alumno\";\n header(\"Location: $url\");\n\n // $this->index();\n\n // if ($this->model->update(['id'=>$id,'nombre'=>$nombre , 'apellido'=>$apellido,'telefono'=>$telefono])) {\n // $alumno = new Alumnos();\n // $alumno->id=$id;\n // $alumno->nombre=$nombre;\n // $alumno->apellido=$apellido;\n // $alumno->telefono=$telefono;\n // $this->view->alumno=$alumno;\n // $this->render();\n\n\n // }else{\n // $this->view->render('errors/index');\n // }\n // $url= constant('URL').\"alumno\";\n // header(\"Location: $url\");\n }", "public function editUniversity($id) {\n global $REQUEST_DATA;\n\n $query = 'UPDATE university SET `universityCode`=\"'.add_slashes(trim(strtoupper($REQUEST_DATA['universityCode']))).'\",`universityName`=\"'.add_slashes(trim($REQUEST_DATA['universityName'])).'\",`universityAbbr`=\"'.add_slashes(trim($REQUEST_DATA['universityAbbr'])).'\",`universityAddress1`=\"'.add_slashes(trim($REQUEST_DATA['universityAddress1'])).'\",`universityAddress2`=\"'.add_slashes(trim($REQUEST_DATA['universityAddress2'])).'\",`cityId`='.$REQUEST_DATA['city'].', `stateId`='.$REQUEST_DATA['states'].',`countryId`='.$REQUEST_DATA['country'].',`pin`=\"'.add_slashes(trim($REQUEST_DATA['pin'])).'\",`designationId`='.( (trim($REQUEST_DATA['designation'])=='SELECT' || trim($REQUEST_DATA['designation'])=='' ) ? 'NULL' : $REQUEST_DATA['designation']).',`contactPerson`=\"'.add_slashes(trim($REQUEST_DATA['contactPerson'])).'\",`contactNumber`=\"'.add_slashes(trim($REQUEST_DATA['contactNumber'])).'\",`universityEmail`=\"'.add_slashes(trim($REQUEST_DATA['universityEmail'])).'\",`universityWebsite`=\"'.add_slashes(trim($REQUEST_DATA['universityWebsite'])).'\", contactPerson=\"'.( (trim($REQUEST_DATA['contactPerson'])=='SELECT' || trim($REQUEST_DATA['contactPerson'])=='' ) ? 'NULL' : $REQUEST_DATA['contactPerson']).'\" WHERE universityId='.$id.'; ';\n return SystemDatabaseManager::getInstance()->executeUpdate($query,\"Query: $query\");\n\n\n //contactPerson & logo is not is not edited\n /* return SystemDatabaseManager::getInstance()->runAutoUpdate('university', \n array('universityCode','universityName','universityAbbr','universityAddress1','universityAddress2','cityId',\n 'stateId','countryId','pin','designationId','contactNumber','universityEmail','universityWebsite'), \n array(strtoupper($REQUEST_DATA['universityCode']),$REQUEST_DATA['universityName'],$REQUEST_DATA['universityAbbr'],\n $REQUEST_DATA['universityAddress1'],$REQUEST_DATA['universityAddress2'],$REQUEST_DATA['city'],\n $REQUEST_DATA['states'],$REQUEST_DATA['country'],$REQUEST_DATA['pin'],\n $REQUEST_DATA['designation'],$REQUEST_DATA['contactNumber'],\n $REQUEST_DATA['universityEmail'],$REQUEST_DATA['universityWebsite']), \"universityId=$id\" );\n */\n }", "public function updateAddress($data){\n\t\tglobal $dbh;\n\t\t$fields = array(\n\t\t\t\"nombre\",\n\t\t\t\"receptorNombre\",\n\t\t\t\"receptorApellido\",\n\t\t\t\"nombreEmpresa\",\n\t\t\t\"facturacion\",\n\t\t\t\"principal\",\n\t\t\t\"idCliente\",\n\t\t\t\"direccion\",\n\t\t\t\"fono\",\n\t\t\t\"cel\",\n\t\t\t\"idZona\",\n\t\t\t\"id\"\n\t\t);\n\t\t$query = \"UPDATE direccion SET nombre=?,receptorNombre=?,receptorApellido=?,nombreEmpresa=?,facturacion=?,principal=?,idCliente=?,direccion=?,fono=?,cel=?,idZona=? WHERE id=?;\";\n\t\t$update = array();\n\t\tif( $data!=null && is_array($data) ){\n\t\t\tif( isset($data['id']) && is_numeric($data['id']) ){\n\t\t\t\t$id = $data['id'];\n\t\t\t\t$old = $dbh->query(\"SELECT * FROM direccion WHERE id=?;\",array($id));\n\t\t\t\t$old = $old[0];\n\t\t\t} else {\n\t\t\t\tThrow new Exception(\"En el metodo ClienteControl::updateAddress(data), el parametro debe ser un arreglo y debe contener la id de la direccion a actualizar.\");\n\t\t\t\texit;\n\t\t\t}\n\t\t\tforeach( $fields as $field ){\n\t\t\t\t$update[$field] = null;\n\t\t\t\tif( $field == 'idCliente' ){\n\t\t\t\t\t$update[$field] = $this->id;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif( isset($data[$field]) && !empty($data[$field]) ){\n\t\t\t\t\t$update[$field] = $data[$field];\n\t\t\t\t} else {\n\t\t\t\t\t$update[$field] = $old[$field];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$res = $dbh->query($query,$update);\n\t\t\treturn $res;\n\t\t}\n\t\treturn false;\n\t}", "public function update($data,$id){\n\t\t\n\t\t $this->db->where($this->pro->booking.\"_id\",$id);\n\t\t return $edit = $this->db->update($this->pro->prifix . $this->pro->booking,$data);\n\t}", "public function edit(Airplaneseat $airplaneseat)\n {\n //\n }", "public function updateAdminData($data, $id) \n {\n $this->db->where('id', $id);\n if ($this->db->update('users', $data))\n return TRUE;\n else\n return FALSE;\n }", "public function editMPa($data) {\n $this->db->where('id_pa',$data['id_pa']);\n $this->db->update('m_pa',$data);\n }", "public function update() {\n\n\t\tif (!empty($this->plan_model->return_plan_by_id($this->input->post('id_plan')))) {\n\t\t\t\n\t\t\t$this->data['plansUpdate'] = $this->plan_model->return_plan_by_id($this->input->post('id_plan'));\n\n\t\t\t$this->session->set_flashdata('succes_msg','Registered Plan Health!');\n\n\t\t}else {\n\n\t\t\t$this->session->set_flashdata('error_msg','Fail Register!');\n\t\t}\n\n\t\t$this->index();\n\n\t}", "public function editTab($id) {\n global $REQUEST_DATA;\n \n return SystemDatabaseManager::getInstance()->runAutoUpdate('employee_appraisal_tab', \n array('appraisalTabName','appraisalProofText'), \n array(trim($REQUEST_DATA['tabName']),trim($REQUEST_DATA['tabProofText'])), \n \"appraisalTabId=$id\" );\n }", "function update() {\n\n global $conn;\n\n $stmt = $conn->prepare('\n UPDATE Del_Adr SET\n Addressln1 = :Addressln1,\n Addressln2 = :Addressln2,\n Customer_id = :Customer_id,\n Name = :Name,\n Postcode = :Postcode\n WHERE Del_id = :Del_id\n ');\n\n $stmt->bindParam(':Addressln1', $this->Addressln1);\n $stmt->bindParam(':Addressln2', $this->Addressln2);\n $stmt->bindParam(':Customer_id', $this->Customer_id);\n $stmt->bindParam(':Name', $this->Name);\n $stmt->bindParam(':Postcode', $this->Postcode);\n $stmt->bindParam(':Del_id', $this->Del_id);\n\n return $stmt->execute();\n }", "public function update(ApprovedAircraft $aircraft, Request $request)\n {\n $request->validate([\n 'icao' => 'required|exists:aircraft,icao',\n 'name' => 'required|max:100',\n 'sim' => 'required|max:50'\n ]);\n\n $aircraft->icao = $request->icao;\n $aircraft->name = $request->name;\n $aircraft->sim = $request->sim;\n\n if ($request->action == 'approve' && Auth::user()->hasRole('admin')) {\n $aircraft->approved = true;\n }\n\n $aircraft->save();\n\n return redirect()->route('aircraft.show', $aircraft);\n }", "function update_Portfolio($PortID, $Title, $ShortDescrip, $Descrip) {\r\n// the database to new details in arguments\r\n\r\n $conn = db_connect();\r\n\r\n $query = \"update Portfolio\r\n set Title= '\".$Title.\"',\r\n ShortDescription = '\".$ShortDescrip.\"',\r\n Description = '\".$Descrip.\"'\r\n where PortID = '\".$PortID.\"'\";\r\n\r\n $result = @$conn->query($query);\r\n if (!$result) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}", "public function update_doctor($id, $data)\n\t\t{\n\t\t\t$this->db->where(\"idDoctor\", $id);\n\n\t\t\treturn $this->db->update(\"or_doctor\", $data);\n\t\t}" ]
[ "0.6825978", "0.6721659", "0.6549448", "0.6472521", "0.6343022", "0.61399287", "0.609083", "0.6001199", "0.5985953", "0.58481944", "0.5838959", "0.5824509", "0.57748777", "0.5758576", "0.5755747", "0.575353", "0.57487", "0.5743395", "0.5741757", "0.5723085", "0.5716736", "0.5713977", "0.57109326", "0.5709331", "0.56913036", "0.5685308", "0.568403", "0.568341", "0.5677161", "0.5663255", "0.5663255", "0.5658594", "0.5653132", "0.56459165", "0.56459165", "0.56459165", "0.56459165", "0.5596054", "0.5596012", "0.5594304", "0.55772215", "0.55709827", "0.55661196", "0.5558206", "0.5556215", "0.5554556", "0.55301094", "0.5523259", "0.5512155", "0.5511042", "0.5509477", "0.55074453", "0.55061615", "0.5504388", "0.55006117", "0.54886717", "0.54735625", "0.5472886", "0.5471509", "0.5471509", "0.5471509", "0.5471509", "0.5471509", "0.54650104", "0.5456171", "0.5444737", "0.5441854", "0.5440516", "0.5430298", "0.5428129", "0.5428079", "0.54275864", "0.54181004", "0.5415402", "0.5411908", "0.54064244", "0.5399682", "0.5395626", "0.53915703", "0.53900576", "0.538841", "0.53773534", "0.537591", "0.537148", "0.53702253", "0.5358509", "0.5351947", "0.53419983", "0.5341059", "0.5332573", "0.533111", "0.532752", "0.5327459", "0.5327454", "0.5323566", "0.5322625", "0.5319309", "0.5319091", "0.53173333", "0.5316743" ]
0.584427
10
Get all types associated with this provider
public function getTypes() { return get_object_vars($this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public static function getAll()\r\n {\r\n return self::$typeRegistry;\r\n }", "protected function getTypes() {}", "public function typesProvider()\n {\n return [\n '1 Type' => ['Type1'],\n '2 Type' => [['Type1', 'Type2']],\n ];\n }", "public function get_types()\n\t{\n\t\treturn $this->driver_query('type_list', FALSE);\n\t}", "function getTypes() {\n\t\treturn $this->types;\n\t}", "public static function getTypes();", "public function get_types()\n {\n }", "public function getTypes()\n {\n return $this->types;\n }", "public function getTypes()\n {\n return $this->types;\n }", "public function getTypes() {\n\t\treturn $this->types;\n\t}", "public function get_types()\n\t{\n\t\treturn array();\n\t}", "public function getTypes()\n {\n return $this->getTypesCollection()->getArrayCopy();\n }", "public function getTypes()\n {\n return $this->getData(self::TYPES);\n }", "public function getTypesItems()\n {\n return self::$_types;\n }", "public function getTypes(): array\n {\n return $this->types;\n }", "public function retrieveEntityTypes()\n {\n return $this->start()->uri(\"/api/entity/type\")\n ->get()\n ->go();\n }", "public function all()\n {\n return $this->type->all();\n }", "public function listAllType(){\n try {\n return $this->identityTypeGateway->getAllTypes();\n } catch (Exception $ex) {\n throw $ex;\n }catch (PDOException $e){\n throw $e;\n }\n }", "protected function _listTypes()\n {\n global $config;\n $types = objects::types();\n\n $result = array();\n foreach ($types as $type) {\n $infos = objects::infos($type);\n $result[$type] = $infos['name'];\n }\n return $result;\n }", "public function types()\n {\n return new Types($this->domusClient);\n }", "public function types()\n {\n return $this->types;\n }", "public static function getAllServiceTypes() {\n return id(new PhutilClassMapQuery())\n ->setAncestorClass(__CLASS__)\n ->setUniqueMethod('getServiceTypeConstant')\n ->setSortMethod('getServiceTypeName')\n ->execute();\n }", "public static function types()\n {\n return self::$types;\n }", "public function getAllTypes()\n {\n return $this->connection->select(\n $this->grammar->compileGetAllTypes()\n );\n }", "public function getAllTypes()\n {\n return $this->connection->select(\n $this->grammar->compileGetAllTypes()\n );\n }", "public function getTypes(): array;", "public function getTypes(): array;", "public function types() {\n return $this->hasMany(Type::class);\n }", "public function index()\n {\n $types = $this->allResources($this->typeRepository);\n\n return TypeResource::collection($types);\n }", "public function getTypes(){\n\t\t$stmt = $this->db->query(\"SELECT * FROM products_types\");\n\t\treturn $stmt->fetchAll(PDO::FETCH_OBJ);\n\t}", "protected function getTypesCollection()\n {\n if (null === $this->types) {\n $this->types = new Collection(\n array($this->type),\n $this->docblock ? $this->docblock->getContext() : null\n );\n }\n return $this->types;\n }", "public function getAllTypes(){\n return $this->find()->asArray()->orderBy('typeDesc ASC')->all();\n }", "public static function get_types()\n {\n return self::$TYPES;\n }", "public function get_types()\n {\n return self::$TYPES;\n }", "public static function getTypes()\n {\n $sql = 'SELECT * FROM location_type';\n $command = Yii::app()->db->createCommand($sql);\n return $command->queryAll(true);\n }", "public function get_desired_types();", "public static function getTypesList()\n {\n $sql = 'SELECT id AS value, display_name AS text '\n . 'FROM location_type '\n . 'WHERE active = 1';\n $command = Yii::app()->db->createCommand($sql);\n return $command->queryAll(true);\n }", "static function getTypes(): array\n\t{\n return self::$types;\n }", "public static function get_possible_types()\n {\n }", "public static function get_possible_types()\n {\n }", "public static function get_possible_types()\n {\n }", "public function typeProvider()\n {\n return array(\n array(true, false),\n array(12, false),\n array(24.50, false),\n array(new \\stdClass(), false),\n array('string', true),\n );\n }", "public function getUserTypes()\n {\n return $this->find()->all();\n }", "public static function getTypesList()\n {\n return ArrayHelper::map(Yii::$app->get('cms')->getPageTypes(), 'type', 'name');\n }", "public static function get_type_registry()\n {\n }", "public static function getTypes()\n {\n return TourType::find()\n ->where(['pid' => null]);\n }", "function get_all_types()\n {\n return $this->db->get('card_types')->result();\n }", "public static function getAllTypes() {\r\n\t\t$class_name = get_class(new static());\r\n\t\treturn isset(self::$all_role_types[$class_name]) ? self::$all_role_types[$class_name] : [];\r\n\t}", "public function getUserTypes()\n {\n $main_actions = [\n 'type' => \\adminer\\lang('Create type'),\n ];\n\n $headers = [\n \\adminer\\lang('Name'),\n ];\n\n // From db.inc.php\n $userTypes = \\adminer\\support(\"type\") ? \\adminer\\types() : [];\n $details = [];\n foreach($userTypes as $userType)\n {\n $details[] = [\n 'name' => \\adminer\\h($userType),\n ];\n }\n\n return \\compact('main_actions', 'headers', 'details');\n }", "public static function getTypes()\n {\n return [\n ModelRegistry::TRANSACTION => ModelRegistry::getById(ModelRegistry::TRANSACTION)->label,\n ModelRegistry::PRODUCT => ModelRegistry::getById(ModelRegistry::PRODUCT)->label,\n ];\n }", "public static function getTypes(): array\n {\n return self::getRelevancyTypes();\n }", "public static function get_all_types() {\t\t$types = scandir(str_replace(\"/\", \"\\\\\", dirname(plugin_dir_path( __FILE__ )) . \"\\\\ESWP\\\\MyTypes\"));\r\n\t\t$size = count($types);\r\n\t\t$_types = array();\r\n\t\t\r\n\t\t//Feed in the extra types\r\n\t\t$extra_types = array();\r\n\t\tif(has_filter(\"es_include_types\")) {\r\n\t\t\t$extra_types = apply_filters(\"es_include_types\", $extra_types);\r\n\t\t\t\r\n\t\t\t$size += count($extra_types);\r\n\t\t\t\r\n\t\t\tforeach ($extra_types as $type) {\r\n\t\t\t\t$order = $size;\r\n\t\t\t\t\r\n\t\t\t\tif (method_exists($type, \"get_order\")) {\r\n\t\t\t\t\t$order = $type->get_order();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tarray_push($_types, array(\r\n\t\t\t\t\t\"order\" => $order,\r\n\t\t\t\t\t\"type\" => $type\r\n\t\t\t\t));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Add the included types\r\n\t\tforeach ($types as $type) {\r\n\t\t\tif ($type !== \"BaseType.php\" && trim($type, \".\") !== \"\") {\r\n\t\t\t\t$order = $size + 10;\r\n\t\t\t\t$_type = \"\\\\ESWP\\\\MyTypes\\\\\". explode(\".\", $type)[0];\r\n\t\t\t\t\r\n\t\t\t\tif (class_exists($_type)) {\r\n\t\t\t\t\t$_type_obj = new $_type();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (method_exists($_type, \"get_order\")) {\r\n\t\t\t\t\t\t$order = $_type_obj->get_order();\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\t\tarray_push($_types, array(\r\n\t\t\t\t\t\t\"order\" => $order,\r\n\t\t\t\t\t\t\"type\" => $_type_obj\r\n\t\t\t\t\t));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $_types;\r\n\t}", "public static function getTypesById()\n {\n return array_flip(self::getTypes());\n }", "public static function getTypesMap()\n {\n return self::$typesMap;\n }", "public function getAllTypes()\n {\n $this->db->select('*', FALSE);\n $this->db->from('item_type');\n $query = $this->db->get();\n return $query->result();\n }", "public function getTypesFromApi(): array {\n return $this->curlRequest('types');\n }", "public function getTypesList() {\n \t//maybe someday sorts them by course, student progress?\n \t$course_id = Auth::user()->course_id;\n Debugbar::info($course_id);\n $course = Course::find($course_id);\n Debugbar::info($course);\n $typesList = $course->questions;\n Debugbar::info($typesList);\n \treturn $typesList;\n }", "protected function loadTypes()\n {\n return array(\n new RecaptchaType(\n $this->app['salberts_recaptcha2.public_key'],\n $this->app['salberts_recaptcha2.enabled'],\n $this->app['salberts_recaptcha2.ajax'],\n $this->app['salberts_recaptcha2.locale_key']\n )\n );\n }", "public function Types(){\r\n\t\t$types = self::get_types();\r\n\t\t$types_available = self::get_types_available();\r\n\t\tif (!$types){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$completeTypes = ArrayList::create();\r\n\t\tforeach ($types as $type){\r\n\t\t\tif (isset($types_available[$type])){\r\n\t\t\t\t$completeTypes->push($types_available[$type]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $completeTypes;\t\r\n\t}", "function getTypeslist ()\r\n\t{\r\n\t\t$query = 'SELECT id, name'\r\n\t\t\t\t. ' FROM #__flexicontent_types'\r\n\t\t\t\t. ' WHERE published = 1'\r\n\t\t\t\t. ' ORDER BY name ASC'\r\n\t\t\t\t;\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$types = $this->_db->loadObjectList();\r\n\t\treturn $types;\r\n\t}", "public function getTypes() : array\n {\n return \\array_map(function ($t) {\n return $t instanceof self ? $t : new self([$t]);\n }, $this->types);\n }", "public function listOfTypes()\n {\n $qb = $this->createQueryBuilder('b')\n ->select('b.type')\n ->distinct('b.type');\n \n $query = $qb->getquery();\n \n return $query->execute();\n }", "public function types()\n {\n return $this->belongsToMany(Type::class);\n }", "public static function getTypesMap(): array\n {\n return self::$typesMap;\n }", "public function list()\n {\n return $this->getResult($this->client->get('linode/types'));\n }", "public function getAccountTypes()\n {\n return AccountTypes::all();\n }", "public static function types()\n\t{\n\t\t$states = array(\n\t\t\t'blog' => __('Blog'),\n\t\t\t'page' => __('Page'),\n\t\t\t'user' => __('User')\n\t\t);\n\n\t\t$values = Module::action('gleez_types', $states);\n\n\t\treturn $values;\n\t}", "public function getGenerics(): array\n {\n return $this->genericTypes;\n }", "public function getProviders();", "public function getProviders();", "public function types(): array\n {\n return collect($this->modelSchemas)->map(function ($modelSchema) {\n return $modelSchema instanceof RootType\n ? $modelSchema\n : $this->registry->type($this->registry->getModelSchema($modelSchema)->typename());\n })->toArray();\n }", "public function getBaseTypes()\n {\n return $this->base_types;\n }", "function &getAssociatedTypes() {\n\t\tif ($this->getIsGeneric()) { return array(); }\n\t\t\n\t\t$sTable = KTUtil::getTableName('document_type_fieldsets');\n $aQuery = array(\n \"SELECT document_type_id FROM $sTable WHERE fieldset_id = ?\",\n array($this->getId()),\n );\n $aIds = DBUtil::getResultArrayKey($aQuery, 'document_type_id');\n\t\t\n\t\t$aRet = array();\n\t\tforeach ($aIds as $iID) {\n\t\t $oType = DocumentType::get($iID);\n\t\t\tif (!PEAR::isError($oType)) { \n\t\t\t $aRet[] = $oType;\n\t\t\t}\n\t\t}\n\t\treturn $aRet;\n\t}", "public function get_location_types()\n {\n return $this->retrieve('SELECT * FROM isys_obj_type WHERE isys_obj_type__container <> 0;');\n }", "public function fetchAll()\n {\n $templateTypeTable = new Api_Model_DbTable_TemplateType();\n\n $rowset = $templateTypeTable->fetchAll(null, 'name');\n\n $templateTypes = new Set();\n foreach ($rowset as $row) {\n $templateType = Type::factory($row);\n\n $templateTypes->addItem($templateType);\n }\n\n return $templateTypes;\n }", "public function getTypes(): TypesRegistryInterface\n {\n if (!isset($this->types)) {\n $this->setTypes(new TypesRegistry());\n }\n\n return $this->types;\n }", "public function types() {\n return $this->belongsToMany('App\\Type');\n }", "public function all()\n {\n return IncomeTypes::all();\n }", "public function getProvider() {\n return [\n ['node', 'article', 'Drupal\\node\\Entity\\Node'],\n ['node', '42', 'Drupal\\node\\Entity\\Node'],\n ['node_type', 'node_type', 'Drupal\\node\\Entity\\NodeType'],\n ['menu', 'menu', 'Drupal\\system\\Entity\\Menu'],\n ];\n }", "public function index()\n {\n $types = Type::all();\n\n return $this->showAll($types);\n }", "private function loadTypes() {\n \n if(!empty($this->types)) return;\n \n $this->types = $this->doctrine\n ->getManager()\n ->getRepository('FenchyNoticeBundle:Type')\n ->getFilterTypes();\n }", "public function getServiceTypes() {\n $dql = \"SELECT s from ServiceType s\n ORDER BY s.name\";\n $query = $this->em->createQuery($dql);\n return $query->getResult();\n }", "public static function types(): array\n {\n $all = self::getAll();\n\n return array_keys($all);\n }", "public static function getTypes()\n\t{\n\t\t\n\t\treturn [\n\t\t\tself::TYPE_SHARES\t\t\t =>\t\"Shares\",\n\t\t\tself::TYPE_PROPERTY\t\t\t =>\t\"Property\",\n\t\t];\n\t\t\n\t}", "protected function getTypes() : Collection\n {\n if (is_array($this->types)) {\n return new Collection($this->types);\n }\n\n return new Collection([]);\n }", "public function getEntityTypes() {\n return $this->entity_types;\n }", "public function allOfType($type)\n {\n return array_filter(\n $this->adapters,\n function ($adapter) use ($type) {\n return $adapter[$type];\n }\n );\n }", "public function index()\n {\n $types = Type::all();\n return $this->showAll($types);\n }", "public function getTypeMap()\n {\n return $this->typeMap;\n }", "protected static function _getDataTypes()\n {\n return [];\n }", "public static function getTypes(): array {\n\t\treturn ['pizza'];\n\t}", "function contentTypes()\n {\n return new ContentTypes($this->accessToken, $this->spaceId, $this->cacher);\n }", "public function getServiceTypes()\n\t{\n\t\t$result = new Result();\n\t\t$types = Cache::getServiceTypes();\n\n\t\tif($types === false)\n\t\t{\n\t\t\t$res = self::getSidResult();\n\n\t\t\tif($res->isSuccess())\n\t\t\t{\n\t\t\t\t$data = $res->getData();\n\t\t\t\t$sessId = $data[0];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$result->addErrors($res->getErrors());\n\t\t\t\t$sessId = '';\n\t\t\t}\n\n\t\t\t$request = new Request();\n\t\t\t$res = $request->getServiceTypes($sessId, $this->getKnownServices());\n\n\t\t\tif(!$res->isSuccess())\n\t\t\t{\n\t\t\t\t$result->addErrors($res->getErrors());\n\t\t\t\treturn $result;\n\t\t\t}\n\n\t\t\t$types = $res->getData();\n\t\t\t$types = $types + self::getOnLineSrvs();\n\t\t\tCache::setServiceTypes($types);\n\t\t}\n\n\t\tif(!is_array($types))\n\t\t\t$types = array();\n\n\t\t$result->setData($types);\n\t\treturn $result;\n\t}", "public function getAllTypes() {\n\n $select = $this->select()\n ->setIntegrityCheck(false)\n ->from(\n array('t' => 'NEWAGENTTYPELOOKUP')\n );\n $allTypes = $this->fetchAll($select);\n $returnVal = array();\n foreach ($allTypes as $typeRow) {\n $returnVal[$typeRow->NEWAGENTTYPELOOKUPID] = $typeRow->LABEL;\n }\n\n return $returnVal;\n }", "public static function get_all() {\n global $CFG;\n // Get directory listing (excluding simpletest, CVS, etc)\n $list = core_component::get_plugin_list('forumngtype');\n\n $results = array();\n foreach ($list as $name => $location) {\n $results[] = self::get_new(str_replace('forumngtype_', '', $name));\n }\n return $results;\n }", "public static function getAllFieldsWithTypes(): array\n {\n $className = get_called_class();\n $table = with(new $className)->getTable();\n\n\n $cache_key = self::$cache_prefix.'.ALLFIELDS.WITH.TYPES.' . strtoupper($table);\n\n return self::$use_cache ? Cache::remember($cache_key, 5 * 60, function () use ($table) {\n return self::getArrayTableInfo($table);\n }) : self::getArrayTableInfo($table);\n }" ]
[ "0.75747883", "0.75747883", "0.75747883", "0.75747883", "0.74928564", "0.7445555", "0.73903793", "0.73855627", "0.73395234", "0.7316055", "0.72919816", "0.7197441", "0.7197441", "0.7131269", "0.7069699", "0.70625514", "0.7060138", "0.7013119", "0.7007147", "0.6960054", "0.6946435", "0.69370896", "0.6879669", "0.6871398", "0.68691623", "0.68285364", "0.6784506", "0.6765359", "0.6765359", "0.6738107", "0.6738107", "0.6706323", "0.66967976", "0.6675513", "0.667532", "0.66607046", "0.66551423", "0.6648234", "0.65805143", "0.65773827", "0.6574056", "0.6569648", "0.6559078", "0.6559078", "0.6559078", "0.65381426", "0.65306526", "0.6529184", "0.6493788", "0.6456346", "0.64382964", "0.64253104", "0.6395891", "0.6386357", "0.6374781", "0.637132", "0.6338083", "0.63289356", "0.6306442", "0.63004565", "0.6300336", "0.62844396", "0.6284342", "0.62781405", "0.6278067", "0.62615097", "0.6259703", "0.6185233", "0.6183278", "0.6170851", "0.61639535", "0.61615324", "0.6137622", "0.6137622", "0.6125159", "0.61087734", "0.6105442", "0.6101234", "0.6086956", "0.6084044", "0.60750985", "0.6071892", "0.6070429", "0.60653317", "0.6064723", "0.60514474", "0.6048367", "0.6045077", "0.6031156", "0.6009438", "0.60007167", "0.59927994", "0.5991795", "0.5970518", "0.5952877", "0.5949595", "0.5926858", "0.5925523", "0.590712", "0.5896172" ]
0.6727703
31
Get the validation rules that apply to the request.
public function rules() { return [ // ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
Run the database seeds.
public function run() { Game::query()->delete(); foreach(Player::all() as $player) { $numGames = rand(20,50); foreach(range(1,$numGames) as $num) { $game = Game::factory()->make(['game_number' => $num, 'player_id' => $player->id]); $player->games()->save($game); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::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 < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::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 < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::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\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::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 Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::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 News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\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 Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Display a listing of the resource.
public function index() { if(!Auth::check()) return redirect() -> to('panel/login'); $categories = self::getCategories(1); return view('panel.category.table', [ 'table' => $categories ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\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\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { if(!Auth::check()) return redirect() -> to('panel/login'); $pageData = self::getPageData('Create new products category - general', 'panel/products/categories/new/general', 'general'); return view('panel.category.general', $pageData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "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 }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "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}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "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 }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "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 }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "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 }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "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}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "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 }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "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 }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "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 }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "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 }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "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 }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "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 }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "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}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $categoryResponse = ProductsCategory::newRecord($request -> all()); // var_dump($categoryResponse); switch($categoryResponse['type']) { case 'Unauthenticated': flash() -> error($categoryResponse['message']); if($categoryResponse['redirect'] === 'back') return redirect() -> back(); return redirect() -> to($categoryResponse['redirect']); case 'InvalidData': // flash() -> error($categoryResponse['message']); if($categoryResponse['redirect'] === 'back') return redirect() -> back() -> withErrors($categoryResponse['messages']) -> withInput(); return redirect() -> to($categoryResponse['redirect']); case 'SavingException': flash() -> error($categoryResponse['message']); if($categoryResponse['redirect'] === 'back') return redirect() -> back(); return redirect() -> to($categoryResponse['redirect']); case 'Success': flash() -> success($categoryResponse['message']); if($categoryResponse['redirect'] === 'back') return redirect() -> back(); return redirect() -> to($categoryResponse['redirect']); default: return redirect() -> to('panel/login'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Store a newly created resource in storage.
public function storeTranslation(Request $request) { if(!Auth::check()) return redirect() -> to('panel/login'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "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\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\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::error('event.view.not_allowed');\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}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { if(!\Auth::check()) return redirect() -> to('/panel/login'); $category = ProductsCategory::find($id); $existCheck = ProductsCategory::checkExisting($category, $id); if($existCheck['error']['code']) return view('panel.errors.404', $existCheck['error']['data']); $pageData = self::getPageData('Edit Category', 'panel/products/categories/' . $id, 'PUT'); $pageData['category'] = $category; return view('panel.category-product-modify', $pageData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\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('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.7855196", "0.76957726", "0.7273917", "0.7241426", "0.71717227", "0.7064183", "0.70528984", "0.69836885", "0.694763", "0.69469565", "0.6941572", "0.69301945", "0.6903868", "0.68989486", "0.68989486", "0.68787694", "0.68641657", "0.6860115", "0.6857286", "0.68464494", "0.6834566", "0.68116575", "0.68075293", "0.6805924", "0.6801357", "0.6796291", "0.67915684", "0.67915684", "0.67874014", "0.678544", "0.67787844", "0.6777662", "0.67675763", "0.676299", "0.6746726", "0.6745706", "0.67450166", "0.67450166", "0.6739429", "0.6734577", "0.6725992", "0.67127997", "0.6694406", "0.6692487", "0.6689421", "0.66884303", "0.6687299", "0.6685663", "0.6682167", "0.66701853", "0.66697115", "0.6666091", "0.6666091", "0.66627705", "0.6661716", "0.6661522", "0.6657919", "0.6656454", "0.6653187", "0.6642113", "0.66332614", "0.66324973", "0.66275465", "0.66275465", "0.6619777", "0.6619387", "0.6617973", "0.66154003", "0.66110945", "0.6607966", "0.66065043", "0.6596376", "0.65953517", "0.65941286", "0.6591486", "0.6590759", "0.6588404", "0.658161", "0.6580548", "0.6579757", "0.6577171", "0.65761065", "0.657386", "0.65686774", "0.6567784", "0.65672046", "0.6566417", "0.65615803", "0.65615714", "0.65615714", "0.65592474", "0.65586483", "0.65568006", "0.6556628", "0.65564895", "0.6555322", "0.65551996", "0.6555016", "0.654888", "0.65477645", "0.65451735" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { if(!Auth::check()) return redirect() -> to('panel/login'); $data = Input::all(); $validate = ProductsCategory::editRecord($id, $data); switch($validate['error']['type']) { case 'invalidData': return redirect() -> back() -> withInput() -> withErrors($validate['error']['responseMessages']); case 'noRecords': case 'noExist': return view('panel.errors.404', $validate['error']['data']); } Session::flash('success', $validate['success']); return redirect() -> back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { if(!Auth::check()) return redirect() -> to('panel/login'); $category = ProductsCategory::find($id); $childs = $category -> childs; foreach($childs as $child) { $child -> delete(); } $category -> delete(); return redirect() -> back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
/ Plugin Name: Site List Plugin URI: Description: This plugin will add a shortcode that can be used to generate and display a list of all the sites in a multisite network. Author: Jon Breitenbucher Author URI: Version: 1.0 License: GNU General Public License v2.0 (or later) License URI: Add a [sitelist] shortcode to list all sites in a multisite network.
function jb_list_all_network_sites() { global $wpdb; $result = ''; $sites = array(); $blogs = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->blogs WHERE spam = '0' AND deleted = '0' and archived = '0' and public='1'")); if(!empty($blogs)) { foreach($blogs as $blog) { $details = get_blog_details($blog->blog_id); if($details != false) { $url = $details->siteurl; $name = $details->blogname; if(!(($blog->blog_id == 1) && ($show_main != 1))) { $sites[$name] = $url; } } } ksort($sites); $count = count($sites); $current = 1; $result.= '<ul class="inside-site-list">'; foreach($sites as $name=>$url) { $result.= '<li class="inside-site"><a href="'.$url.'">'.$name.'</a></li>'; ++$current; } $result.= '</ul>'; } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ssc_location_shortcode( $atts ) {\n\textract( shortcode_atts( array(\n\t\t'sites' => get_current_blog_id(),\n\t\t'hours' => 'hide',\n\t\t'map' => 'hide',\n\t\t'address' => 'show'\n\t\t), $atts ) );\n\tif ( $sites == 'all' ) {\n\t\t$site_list = get_blog_list( 0, 'all' );\n\t}\n\telse {\n\t\t$site_list = array($sites);\n\t}\n\tob_start();\n\tif ( $map == 'show' ) {\n\t\t$pageURL = 'http';\n if ($_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\n $pageURL .= \"://\";\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"];\n } else {\n $pageURL .= $_SERVER[\"SERVER_NAME\"];\n }\n include_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n if ( is_plugin_active( 'osm/osm.php' ) ) {\n \t//echo $pageURL;\n \t echo do_shortcode( '[osm_map marker_file=\"'.$pageURL.'/marker/marker.php?sites='.$sites.'\" zoom=\"3\" width=\"600\" height=\"450\" lat=\"34.37\" long=\"-88.375\" ]' );\n \t}\n\t}\n echo '<ul class=\"site-list\">';\n foreach ( $site_list as $blog ) {\n \techo '<li>';\n \t$site_contacts = get_site_contacts( $blog['blog_id'] );\t\n \tif ( $address == 'show') {\n \techo '<h4><a href=\"' . $site_contacts[$blog['blog_id']]['path'] .'\">' . $site_contacts[$blog['blog_id']]['name'] . '</a></h4>';\n \techo '<address>' . $site_contacts[$blog['blog_id']]['street'] . '<br>';\n \t echo $site_contacts[$blog['blog_id']]['city'] . ', ' . $site_contacts[$blog['blog_id']]['state'] . ' ' . $site_contacts[$blog['blog_id']]['zip'] . '</address>';\n \t echo '<p><a href=\"tel:' . $site_contacts[$blog['blog_id']]['phone'] . '\">' . $site_contacts[$blog['blog_id']]['phone'] . '</a></p>';\n \t}\n \tif ( $hours == 'show' ) {\n $site_hours = get_site_hours( $blog );\n echo '<dl>';\n $current_day = '';\n foreach ( $site_hours[$blog['blog_id']] as $hours_val ) {\n \t$day = explode('_', $hours_val['name'] );\n \t$title = explode( ' ', $hours_val['title'] );\n \tif ( $day[1] == 'open' ) {\n \techo '<dt>' . $title[0] . '</dt>';\n \tif ( $hours_val['value'] ) {\n \t\techo '<dd>' . $hours_val['value'];\n \t\t$current_day = $day[0];\n \t}\n \telse {\n \t\techo '<dd>Closed</dd>';\n \t}\n }\n elseif ( $day[1] == 'close' && $day[0] == $current_day ) {\n \techo ' - ' . $hours_val['value'] .'</dd>';\n }\n else {\n \techo '</dd>';\n }\n } // Hours sites loop\n /**/\n echo '</dl>';\n\t }\n \techo '</li>';\n } // end sites loop\n echo '</ul>';\t \n $output = ob_get_clean();\n return $output;\n}", "public function _list( $args, $assoc_args ) {\n\t\t\\EE\\Utils\\delem_log( 'site list start' );\n\n\t\t$format = \\EE\\Utils\\get_flag_value( $assoc_args, 'format' );\n\t\t$enabled = \\EE\\Utils\\get_flag_value( $assoc_args, 'enabled' );\n\t\t$disabled = \\EE\\Utils\\get_flag_value( $assoc_args, 'disabled' );\n\n\t\t$where = array();\n\n\t\tif ( $enabled && ! $disabled ) {\n\t\t\t$where['is_enabled'] = 1;\n\t\t} elseif ( $disabled && ! $enabled ) {\n\t\t\t$where['is_enabled'] = 0;\n\t\t}\n\n\t\t$sites = $this->db::select( array( 'sitename', 'is_enabled' ), $where );\n\n\t\tif ( ! $sites ) {\n\t\t\tEE::error( 'No sites found!' );\n\t\t} \n\t\t\n\t\tif ( 'text' === $format ) {\n\t\t\tforeach ( $sites as $site ) {\n\t\t\t\tEE::log( $site['sitename'] );\n\t\t\t}\n\t\t} else {\n\t\t\t$result = array_map(\n\t\t\t\tfunction ( $site ) {\n\t\t\t\t\t$site['site'] = $site['sitename'];\n\t\t\t\t\t$site['status'] = $site['is_enabled'] ? 'enabled' : 'disabled';\n\n\t\t\t\t\treturn $site;\n\t\t\t\t}, $sites\n\t\t\t);\n\n\t\t\t$formatter = new \\EE\\Formatter( $assoc_args, [ 'site', 'status' ] );\n\n\t\t\t$formatter->display_items( $result );\n\t\t}\n\n\t\t\\EE\\Utils\\delem_log( 'site list end' );\n\t}", "public function get_site_list() {\n $option_name = 'mailchimp_site_list';\n $list = get_option( $option_name );\n if ( $list ) {\n return $list;\n }\n $list = $this->get_list( PEDESTAL_BLOG_NAME );\n if ( ! $list ) {\n $args = [\n 'name' => PEDESTAL_BLOG_NAME,\n ];\n $list = $this->add_list( $args );\n }\n $autoload = false;\n add_option( $option_name, $list, '', $autoload );\n return $list;\n }", "function listnetwork_function() {\n global $wpdb;\n\t\t\t\n\t\t// Query all blogs from multi-site install\n\t\t$blogs = $wpdb->get_results(\"SELECT blog_id,domain,path FROM wp_blogs where blog_id > 1 ORDER BY path\");\n\t\n\t\t// Start unordered list\n\t\techo '<ul>';\n\t\n\t\t// For each blog search for blog name in respective options table\n\t\tforeach( $blogs as $blog ) {\n\t\n\t\t\t// Query for name from options table\n\t\t\t$blogname = $wpdb->get_results(\"SELECT option_value FROM wp_\".$blog->blog_id .\"_options WHERE option_name='blogname' \");\n\t\t\tforeach( $blogname as $name ) { \n\t\n\t\t\t\t// Create bullet with name linked to blog home pag\n\t\t\t\techo '<li>';\n\t\t\t\techo $name->option_value;\n\t\t\t\techo '<a href=\"http://';\n\t\t\t\techo $blog->domain;\n\t\t\t\techo $blog -> path;\n\t\t\t\techo '\">';\n\t\t\t\techo ' Visit';\n\t\t\t\techo '</a> or ';\n\t\t\t\techo '<a href=\"http://';\n\t\t\t\techo $blog->domain;\n\t\t\t\techo $blog -> path;\n\t\t\t\techo '/wp-admin\">';\n\t\t\t\techo 'Edit';\n\t\t\t\techo '</a>';\n\t\t\t\techo '</li>';\n\t\n\t\t\t}\n\t\t}\n\t\n\t\t// End unordered list\n\t\techo '</ul>';\n}", "function display_site_info()\r\n{\r\n?>\r\n <? /*<ul>\r\n <li>Сервер статистики пользователей\r\n <li>Управление пользователями\r\n <li>Подключение и переподключение\r\n </ul> */ ?>\r\n<?\r\n}", "function epsw_shortcode( $args )\n{\n\t// User uploaded icon url\n\t$wp_upload_dir = wp_upload_dir();\n\t$iconurl = $wp_upload_dir['baseurl'] . '/epsocial_icons/';\n\t$icondir = $wp_upload_dir['basedir'] . '/epsocial_icons/';\n\n\t// Plugin path\n\t$plugin_path = WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . str_replace( basename( __FILE__ ), '', plugin_basename( __FILE__ ) );\n\n\t$html = '<ul class=\"ep_social_widget\" id=\"epSW_shortcode\">';\n\tforeach ( $args as $network => $link )\n\t{\n\t\tif ( $network === 'rss' )\n\t\t{\n\t\t\tif ( $link === '1' )\n\t\t\t{\n\t\t\t\t$html .= '<li>';\n\t\t\t\t\t$html .= '<a href=\"' . get_bloginfo( \"rss2_url\" ) . '\" target=\"_blank\" title=\"RSS\"><img src=\"' . plugins_url( \"icons/rss.svg\", __FILE__ ) . '\" alt=\"RSS\" width=\"26\" height=\"26\" /></a>';\n\t\t\t\t$html .= '</li>';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$pattern1 = '/^http:\\/\\//';\n\t\t\t$pattern2 = '/^https:\\/\\//';\n\n\t\t\t$l = strip_tags( $link );\n\t\t\tif ( preg_match( $pattern1, $l ) || preg_match( $pattern2, $l ) )\n\t\t\t{\n\t\t\t\t$link = $l;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$link = 'http://'.$l;\n\t\t\t}\n\n\t\t\t$html .= '<li>';\n\n\t\t\tif ( file_exists( $plugin_path . '/icons/' . $network . '.svg' ) )\n\t\t\t{\n\t\t\t\t$html .= '<a href=\"' . $link . '\" target=\"_blank\" title=\"' . $network . '\"><img src=\"'.plugins_url( \"icons/\" . $network . \".svg\", __FILE__ ).'\" alt=\"' . $network . '\" width=\"26\" height=\"26\" /></a>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( ! file_exists( $icondir ) )\n\t\t\t\t{\n\t\t\t\t\t$icons = NULL;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$icons = scandir( $icondir );\n\t\t\t\t}\n\n\t\t\t\tif ( $icons )\n\t\t\t\t{\n\t\t\t\t\tforeach ( $icons as $icon )\n\t\t\t\t\t{\n\t\t\t\t\t\t$ext = pathinfo( $icon, PATHINFO_EXTENSION );\n\t\t\t\t\t\t$name = str_replace( 'icon-', '', str_replace( '.' . $ext, '', $icon ) );\n\n\t\t\t\t\t\tif ( $name == $network )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$html .= '<a href=\"' . $link . '\" target=\"_blank\" title=\"' . $network . '\"><img src=\"' . $iconurl . 'icon-' . $network . '.' . $ext . '\" alt=\"' . $network . '\" width=\"26\" height=\"26\" /></a>';\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$html .= '</li>';\n\n\t\t}\n\t}\n\t$html .= '</ul>';\n\n\treturn $html;\n}", "function acf_get_sites()\n{\n}", "public function listPlugin()\n\t{\n\t\t\n\t}", "function omn_wp_get_sites($args){\n// replacement for wp-includes/ms-deprecated.php#get_blog_list\n// see wp-admin/ms-sites.php#352\n// also wp-includes/ms-functions.php#get_blogs_of_user\n// also wp-includes/post-template.php#wp_list_pages\n\tglobal $wpdb;\n\n\t$defaults = array(\n\t\t'include_id' \t\t,\t\t\t\t// includes only these sites in the results, comma-delimited\n\t\t'exclude_id' \t\t,\t\t\t\t// excludes these sites from the results, comma-delimted\n\t\t'blogname_like' \t,\t\t\t\t// domain or path is like this value\n\t\t'ip_like'\t\t\t,\t\t\t\t// Match IP address\n\t\t'reg_date_since'\t,\t\t\t\t// sites registered since (accepts pretty much any valid date like tomorrow, today, 5/12/2009, etc.)\n\t\t'reg_date_before'\t,\t\t\t\t// sites registered before\n\t\t'include_user_id'\t,\t\t\t\t// only sites owned by these users, comma-delimited\n\t\t'exclude_user_id'\t,\t\t\t\t// don't include sites owned by these users, comma-delimited\n\t\t'include_spam'\t\t=> false,\t\t// Include sites marked as \"spam\"\n\t\t'include_deleted'\t=> false,\t\t// Include deleted sites\n\t\t'include_archived'\t=> false,\t\t// Include archived sites\n\t\t'include_mature'\t=> false,\t\t// Included blogs marked as mature\n\t\t'public_only'\t\t=> true,\t\t// Include only blogs marked as public\n\t\t'sort_column'\t\t=> 'registered',// or registered, last_updated, blogname, site_id\n\t\t'order'\t\t\t\t=> 'asc',\t\t// or desc\n\t\t'limit_results'\t\t,\t\t\t\t// return this many results\n\t\t'start'\t\t\t\t,\t\t\t\t// return results starting with this item\n\t);\n\tfunction make_email_list_by_user_id($user_ids){\n\t\t$the_users = explode(',',$user_ids);\n\t\t$the_emails = array();\n\t\tforeach( (array) $the_users as $user_id){\n\t\t\t$the_user = get_userdata($user_id);\n\t\t\t$the_emails[] = $the_user->user_email;\n\t\t}\n\t\treturn $the_emails;\n\t}\n\n\n\t// array_merge\n\t$r = wp_parse_args( $args, $defaults );\n\textract( $r, EXTR_SKIP );\n\n\t//$query = \"SELECT * FROM {$wpdb->blogs}, {$wpdb->registration_log} WHERE site_id = '{$wpdb->siteid}' AND {$wpdb->blogs}.blog_id = {$wpdb->registration_log}.blog_id \";\n\t$query = \"SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' \";\n\tif ( isset($include_id) ) {\n\t\t$list = implode(\"','\", explode(',', $include_id));\n\t\t$query .= \" AND {$wpdb->blogs}.blog_id IN ('{$list}') \";\n\t}\n\tif ( isset($exclude_id) ) {\n\t\t$list = implode(\"','\", explode(',', $exclude_id));\n\t\t$query .= \" AND {$wpdb->blogs}.blog_id NOT IN ('{$list}') \";\n\t}\n\tif ( isset($blogname_like) ) {\n\t\t$query .= \" AND ( {$wpdb->blogs}.domain LIKE '%\".$blogname_like.\"%' OR {$wpdb->blogs}.path LIKE '%\".$blogname_like.\"%' ) \";\n\t}\n\t/*if ( isset($ip_like) ) {\n\t\t$query .= \" AND {$wpdb->registration_log}.IP LIKE '%\".$ip_like.\"%' \";\n\t}\n\tif( isset($reg_date_since) ){\n\t\t$query .= \" AND unix_timestamp({$wpdb->registration_log}.date_registered) > '\".strtotime($reg_date_since).\"' \";\n\t}\n\tif( isset($reg_date_before) ){\n\t\t$query .= \" AND unix_timestamp({$wpdb->registration_log}.date_registered) < '\".strtotime($reg_date_before).\"' \";\n\t}\n\tif ( isset($include_user_id) ) {\n\t\t$the_emails = make_email_list_by_user_id($include_user_id);\n\t\t$list = implode(\"','\", $the_emails);\n\t\t$query .= \" AND {$wpdb->registration_log}.email IN ('{$list}') \";\n\t}\n\tif ( isset($exclude_user_id) ) {\n\t\t$the_emails = make_email_list_by_user_id($include_user_id);\n\t\t$list = implode(\"','\", $the_emails);\n\t\t$query .= \" AND {$wpdb->registration_log}.email NOT IN ('{$list}') \";\n\t}\n\tif ( isset($ip_like) ) {\n\t\t$query .= \" AND {$wpdb->registration_log}.IP LIKE ('%\".$ip_like.\"%') \";\n\t}*/\n\n\tif( $public_only ) {\n\t\t$query .= \" AND {$wpdb->blogs}.public = '1'\";\n\t}\n\t\n\t$query .= \" AND {$wpdb->blogs}.archived = \". (($include_archived) ? \"'1'\" : \"'0'\");\n\t$query .= \" AND {$wpdb->blogs}.mature = \". (($include_mature) ? \"'1'\" : \"'0'\");\n\t$query .= \" AND {$wpdb->blogs}.spam = \". (($include_spam) ? \"'1'\" : \"'0'\");\n\t$query .= \" AND {$wpdb->blogs}.deleted = \". (($include_deleted) ? \"'1'\" : \"'0'\");\n\n\tif ( $sort_column == 'site_id' ) {\n\t\t$query .= ' ORDER BY {$wpdb->blogs}.blog_id ';\n\t} elseif ( $sort_column == 'lastupdated' ) {\n\t\t$query .= ' ORDER BY last_updated ';\n\t} elseif ( $sort_column == 'blogname' ) {\n\t\t$query .= ' ORDER BY domain ';\n\t} else {\n\t\t$sort_column = 'registered';\n\t\t$query .= \" ORDER BY {$wpdb->blogs}.registered \";\n\t}\n\n\t$order = ( 'desc' == $order ) ? \"DESC\" : \"ASC\";\n\t$query .= $order;\n\n\t$limit = '';\n\tif( isset($limit_results) ){\n\t\tif( isset($start) ){\n\t\t\t$limit = $start.\" , \";\n\t\t}\n\t\t$query .= \"LIMIT \".$limit.$limit_results;\n\t}\n\n\t$results = $wpdb->get_results( $query , ARRAY_A );\n\n\treturn $results;\t\n}", "function publisher_social_share_option_list() {\n\n\t\t$sites = array(\n\t\t\t'facebook' => array(\n\t\t\t\t'label' => '<i class=\"fa fa-facebook\"></i> ' . __( 'Facebook', 'publisher' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\t\t\t'facebook-messenger' => array(\n\t\t\t\t'label' => '<i class=\"fa bsfi-fb-messenger\"></i> ' . __( 'Facebook Messenger', 'publisher' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\t\t\t'twitter' => array(\n\t\t\t\t'label' => '<i class=\"fa fa-twitter\"></i> ' . __( 'Twitter', 'publisher' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\t\t\t'google_plus' => array(\n\t\t\t\t'label' => '<i class=\"fa fa-google-plus\"></i> ' . __( 'Google+', 'publisher' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\t\t\t'pinterest' => array(\n\t\t\t\t'label' => '<i class=\"fa fa-pinterest\"></i> ' . __( 'Pinterest', 'publisher' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\t\t\t'reddit' => array(\n\t\t\t\t'label' => '<i class=\"fa fa-reddit-alien\"></i> ' . __( 'ReddIt', 'publisher' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\t\t\t'linkedin' => array(\n\t\t\t\t'label' => '<i class=\"fa fa-linkedin\"></i> ' . __( 'Linkedin', 'publisher' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\t\t\t'tumblr' => array(\n\t\t\t\t'label' => '<i class=\"fa fa-tumblr\"></i> ' . __( 'Tumblr', 'publisher' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\t\t\t'telegram' => array(\n\t\t\t\t'label' => '<i class=\"fa fa-send\"></i> ' . __( 'Telegram', 'publisher' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\t\t\t'whatsapp' => array(\n\t\t\t\t'label' => '<i class=\"fa fa-whatsapp\"></i> ' . __( 'Whatsapp (Only Mobiles)', 'publisher' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\t\t\t'email' => array(\n\t\t\t\t'label' => '<i class=\"fa fa-envelope\"></i> ' . publisher_translation_get( 'email' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\t\t\t'stumbleupon' => array(\n\t\t\t\t'label' => '<i class=\"fa fa-stumbleupon\"></i> ' . __( 'StumbleUpon', 'publisher' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\t\t\t'vk' => array(\n\t\t\t\t'label' => '<i class=\"fa fa-vk\"></i> ' . __( 'VK', 'publisher' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\t\t\t'digg' => array(\n\t\t\t\t'label' => '<i class=\"fa fa-digg\"></i> ' . __( 'Digg', 'publisher' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\t\t\t'line' => array(\n\t\t\t\t'label' => '<i class=\"fa bsfi-line\"></i> ' . __( 'LINE (Only Mobiles)', 'publisher' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\t\t\t'bbm' => array(\n\t\t\t\t'label' => '<i class=\"fa bsfi-bbm\"></i> ' . __( 'BlackBerry (Only Mobiles)', 'publisher' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\t\t\t'viber' => array(\n\t\t\t\t'label' => '<i class=\"fa bsfi-viber\"></i> ' . __( 'Viber (Only Mobiles)', 'publisher' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\t\t\t'print' => array(\n\t\t\t\t'label' => '<i class=\"fa fa-print\"></i> ' . publisher_translation_get( 'print' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\t\t\t'ok-ru' => array(\n\t\t\t\t'label' => '<i class=\"fa bsfi-ok-ru\"></i> ' . __( 'OK.ru', 'publisher' ),\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t),\n\n\t\t);\n\n\t\tforeach ( publisher_get_option( 'social_share_custom_links' ) as $link ) {\n\n\t\t\tif ( empty( $link['title'] ) || empty( $link['link'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$sites[ $link['title'] ] = array(\n\t\t\t\t'label' => bf_get_icon_tag( $link['icon'] ) . ' ' . $link['title'],\n\t\t\t\t'css-class' => 'active-item'\n\t\t\t);\n\t\t}\n\n\t\treturn $sites;\n\t}", "function add_shortcode_for_our_plugin ($attr , $content = null ){\n\t\textract(shortcode_atts(array(\n\t\t\t'post_type'=>'post',\n\t\t\t'posts_per_page'=>2,\n\t\t\t\n\t\t\t\n\t\t\n\t\t), $attr,'our_shortcode' ));\n\t\n\t$query = new WP_Query(array(\n\t\t'post_type'=>$post_type,\n\t\t'posts_per_page'=>$posts_per_page,\n\t\n\t));\n\t\n\tif($query->have_posts()):\n\t\t$output = '<div class=\"recent_posts\"><ul>';\n\t\t$i=0;\n\t\twhile($query->have_posts()){\n\t\t\t\n\t\t\t$query->the_post();\n\t\t\tif($i == 0):\n\t\t\t$output .= '<li><a href=\"'.get_the_permalink().'\" style=\"color:red;\" >'.get_the_title().'</a></li>';\n\t\t\telse:\n\t\t\t$output .= '<li><a href=\"'.get_the_permalink().'\">'.get_the_title().'</a></li>';\n\t\t\tendif;\n\t\t\t\n\t\t\t\n\t\t$i++; }\n\t\twp_reset_postdata();\n\t$output .= '</ul></div>';\n\treturn $output;\n\telse:\n\t return 'no post found';\n\t\n\tendif;\n\t\n\t\n\t\n\t\n\t\n\t\n}", "function stanford_subsites_views_plugins() {\n $plugins = array();\n $plugins['argument validator'] = array(\n 'subsite' => array(\n 'title' => t('Active Subsite'),\n 'handler' => 'views_plugin_argument_validate_subsite',\n ),\n );\n\n $plugins['argument default'] = array(\n 'subsite' => array(\n 'title' => t('Active Subsite'),\n 'handler' => 'views_plugin_argument_default_subsite',\n ),\n );\n\n return $plugins;\n}", "public function getSites() {\n $result = $this->query('GET', 'site', array(), array('list'));\n return isset($result['list']) ? $result['list'] : $result;\n }", "public function getServerList() {}", "function show_dhz_plugins_list_meta_box() {\n\n\t\t$plugins = apply_filters('_dhz_plugins_list', array());\n\t\t?>\n\t\t\t<p style=\"margin-bottom: 10px; font-weight:500\"><?php _e(\"Thank you for using my plugins!\", \"acf-collapse-fields\") ?></p>\n\t\t\t<ul style=\"margin-top: 0; margin-left: 5px;\">\n\t\t\t\t<?php \n\t\t\t\t\tforeach ($plugins as $plugin) {\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<li style=\"list-style-type: disc; list-style-position:inside; text-indent:-13px; margin-left:13px\">\n\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\t\techo $plugin['title'].\"<br/>\";\n\t\t\t\t\t\t\t\t\tif ($plugin['doc']) {\n\t\t\t\t\t\t\t\t\t\t?> <a style=\"font-size:12px\" href=\"<?php echo $plugin['doc']; ?>\" target=\"_blank\"><?php _e(\"Documentation\", \"acf-collapse-fields\") ?></a><?php \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</li>\n\t\t\t\t\t\t<?php \n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</ul>\n\t\t\t<div style=\"margin-left:-12px; margin-right:-12px; margin-bottom: -12px; background: #2a9bd9; padding:14px 12px\">\n\t\t\t\t<p style=\"margin:0; text-align:center\"><a style=\"color: #fff;\" href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=XMLKD8H84HXB4&lc=US&item_name=Donation%20for%20WordPress%20Plugins&no_note=0&cn=Add%20a%20message%3a&no_shipping=1&currency_code=EUR\" target=\"_blank\"><?php _e(\"Please consider making a small donation!\", \"acf-collapse-fields\") ?></a></p>\n\t\t\t</div>\n\t\t<?php\n\t}", "function website_sitemap() {\n\n\t$websites = website_themes();\n\n\tforeach ( $websites as $site ) {\n?>\n\t<li><a href=\"<?php echo path( 'theme-showcase/' . $site . '/' ); ?>\"><?php echo ucwords( $site ); ?></a></li>\n<?php\n\t}\n\n}", "function wp_smpro_servers() {\r\n\t$server_list = array(\r\n\t\t'https://smush1.wpmudev.com/',\r\n\t\t'https://smush2.wpmudev.com/',\r\n\t\t'https://smush3.wpmudev.com/',\r\n\t\t'https://smush4.wpmudev.com/',\r\n\t\t'https://smush5.wpmudev.com/',\r\n\t\t'https://smush6.wpmudev.com/',\r\n\t\t'https://smush7.wpmudev.com/',\r\n\t\t'https://smush8.wpmudev.com/',\r\n\t\t'https://smush9.wpmudev.com/',\r\n\t\t'https://smush10.wpmudev.com/'\r\n\t);\r\n\r\n\treturn $server_list;\r\n}", "function AWS_easy_page_head($initArray){\n $initArray['external_link_list_url'] = get_option('siteurl') . '/wp-content/plugins/aws-easy-page-link/link-list.php';\n return $initArray;\n}", "function wp_get_sitemap_providers()\n {\n }", "public function getMagentoWebsites();", "function register_links_list_widget()\n{\n register_widget( 'VF_Widget_Links_List' );\n}", "function display_site_info()\r\n{\r\n?>\r\n <ul>\r\n <li>¡Almacena tus marcadores online con nosotros!\r\n <li>¡Conoce los que usan otros usuarios!\r\n <li>¡Comparte tus enlaces favoritos con otros!\r\n </ul>\r\n<?\r\n}", "public function getSitesList()\n {\n return Db::fetchAll(\"SELECT idsite, name\"\n . \"\\n FROM \" . Common::prefixTable('site')\n . \"\\n ORDER BY idsite\");\n }", "function uvasomcme_register_shortcodes(){\n add_shortcode( 'uvasomcmecourselist', 'uvasomcmecourses_do_loop' );\n add_shortcode('uvasomcmecourse','uvasomcmecourse_single');\n}", "private function get_current_set_sites() {\n\t\t\t$content = '<ul id=\"ub_maintenance_selcted_sites\">';\n\t\t\t$sites = $this->get_current_sites();\n\t\t\tif ( ! empty( $sites ) ) {\n\t\t\t\t$sites = get_sites( array( 'site__in' => $sites ) );\n\t\t\t\tforeach ( $sites as $site ) {\n\t\t\t\t\t$content .= sprintf( '<li id=\"site-%d\">', esc_attr( $site->blog_id ) );\n\t\t\t\t\t$content .= sprintf( '<input type=\"hidden\" name=\"simple_options[sites][list][]\" value=\"%d\" />', esc_attr( $site->blog_id ) );\n\t\t\t\t\t$blog = get_blog_details( $site->blog_id );\n\t\t\t\t\t$content .= esc_html( sprintf( '%s (%s)', $blog->blogname, $blog->siteurl ) );\n\t\t\t\t\t$content .= sprintf( ' <a href=\"#\">%s</a>', esc_html__( 'remove site', 'ub' ) );\n\t\t\t\t\t$content .= '</li>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$content .= '</ul>';\n\t\t\treturn $content;\n\t\t}", "function spreadshop_article_list()\n{\ninclude(plugin_dir_path(__FILE__).'/spreadarticlelist.php');\n}", "public function get_sites()\n {\n }", "function cherry_site_shortcodes() {\n\t\treturn Cherry_Site_Shortcodes::get_instance();\n\t}", "public function plugin_name() {\n\t\treturn 'All In One SEO Pack';\n\t}", "function register_taxonomy_omfg_mobile_pro_sites() {\n\t// USED TO CONNECT A SITE WITH A SELECTED THEME\n\t// ============================================ -->\n $labels = array( \n 'name' => _x( 'OMFG Mobile Pro Page Sites', 'omfg_mobile_pro_sites' ),\n 'singular_name' => _x( 'OMFG Mobile Pro Page Site', 'omfg_mobile_pro_sites' ),\n 'search_items' => _x( 'Search OMFG Mobile Pro Page Sites', 'omfg_mobile_pro_sites' ),\n 'popular_items' => _x( 'Popular OMFG Mobile Pro Page Sites', 'omfg_mobile_pro_sites' ),\n 'all_items' => _x( 'All OMFG Mobile Pro Page Sites', 'omfg_mobile_pro_sites' ),\n 'parent_item' => _x( 'Parent OMFG Mobile Pro Page Site', 'omfg_mobile_pro_sites' ),\n 'parent_item_colon' => _x( 'Parent OMFG Mobile Pro Page Site:', 'omfg_mobile_pro_sites' ),\n 'edit_item' => _x( 'Edit OMFG Mobile Pro Page Site', 'omfg_mobile_pro_sites' ),\n 'update_item' => _x( 'Update OMFG Mobile Pro Page Site', 'omfg_mobile_pro_sites' ),\n 'add_new_item' => _x( 'Add New OMFG Mobile Pro Page Site', 'omfg_mobile_pro_sites' ),\n 'new_item_name' => _x( 'New OMFG Mobile Pro Page Site Name', 'omfg_mobile_pro_sites' ),\n 'separate_items_with_commas' => _x( 'Separate omfg mobile pro page sites with commas', 'omfg_mobile_pro_sites' ),\n 'add_or_remove_items' => _x( 'Add or remove omfg mobile pro page sites', 'omfg_mobile_pro_sites' ),\n 'choose_from_most_used' => _x( 'Choose from the most used omfg mobile pro page sites', 'omfg_mobile_pro_sites' ),\n 'menu_name' => _x( 'OMFG Mobile Pro Page Sites', 'omfg_mobile_pro_sites' ),\n );\n\n $args = array( \n 'labels' => $labels,\n 'public' => true,\n 'show_in_nav_menus' => false,\n 'show_ui' => true,\n 'show_tagcloud' => false,\n 'hierarchical' => true,\n 'rewrite' => false,\n 'query_var' => true\n );\n\n register_taxonomy( 'omfg_mobile_pro_sites', /*array('omfg-mobile-pro'),*/ $args );\n}", "function install_site() {\n \n}", "function get_site_socialmedia( $site_list ) {\n\t/*global $ssc_options;\n\t$options = $ssc_options;\n\t/**/\n\tglobal $ssc_location_options;\n\t$options = $ssc_location_options;\n\tif ( !is_array( $site_list ) ){\n\t\t$site_list = array( $site_list );\n\t}\n\tforeach ( $options['settings'] as $option_group ) {\n\t\tif ( $option_group['group_name'] == 'socialmedia' ){\n\t\t\tforeach ($option_group['group_fields'] as $field ) {\n\t\t\t\tif ( get_blog_option( $site_list['blog_id'], 'ssc_admin_socialmedia_settings_' . $field['name'] ) ) {\n \t\t\t\t$site_options[$site_list['blog_id']][$field['name']] = array(\n\t \t\t\t\t'name' => $field['name'],\n\t\t \t\t\t'title' => $field['title'],\n\t\t\t \t\t'value' => get_blog_option( $site_list['blog_id'], 'ssc_admin_socialmedia_settings_' . $field['name'] )\n\t\t\t\t \t);\n \t\t }\n\t\t\t}\n\t\t}\n\t}\n\tif ( $site_options ){\n\t\treturn $site_options;\n\t}\n\telse {\n\t\treturn false;\n\t}\n}", "function dm_list_subpages_shortcode($atts, $content = null) {\n\tglobal $post;\n\n\textract(shortcode_atts(array(\n\t\t'page_id' => $post->ID,\n\t), $atts));\n\n\t$pages = get_pages(array(\n\t\t'hierarchical' => false,\n\t\t'parent' => $page_id,\n\t\t'post_type' => 'page',\n\t));\n\n\tif (!empty($pages)) {\n\t\tob_start();\n?>\n<ul class=\"page-list\">\n\t<?php foreach ($pages as $page): ?>\n\t\t<li>\n\t\t\t<a href=\"<?php echo get_permalink($page->ID); ?>\"><?php echo $page->post_title; ?></a>\n\t\t</li>\n\t<?php endforeach; ?>\n</ul>\n<?php\n\t} else {\n\t\t$output = '';\n\t}\n\n\treturn $output;\n}", "function dt_shortcode_admin() {\r\n $rel_theme_url = explode( $_SERVER['SERVER_NAME'], get_template_directory_uri() );\r\n if( isset($rel_theme_url[1]) )\r\n $rel_theme_url = $rel_theme_url[1];\r\n else\r\n $rel_theme_url = str_replace( site_url(), '', get_template_directory_uri() );\r\n\r\n wp_localize_script(\r\n 'custom_quicktags',\r\n 'dt_admin',\r\n array(\r\n 'themeurl'\t=> $rel_theme_url\r\n )\r\n );\r\n }", "function plugin_version_itilcategorygroups() {\n return array('name' => __('ItilCategory Groups', 'itilcategorygroups'),\n 'version' => '0.90+1.0.3',\n 'author' => \"<a href='http://www.teclib.com'>TECLIB'</a>\",\n 'homepage' => 'http://www.teclib.com');\n}", "function get_site_contacts( $site_list ) {\n\tif ( !is_array( $site_list ) ) {\n\t\t$site_list = array( $site_list );\n\t}\n foreach( $site_list as $site ){\n \t$site_options[$site['blog_id']]['name'] = get_blog_details( $site['blog_id'])->blogname;\n $site_options[$site['blog_id']]['street'] = get_blog_option( $site['blog_id'], 'ssc_admin_contact_settings_street' );\n $site_options[$site['blog_id']]['city'] = get_blog_option( $site['blog_id'], 'ssc_admin_contact_settings_city' );\n $site_options[$site['blog_id']]['state'] = get_blog_option( $site['blog_id'], 'ssc_admin_contact_settings_state' );\n $site_options[$site['blog_id']]['zip'] = get_blog_option( $site['blog_id'], 'ssc_admin_contact_settings_zip' );\n $site_options[$site['blog_id']]['phone'] = get_blog_option( $site['blog_id'], 'ssc_admin_contact_settings_phone' );\n $site_options[$site['blog_id']]['path'] = get_blog_details( $site['blog_id'])->path;\n }\n return $site_options;\n}", "function plugin_url() {\n\t\t\n\t\treturn AVIA_PHP_URL.'avia_shortcodes/';\n\t}", "public function register_shortcode_ui() {\n\t\tshortcode_ui_register_for_shortcode( 'hippomundo_results', array(\n\t\t\t'label' => __( 'Hippomundo Results', 'hippomundo' ),\n\t\t\t'listItemImage' => 'dashicons-clipboard',\n\t\t\t'attrs' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'API Key', 'hippomundo' ),\n\t\t\t\t\t'description' => __( 'Your API token, received from Hippomundo personnel.', 'hippomundo' ),\n\t\t\t\t\t'attr' => 'api_key',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t'placeholder' => get_option( 'hippomundo_api_key' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Studbook', 'hippomundo' ),\n\t\t\t\t\t'description' => __( 'The abbreviated name of your studbook. Your API token will be checked against for permissions on this studbook.', 'hippomundo' ),\n\t\t\t\t\t'attr' => 'Studbook',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t'placeholder' => get_option( 'hippomundo_studbook' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Title', 'hippomundo' ),\n\t\t\t\t\t'description' => __( 'Title displayed above the results. Available tags: <code>{days}</code>, <code>{place}</code>.', 'hippomundo' ),\n\t\t\t\t\t'attr' => 'title',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t'placeholder' => get_option( 'hippomundo_title' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Subtitle', 'hippomundo' ),\n\t\t\t\t\t'description' => __( 'Subtitle displayed above the results. Available tags: <code>{days}</code>, <code>{place}</code>.', 'hippomundo' ),\n\t\t\t\t\t'attr' => 'subtitle',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t'placeholder' => get_option( 'hippomundo_subtitle' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Days', 'hippomundo' ),\n\t\t\t\t\t'description' => __( 'Amount of days of sport results to fetch.', 'hippomundo' ),\n\t\t\t\t\t'attr' => 'days',\n\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t'placeholder' => 10,\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Discipline', 'hippomundo' ),\n\t\t\t\t\t'description' => __( 'The discipline of the results to fetch (all, jumping, eventing, dressage).', 'hippomundo' ),\n\t\t\t\t\t'attr' => 'discipline',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t'placeholder' => 'all'\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t) );\n\t}", "function wp_dashboard_plugins()\n {\n }", "function devindavid_site_info() {\n\t\tdo_action( 'devindavid_site_info' );\n\t}", "function list_competencies_dev($atts) {\n\t$src = 'empty';\n\t\n\tif (isset($_GET['src']))\n\t\t$src = $_GET['src'];\n\t\n\t$a = shortcode_atts( array(\n 'target' => 'empty',\n\t\t'src' => $src,\n\t\t'collapse' => false\n ), $atts );\n\twp_localize_script( 'sr-functions', 'target_div', $a );\n\t\n\t$taxonomy = 'asn_index';\n\t$orderby = 'slug';\n\t$show_count = 1;\n\t$pad_counts = 1;\n\t$hierarchical = 1;\n\t$title = '';\n\t$empty = 0;\n\t\n\t$args = array(\n\t 'taxonomy' => $taxonomy,\n\t 'orderby' => $orderby,\n\t 'show_count' => $show_count,\n\t 'pad_counts' => $pad_counts,\n\t 'hierarchical' => $hierarchical,\n\t 'title_li' => $title,\n\t 'hide_empty' => $empty,\n\t 'echo' => 0\n\t);\n\t\n\treturn '<div id=\"comp-list\">'.wp_list_categories( $args ).'</div>';\n}", "function wp_list_minibbc()\n{\nglobal $wpdb;\n\n\n// PLEASE FILL IT OUT.. its really needed, boys.. ;)\n$prefix = \"minibbtable_\"; // Prefix of the minibb database tables (e.g. minibb_)\n\n$LIMIT = \"DESC LIMIT 0,2\"; // Show only 5 Boards? Insert it like \"LIMIT 5\", show all boards -> do nothing here\n\n$utb = \"/forum\"; // URL to minibb boards.. e.g. domain.de/board then insert something like /board , no backslash please..\n\n$modrewrite = \"1\"; // if using minibb`s rewrite rules, please insert 1, if not.. nothing.\n\n\n$sqlit = \"SELECT SQL_CACHE forum_id, forum_name, topics_count, posts_count FROM \" . $prefix . \"forums ORDER BY forum_name \" . $LIMIT . \"\";\n\n$boards = $wpdb->get_results($sqlit);\n\nforeach ($boards as $board)\n\t{\necho \"<li>\";\n\nif ($modrewrite = '1') \t{\necho \"<a href=\\\"\" . $utb . \"/\" . $board->forum_id . \"_0.html\\\" title=\\\"\" .\n$board->forum_name . \"\\\">\";\n\t} else {\necho \"<a href=\\\"\" . $utb . \"/index.php?action=vtopic&amp;forum=\" . $board->forum_id . \">\";\n\t}\necho \"<b>\" . $board->forum_name . \"</b></a> (Topics: \" . $board->topics_count . \" Posts: \" . $board->posts_count . \")</li>\";\n\t}\n}", "public function widget_sites()\n {\n $site = Model::fly('Model_Site');\n\n $order_by = $this->request->param('sites_order', 'id');\n $desc = (bool) $this->request->param('sites_desc', '0');\n\n // Select all products\n $sites = $site->find_all();\n\n // Set up view\n $view = new View('backend/sites');\n\n $view->order_by = $order_by;\n $view->desc = $desc;\n\n $view->sites = $sites;\n\n return $view->render();\n }", "public function kiwip_make_list(){\n\t\t\n\t\t/**\n\t\t * - list all directory in scripts folder\n\t\t * - list all files in the current folder\n\t\t * - create the attributes of the shortcode\n\t\t * - increment the array for listing\n\t\t */\n\t\tif(is_dir($this->scriptsDir)){\n\t\t\tif($folder = opendir($this->scriptsDir)){ //open the directory\n\n\t\t\t\t$i = 0; //increment\n\t\t\t\twhile(($file = readdir($folder)) !== false){ //grab subfolder\n\t\t\t\t\tif($file !== '.' AND $file !== '..'){\n\n\t\t\t\t\t\t/* Constrcut the tree structure in the array to store informations */\n\t\t\t\t\t\t$this->shortcodes[$i] = array('name' => $file); //increment the general array of shortcode\n\n\t\t\t\t\t\tif($subfiles = scandir($this->scriptsDir.'/'.$file)){\n\t\t\t\t\t\t\t$options = false;\n\t\t\t\t\t\t\t$tinymce = false;\n\t\t\t\t\t\t\t$shortcode = false;\n\n\t\t\t\t\t\t\tforeach($subfiles as $filename){\n\n\t\t\t\t\t\t\t\tif($filename == 'tinymce.js'){\n\t\t\t\t\t\t\t\t\t$tinymce = $file.'/tinymce.js';\n\t\t\t\t\t\t\t\t\t$this->shortcodes[$i]['tinymce'] = $tinymce; //add information in the array\n\t\t\t\t\t\t\t\t\t$tinymce = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif($filename == 'options.php'){\n\t\t\t\t\t\t\t\t\t$options = $file.'/options.php';\n\t\t\t\t\t\t\t\t\t$this->shortcodes[$i]['options'] = $options; //add information in the array\n\t\t\t\t\t\t\t\t\t$options = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif($filename == 'shortcode.php'){\n\t\t\t\t\t\t\t\t\t$shortcode = $file.'/shortcode.php';\n\t\t\t\t\t\t\t\t\t$this->shortcodes[$i]['shortcode'] = $shortcode; //add information in the array\n\t\t\t\t\t\t\t\t\t$shortcode = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif($filename == 'style.css'){\n\t\t\t\t\t\t\t\t\t$stylesheet = $file.'/style.css';\n\t\t\t\t\t\t\t\t\t$this->shortcodes[$i]['stylesheet'] = $stylesheet; //add information in the array\n\t\t\t\t\t\t\t\t\t$stylesheet = true;\n\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t * The type are :\n\t\t\t\t\t\t\t\t * - complete+style: tinymce button + shortcode + options + stylesheet\n\t\t\t\t\t\t\t\t * - complete: tinymce button + shortcode + options\n\t\t\t\t\t\t\t\t * - medium: tinymce button + shortcode\n\t\t\t\t\t\t\t\t * - small: shortcode\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\tif($tinymce AND $shortcode AND $options AND $stylesheet){\n\t\t\t\t\t\t\t\t\t$this->shortcodes[$i]['type'] = 'complete+stylesheet';\n\t\t\t\t\t\t\t\t}elseif($tinymce AND $shortcode AND $options){\n\t\t\t\t\t\t\t\t\t$this->shortcodes[$i]['type'] = 'complete';\n\t\t\t\t\t\t\t\t}elseif($shortcode AND $tinymce AND !$options){\n\t\t\t\t\t\t\t\t\t$this->shortcodes[$i]['type'] = 'medium';\n\t\t\t\t\t\t\t\t}elseif($shortcode AND !$tinymce AND !$options){\n\t\t\t\t\t\t\t\t\t$this->shortcodes[$i]['type'] = 'small';\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t//nothing\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}//end foreach\n\t\t\t\t\t\t}//end if\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}//end if\n\t\t\t\t}//end while\n\t\t\t}//end if\n\t\t}//end if\n\n\t\t// $this->debug($this->shortcodes); die();\n\t}", "function wpaddons_shortcode( $atts ) {\n\n\t// Register and enqueues styles\n\tadd_action( 'wp_enqueue_scripts', array( 'WP_Addons_IO', 'enqueue_styles' ) );\n\n\t$atts = shortcode_atts(\n\t\tarray(\n\t\t\t'debug_mode' => 0,\n\t\t\t'plugin' => '',\n\t\t\t'view' => 'cover-grid-third',\n\t\t),\n\t\t$atts,\n\t\t'wpaddons'\n\t);\n\n\t// Load wpAddons SDK\n\t//require_once plugin_dir_path( __FILE__ ) . '/wpaddons-io-sdk/wpaddons-io-sdk.php';\n\n\t// Set addon parameters\n\t$plugin_data = array(\n\t\t'parant_plugin_slug' => $atts['plugin'],\n\t\t'view' => plugin_dir_path( __FILE__ ) . 'wpaddons-io-sdk/view/' . $atts['view'] . '.php',\n\t);\n\n\t// Initiate addons\n\tnew WP_Addons_IO( $plugin_data );\n\n}", "function get_site_name()\n{\n return get_option('site_name');\n}", "function _dhz_plugins_list_meta_box() {\n\t\tif (apply_filters('remove_dhz_nag', false)) {\n\t\t\treturn;\n\t\t}\n\t\t$plugins = apply_filters('_dhz_plugins_list', array());\n\t\t\t\n\t\t$id = 'plugins-by-dreihochzwo';\n\t\t$title = '<a style=\"text-decoration: none; font-size: 1em;\" href=\"https://profiles.wordpress.org/tmconnect/#content-plugins\" target=\"_blank\">'.__(\"Plugins by dreihochzwo\", \"acf-collapse-fields\").'</a>';\n\t\t$callback = array($this, 'show_dhz_plugins_list_meta_box');\n\t\t$screens = array();\n\t\tforeach ($plugins as $plugin) {\n\t\t\t$screens = array_merge($screens, $plugin['screens']);\n\t\t}\n\t\t$context = 'side';\n\t\t$priority = 'default';\n\t\tadd_meta_box($id, $title, $callback, $screens, $context, $priority);\n\t\t\n\t\t\n\t}", "function wp_sitemaps_get_server()\n {\n }", "public function meta_site_name();", "function wp_admin_bar_my_sites_menu($wp_admin_bar)\n {\n }", "function list_plugin_updates()\n {\n }", "function wpmu_current_site()\n {\n }", "function csv_site_list() {\n echo '\n <div class=\"wrap\">\n <h2>CSV of Site List</h2>\n <p>&nbsp;</p>\n <p><b>Below you will see an output of the site list for this WPMU server.<br>\n Just copy/paste it into a text file with a .csv extension and you can open it in Excel.</b></p>\n ';\n\n // Column Titles\n $content = 'BLOG_ID,SITE,REGISTERED,LAST_UPDATED,ARCHIVED,DELETED\\n <br>';\n\n // Data in the CSV\n $sites = wp_get_sites();\n foreach( $sites as $site ){\n $content .= $site['blog_id'];\n $content .= ',';\n $content .= trim($site['path'], '/');\n $content .= ',';\n $content .= $site['registered'];\n $content .= ',';\n $content .= $site['last_updated'];\n $content .= ',';\n $content .= $site['archived'];\n $content .= ',';\n $content .= $site['deleted'];\n $content .= '\\n <br>';\n }\n\n // Output CSV data to screen\n echo $content;\n\n echo '</div>';\n }", "function getSitesList(){\n $result = db_select('fossee_website_index','n')\n ->fields('n',array('site_code','site_name'))\n ->range(0,50)\n //->condition('n.uid',$uid,'=')\n ->execute();\n\n return $result;\n\n}", "function wpestate_add_plugin($plugin_array) { \n $plugin_array['slider_recent_items'] = get_template_directory_uri() . '/js/shortcodes.js';\n $plugin_array['testimonials'] = get_template_directory_uri() . '/js/shortcodes.js';\n<<<<<<< HEAD\n=======\n $plugin_array['testimonial_slider'] = get_template_directory_uri() . '/js/shortcodes.js';\n>>>>>>> 64662fd89bea560852792d7203888072d7452d48\n $plugin_array['recent_items'] = get_template_directory_uri() . '/js/shortcodes.js';\n $plugin_array['featured_agent'] = get_template_directory_uri() . '/js/shortcodes.js';\n $plugin_array['featured_article'] = get_template_directory_uri() . '/js/shortcodes.js';\n $plugin_array['featured_property'] = get_template_directory_uri() . '/js/shortcodes.js';\n $plugin_array['login_form'] = get_template_directory_uri() . '/js/shortcodes.js';\n $plugin_array['register_form'] = get_template_directory_uri() . '/js/shortcodes.js';\n $plugin_array['list_items_by_id'] = get_template_directory_uri() . '/js/shortcodes.js';\n $plugin_array['advanced_search'] = get_template_directory_uri() . '/js/shortcodes.js';\n $plugin_array['font_awesome'] = get_template_directory_uri() . '/js/shortcodes.js';\n $plugin_array['spacer'] = get_template_directory_uri() . '/js/shortcodes.js';\n $plugin_array['icon_container'] = get_template_directory_uri() . '/js/shortcodes.js';\n<<<<<<< HEAD\n \n=======\n $plugin_array['list_agents'] = get_template_directory_uri() . '/js/shortcodes.js';\n $plugin_array['places_list'] = get_template_directory_uri() . '/js/shortcodes.js';\n $plugin_array['listings_per_agent'] = get_template_directory_uri() . '/js/shortcodes.js';\n $plugin_array['property_page_map'] = get_template_directory_uri() . '/js/shortcodes.js';\n $plugin_array['estate_membership_packages'] = get_template_directory_uri() . '/js/shortcodes.js';\n $plugin_array['estate_featured_user_role'] = get_template_directory_uri() . '/js/shortcodes.js';\n\t\n\t// slick function\n\t$plugin_array['places_slider'] = get_template_directory_uri() . '/js/shortcodes.js';\n\t\n>>>>>>> 64662fd89bea560852792d7203888072d7452d48\n \n return $plugin_array;\n}", "function wp_get_active_network_plugins()\n {\n }", "public function socialButtons($atts)\n {\n $atts = shortcode_atts(array(\n 'class' => '',\n 'include' => null,\n 'exclude' => null,\n ), $atts);\n\n $rs = '<ul class=\"socialButtons '.$atts['class'].'\">';\n $smOptions = explode(',', SOCIAL_MEDIA_OPTIONS);\n\n if (!empty($atts['include'])) {\n $items = explode(',', $atts['include']);\n foreach ($smOptions as $socialChannel) {\n $option = get_option($socialChannel);\n $load = false;\n foreach ($items as $item) {\n if ($socialChannel == $item) {\n $load = true;\n }\n }\n if ($load) {\n if ($option == true && $option !== '') {\n $option = str_replace('http://', '', $option);\n $option = str_replace('https://', '', $option);\n $rs .= '<li><a target=\"_blank\" class=\"socialButton ' . $socialChannel . '\" href=\"//' . $option . '\"></a></li>';\n }\n }\n }\n } else if (!empty($atts['exclude'])) {\n $items = explode(',', $atts['exclude']);\n foreach ($smOptions as $socialChannel) {\n $option = get_option($socialChannel);\n $load = true;\n foreach ($items as $item) {\n if ($socialChannel == $item) {\n $load = false;\n }\n }\n if ($load) {\n if ($option == true && $option !== '') {\n $option = str_replace('http://', '', $option);\n $option = str_replace('https://', '', $option);\n $rs .= '<li><a target=\"_blank\" class=\"socialButton ' . $socialChannel . '\" href=\"//' . $option . '\"></a></li>';\n }\n }\n }\n } else {\n foreach ($smOptions as $socialChannel) {\n $option = get_option($socialChannel);\n if ($option == true && $option !== '') {\n $option = str_replace('http://', '', $option);\n $option = str_replace('https://', '', $option);\n $rs .= '<li><a target=\"_blank\" class=\"socialButton ' . $socialChannel . '\" href=\"//' . $option . '\"></a></li>';\n }\n }\n }\n\n $rs .= '</ul>';\n return $rs;\n }", "function theme_nightingale_get_siteadmin_link() {\n\n global $USER, $CFG, $PAGE;\n\n $siteadminhtml = \"\";\n\n $contacturl = '';\n if(!empty($PAGE->theme->settings->contacturl)) {\n $contacturl = $PAGE->theme->settings->contacturl;\n }\n\n if(is_siteadmin($USER->id)) {\n\n $siteadminhtml = \"<li class='c-nav-primary__item c-nav-primary__align'>\n <a href='\".$CFG->wwwroot.\"/admin/search.php' class='c-nav-primary__link'>Site Admin</a>\n </li>\";\n } else {\n $siteadminhtml = \"<li class='c-nav-primary__item c-nav-primary__align'>\n <a href='\".$contacturl.\"' class='c-nav-primary__link'>Contact</a>\n </li>\";\n }\n\n return $siteadminhtml;\n\n}", "function register_plugin_menu(){\n add_menu_page( 'Rss Multi Updater', 'Rss Multi Updater', 'manage_options', 'RssMultiUpdater', array(&$this, 'admin_page'), '', 26 ); \n \n }", "function index() {\r\r\n $data = array();\r\r\n //load the view\r\r\n $data['sites'] = $this->sites_model->get_all_site($data);\r\r\n $data['main_content'] = 'admin/sites/list';\r\r\n $this->load->view('includes/template', $data);\r\r\n }", "public function index()\n {\n //$sites = $this->site->all();\n\n return view('isite::admin.sites.index', compact(''));\n }", "public function index()\n {\n //$sites = $this->site->all();\n\n return view('site::admin.sites.index', compact(''));\n }", "public function getSite();", "function ms_slideshare_shortcode_handler( $atts ) {\n extract(shortcode_atts( array(\n 'url' => 'http://www.slideshare.net/',\n ), $atts));\n $pluginurl = plugin_dir_url(__FILE__);\n\n return '<a href=\"'.$url.'\"><img style=\"height: 1em; padding: 0; margin: 0;\" src=\"'.$pluginurl.'/slideshare-32x32.png\" alt=\"link to slideshare\" /></a>';\n}", "function sp_pagelist_sc( $atts ){\n\t\tglobal $post;\n\t\t\n\t\textract(shortcode_atts(array(\n\t\t\t\"page_id\" => ''\n\t\t),$atts));\t\n\n\t\t$output = '';\n\t\t\n\t\t$args = array('post_parent' => $page_id,\n\t\t\t\t\t 'post_type' => 'page',\n\t\t\t\t\t 'orderby' => 'title',\n\t\t\t\t\t 'order' => 'ASC'\n\t\t\t\t );\n\t\tquery_posts( $args );\t\n\t\t\n\t\tif( have_posts() ) while ( have_posts() ) : the_post();\n\t\t\n\t\t$post_thumb = get_post_thumbnail_id( $post->ID );\n\t\t$image_src = wp_get_attachment_image_src($post_thumb, 'large');\n\t\t$image = aq_resize( $image_src[0], 118, 118, true ); //resize & crop the image\n\t\t\n\t\t$output .= '<div class=\"pagelist-items\">';\n\t\t$output .= '<div class=\"one_third\">';\n\t\tif ($image) {\n\t\t\t$output .= '<a href=\"'.get_permalink().'\"><img src=\"' . $image . '\" class=\"alignnone\" /></a>';\n\t\t} else {\n\t\t\t$output .= '<img src=\"' . SP_BASE_URL . 'images/blank-pagelist-photo.gif\" width=\"118\" height=\"118\" alt=\"Blank photo\" class=\"alignnone\" />';\n\t\t}\n\t\t$output .= '</div>';\n\t\t\n\t\t$output .= '<div class=\"two_third last\">';\n\t\t$output .= '<h3 class=\"name\"><a href=\"'.get_permalink().'\">' . get_the_title() .'</a></h3>';\n\n\t\t$output .= '<p>' . sp_excerpt_length(6) . '</p>';\n\t\t$output .= '<a href=\"'.get_permalink().'\" class=\"learn-more button\">' . __( 'Read more »', 'sptheme' ) . '</a>';\n\t\t\n\t\t$output .= '</div>';\n\t\t$output .= '<div class=\"clear\"></div>';\n\t\t$output .= '</div>';\n\t\t\n\t\tendwhile;\n\n\t\twp_reset_query();\n\t\t\n\t\treturn $output;\t \t \n\t}", "function htheme_woolist_shortcode( $atts ) {\r\n\r\n\t\t#IF WOOCOMMERCE CLASS EXIST - ADD WOO VISUAL COMPOSER ELEMENTS\r\n\t\tif ( class_exists( 'WooCommerce' ) ){\r\n\t\t\t#SETUP WOO CONTENT CLASS\r\n\t\t\t$htheme_data = $this->htheme_woo_content->htheme_get_woo_product_list($atts, false);\r\n\r\n\t\t\t#RETURN DATA/HTML\r\n\t\t\treturn $htheme_data;\r\n\t\t} else {\r\n\t\t\treturn 'WooCommerce required!';\r\n\t\t}\r\n\r\n\t}", "public function get_sitemap_list()\n {\n }", "function activate_sitewide_plugin()\n {\n }", "function blankPlugin_add_settings_link( $links ) {\n $settings_link = '<a href=\"admin.php?page=blankPlugin\">' . __( 'Settings', 'blankPlugin' ) . '</a>';\n array_push( $links, $settings_link );\n \treturn $links;\n}", "function crumble_list_shortcode($atts, $content = null) {\r\n\textract( shortcode_atts( \r\n\t\tarray( \r\n\t\t\t\"style\" => '1',\r\n\t\t\t\"underline\" => '1' \r\n\t\t), $atts));\r\n\t\r\n\t$code = '';\r\n\t$list_type = '';\r\n\t\r\n\tswitch ($style) {\r\n\t case 1:\r\n\t\t\t$list_type = 'unordered';\r\n\t\t\tbreak;\r\n\t case 2:\r\n\t \t\t$list_type = 'ordered';\r\n\t\t\tbreak;\r\n\r\n\t case 3:\r\n\t \t\t$list_type = 'square';\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t case 4:\r\n\t \t\t$list_type = 'circle';\r\n\t\t\tbreak;\r\n\r\n\t case 5:\r\n\t \t\t$list_type = 'bullets';\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t case 6:\r\n\t \t\t$list_type = 'arrow';\r\n\t\t\tbreak;\r\n\r\n\t case 7:\r\n\t \t\t$list_type = 'arrow2';\r\n\t\t\tbreak;\r\n\t\t\r\n\t}\r\n\t\r\n\tif( $underline == \"1\" ) {\r\n\t\t$code = '<ul class=\"list '.$list_type.' underline\">' . do_shortcode ( $content ) . '</ul>';\r\n\t} else {\r\n\t\t$code = '<ul class=\"list '.$list_type.'\">' . do_shortcode ( $content ) . '</ul>';\r\n\t}\r\n\t\r\n\treturn $code;\r\n\t\r\n}", "public function getWpDetailsList()\n\t{\n\t\techo \"Version : \" . get_bloginfo('version') . \"\\n\";\n\t\techo \"Charset : \" . get_bloginfo('charset') . \"\\n\";\n\t\techo \"Url : \" . get_bloginfo('url') . \"\\n\";\n\t\techo \"Language : \" . get_bloginfo('language') . \"\\n\";\n\t\techo \"PHP : \" . phpversion() . \"\\n\";\n\t}", "public function admin_init()\n {\n add_settings_section('wp_plugin_template-section', __('Master Link Settings'), array(\n &$this,\n 'settings_section_master_link_plugin'\n ), 'master_link_plugin');\n\n // Add URL Slug field\n add_settings_field('master_link_plugin-slug', 'URL Slug', array(\n &$this,\n 'settings_field_input_text_slug'\n ), 'master_link_plugin', 'wp_plugin_template-section');\n\n // Add HUM config\n if(class_exists(Hum) && is_plugin_active(\"hum/hum.php\")) {\n add_settings_field('master_link_plugin-hum', 'HUM Short URL Slug', array(\n &$this,\n 'settings_field_input_text_hum'\n ), 'master_link_plugin', 'wp_plugin_template-section');\n }\n\n // Add Use default template\n add_settings_field('master_link_plugin-use_template', 'Use Plugin Template', array(\n &$this,\n 'settings_field_input_use_template'\n ), 'master_link_plugin', 'wp_plugin_template-section');\n\n // register your plugin's settings\n register_setting('master_link_plugin', 'master_link_plugin-slug');\n register_setting('master_link_plugin', 'master_link_plugin-use_template');\n\n $args = array(\n 'type' => 'string',\n 'default' => NULL,\n );\n\n register_setting('master_link_plugin', 'master_link_plugin_spotify_client_id', $args);\n register_setting('master_link_plugin', 'master_link_plugin_spotify_client_secret', $args);\n register_setting('master_link_plugin', 'master_link_plugin_spotify_auth', $args);\n\n add_settings_section(\n 'master_link_plugin_spotify_client_settings',\n __( 'Spotify Client Settings', 'master_link' ),\n null,\n 'master_link_plugin'\n );\n\n add_settings_section(\n 'master_link_plugin_spotify_auth_settings',\n __( 'Spotify Authentication Settings', 'master_link' ),\n array($this,'spotify_auth_settings'),\n 'master_link_plugin_auth_settings'\n );\n\n add_settings_field(\n 'master_link_plugin_spotify_auth',\n __('Spotify authentication token','master_link'),\n array($this,'disabled_text_callback'),\n 'master_link_plugin',\n 'master_link_plugin_spotify_auth_settings',\n array(\n 'name' => 'master_link_plugin_spotify_auth'\n )\n );\n\n add_settings_field(\n 'master_link_plugin_spotify_client_id',\n __('Spotify Client ID','master_link'),\n array($this,'text_callback'),\n 'master_link_plugin',\n 'master_link_plugin_spotify_client_settings',\n array(\n 'name' => 'master_link_plugin_spotify_client_id'\n )\n );\n\n add_settings_field(\n 'master_link_plugin_spotify_client_secret',\n __('Spotify Client Secret','master_link'),\n array($this,'text_callback'),\n 'master_link_plugin',\n 'master_link_plugin_spotify_client_settings',\n array(\n 'name' => 'master_link_plugin_spotify_client_secret'\n )\n );\n }", "function shibboleth_network_admin_panels() {\n\tif ( is_multisite() ) {\n\t\tadd_submenu_page( 'settings.php', __( 'Shibboleth Options', 'shibboleth' ), __( 'Shibboleth', 'shibboleth' ), 'manage_network_options', 'shibboleth-options', 'shibboleth_options_page' );\n\t}\n}", "function my_customizer_social_media_array() {\n\t$social_sites = array('twitter', 'facebook', 'google-plus', 'flickr', 'pinterest', 'youtube', 'tumblr', 'dribbble', 'rss', 'linkedin', 'instagram', 'email');\n\treturn $social_sites;\n}", "function wp_parse_list($input_list)\n {\n }", "function pluginActionLinks($links) \n{\n\t$settings_link = '<a href=\"tools.php?page=wp-static-html-output-options\">' . __('Settings', 'static-html-output-plugin') . '</a>'; \n \tarray_unshift( $links, $settings_link ); \n \treturn $links; \t\n}", "function labdevs_short_url_link()\n{\n return get_option(\"labdevs_settings_option_short_url\");\n}", "public function get_sites() {\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/sites.json\");\n }", "function wpestate_register_shortcodes() {\n<<<<<<< HEAD\n add_shortcode('slider_recent_items', 'wpestate_slider_recent_posts_pictures');\n \n add_shortcode('spacer', 'wpestate_spacer_shortcode_function');\n add_shortcode('recent-posts', 'wpestate_recent_posts_function');\n add_shortcode('testimonial', 'wpestate_testimonial_function');\n add_shortcode('recent_items', 'wpestate_recent_posts_pictures');\n=======\n add_shortcode('contact_us_form', 'wpestate_contact_us_form'); \n add_shortcode('slider_recent_items', 'wpestate_slider_recent_posts_pictures'); \n add_shortcode('spacer', 'wpestate_spacer_shortcode_function');\n add_shortcode('recent-posts', 'wpestate_recent_posts_function');\n add_shortcode('testimonial', 'wpestate_testimonial_function');\n add_shortcode('testimonial_slider', 'wpestate_testimonial_slider_function');\n add_shortcode('recent_items', 'wpestate_recent_posts_pictures_new');\n>>>>>>> 64662fd89bea560852792d7203888072d7452d48\n add_shortcode('featured_agent', 'wpestate_featured_agent');\n add_shortcode('featured_article', 'wpestate_featured_article');\n add_shortcode('featured_property', 'wpestate_featured_property');\n add_shortcode('login_form', 'wpestate_login_form_function');\n add_shortcode('register_form', 'wpestate_register_form_function');\n add_shortcode('list_items_by_id', 'wpestate_list_items_by_id_function');\n add_shortcode('advanced_search', 'wpestate_advanced_search_function');\n add_shortcode('font_awesome', 'wpestate_font_awesome_function');\n add_shortcode('icon_container', 'wpestate_icon_container_function');\n<<<<<<< HEAD\n=======\n add_shortcode('list_agents','wpestate_list_agents_function');\n add_shortcode('places_list', 'wpestate_places_list_function');\n add_shortcode('listings_per_agent', 'wplistingsperagent_shortcode_function' );\n add_shortcode('property_page_map', 'wpestate_property_page_map_function' );\n add_shortcode('test_sh', 'wpestate_test_sh' );\n \n add_shortcode('estate_property_page_tab', 'wpestate_property_page_design_tab' );\n add_shortcode('estate_property_page_acc', 'wpestate_property_page_design_acc' );\n add_shortcode('estate_property_simple_detail','wpestate_estate_property_simple_detail');\n add_shortcode('estate_property_details_section','wpestate_estate_property_details_section');\n add_shortcode('estate_property_slider_section','wpestate_estate_property_slider_section');\n add_shortcode('estate_property_design_agent','wpestate_estate_property_design_agent');\n add_shortcode('estate_property_design_agent_contact','wpestate_estate_property_design_agent_contact');\n add_shortcode('estate_property_design_related_listings','wpestate_estate_property_design_related_listings');\n add_shortcode('estate_property_design_intext_details','wpestate_estate_property_design_intext_details');\n add_shortcode('estate_property_design_gallery','wpestate_estate_property_design_gallery');\n add_shortcode('estate_property_design_agent_details_intext_details','wpestate_estate_property_design_agent_details_intext_details');\n add_shortcode('estate_membership_packages','wpestate_membership_packages_function');\n add_shortcode('estate_featured_user_role','wpestate_featured_user_role_shortcode');\n\t\n\t// slick new shortcode\n\tadd_shortcode('places_slider','wpestate_places_slider');\n>>>>>>> 64662fd89bea560852792d7203888072d7452d48\n}", "function cpc_broker_list_shortcode( $atts ) {\n\twp_enqueue_style( 'featured-broker', plugin_dir_url( __FILE__ ) . 'style.css' );\n\t$a = shortcode_atts( array(\n\t\t'type' => '',\n\t\t'state' => '',\n\t), $atts );\n\n\t$user_query = cpc_list_brokers( $a['type'], $a['state'] );\n\t?>\n\t<?php ob_start(); ?>\n\t<?php if( $user_query->results ) : ?>\n\t\t<h2 style=\"text-align: center; margin-top: 0.5em;\"><?php echo $a['type'];?>s</h2>\n\t\t<ul class=\"broker-list-broker\">\n\t\t<?php\n\t\t\tforeach( $user_query->results as $user){\n\t\t\t\t$imgURL = cpc_broker_img_url( $user->ID );\n\t\t\t?>\n\t\t\t<li class=\"broker-ind-wrapper<?php if( cpc_is_featured( $user->ID, 'Broker' )){echo ' featured';}?>\"> \n\t\t\t\t<a class=\"broker-list-link\" href=\"<?php echo site_url();?>/<?php if( function_exists('cpc_author_slug') ){ echo cpc_author_slug(); }else{ echo 'author'; } ?>/<?php echo $user->user_nicename;?>/\">\n\t\t\t\t<div class=\"broker-list-image\">\n\t\t\t\t\t<figure class=\"broker-content\">\n\t\t\t\t\t\t<img src=\"<?php echo $imgURL; ?>\" class=\"\" alt=\"\" />\n\t\t\t\t\t</figure>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"broker-list-desc\">\n\t\t\t\t\t<h3 class=\"broker-list-header\"><?php echo $user->display_name;?></h3>\n\t\t\t\t\t<?php\n\t\t\t\t\t\t$the_description = strip_tags( get_the_author_meta( 'description', $user->ID ) );\n\t\t\t\t\t\tif( mb_strlen( $the_description ) >= 250 ){\n\t\t\t\t\t\t\t$the_description = mb_substr( $the_description, 0, 250 ).'...';\n\t\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t<p><?php echo $the_description; ?></p>\n\t\t\t\t<?php if( cpc_is_featured( $user->ID, 'Broker' )) : ?>\n\t\t\t\t<p class=\"broker-list-featured\"><a href=\"/featured/\">Featured Broker</a></p>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t</div>\n\t\t\t\t</a>\n\t\t\t</li><!-- .broker-wrapper -->\n\t\t\t<?php\n\t\t} // end foreach\n\t\t?>\n\t\t</ul> <!-- .broker-list-broker -->\n\t<?php endif; ?>\n\t<?php return ob_get_clean(); ?>\n<?php\n}", "function help_dashboard_widget_function() {\n // Display whatever it is you want to show\n echo '\n <ul style=\"width:40%;float:left;margin-right:55px;min-width:153px;\">\n <li style=\"color:#666;font-size:14px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:#DFDFDF;padding-bottom:5px;margin-bottom:10px;\">WordPress 101 Videos:</li>\n <li><a href=\"http://wp.tutsplus.com/tutorials/wp101-video-training-part-1-the-dashboard/\" target=\"_blank\">The Dashboard</a></li>\n <li><a href=\"http://wp.tutsplus.com/tutorials/wp-101-video-training-part-2-creating-a-new-post/\" target=\"_blank\">Creating A New Post</a></li>\n <li><a href=\"http://wp.tutsplus.com/tutorials/wp-101-video-training-part-3-edit-existing-post/\" target=\"_blank\">Edit Existing Post</a></li>\n <li><a href=\"http://wp.tutsplus.com/tutorials/wp-101-video-training-part-4-using-categories-and-tags/\" target=\"_blank\">Using Categories and Tag</a></li>\n <li><a href=\"http://wp.tutsplus.com/tutorials/wp-101-video-training-part-5-creating-and-editing-pages/\" target=\"_blank\">Creating and Editing Pages</a></li>\n <li><a href=\"http://wp.tutsplus.com/tutorials/wp-101-video-training-part-6-adding-images/\" target=\"_blank\">Adding Images &amp; Photos</a></li>\n <li><a href=\"http://wp.tutsplus.com/tutorials/wp-101-video-training-part-7-embedding-video/\" target=\"_blank\">How to Embed Video</a></li>\n <li><a href=\"http://wp.tutsplus.com/tutorials/wp-101-video-training-part-8-media-library/\" target=\"_blank\">Using the Media Library</a></li>\n <li><a href=\"http://wp.tutsplus.com/tutorials/wp-101-video-training-part-9-managing-comments/\" target=\"_blank\">Managing Comments</a></li>\n <li><a href=\"http://wp.tutsplus.com/tutorials/wp-101-video-training-part-10-creating-links/\" target=\"_blank\">Creating Links</a></li>\n <li><a href=\"http://wp.tutsplus.com/tutorials/wp-101-video-training-part-12-widgets/\" target=\"_blank\">Adding Widgets</a></li>\n <li><a href=\"http://wp.tutsplus.com/tutorials/wp-101-video-training-part-13-custom-menus/\" target=\"_blank\">Building Custom Menus</a></li>\n <li><a href=\"http://wp.tutsplus.com/tutorials/wp-101-video-training-part-15-users/\" target=\"_blank\">Adding New Users</a></li>\n </ul>\n\n <ul style=\"width:40%;float:left;min-width:153px;\">\n <li style=\"color:#666;font-size:14px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:#DFDFDF;padding-bottom:5px;margin-bottom:10px;\">Videos Specific To Your Site:</li>\n <li><a href=\"http://www.youtube.com/watch?v=IE_10_nwe0c\" target=\"_blank\">SEO Ultimate Tutorial</a></li>\n <li><a href=\"#\" target=\"_blank\">Video</a></li>\n <li><a href=\"#\" target=\"_blank\">Video</a></li>\n </ul>\n\n <p style=\"clear:both;padding-top:5px;margin-bottom:0.5em;color:#666;font-size:14px;\">Helpful Quick Links:</p>\n\n <a href=\"http://login.mailchimp.com\" target=\"_blank\">Mailchimp Login</a> |\n <a href=\"http://mailchimp.com/support/online-training\" target=\"_blank\">Mailchimp Training</a> |\n <a href=\"http://docs.disqus.com/kb\" target=\"_blank\">Disqus Training</a> |\n <a href=\"http://google.com/analytics\" target=\"_blank\">Analytics Login</a> |\n <a href=\"http://mail.'. substr(get_bloginfo('url'), 7).'\" target=\"_blank\">Mail Login</a>\n\n <p>Still stuck? Give us a call at <strong>(530) 638-3581</strong> or email us at <a href=\"mailto:[email protected]?subject=Help!\"><strong>[email protected]</strong></a>.\n ';\n}", "private function get_conflicting_plugins_list() {\n\n\t\t$plugins = [\n\t\t\t'2-click-socialmedia-buttons/2-click-socialmedia-buttons.php' => '2 Click Social Media Buttons.',\n\t\t\t'add-link-to-facebook/add-link-to-facebook.php' => 'Add Link to Facebook.',\n\t\t\t'extended-wp-reset/extended-wp-reset.php' => 'Extended WP Reset.',\n\t\t\t'add-meta-tags/add-meta-tags.php' => 'Add Meta Tags.',\n\t\t\t'all-in-one-seo-pack/all_in_one_seo_pack.php' => 'All In One SEO Pack',\n\t\t\t'easy-facebook-share-thumbnails/esft.php' => 'Easy Facebook Share Thumbnail.',\n\t\t\t'facebook/facebook.php' => 'Facebook (official plugin).',\n\t\t\t'facebook-awd/AWD_facebook.php' => 'Facebook AWD All in one.',\n\t\t\t'facebook-featured-image-and-open-graph-meta-tags/fb-featured-image.php' => 'Facebook Featured Image & OG Meta Tags.',\n\t\t\t'facebook-meta-tags/facebook-metatags.php' => 'Facebook Meta Tags.',\n\t\t\t'wonderm00ns-simple-facebook-open-graph-tags/wonderm00n-open-graph.php' => 'Facebook Open Graph Meta Tags for WordPress.',\n\t\t\t'facebook-revised-open-graph-meta-tag/index.php' => 'Facebook Revised Open Graph Meta Tag.',\n\t\t\t'facebook-thumb-fixer/_facebook-thumb-fixer.php' => 'Facebook Thumb Fixer.',\n\t\t\t'facebook-and-digg-thumbnail-generator/facebook-and-digg-thumbnail-generator.php' => 'Fedmich\\'s Facebook Open Graph Meta.',\n\t\t\t'network-publisher/networkpub.php' => 'Network Publisher.',\n\t\t\t'nextgen-facebook/nextgen-facebook.php' => 'NextGEN Facebook OG.',\n\t\t\t'opengraph/opengraph.php' => 'Open Graph.',\n\t\t\t'open-graph-protocol-framework/open-graph-protocol-framework.php' => 'Open Graph Protocol Framework.',\n\t\t\t'seo-facebook-comments/seofacebook.php' => 'SEO Facebook Comments.',\n\t\t\t'seo-ultimate/seo-ultimate.php' => 'SEO Ultimate.',\n\t\t\t'sexybookmarks/sexy-bookmarks.php' => 'Shareaholic.',\n\t\t\t'shareaholic/sexy-bookmarks.php' => 'Shareaholic.',\n\t\t\t'sharepress/sharepress.php' => 'SharePress.',\n\t\t\t'simple-facebook-connect/sfc.php' => 'Simple Facebook Connect.',\n\t\t\t'social-discussions/social-discussions.php' => 'Social Discussions.',\n\t\t\t'social-sharing-toolkit/social_sharing_toolkit.php' => 'Social Sharing Toolkit.',\n\t\t\t'socialize/socialize.php' => 'Socialize.',\n\t\t\t'only-tweet-like-share-and-google-1/tweet-like-plusone.php' => 'Tweet, Like, Google +1 and Share.',\n\t\t\t'wordbooker/wordbooker.php' => 'Wordbooker.',\n\t\t\t'wordpress-seo/wp-seo.php' => 'Yoast SEO',\n\t\t\t'wordpress-seo-premium/wp-seo-premium.php' => 'Yoast SEO Premium',\n\t\t\t'wp-seopress/seopress.php' => 'SEOPress',\n\t\t\t'wp-seopress-pro/seopress-pro.php' => 'SEOPress Pro',\n\t\t\t'wpsso/wpsso.php' => 'WordPress Social Sharing Optimization.',\n\t\t\t'wp-caregiver/wp-caregiver.php' => 'WP Caregiver.',\n\t\t\t'wp-facebook-like-send-open-graph-meta/wp-facebook-like-send-open-graph-meta.php' => 'WP Facebook Like Send & Open Graph Meta.',\n\t\t\t'wp-facebook-open-graph-protocol/wp-facebook-ogp.php' => 'WP Facebook Open Graph protocol.',\n\t\t\t'wp-ogp/wp-ogp.php' => 'WP-OGP.',\n\t\t\t'zoltonorg-social-plugin/zosp.php' => 'Zolton.org Social Plugin.',\n\t\t\t'all-in-one-schemaorg-rich-snippets/index.php' => 'All In One Schema Rich Snippets.',\n\t\t\t'wp-schema-pro/wp-schema-pro.php' => 'Schema Pro',\n\t\t\t'no-category-base-wpml/no-category-base-wpml.php' => 'No Category Base (WPML)',\n\t\t\t'all-404-redirect-to-homepage/all-404-redirect-to-homepage.php' => 'All 404 Redirect to Homepage',\n\t\t\t'remove-category-url/remove-category-url.php' => 'Remove Category URL',\n\t\t];\n\n\t\t$plugins = Helper::is_module_active( 'redirections' ) ? array_merge( $plugins, $this->get_redirection_conflicting_plugins() ) : $plugins;\n\t\t$plugins = Helper::is_module_active( 'sitemap' ) ? array_merge( $plugins, $this->get_sitemap_conflicting_plugins() ) : $plugins;\n\n\t\treturn $plugins;\n\t}", "function bf_admin_help_links() {\r\n\t$content = '<strong><a href=\"http://code.google.com/p/arras-buffet/\">' . __('Project Page', 'buffet') . '</a></strong> | ';\r\n\t$content .= '<strong><a href=\"http://www.zy.sg/\">' . __(\"Developer's Blog\", 'buffet') . '</a></strong>';\r\n\t\r\n\techo apply_filters('bf_admin_help_links', $content);\r\n}", "function agsg_shortcode_add_menu_items()\n{\n global $shortcode_page;\n $shortcode_page = add_menu_page('AGSG Shortcode List', 'AGSG Shortcode List', 'manage_options', 'shortcode_list', 'agsg_shortcode_render_list_page');\n add_action(\"load-$shortcode_page\", \"agsg_shortcode_page_screen_options\");\n add_action('admin_print_styles-' . $shortcode_page, 'agsg_shortcode_list_css_enqueue');\n add_action('admin_print_scripts-' . $shortcode_page, 'agsg_shortcode_list_js_enqueue');\n}", "function cil_plugin_optionMenu_list()\n{\n\t//show admin options view, this view exists in cil_adminOptionsView.php\n\tdo_action('show_cil_admin_manage_lists');\n}", "public function list()\n {\n $plugins = Plugin::orderBy('name', 'asc')->where('vsrepo', 0)->where('vs_included', 0)->with('categories')->get();\n\t\treturn view('vsrepo.list', compact('plugins'));\n }", "public function links() {\n\t\t?>\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/15uoww1\" target=\"_blank\"><?php echo __( 'Installation manual', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/W9GDQT\" target=\"_blank\"><?php echo __( 'Frequently Asked Questions', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/WW93Sk\" target=\"_blank\"><?php echo __( 'Report a bug', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/11UE2lF\" target=\"_blank\"><?php echo __( 'Request a function', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/XkivOW\" target=\"_blank\"><?php echo __( 'Submit a translation', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/UlDG4t\" target=\"_blank\"><?php echo __( 'More cool stuff by WPBuddy', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t</ul>\n\t<?php\n\t}", "private function get_sites( $args = array() ) {\n\t\t\t$results = array(\n\t\t\t\t'-1' => esc_html__( 'Select a site', 'ub' ),\n\t\t\t);\n\t\t\t$sites = get_sites( $args );\n\t\t\tif ( empty( $sites ) ) {\n\t\t\t\treturn array();\n\t\t\t}\n\t\t\tforeach ( $sites as $site ) {\n\t\t\t\t$blog = get_blog_details( $site->blog_id );\n\t\t\t\t$results[ $blog->blog_id ] = esc_html( sprintf( '%s (%s)', $blog->blogname, $blog->siteurl ) );\n\t\t\t}\n\t\t\treturn $results;\n\t\t}", "function list_competencies($atts) {\n\t$src = 'empty';\n\t\n\tif (isset($_GET['src']))\n\t\t$src = $_GET['src'];\n\t\n\t//set the settings values based on the the user-specified shortcode values or the defaults\n\t$a = shortcode_atts( array(\n 'target' => 'empty',\n\t\t'src' => $src,\n\t\t'collapse' => false,\n\t\t'taxonomy' => 'asn_index',\n\t\t'is_map_builder' => false\n ), $atts );\n\twp_localize_script( 'sr-functions', 'target_div', $a );//passes the settings values to functions.js\n\t\n\t$taxonomy = $a['taxonomy'];\n\t$orderby = 'slug';//order the competency index by the Wordpress slug\n\t$show_count = $a['is_map_builder'] ? 0:1;//show the number of learning resources associated with this node if this is not for a map builder\n\t$pad_counts = 1;//include the child node counts in the parent counts\n\t$hierarchical = 1;//the taxonomy is hierarchical\n\t$title = '';//do not show an automatic title\n\t$empty = 0;//show all nodes, even if they do not have associated resources\n\t\n\t$args = array(\n\t 'taxonomy' => $taxonomy,\n\t 'orderby' => $orderby,\n\t 'show_count' => $show_count,\n\t 'pad_counts' => $pad_counts,\n\t 'hierarchical' => $hierarchical,\n\t 'title_li' => $title,\n\t 'hide_empty' => $empty,\n\t 'echo' => 0\n\t);\n\t\n\tif ($a['is_map_builder']) { //if this is for the learning map builder, check that the user is logged in before displaying the index (must be logged in to use the map builder)\n\t\tif (is_user_logged_in()) { \n\t\t\t$ret = '<div id=\"comp-list\" class=\"comp-index-nav is-map\">'.wp_list_categories( $args ).'</div>'; \n\t\t}\n\t\telse $ret = '<a href=\"'.esc_attr(get_option('mapListing')).'\"><< Show all Learning Maps</a>';\n\t} else { //if this is not for the learning map builder, display the index\n\t\t$collapse = ($a['collapse']) ? \" \" : \" no-collapse\";\n\t\t$ret = '<div id=\"comp-list\" class=\"comp-index-nav not-map' . $collapse . '\">'.wp_list_categories( $args ).'</div>';\n\t}\n\t\n\treturn $ret;\n}", "function cil_list_options($arg)\n{\n\t//show list edit view, url will determine which list gets shown\n\tdo_action('show_cil_admin_list_options');\n}", "function demolistposts_handler() {\n $demolph_output = demolistposts_function();\n //send back text to replace shortcode in post\n return $demolph_output;\n}", "public function help(){\n\t\t$screen = get_current_screen();\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/installing\" target=\"_blank\">' . __( 'Installing the Plugin', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/staying-updated\" target=\"_blank\">' . __( 'Staying Updated', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/glossary\" target=\"_blank\">' . __( 'Glossary', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-general-info',\n\t\t\t'title' => __( 'General Info', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-creating\" target=\"_blank\">' . __( 'Creating a New Form', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-sorting\" target=\"_blank\">' . __( 'Sorting Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-building\" target=\"_blank\">' . __( 'Building Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-forms',\n\t\t\t'title' => __( 'Forms', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-managing\" target=\"_blank\">' . __( 'Managing Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-searching-filtering\" target=\"_blank\">' . __( 'Searching and Filtering Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-entries',\n\t\t\t'title' => __( 'Entries', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/email-design\" target=\"_blank\">' . __( 'Email Design Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/analytics\" target=\"_blank\">' . __( 'Analytics Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-email-analytics',\n\t\t\t'title' => __( 'Email Design &amp; Analytics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/import\" target=\"_blank\">' . __( 'Import Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/export\" target=\"_blank\">' . __( 'Export Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-import-export',\n\t\t\t'title' => __( 'Import &amp; Export', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/conditional-logic\" target=\"_blank\">' . __( 'Conditional Logic', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/templating\" target=\"_blank\">' . __( 'Templating', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/custom-capabilities\" target=\"_blank\">' . __( 'Custom Capabilities', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/hooks\" target=\"_blank\">' . __( 'Filters and Actions', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-advanced',\n\t\t\t'title' => __( 'Advanced Topics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<p>' . __( '<strong>Always load CSS</strong> - Force Visual Form Builder Pro CSS to load on every page. Will override \"Disable CSS\" option, if selected.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable CSS</strong> - Disable CSS output for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Email</strong> - Disable emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Notifications Email</strong> - Disable notification emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip Empty Fields in Email</strong> - Fields that have no data will not be displayed in the email.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving new entry</strong> - Disable new entries from being saved.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving entry IP address</strong> - An entry will be saved, but the IP address will be removed.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Place Address labels above fields</strong> - The Address field labels will be placed above the inputs instead of below.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Remove default SPAM Verification</strong> - The default SPAM Verification question will be removed and only a submit button will be visible.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable meta tag version</strong> - Prevent the hidden Visual Form Builder Pro version number from printing in the source code.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip PayPal redirect if total is zero</strong> - If PayPal is configured, do not redirect if the total is zero.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Prepend Confirmation</strong> - Always display the form beneath the text confirmation after the form has been submitted.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Max Upload Size</strong> - Restrict the file upload size for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Sender Mail Header</strong> - Control the Sender attribute in the mail header. This is useful for certain server configurations that require an existing email on the domain to be used.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Public Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Private Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-settings',\n\t\t\t'title' => __( 'Settings', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t}", "function my_social_media_icons() {\n\t$social_sites = my_customizer_social_media_array();\n\t/* any inputs that aren't empty are stored in $active_sites array */\n\tforeach($social_sites as $social_site) {\n\t\tif( strlen( get_theme_mod( $social_site ) ) > 0 ) {\n\t\t$active_sites[] = $social_site;\n\t\t}\n\t}\n\t/* for each active social site, add it as a list item */\n\tif ( ! empty( $active_sites ) ) {\n\t\techo \"<ul class='social-media-icons'>\";\n\t\tforeach ( $active_sites as $active_site ) {\n\t\t\t/* setup the class */\n\t\t\t$class = 'fab fa-' . $active_site;\n\t\t\tif ( $active_site == 'email' ) {\n\t\t\t?>\n\t\t\t<li>\n\t\t\t<a class=\"email\" target=\"_blank\" href=\"mailto:<?php echo antispambot( is_email( get_theme_mod( $active_site ) ) ); ?>\">\n\t\t\t<i class=\"fab fa-envelope\" title=\"<?php _e('email icon', 'text-domain'); ?>\"></i>\n\t\t\t</a>\n\t\t\t</li>\n\t\t\t<?php } else { ?>\n\t\t\t<li>\n\t\t\t<a class=\"<?php echo $active_site; ?>\" target=\"_blank\" href=\"<?php echo esc_url( get_theme_mod( $active_site) ); ?>\">\n\t\t\t<i class=\"<?php echo esc_attr( $class ); ?>\" title=\"<?php printf( __('%s icon', 'text-domain'), $active_site ); ?>\"></i>\n\t\t\t</a>\n\t\t\t</li>\n\t\t\t<?php\n\t\t\t}\n\t\t}\n\t\techo \"</ul>\";\n\t}\n}", "function nt_mass_listing_shortcode( $atts ) {\n ob_start();\n\t\t$current_user = get_current_user_id();\n\n\n\t\t//Admin and editor users can view all notes\n\t\tif(current_user_can('edit_posts')) {\n\t\t\t$args = array(\n\t\t\t\t\t'post_type' => 'coursenote',\n\t\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t\t'post_status' => array('draft'),\n\t\t\t\t\t'order' => 'ASC',\n\t\t\t\t\t'orderby' => 'title',\n\n\t\t\t);\n\t\t}\n\t\t//Viewer can only see their notes\n\t\telse {\n\t\t\t$args = array(\n\t\t\t\t\t'post_type' => 'coursenote',\n\t\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t\t'post_status' => array('draft'),\n\t\t\t\t\t'order' => 'ASC',\n\t\t\t\t\t'orderby' => 'title',\n\t\t\t\t\t'author__in' => $current_user\n\t\t\t);\n\t\t}\n\n\n\n $query = new WP_Query($args);\n if ( $query->have_posts() ) { ?>\n <ul class=\"notes-listing\">\n <?php while ( $query->have_posts() ) : $query->the_post(); ?>\n <li id=\"post-<?php the_ID(); ?>\" <?php post_class(); ?>>\n <a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a>\n </li>\n <?php endwhile;\n wp_reset_postdata(); ?>\n </ul>\n <?php $nt_mass_list = ob_get_clean();\n return $nt_mass_list;\n }\n}", "function wph_post_types() { ?>\n\t<ul>\n\t\t<li><strong><a href=\"/\">Home</a></strong></li>\n\t\t<li><strong><a href=\"/sites/\">Sites</a></strong></li>\n\t\t<li><strong><a href=\"/plugins/\">Plugins</a></strong></li>\n\t\t<li><strong><a href=\"/themes/\">Themes</a></strong></li>\n\t\t<li><strong><a href=\"/personalities/\">Personalities</a></strong></li>\n\t\t<li><strong><a href=\"/sponsors/\">Sponsors</a></strong></li>\n\t\t<li><strong><a href=\"/blog/\">Blog</a></strong></li>\n\t\t<li><strong><a href=\"/contact/\">Contact</a></strong></li>\n\t</ul>\n<?php\n}", "function timezonecalculator_adminmenu_plugin_actions($links, $file) {\r\n\tif ($file == plugin_basename(__FILE__))\r\n\t\t$links[] = \"<a href='options-general.php?page=\".plugin_basename(__FILE__).\"'>\" . __('Settings') . \"</a>\";\r\n\r\n\treturn $links;\r\n}", "protected function registerPluginListCommand()\n {\n $this->app->singleton('command.plugin.list', function ($app)\n {\n return new PluginListCommand($app['plugins']);\n });\n\n $this->commands('command.plugin.list');\n }", "function tsmp_plugin_action_links( $links ) {\n\t$link = 'admin.php?page=' . TSMP_PLUGIN_SLUG;\n\t$link = '<a href=\"'.esc_url( get_admin_url(null, $link) ).'\">'.__('Settings').'</a>';\n\tarray_unshift($links, $link);\n\treturn $links;\n}", "function frame_share_links($providers = null, $post_id = null)\n{\n // Get the providers\n if ($providers === null)\n $providers = array('facebook', 'google', 'linkedin', 'pinterest', 'reddit', 'twitter');\n else\n $providers = (array) $providers;\n\n $output = '<ul>';\n\n foreach($providers as $provider)\n {\n // $output .= '<li>'..'</li>';\n }\n\n $output .= '</ul>';\n}", "protected function get_installed_plugin_slugs()\n {\n }" ]
[ "0.6257706", "0.6104162", "0.6043351", "0.5998293", "0.59878147", "0.5963538", "0.59376615", "0.5931486", "0.5903335", "0.58565223", "0.58479315", "0.5802282", "0.5801367", "0.5757627", "0.5757277", "0.56706434", "0.5638412", "0.5618527", "0.5581637", "0.55246913", "0.55238396", "0.5523399", "0.5511507", "0.55025643", "0.55019", "0.5484139", "0.5483526", "0.54693836", "0.546679", "0.54593515", "0.5445378", "0.54289645", "0.53833246", "0.5380301", "0.5340621", "0.5336656", "0.5322952", "0.5318699", "0.53112906", "0.5294577", "0.5287652", "0.52843714", "0.52843213", "0.5272757", "0.5264231", "0.5260898", "0.52602494", "0.5260018", "0.52577955", "0.5250632", "0.5245984", "0.5244222", "0.5238948", "0.5236521", "0.5196154", "0.5193617", "0.5189182", "0.5176858", "0.5171219", "0.51662254", "0.5153615", "0.515094", "0.51277494", "0.5121178", "0.51182467", "0.5115435", "0.5105142", "0.51013803", "0.50980914", "0.5090004", "0.5087456", "0.5086636", "0.50774515", "0.50711435", "0.5064615", "0.5062595", "0.50592023", "0.50521475", "0.50494057", "0.50481987", "0.5041322", "0.5035705", "0.5032759", "0.50286806", "0.5026854", "0.50181544", "0.50179243", "0.50142634", "0.50123703", "0.5007686", "0.4998476", "0.4995882", "0.4995857", "0.49948588", "0.49942115", "0.49937934", "0.49887666", "0.4984075", "0.49836406", "0.49800944" ]
0.5714013
15
Display a listing of the resource.
public function index() { if(NumberOfAutomaticEmail::find(1)){ $quantity = NumberOfAutomaticEmail::find(1); } else { $quantity = new NumberOfAutomaticEmail; } return view('automatic-emails.index', compact('quantity')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\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\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { if (! $request->ajax()) abort(403, 'Unauthorized action.'); NumberOfAutomaticEmail::where('id', 1)->update([ 'quantity' => $request->input('quantity') ]); return response()->json([ 'mensaje' => 'Cantidad actualizada correctamente', 'quantity' => $request->input('quantity') ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Retornamos vista del login
public function showLoginForm() { return view('auth.login'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLogin();", "public function getLogin();", "public function getLogin();", "public function login();", "public function login();", "private function login(){\n \n }", "public function login() {\n\n $user_login = trim(in('id'));\n $user_pass = in('password');\n $remember_me = 1;\n\n $credits = array(\n 'user_login' => $user_login,\n 'user_password' => $user_pass,\n 'rememberme' => $remember_me\n );\n\n $re = wp_signon( $credits, false );\n\n if ( is_wp_error($re) ) {\n $user = user( $user_login );\n if ( $user->exists() ) ferror( -40132, \"Wrong password\" );\n else ferror( -40131, \"Wrong username\" );\n }\n else if ( in('response') == 'ajax' ) {\n // $this->response( user($user_login)->session() ); // 여기서 부터..\n }\n else {\n $this->response( ['data' => $this->get_button_user( $user_login ) ] );\n }\n\n }", "function login() {\n\t\tif (isset($_REQUEST['username']) && !empty($_REQUEST['username'])) {\n\t\t\t$username = $_REQUEST['username'];\n\n\t\t\t$userDAO = implementationUserDAO_Dummy::getInstance();\n\t\t\t$users = $userDAO->getUsers();\n\n\t\t\tforeach ($users as $key => $user) {\n\t\t\t\tif ($user->getUsername() === $username) {\n\t\t\t\t\t$userFound = $user;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($userFound) && $userFound != null) {\n\n\t\t\t\tif (isset($_REQUEST['password']) && !empty($_REQUEST['password'])) {\n\t\t\t\t\t$password = $_REQUEST['password'];\n\n\t\t\t\t\tif ($userFound->getPassword() === $password) {\n\n\t\t\t\t\t\tsession_start();\n\t\t\t\t\t\t$_SESSION['USERNAME']= $username;\n\n\t\t\t\t\t\t$url = getPreviousUrl();\n\t\t\t\t\t\t$newUrl = substr($url, 0, strpos($url, \"?\"));\n\n\t\t\t\t\t\tredirectToUrl($newUrl);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\t// redirecting to login with bad password alert\n\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\t// redirecting to login page with bad username alert\n\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t}\n\n\n\t}", "public function login() {\n parent::conectarBD();\n\n $queri = parent::query(sprintf(\"select usu_id as codigo, usu_password as senha, \"\n . \"usu_token_sessao as token_sessao, usu_login as login from \"\n . table_prefix . \"usuario where usu_login = '%s' and \"\n . \"usu_password = '%s'\", $this->usu_login, $this->usu_password));\n\n if ($queri) {\n $dados = $queri->fetch_assoc();\n if ($dados) {\n $new_session_id = hash('sha256', $dados['senha'] . time());\n $queri2 = parent::query(\"update \" . table_prefix . \"usuario set usu_token_sessao = '$new_session_id' where usu_id = \" . $dados['codigo']);\n\n if ($queri2) {\n $dados['token_sessao'] = $new_session_id;\n parent::commit();\n parent::desconectarBD();\n return $dados;\n } else {\n parent::rollback();\n parent::desconectarBD();\n return false;\n }\n } else {\n parent::desconectarBD();\n return false;\n }\n } else {\n parent::desconectarBD();\n return false;\n }\n }", "public function getLogin() //El nombre de la ruta es lo que está escrito después del get. Debo tener el get porque es en la que se manda a llamar el formulario.\n {\n return render('../views/login.php');\n }", "public function login()\n {\n $this->vista->index();\n }", "static public function getLogin() {\n //resultat : chaîne de caractère qui correspond au login \n return self::$databases['login'];\n }", "public function login(){\n\n }", "function login();", "public function get_login() \n {\n return $this->login;\n }", "public function check_login(){\n\t\tsession_start();\n\t\t$user = new InterfacePersonRepo;\n\t\t$tmp = $user->getRepository(Input::get('txtUsername'));\n\t\tif($tmp==NULL){\n\t\t\treturn View::make('alert/authen/alertLogin');\n\t\t}else{\n\t\t\tif (Hash::check(Input::get('txtPassword'), $tmp->getPassword())){\n\t\t\t\t$_SESSION[\"id\"] = $tmp->getUserID();\n\t\t\t\t$_SESSION[\"Username\"] = $tmp->getUsername();\n\t\t\t\t$_SESSION[\"Name\"] = $tmp->getName();\n\t\t\t\t$_SESSION[\"Surname\"] = $tmp->getSurname();\n\t\t\t\t$_SESSION[\"Address\"] = $tmp->getAddress();\n\t\t\t\t$_SESSION[\"Email\"] = $tmp->getEmail();\n\t\t\t\t$_SESSION[\"Phone\"] = $tmp->getPhone();\n\t\t\t\t$_SESSION[\"Status\"] = $tmp->getStatus();\n\t\t\t\t$_SESSION[\"Filename\"] = $tmp->getPath_file();\n\t\t\t\t$_SESSION[\"Fine\"] = $tmp->getFine();\n\n\t\t\t\tsession_write_close();\n\t\t\t\treturn Redirect::to(\"/main\");\n\t\t\t}else{\n\t\t\t\treturn View::make('alert/authen/alertLogin');\n\t\t\t}\n\t\t}\n\t}", "function login() {\n\t $login_parameters = array(\n\t\t \"user_auth\" => array(\n\t\t \"user_name\" => $this->username,\n\t\t \"password\" => $this->hash,\n\t\t \"version\" => \"1\"\n\t\t ),\n\t\t \"application_name\" => \"mCasePortal\",\n\t\t \"name_value_list\" => array(),\n\t );\n\n\t $login_result = $this->call(\"login\", $login_parameters);\n\t $this->session = $login_result->id;\n\t return $login_result->id;\n\t}", "public function login()\n {\n }", "public function login()\n {\n }", "function get_login ()\r\n {\r\n return $_SESSION[\"login\"];\r\n }", "public function login2(){\n $row = $this->_usuarios->getUsuario1(\n $this->getAlphaNum('usuario2'),\n $this->getSql('pass2')\n );\n \n // si no existe la fila.\n if(!$row){\n echo \"Nombre y/o contraseña incorrectos\";\n exit;\n }\n \n //Inicia session y define las variables de session \n Session::set('autenticado', true);\n Session::set('usuario', $row['usuario']);\n Session::set('id_role', $row['role']);\n Session::set('nombre', $row['nombre']);\n Session::set('ape_pat', $row['ape_pat']);\n Session::set('ape_mat', $row['ape_mat']);\n Session::set('clave_cetpro', $row['cetpro']);\n Session::set('id_usuario', $row['id']);\n Session::set('admin', $this->_usuarios->checkAdmin());\n Session::set('tiempo', time());\n \n echo \"ok\";\n }", "public function login() {\n $this->db->sql = 'SELECT * FROM '.$this->db->dbTbl['users'].' WHERE username = :username LIMIT 1';\n\n $user = $this->db->fetch(array(\n ':username' => $this->getData('un')\n ));\n\n if($user['hash'] === $this->hashPw($user['salt'], $this->getData('pw'))) {\n $this->sessionId = md5($user['id']);\n $_SESSION['user'] = $user['username'];\n $_SESSION['valid'] = true;\n $this->output = array(\n 'success' => true,\n 'sKey' => $this->sessionId\n );\n } else {\n $this->logout();\n $this->output = array(\n 'success' => false,\n 'key' => 'WfzBq'\n );\n }\n\n $this->renderOutput();\n }", "public function login(){\n\t\t$this->user = $this->user->checkCredentials();\n\t\t$this->user = array_pop($this->user);\n\t\tif($this->user) {\n\t\t\t$_SESSION['id'] = $this->user['id'];\n\t\t\t$_SESSION['name'] = $this->user['name'];\n\t\t\t$_SESSION['admin'] = $this->user['admin'];\n\t\t\t$this->isAdmin();\n\t \t\theader('location: ../view/home.php');\n\t \t\texit;\n\t \t}\n\t\t$dados = array('msg' => 'Usuário ou senha incorreto!', 'type' => parent::$error);\n\t\t$_SESSION['data'] = $dados;\n\t\theader('location: ../view/login.php');\n \t\texit;\n\t}", "public function loginTraitement(){\n\n $identifiant = $this->verifierSaisie(\"identifiant\");\n $password = $this->verifierSaisie(\"password\");\n\n //securite\n if (($identifiant != \"\") && ($password != \"\")){\n\n //on crée un objet de la classe \\W\\Security\\AuthentificationModel\n //ce qui nous permet d'utiliser la methode isValidLoginInfo\n $objetAuthentificationModel = new \\W\\Security\\AuthentificationModel;\n\n $idUser = $objetAuthentificationModel->isValidLoginInfo($identifiant, $password);\n\n if($idUser > 0){\n\n // recuperer les infos de l'utilisateur\n //requete base de donnée pour les recuperer\n //je crée un objet de la classe \\W\\Model\\UsersModel\n $objetUsersModel = new \\W\\Model\\UsersModel;\n // je retrouve les infos de la ligne grace à la colonne ID\n // La classe UsersModel herite de la classe Model je peu donc faire un find pour recupeerr les infos\n $tabUser = $objetUsersModel->find($idUser);\n\n // Je vais ajouter des infos dans la session\n $objetAuthentificationModel->logUserIn($tabUser);\n\n // recuperer l'username\n $username = $tabUser[\"username\"];\n\n\n $GLOBALS[\"loginRetour\"] = \"Bienvenue $username\";\n\n $this->redirectToRoute(\"admin_accueil\");\n }\n else{\n $GLOBALS[\"loginRetour\"] = \"Identifiant incorrects \";\n }\n }else{\n\n $GLOBALS[\"loginRetour\"] = \"Identifiant incorrects \";\n }\n }", "public static function login() {\n \n $identificado = Login::get();\n \n echo \"<section class='container st-login'>\";\n echo \"<div class='row'>\";\n echo \"<div class='col-md-12'>\";\n echo \"<div class='login'>\";\n echo $identificado ?\n \"Hola <a href='/usuario/show/$identificado->id' class='logname'>$identificado->usuario</a>|\n <a href='/login/logout' class='logout'>salir</a>\" :\n \"<a href='/login' class='regis-link'>Identifícate</a><a class='regis-link' href='/usuario/create'>Regístrate</a>\";\n \n echo \"</div>\";\n \n echo \"</div>\";\n echo \"</div>\";\n echo \"</section>\";\n \n }", "function _genLogin()\n {\n $this->mismatch = false;\n if (isset($_POST['login']) && $this->_verify() == \"\") {\n $this->name_post = $_POST['gebruikersnaam'];\n $this->pass_post = $_POST['wachtwoord'];\n\n $this->_getFromGebruikersDb($this->name_post);\n if ($this->_isMatch()) {\n $_SESSION['ingelogd'] = true;\n //toegevoegd door rens om een gebruikersnaam en rol te krijgen\n $_SESSION['gebruikersnaam'] = $this->name_post;\n $_SESSION['Rol'] = $this->role_db;\n header('location: Login_Redir.php');\n }\n }\n }", "private static function loginGet(){\r\n \r\n if(!isset($_POST['login']) || !isset($_POST['password']))\r\n return false;\r\n \r\n $client = new Login(addslashes($_POST['login']), addslashes($_POST['password']));\r\n if($client->identification()){\r\n //for agency\r\n $_SESSION['account'] = $_POST['login'];\r\n $_SESSION['login'] = $client->login;\r\n \r\n if (!Security::isAdmin()){\r\n $date = Client::GetConfigurationStatic($_SESSION['login'], 'LAST_CONNEXION');\r\n Client::setConfigurationStatic($_SESSION['login'], 'BEFORE_LAST_CONNEXION', $date);\r\n Client::setConfigurationStatic($_SESSION['login'], 'LAST_CONNEXION', date('Y-m-d H:i:s'));\r\n header ('location:/');\r\n }else\r\n header ('location:/admin');\r\n \r\n exit;\r\n }\r\n \r\n return false;\r\n }", "public function setLogin(){\n \n\t\t\t$obUser = Model::getUserByEmail($this->table, $this->camp,$this->email);\n\t\t\tif (!$obUser instanceof Model) {\n\t\t\t\t$this->message = 'Usuario ou Senha incorretos';\n return false;\n\t\t\t}\n\t\t\tif (!password_verify($this->password, $obUser->senha)) {\n\t\t\t\t$this->message = 'Usuario ou Senha incorretos';\n return false;\n\t\t\t}\n\t\t\t\n\t\t\t$this->session($obUser);\n\n\t\t\theader('location: '.$this->location);\n\t\t\texit;\n\n\t\t}", "public function vistaLogin()\n {\n \n return view('auth.login');\n }", "function login() {\n $sql = \"SELECT *\n FROM USUARIOS\n WHERE (\n\t\t\t\t (email = '$this->email')\n )\";\n\n $resultado = $this->mysqli->query( $sql );//hacemos la consulta en la base de datos\n if ( $resultado->num_rows == 0 ) {//miramos si el numero de filas es 0\n \t\t\t return 'El usuario no existe';\n\n \t\t} else {//si no es 0, el usuario existe\n \t\t\t$tupla = $resultado->fetch_array();//devolvemos la tupla\n\n \t\t\t if ( $tupla[ 'password' ] == $this->password ) {//si la contraseña es correcta entra en la página\n \t\t\t\t return true;\n\n \t\t\t } else {//en caso contrario no entra\n \t\t\t\t return 'La password para este usuario no es correcta';\n \t\t\t }\n \t }\n\t }", "public function isLogin();", "function cek_login($tabel,$where) {\n\t\t$login = $this->db->get_where('user',$where);\n\t\treturn $login;\n\t}", "public function getLogin()\n {\n return $this->__get(\"login\");\n }", "public function login(){\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\" && isset($_POST[\"Anmelden\"]) && $_POST[\"Anmelden\"] == \"Anmelden\") {\n if ($this->error == false) {\n $datenbank = new DatenbankAufrufe;\n #Prüfung ob der Benutzer bereits existiert\n $result = $datenbank->existBenutzer();\n if ($result == true) {\n $dbPasswort = $datenbank->passwortAuslesen();\n $pwKrypto = new PasswortSpeichern;\n $result2 = $pwKrypto->passwortAbgleich($_POST['passwort'], $dbPasswort);\n if ($result2 == true) {\n #SESSION\n $session = new sessionClass;\n $name = $datenbank->benutzernameAuslesen();\n $session->SessionStart($name, $datenbank);\n\n header(\"Location: index.php?site=main\");\n }\n else {\n echo \"Das Passwort ist nicht korrekt\";\n }\n } else {\n echo \"Bitte zuerst Registrieren\";\n }\n }\n }\n }", "public function login()\n\t{\n\t\t$mtg_login_failed = I18n::__('mtg_login_failed');\n\t\tR::selectDatabase('oxid');\n\t\t$sql = 'SELECT oxid, oxfname, oxlname FROM oxuser WHERE oxusername = ? AND oxactive = 1 AND oxpassword = MD5(CONCAT(?, UNHEX(oxpasssalt)))';\n\t\t$users = R::getAll($sql, array(\n\t\t\tFlight::request()->data->uname,\n\t\t\tFlight::request()->data->pw\n\t\t));\n\t\tR::selectDatabase('default');//before doing session stuff we have to return to db\n\t\tif ( ! empty($users) && count($users) == 1) {\n\t\t\t$_SESSION['oxuser'] = array(\n\t\t\t\t'id' => $users[0]['oxid'],\n\t\t\t\t'name' => $users[0]['oxfname'].' '.$users[0]['oxlname']\n\t\t\t);\n\t\t} else {\n\t\t\t$_SESSION['msg'] = $mtg_login_failed;\n\t\t}\n\t\t$this->redirect(Flight::request()->data->goto, true);\n\t}", "function verificar_login()\n {\n if (!isset($_SESSION['usuario'])) {\n $this->sign_out();\n }\n }", "public function login(){\n\n if(isset($_POST)){\n \n /* identificar al usuario */\n /* consulta a la base de datos */\n $usuario = new Usuario();\n \n $usuario->setEmail($_POST[\"email\"]);\n $usuario->setPassword($_POST[\"password\"]);\n \n $identity = $usuario->login();\n \n\n if($identity && is_object($identity)){\n \n $_SESSION[\"identity\"]= $identity;\n\n if($identity->rol == \"admin\"){\n var_dump($identity->rol);\n\n $_SESSION[\"admin\"] = true;\n }\n }else{\n $_SESSION[\"error_login\"] = \"identificacion fallida\";\n }\n\n\n /* crear una sesion */\n \n }\n /* redireccion */\n header(\"Location:\".base_url);\n\n }", "private function login(){\n\t\tif ($_SERVER['REQUEST_METHOD'] != \"POST\") {\n\t\t\t# no se envian los usuarios, se envia un error\n\t\t\t$this->mostrarRespuesta($this->convertirJson($this->devolverError(1)), 405);\n\t\t} //es una peticion POST\n\t\tif(isset($this->datosPeticion['email'], $this->datosPeticion['pwd'])){\n\t\t\t#el constructor padre se encarga de procesar los datos de entrada\n\t\t\t$email = $this->datosPeticion['email']; \n \t\t$pwd = $this->datosPeticion['pwd'];\n \t\t//si los datos de la solicitud no es tan vacios se procesa\n \t\tif (!empty($email) and !empty($pwd)){\n \t\t\t//se valida el email\n \t\t\tif (filter_var($email, FILTER_VALIDATE_EMAIL)) { \n \t\t\t//consulta preparada mysqli_real_escape()\n \t\t\t\t$query = $this->_conn->prepare(\n \t\t\t\t\t\"SELECT id, nombre, email, fRegistro \n \t\t\t\t\t FROM usuario \n \t\t\t\t\t WHERE email=:email AND password=:pwd \");\n \t\t\t\t//se le prestan los valores a la query\n \t\t\t\t$query->bindValue(\":email\", $email); \n \t\t\t$query->bindValue(\":pwd\", sha1($pwd)); \n \t\t\t$query->execute(); //se ejecuta la consulta\n \t\t\t//Se devuelve un respuesta a partir del resultado\n \t\t\tif ($fila = $query->fetch(PDO::FETCH_ASSOC)){ \n\t\t\t $respuesta['estado'] = 'correcto'; \n\t\t\t $respuesta['msg'] = 'Los datos pertenecen a un usuario registrado';\n\t\t\t //Datos del usuario \n\t\t\t $respuesta['usuario']['id'] = $fila['id']; \n\t\t\t $respuesta['usuario']['nombre'] = $fila['nombre']; \n\t\t\t $respuesta['usuario']['email'] = $fila['email']; \n\t\t\t $this->mostrarRespuesta($this->convertirJson($respuesta), 200); \n\t\t\t } \n \t\t\t}\n \t\t} \n\t\t} // se envia un mensaje de error\n\t\t$this->mostrarRespuesta($this->convertirJson($this->devolverError(3)), 400);\n\t}", "public function mostrarLogin(){\r\n if(Auth::check()){\r\n // Si tenemos sesión activa mostrará el inicio\r\n //return Redirect::to('/principal');\r\n return Redirect::to('/inicio');\r\n }\r\n \r\n \r\n // Si no hay sesión activa mostrará el login\r\n return View::make('index');\r\n //return Redirect::to('/login');\r\n }", "public function checkLogin(){\n $dbQuery = new DBQuery(\"\", \"\", \"\");\n $this->email = $dbQuery->clearSQLInjection($this->email);\n $this->senha = $dbQuery->clearSQLInjection($this->senha);\n \n // Verificar quantas linhas um Select por Email e Senha realiza \n $resultSet = $this->usuarioDAO->select(\" email='\".$this->email.\"' and senha='\".$this->senha.\"' \");\n $qtdLines = mysqli_num_rows($resultSet);\n \n // Pegar o idUsuario da 1ª linha retornada do banco\n $lines = mysqli_fetch_assoc($resultSet);\n $idUsuario = $lines[\"idUsuario\"];\n \n\n \n // retorna aonde a função foi chamada TRUE ou FALSE para se tem mais de 0 linhas\n if ( $qtdLines > 0 ){\n // Gravar o IdUsuario e o Email em uma Sessão\n session_start();\n $_SESSION[\"idUsuario\"] = $idUsuario;\n $_SESSION[\"email\"] = $this->email;\n return(true);\n }else{\n // Gravar o IdUsuario e o Email em uma Sessão\n session_start();\n unset($_SESSION[\"idUsuario\"]);\n unset($_SESSION[\"email\"]);\n return(false);\n }\n }", "static public function ctrLoginUser(){ \n\t\t\tif(isset($_POST[\"ingUser\"])){\n\t\t\t\t//Intento de Logeo\n\t\t\t\tif((preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingUser\"]))\n\t\t\t\t && (preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingPassword\"]))){\n\t\t\t\t\t\t$tabla = \"usuarios\";\t//Nombre de la Tabla\n\n\t\t\t\t\t\t$item = \"usuario\";\t\t//Columna a Verficar\n\t\t\t\t\t\t$valor = $_POST[\"ingUser\"];\n\n\t\t\t\t\t\t//Encriptar contraseña\n\t\t\t\t\t\t$crPassword = crypt($_POST[\"ingPassword\"], '$2a$08$abb55asfrga85df8g42g8fDDAS58olf973adfacmY28n05$');\n\n\t\t\t\t\t\t$respuesta = ModelUsers::mdlMostrarUsuarios($tabla, $item, $valor);\n\n\t\t\t\t\t\tif($respuesta[\"usuario\"] == $_POST[\"ingUser\"]\n\t\t\t\t\t\t\t&& $respuesta[\"password\"] == $crPassword){\n\t\t\t\t\t\t\t\tif($respuesta[\"estado\"] == '1'){\n\t\t\t\t\t\t\t\t\t//Coincide \n\t\t\t\t\t\t\t\t\t$_SESSION[\"login\"] = true;\n\t\t\t\t\t\t\t\t\t//Creamos variables de Sesion\n\t\t\t\t\t\t\t\t\t$_SESSION[\"user\"] = $respuesta;\n\t\t\t\t\t\t\t\t\t//Capturar Fecha y Hora de Login\n\t\t\t\t\t\t\t\t\tdate_default_timezone_set('America/Mexico_City');\n\t\t\t\t\t\t\t\t\t$fechaActual = date('Y-m-d H:i:s');\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t$item1 = \"ultimo_login\";\n\t\t\t\t\t\t\t\t\t$valor1 = $fechaActual;\n\t\t\t\t\t\t\t\t\t$item2 = \"id_usuario\";\n\t\t\t\t\t\t\t\t\t$valor2 = $respuesta[\"id_usuario\"];\n\n\t\t\t\t\t\t\t\t\t$ultimoLogin = ModelUsers::mdlActualizarUsuario($tabla, $item1, $valor1, $item2, $valor2);\n\n\t\t\t\t\t\t\t\t\tif($ultimoLogin)\t//Redireccionando\n\t\t\t\t\t\t\t\t\t\techo '<script>location.reload(true);</script>';\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\techo '<br><div class=\"alert alert-danger\">El usuario no esta activado</div>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\techo '<br><div class=\"alert alert-danger\">Error al ingresar, vuelve a intentarlo</div>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t}", "public function hacerLogin() {\n $user = json_decode(file_get_contents(\"php://input\"));\n\n if(!isset($user->email) || !isset($user->password)) {\n http_response_code(400);\n exit(json_encode([\"error\" => \"No se han enviado todos los parametros\"]));\n }\n \n //Primero busca si existe el usuario, si existe que obtener el id y la password.\n $peticion = $this->db->prepare(\"SELECT id,idRol,password FROM users WHERE email = ?\");\n $peticion->execute([$user->email]);\n $resultado = $peticion->fetchObject();\n \n if($resultado) {\n \n //Si existe un usuario con ese email comprobamos que la contraseña sea correcta.\n if(password_verify($user->password, $resultado->password)) {\n \n //Preparamos el token.\n $iat = time();\n $exp = $iat + 3600*24*2;\n $token = array(\n \"id\" => $resultado->id,\n \"iat\" => $iat,\n \"exp\" => $exp\n );\n \n //Calculamos el token JWT y lo devolvemos.\n $jwt = JWT::encode($token, CJWT);\n http_response_code(200);\n exit(json_encode($jwt . \"?\" . $resultado->idRol));\n \n } else {\n http_response_code(401);\n exit(json_encode([\"error\" => \"Password incorrecta\"]));\n }\n \n } else {\n http_response_code(404);\n exit(json_encode([\"error\" => \"No existe el usuario\"])); \n }\n }", "public function login() {\n return $this->run('login', array());\n }", "function login(){\n\t\t$apikey = $this->get_api_key();\n\t\t$apisecret = $this->get_api_secret();\n\t\t$authorization = $this->get_authorization();\n\t\t$user = new \\gcalc\\db\\api_user( $apikey, $apisecret, $authorization );\n\t\tif ( $user->login() ) {\n\t\t\t$credetials = $user->get_credentials();\t\t\t\t\n\t\t} else {\n\t\t\t$credetials = array(\n\t\t\t\t'login' => 'anonymous',\n\t\t\t\t'access_level' => 0\n\t\t\t);\n\t\t}\n\t\treturn $credetials;\n\t}", "function getLogin() {\n return $this->login;\n }", "public function getLogin()\n {\n return $this->login;\n }", "function login(){\n if(isset($_POST['login'])){\n $username = $_POST['username'];\n $password = $_POST['password'];\n\n $query = query(\"SELECT * FROM utenti WHERE username = '{$username}' AND password = '{$password}' \");\n conferma($query);\n\n if(mysqli_num_rows($query) == 0){\n\n creaAvviso('Utente o password Errati');\n header('Location: login.php');\n }else{\n\n $_SESSION['username'] = $username ;\n header('Location: admin/index.php');\n }\n }\n }", "function login() { }", "public function loginValide () {\n $login = $this->donnees[self::LOGIN_REF];\n // Le champ login ne doit pas ?tre vide\n if ($login == null) {\n $this->erreur[self::LOGIN_REF] = \"Veuillez remplir le champ login\";\n return false;\n // Le champ login doit contenir un login pr?sent dans la base de donn?es\n } else if (! $this->utilisateurs->exist($login)) {\n $this->erreur[self::LOGIN_REF] .= \"ce login est inconnu\";\n return false;\n }\n return true;\n }", "public function get_login($data=array()){\n if(array_key_exists('username', $data)){\n $this->query = \" SELECT t1.cod_usuario,CONCAT(t1.nom_usuario,' ',t1.ape_usuario) as nom_usuario,t1.email_usuario,t1.tel_usuario,t1.tw_usuario,\n t1.fb_usuario,t1.intro_usuario,t1.linkid_usuario,t1.usuario_usuario,\n t1.cod_estado,concat('modules/sistema/adjuntos/',t1.img_usuario) as img_usuario,t2.cod_perfil,t2.des_perfil,t1.cod_proveedores\n FROM sys_usuario as t1, sys_perfil as t2\n WHERE t1.cod_perfil=t2.cod_perfil\n AND usuario_usuario = '\" .$data['username']. \"'\n AND password_usuario = '\" .md5($data['password']). \"'\";\n $this->get_results_from_query();\n }\n if(count($this->rows) == 1){\n foreach ($this->rows[0] as $propiedad=>$valor) {\n Session::set(str_replace('_usuario','',$propiedad), $valor);\n }\n if(Session::get('cod_estado') != 'AAA'){\n $this->msj = 'La sesi&oacute;n esta desactivada, consulte al administrador. ';\n $this->err = '1';\n return false;exit();\n }\n\n if( Session::get('cod_perfil')=='2'\n && Session::get('cod_perfil')=='6'\n && Session::get('cod_perfil')=='7'\n && Session::get('cod_perfil')=='8'\n && Session::get('cod_perfil')=='9'){\n $this->msj = 'El usuario no tiene permisos para accder, consulte al administrador. ';\n $this->err = '1';\n if(!Session::get('usuario'))\n redireccionar(array('modulo'=>'sistema','met'=>'cerrar'));\n\n return false;\n }\n return true;\n }else{\n $this->msj = 'Informaci&oacute;n incorrecta, revise los datos. ';\n $this->err = '0';\n return false;exit();\n }\n }", "public function CheckLogin()\r\n {\r\n $visiteur = new Visiteur();\r\n \r\n //Appelle la fonction Attempt pour verifier le login et le password, si cela correspond $result prends la valeur ID correspondant a l'utilisateur\r\n $result = $visiteur->Attempt($_POST['login'],$_POST['password']);\r\n \r\n //SI l'ID a une valeur, stocke l'ID dans $_SESSION et ramene a la main mage\r\n if (isset($result)){\r\n $_SESSION['uid'] = $result->id;\r\n $this->MainPage();\r\n }\r\n //Sinon, ramene a la page de connexion\r\n else{\r\n $this->LoginPage();\r\n } \r\n }", "public function login(){\n\n }", "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "public function getLogin(): string\n {\n }", "public function getLogin() {\n $basic_data['title'] = 'Sign In';\n $basic_data['body_id'] = 'login';\n return ViewController::displayPage($basic_data,'auth.login',[]);\n }", "function shopLogin()\r\n\t{\r\n\t\t$tpl_dir = BASE_DIR . \"/modules/login/templates/\";\r\n\t\t$lang_file = BASE_DIR . \"/modules/login/lang/\" . STD_LANG . \".txt\";\r\n\r\n\t//\t$login = new Login;\r\n\r\n\t\tif(!isset($_SESSION[\"cp_benutzerid\"]))\r\n\t\t\treturn $this->displayLoginform($tpl_dir,$lang_file);\r\n\t\telse\r\n\t\t\treturn $this->displayPanel($tpl_dir,$lang_file);\r\n\t}", "public function login_get()\n {\n return view('admin.auth.login');\n }", "public function loginUser()\n {\n $sql = \"SELECT * FROM user WHERE username=\\\"\" . $this->getUsername().\"\\\" AND password=\\\"\" . $this->getPassword().\"\\\"\";\n $result = mysqli_query($this->_connection, $sql);\n if (!$result) {\n print \"Error: \" . $result . \"<br>\" . mysqli_error($this->_connection);\n } else {\n while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) if ($row) {\n return $row;\n }\n }\n }", "function login2($_login, $_password){\n $this->login($_login,$_password);\n $resultado_login = mysql_query(\"SELECT * FROM registro\n\t\tWHERE login_reg = '$_login' AND clave_reg = '$_password'\");\n $num_rows = mysql_num_rows($resultado_login);\n if (isset($num_rows)&& $num_rows == 0){\n $this->mensaje = \"Login or Password incorrect!\";\n $_SESSION['estado_temp'] = -1;\n }\n else{\n $fila_login = mysql_fetch_assoc($resultado_login);\n $this->nombre = $fila_login[\"nombre_reg\"];\n $this->apellido = $fila_login[\"apellido_reg\"];\n $this->mensaje = \"Bienvenido $this->nombre $this->apellido.\";\n $_SESSION['estado_temporal'] = 1;\n $_SESSION['login_temporal'] = $fila_login[\"login_reg\"];\n $___login = $fila_login[\"login_reg\"];\n $_SESSION['nombre_temporal'] = $fila_login[\"nombre_reg\"];\n $_SESSION['apellido_temporal'] = $fila_login[\"apellido_reg\"];\n $_SESSION['id_temporal'] = $fila_login[\"id_reg\"];\n //mysql_query (\"UPDATE usuarios SET last_login = curdate()\n //WHERE login = $___login\");\n //if($_SESSION['_url'])\n header(\"location: panel_usuario.php#next\");\n }\n }", "public function getLogin() {\n View::share('title', 'Bejelentkezés');\n\n return View::make('admin.users.login');\n }", "function login() {\n \t$this->set('indata',$this->data);\n\t\tif(empty($this->data)){\n\t\t\t$this->pageTitle = 'Log in';\n\t\t\t$cookie = $this->Cookie->read('Auth.User');\n\t\t}\n }", "public function login()\n {\n return $this->authRepo->login();\n }", "public function login(){\n echo $this->name . ' logged in';\n }", "public function loginUser()\r\n {\r\n $req = $this->login->authenticate($this->user);\r\n $req_result = get_object_vars($req);\r\n print(json_encode($req_result));\r\n }", "public function getLogin()\n {\n \treturn view('auth.login');\n }", "private function compare_with_login()\n {\n }", "public function get_login(){\n\t if (!Auth::guest()) \n\t \treturn Redirect::to('/')->with('message', 'You are already logged in!');\n\t else\n\t\t\t$this->layout->content = View::make('frontend.customers.login');\n\t}", "public function login() {\n\t\treturn $this->login_as( call_user_func( Browser::$user_resolver ) );\n\t}", "function getLogin()\n {\n if (isset($_SESSION[\"login\"])) {\n return $_SESSION[\"login\"];\n }\n }", "public function p_login() {\n\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\t\n\t# Search the db for this email and password\n\t# Retrieve the token if it's available\n\t$q = \"SELECT token \n\t\tFROM users \n\t\tWHERE email = '\".$_POST['email'].\"' \n\t\tAND password = '\".$_POST['password'].\"'\";\n\t\n\t$token = DB::instance(DB_NAME)->select_field($q);\t\n\t\t\t\t\n\t# If we didn't get a token back, login failed\n\tif(!$token) {\n\t\t\t\n\t\t# Send them back to the login page\n\n\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t\n\t# But if we did, login succeeded! \n\t} else {\n\t\t\t\n\t\t# Store this token in a cookie\n\t\t@setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\t\t\n\t\tRouter::redirect(\"/users/profile\");\n\t\t\t\t\t\n\t}\n }", "public function login( )\n\t\t{\n\t\t\treturn $this->get_session();\n\t\t}", "function loginUser($username,$password,$return=true);", "private static function login() {\n if ( !self::validatePost() ) {\n return;\n }\n $_POST['email'] = strtolower($_POST['email']);\n \n $password = Helper::hash($_POST['password'].$_POST['email']);\n \n $result = Database::getUser($_POST['email'],$password);\n \n if ( $result === false || !is_array($result) ) {\n self::setError('Unbekannter Benutzername oder Passwort!<br>');\n return;\n }\n \n if ( count($result) != 1 ) {\n self::setError('Unbekannter Benutzername oder Passwort!<br>');\n return;\n }\n \n $_SESSION['user']['id'] = $result[0]['id'];\n $_SESSION['user']['email'] = $result[0]['email'];\n $_SESSION['user']['nickname'] = $result[0]['nickname'];\n $_SESSION['user']['verified'] = $result[0]['verified'];\n $_SESSION['user']['moderator'] = $result[0]['moderator'];\n $_SESSION['user']['supermoderator'] = $result[0]['supermoderator'];\n $_SESSION['loggedin'] = true;\n self::$loggedin = true;\n }", "function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db for this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the database, it means login failed\n if(!$token) {\n\n # Send them back to the login page\n Router::redirect(\"/users/login/error\");\n\n # But if we did, login succeeded! \n } else {\n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+1 year'), '/');\n\n # update the last_login time for the user\n/* $_POST['last_login'] = Time::now();\n\n $user_id = DB::instance(DB_NAME)->update('users', $_POST); */\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n }\n }", "public function getFormLoginPage();", "public function getLogin()\n {\n return $this->login;\n }", "public function getLogin()\n {\n return $this->login;\n }", "public function getLogin()\n {\n return $this->login;\n }", "public function getLogin()\n {\n return $this->login;\n }", "public function getLogin()\n {\n return $this->login;\n }", "public function getLogin()\n {\n return $this->login;\n }", "public function getLogin()\n {\n return $this->login;\n }", "public function getLogin()\n {\n return $this->login;\n }", "public function getLogin()\n {\n return view(\"Home::auth.login\");\n }", "public function loginTrainer(){\r\n\t\t\t$objDBConn = DBManager::getInstance();\t\r\n\t\t\tif($objDBConn->dbConnect()){\r\n\t\t\t\t$result = mysql_query(\"SELECT * from trainer where username='\".$_REQUEST[\"username\"].\"' and password='\".$_REQUEST[\"pass\"].\"'\");\r\n\t\t\t\t$row = mysql_fetch_array($result);\r\n\t\t\t\tif($row == false){\r\n\t\t\t\t\t//echo \"No records\";\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$_SESSION['trainer'] = $row;\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//echo 'Something went wrong ! ';\r\n\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public function getLogin()\n {\n return $this->Login;\n }", "public function getLogin()\n {\n if(Auth::user()){\n return Redirect::action('frontend\\UserController@getIndex');\n }\n\n $meta = $this->meta;\n $meta['title'] = 'login';\n\n return View::make('frontend/user/login', compact('title', 'meta'));\n }", "public function signIn(){\n\t\t\n\t\t$login=$_POST['login'];\n\t\t$pwd=$_POST['pwd'];\n\n\t\tValidation::validForm($login,$pwd,$dVueErreur);\n\t\t\n\t\ttry{\n\t\t\t$this->modele->connexion($login,$pwd);\n\t\t\tglobal $a;\n\t\t\t$a = $this->modele->isAdmin();\n\t\t}\n\t\tcatch (PDOException $e) {\n\t\t\t$dVueErreur[] = \"Erreur inattendue!! \";\n\t\t\trequire(\"vue/error.php\");\n\n\t\t}\n\t\tcatch (Exception $e){\n\t\t\t$dVueErreur[] = 'Exception reçue : ' .$e->getMessage(). \"\\n\";\n\t\t\trequire(\"vue/error.php\");\n\t\t}\n\t\t\n\t\t$this->affichNews();\n\t\t\n\t}", "public function getLogin()\n {\n //hien thi trang login\n return view('admin.login');\n }", "public function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db fpr this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token\n FROM users\n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the db, it means login failed\n if(!$token) {\n\n Router::redirect(\"/users/login/error\");\n \n\n # But if we did, login succeeded!\n } else {\n\n \n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n \n\n # Send them to the main page - or wherevr you want them to go\n Router::redirect(\"/\");\n # Send them back to the login page\n }\n }", "public function login() {\r\n if (!empty($_POST)) {\r\n $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\r\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\r\n\r\n $hash = hash('sha512', $password . Configuration::USER_SALT);\r\n unset($password);\r\n\r\n $user = UserModel::getByUsernameAndPasswordHash($username, $hash);\r\n unset($hash);\r\n\r\n if ($user) {\r\n Session::set('user_id', $user->user_id);\r\n Session::set('username', $username);\r\n Session::set('ip', filter_input(INPUT_SERVER, 'REMOTE_ADDR'));\r\n Session::set('ua', filter_input(INPUT_SERVER, 'HTTP_USER_AGENT', FILTER_SANITIZE_STRING));\r\n\r\n Misc::redirect('');\r\n } else {\r\n $this->set('message', 'Nisu dobri login parametri.');\r\n sleep(1);\r\n }\r\n }\r\n }", "public function getLogin() {\n // redirect if user has been logged in\n $view = new View('layout');\n $view->inject('navbar', 'navbar');\n $view->inject('content', 'login');\n $view->set('pageTitle', 'Login');\n\n $view->addJavascript('/assets/js/js-cookie.js');\n $view->addJavascript('/assets/js/login.js');\n $view->addJavascript('/assets/js/sha.js');\n\n // csrf\n $manager = SessionManager::getManager();\n $manager->generateCsrfToken();\n\n echo $view->output();\n }", "abstract protected function doLogin();", "public function logUser(){\r\n\t\t$email = $_POST['login_email'];\r\n\t\t$password = $_POST['login_password'];\r\n\r\n\t\t$sql = \"SELECT * FROM users where email = ? and password = ? \";\r\n\t\t$query = $this->db->prepare($sql);\r\n\t\t$query->execute([$email,$password]);\r\n\t\t//rezultat smestamo u promenljivu loggedUser i stavljamo samo fetch zzbog toga sto vraca jedan rezultat\r\n\r\n\t\t$loggedUser = $query->fetch(PDO::FETCH_OBJ);\r\n\r\n\t\tif ($loggedUser != NULL) {\r\n\t\t\t//dodeljujemo sesiji celog usera (OBJEKAT)\r\n\t\t\t$_SESSION['loggedUser'] = $loggedUser;\r\n\t\t\t//ovde dodeljujemo usera iz baze varijabli login_result!!!\r\n\t\t\t$this->login_result = $loggedUser;\r\n\t\t}\r\n\t}", "protected function LoginAuthentification()\n {\n \n $tokenHeader = apache_request_headers();\n\n //isset Determina si una variable esta definida y no es NULL\n\n if(isset($tokenHeader['token']))\n { \n $token = $tokenHeader['token'];\n $datosUsers = JWT::decode($token, $this->key, $this->algorithm); \n //var_dump($datosUsers);\n if(isset($datosUsers->nombre) and isset($datosUsers->password))\n { \n $user = Model_users::find('all', array\n (\n 'where' => array\n (\n array('nombre'=>$datosUsers->nombre),\n array('password'=>$datosUsers->password)\n )\n ));\n if(!empty($user))\n {\n foreach ($user as $key => $value)\n {\n $id = $user[$key]->id;\n $username = $user[$key]->nombre;\n $password = $user[$key]->password;\n }\n }\n else\n {\n return false;\n }\n }\n else\n {\n return false;\n }\n\n if($username == $datosUsers->nombre and $password == $datosUsers->password)\n {\n return true;\n }\n else\n {\n return false;\n }\n }\n else\n {\n return false;\n } \n \n }", "public function getUserLogin()\n {\n return view('frontend.auth.login');\n }", "public function loginAction() : object\n {\n $title = \"Logga in\";\n\n // Deal with incoming variables\n $user = getPost('user');\n $pass = getPost('pass');\n $pass = MD5($pass);\n\n if (hasKeyPost(\"login\")) {\n $sql = loginCheck();\n $res = $this->app->db->executeFetchAll($sql, [$user, $pass]);\n if ($res != null) {\n $this->app->session->set('user', $user);\n return $this->app->response->redirect(\"content\");\n }\n }\n\n // Add and render page to login\n $this->app->page->add(\"content/login\");\n return $this->app->page->render([\"title\" => $title,]);\n }", "public function login(){\n\t\t\tValidator::validateOrRedirect($_POST,\n\t\t\t\t\t[\n\t\t\t\t\t\t\t\"required\" => [\"txt-input\", \"password\",\"action\"],\n\t\t\t\t\t\t\t\"email\" => \"txt-input\",\n\t\t\t\t\t],\n\t\t\t\t\t\"/login\");\n\t\t\t$this->resetMessage();\n\t $username=$_POST[\"txt-input\"];\n\t $password=$_POST[\"password\"];\n\t $action=$_POST[\"action\"];\n\t\t\t$userList =[];\n\t\t\t$column_value=array('email'=>$username,'password'=>$password);\n\t\t\t$uss=new User();\n\t\t\t$login=$uss->getBy($column_value);\n\t\t\tif (is_array($login)) {\n\t\t\t\tif (count($login)>0) {\n\t\t\t\t\tforeach ($login as $user)\n\t\t\t {\n\t\t\t\t\t\t$userList[]= array(\n\t\t\t 'user' =>$user['user_name'],\n\t\t\t 'email' =>$user['email'],\n\t\t\t 'password' =>$user['password']);\n\t\t\t\t\t}\n\n\t\t\t\t\t$user=$userList[0][\"email\"];\n\t\t $pass=$userList[0][\"password\"];\n\t\t Redirect::to(\"/products\")->with([\n\t\t 'name'=>$userList[0][\"email\"],\n\t\t 'check'=>\"true\",\n\t\t ])->do();\n\t\t\t\t}\n\t\t\t\telse{\n\n\t\t\t\t\tRedirect::to(\"/login\")->with([\n\t\t \"message\" => \"Ha ocurrido un error: usuario o contraseña incorrectos.</br> Revise por favor\",\n\t\t \"type\" => \"danger\",\n\t\t ])\n\t\t ->do();\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse{\n\n\t\t\t\tRedirect::to(\"/login\")->with([\n\t \"message\" => $login,\n\t \"type\" => \"danger\",\n\t ])\n\t ->do();\n\t\t\t}\n\t }", "public function loginUser($user,$pwd){\n \n $pwdCr = mkpwd($pwd);\n \n \n \n $sql = new Sql();\n $userData = $sql->select('SELECT * FROM usuarios \n WHERE email_usuario = :email_usuario\n AND pwd_usuario = :pwd_usuario',array(':email_usuario'=>$user,':pwd_usuario'=>$pwdCr));\n \n if(!isSet($userData) || count($userData)==0){//CASO NADA RETORNADO\n return false;\n }elseif(count($userData)>0){//CASO DADOS RETORNADOS CONFERE O STATUS\n \n if($userData[0]['status_usuario']==0){\n \n return 0;//caso INATIVO entao retorna ZERO indicando cadastro NAO ATIVO\n \n }elseif($userData[0]['status_usuario']==1){//CASO USUARIO ATIVO GERA SESSION DO LOGIN\n \n \n //permissao do cliente\n $_SESSION['_uL'] = encode($userData[0]['permissao_usuario']);\n $_SESSION['logado'] = 'sim';\n \n //dados do usuario\n $_SESSION['_iU'] = encode($userData[0]['id_usuario']);\n $_SESSION['_iE'] = encode($userData[0]['id_empresa']);\n $_SESSION['_nU'] = encode($userData[0]['nome_usuario'] . ' ' . $userData[0]['sobrenome_usuario']);\n $_SESSION['_eU'] = encode($userData[0]['email_usuario']);\n \n return 1;\n }\n \n }\n \n \n }", "public function showLogin(){\n\t\t\t\n\t\t\t//Verificamos si ya esta autenticado\n\t\t\tif(Auth::check()){\n\n\t\t\t\t//Si esta autenticado lo mandamos a la raiz, el inicio\n\t\t\t\treturn Redirect::to('/');\n\t\t\t} else {\n\n\t\t\t\t//Si no lo mandamos al formulario de login\n\t\t\t\treturn View::make('login');\n\n\t\t\t}\n\t\t}", "function checkLogin() {\n /* Check if user has been remembered */\n if (isset($_COOKIE['cook_VenusetP_UserEmail']) && isset($_COOKIE['cook_Venueset_UserPassword'])) {\n $varUserEmail = $_COOKIE['cook_VenusetP_UserEmail'];\n $varUserPassword = $_COOKIE['cook_Venueset_UserPassword'];\n /* Confirm that username and password are valid */\n $arrUserFlds = array('pkUserID', 'UserEmail', 'UserPassword', 'UserFirstName');\n $varUserWhere = ' 1 AND UserEmail = \\'' . $varUserEmail . '\\' AND UserPassword = \\'' . md5(trim($varUserPassword)) . '\\'';\n //echo '<pre>';print_r($varUserWhere);exit;\n $arrUserList = $this->select(TABLE_USERS, $arrUserFlds, $varUserWhere);\n if (count($arrUserList) > 0) {\n /* $_SESSION['VenusetP_UserEmail'] = $arrUserList[0]['UserEmail'];\n $_SESSION['VenusetP_UserID'] = $arrUserList[0]['pkUserID'];\n $_SESSION['VenusetP_UserName'] = $arrUserList[0]['UserFirstName']; */\n }\n return true;\n } else {\n return false;\n }\n }" ]
[ "0.8125726", "0.8125726", "0.8125726", "0.7900083", "0.7900083", "0.7691457", "0.7314852", "0.726456", "0.72525424", "0.72496486", "0.724711", "0.7242342", "0.7233132", "0.7230456", "0.7219693", "0.72124535", "0.7185834", "0.71632224", "0.71632224", "0.71366656", "0.7135054", "0.71181196", "0.71133524", "0.70924616", "0.7077736", "0.7077529", "0.70745873", "0.7069815", "0.7066623", "0.70579916", "0.70573914", "0.7045159", "0.70431125", "0.7038582", "0.70323366", "0.70284444", "0.7023298", "0.7022433", "0.7018555", "0.7015804", "0.70132506", "0.7008139", "0.70068884", "0.7006256", "0.7002154", "0.7001812", "0.7001323", "0.69927865", "0.69909936", "0.69891113", "0.698847", "0.69861555", "0.69793195", "0.6973359", "0.69673544", "0.6959302", "0.6953666", "0.6938328", "0.69375706", "0.6936223", "0.69339657", "0.6928701", "0.69275147", "0.692336", "0.69196725", "0.6914044", "0.6899923", "0.68953204", "0.6894789", "0.6890029", "0.68897015", "0.6885066", "0.68837965", "0.6878641", "0.6872528", "0.6869787", "0.6869787", "0.6869787", "0.6869787", "0.6869787", "0.6869787", "0.6869787", "0.6869787", "0.6864828", "0.6863184", "0.68588936", "0.6858834", "0.68571186", "0.68538445", "0.6834042", "0.683304", "0.6831179", "0.68280584", "0.68264973", "0.6824541", "0.6824163", "0.6824008", "0.6821645", "0.6820356", "0.68199885", "0.68143195" ]
0.0
-1
Recibimos los datos del login
public function login(Request $request) { $request->validate([ 'email' => 'required|email|exists:users,email', 'password' => 'required|min:8' ]); if (Auth::attempt(['email' => $request->email, 'password' => $request->password])) { $request->session()->regenerate(); return redirect('/'); } return back()->withErrors([ 'email' => 'The provided credentials do not match our records.', ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function recibirdatos() {\n\t\t$passSha1 = sha1($this->input->post('password'));\n\t\t$datos = array(\n\t\t\t'usuario' => $this->input->post('usuario'),\n\t\t\t'password' => $passSha1\n\t\t\t);\n\t\t//Llamamos al modelo, Si la autentificacion es correcta damos paso a la aplicacion y sino devolvemos al login\n\t\tif($this->login_model->obtenerPass($datos) == true){\n\t\t\t//Cargamos la pagina principal\n\t\t\t$this->session->set_userdata('usuario', $datos['usuario']);\n\t\t\t//Llamamos a la clase que realiza los test de caja blanca\n\t\t\t$this->testCajaBlanca($datos);\n\t\t\t$this->mostrarDatosUser();\n\t\t\t$this->session->set_userdata('Token', true);\n\t\t}else{\n\t\t\t$this->load->view('login');\n\t\t}\n\t}", "private function login(){\n\t\tif ($_SERVER['REQUEST_METHOD'] != \"POST\") {\n\t\t\t# no se envian los usuarios, se envia un error\n\t\t\t$this->mostrarRespuesta($this->convertirJson($this->devolverError(1)), 405);\n\t\t} //es una peticion POST\n\t\tif(isset($this->datosPeticion['email'], $this->datosPeticion['pwd'])){\n\t\t\t#el constructor padre se encarga de procesar los datos de entrada\n\t\t\t$email = $this->datosPeticion['email']; \n \t\t$pwd = $this->datosPeticion['pwd'];\n \t\t//si los datos de la solicitud no es tan vacios se procesa\n \t\tif (!empty($email) and !empty($pwd)){\n \t\t\t//se valida el email\n \t\t\tif (filter_var($email, FILTER_VALIDATE_EMAIL)) { \n \t\t\t//consulta preparada mysqli_real_escape()\n \t\t\t\t$query = $this->_conn->prepare(\n \t\t\t\t\t\"SELECT id, nombre, email, fRegistro \n \t\t\t\t\t FROM usuario \n \t\t\t\t\t WHERE email=:email AND password=:pwd \");\n \t\t\t\t//se le prestan los valores a la query\n \t\t\t\t$query->bindValue(\":email\", $email); \n \t\t\t$query->bindValue(\":pwd\", sha1($pwd)); \n \t\t\t$query->execute(); //se ejecuta la consulta\n \t\t\t//Se devuelve un respuesta a partir del resultado\n \t\t\tif ($fila = $query->fetch(PDO::FETCH_ASSOC)){ \n\t\t\t $respuesta['estado'] = 'correcto'; \n\t\t\t $respuesta['msg'] = 'Los datos pertenecen a un usuario registrado';\n\t\t\t //Datos del usuario \n\t\t\t $respuesta['usuario']['id'] = $fila['id']; \n\t\t\t $respuesta['usuario']['nombre'] = $fila['nombre']; \n\t\t\t $respuesta['usuario']['email'] = $fila['email']; \n\t\t\t $this->mostrarRespuesta($this->convertirJson($respuesta), 200); \n\t\t\t } \n \t\t\t}\n \t\t} \n\t\t} // se envia un mensaje de error\n\t\t$this->mostrarRespuesta($this->convertirJson($this->devolverError(3)), 400);\n\t}", "function consult_login($dato){\n\t\t// se crean las variables que tentran la data correspondiente en la posicion que esta cada uno de estos datos\n\t\t$cedula=strip_tags($dato[0]);\n\t\t$contrasena=strip_tags($dato[1]);\n\t\t//se crea una variable que instancia la clase que coneccion a la base de datos\n\t\t$mysqli = new conect_database();\n\t\t// se rea una variable que sea igual a la variable que instancio la clase anterior y se realiza una respectiva consulta y se le mandan los respectivos datos\n\t\t$query = $mysqli->prepare(\"select id_usuarios,nombre_usuario,tipo_usuario from t_usuarios where usuario='\".$cedula.\"' and contrasena='\".$contrasena.\"'\");\n\t\t// se ejecuta lo que esta dentro de la variable anterior \n\t\t$query->execute();\t\n // se llama la una de las variables privadas que se crearon al principio y esta va a ser igual a la variable que contiene los datos de la consulta uy se obtienen los datos con get_result();\n\t\t$this->consult=$query->get_result();\n // se creaun bucle que es igual a data que sea igual al metodo inbocado en este caso la variable que contiela los datos de la consulta y se obtiene una colunma o un array (los datos)\n\t\twhile ($data=$this->consult->fetch_row()) {\n // llamamos a la otra variable privada que sera un array y contendra los datos\n\t\t\t$this->dataAll[]=$data;\n\n\t\t}\n // retornamos los datos \n\t\treturn $this->dataAll;\n\t}", "public function loginprofesor_post() //INICIAR SESION = http://localhost/foxweb/Api/login\n {\n $matricula = $this->post('matricula');\n $password = $this->post('password');\n $type = $this->post('type');\n\n $datauser = $this->ApiModel->flogin($matricula, $password, $type);\n\n if ($datauser != false) {\n foreach ($datauser as $data) {\n $matricula = $data['matricula'];\n $nombre = $data['nombre'];\n $apellidos = $data['apellidos'];\n }\n\n $response = ['error' => false, 'status' => parent::HTTP_OK, \"matricula\" => $matricula, \"nombre\" => $nombre, \"apellidos\" => $apellidos];\n\n $this->response($response, parent::HTTP_OK);\n\n } else {\n\n $response = ['error' => true,'status' => parent::HTTP_NOT_FOUND, 'msg' => 'Usuario o Contraseña Invalidos!'];\n\n $this->response($response, parent::HTTP_NOT_FOUND);\n\n }\n }", "public function getLoginFormData() {}", "public function getLoginFormData() {}", "public function loginalumno_post() //INICIAR SESION = http://localhost/foxweb/Api/login\n {\n $matricula = $this->post('matricula');\n $password = $this->post('password');\n $type = $this->post('type');\n\n $datauser = $this->ApiModel->flogin($matricula, $password, $type);\n\n if ($datauser != false) {\n foreach ($datauser as $data) {\n $matricula = $data['matricula'];\n $nombre = $data['nombre'];\n $apellidos = $data['apellidos'];\n $num_grupo = $data['num_grupo'];\n }\n\n $response = ['error' => false, 'status' => parent::HTTP_OK, \"matricula\" => $matricula, \"nombre\" => $nombre, \"apellidos\" => $apellidos, \"num_grupo\" => $num_grupo];\n\n $this->response($response, parent::HTTP_OK);\n\n } else {\n\n $response = ['error' => true,'status' => parent::HTTP_NOT_FOUND, 'msg' => 'Usuario o Contraseña Invalidos!'];\n\n $this->response($response, parent::HTTP_NOT_FOUND);\n\n }\n }", "public function getUsuariosLogin($datos)\n {\n $stmt = Conexion::conectar()->prepare('SELECT *from usuarios WHERE correo=:correo && password=:contrasena');\n $stmt->bindParam(\":correo\", $datos[\"correo\"] , PDO::PARAM_STR);\n $stmt->bindParam(\":contrasena\", $datos[\"contrasena\"] , PDO::PARAM_STR);\n if($stmt->execute())\n {\n \n //Variables para iniciar una sesion \n \n $respuesta = $stmt->rowCount();\n $resultado =$stmt->fetch();\n session_start();\n $_SESSION[\"idUsuario\"]=$resultado[\"idUsuario\"];\n $_SESSION[\"nombre\"]=$resultado[\"nombre\"];\n $_SESSION[\"apellido\"]=$resultado[\"apellido\"];\n $_SESSION[\"nombre_usuario\"]=$resultado[\"nombre_usuario\"];\n $_SESSION[\"contrasena\"]=$resultado[\"password\"];\n $_SESSION[\"apellido\"]=$resultado[\"apellido\"];\n $_SESSION[\"correo\"]=$resultado[\"correo\"];\n $_SESSION[\"fecha_registro\"]=$resultado[\"fecha_registro\"];\n $_SESSION[\"ruta_img\"]=$resultado[\"ruta_img\"];\n $_SESSION[\"tipoUsuario\"]=$resultado[\"tipoUsuario\"];\n\n return $respuesta;\n }else\n {\n return \"error\";\n }\n }", "public function loginUser()\r\n {\r\n $req = $this->login->authenticate($this->user);\r\n $req_result = get_object_vars($req);\r\n print(json_encode($req_result));\r\n }", "public function dadosLogin(){\n\t\t$sql=\"select id_empresa from empresa where email=:email and senha=:senha\";\n\t\t//prepara o comando a ser executado no banco de dados\n\t\t$query=$this->con->prepare($sql);\n\t\t//set as variáveis no comando sql e executa no banco de dados\n\t\t$query->execute(array(\"email\"=>$this->email,\"senha\"=>$this->senha));\n\t\t//retorna resultado com um array assoc\n\t\t$resultado = $query->fetch(PDO::FETCH_ASSOC);\n\t\t//retorna os dados do usuário se estiver tudo ok, senão retorna falso\n\t\tif($resultado){\n\t\t\treturn $resultado;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "private function processFormLogin(){\n\t\t$username = $_REQUEST[\"usuario\"];\n\t\t$password = $_REQUEST[\"password\"];\n\t\t$validar = $this->users->getProcessUser($username, $password);\n\t\tif($validar){\n\t\t\tif (Seguridad::getTipo() == \"0\")\n\t\t\t\tView::redireccion(\"selectTable\", \"userController\");\n\t\t\telse\n\t\t\t\tView::redireccion(\"selectTable\", \"userController\");\n\t\t} else {\n\t\t\t$data[\"informacion\"] = \"Nombre de usuario o contraseña incorrecta.\";\n\t\t\tView::show(\"user/login\", $data);\n\t\t}\n\t}", "public function login() {\n parent::conectarBD();\n\n $queri = parent::query(sprintf(\"select usu_id as codigo, usu_password as senha, \"\n . \"usu_token_sessao as token_sessao, usu_login as login from \"\n . table_prefix . \"usuario where usu_login = '%s' and \"\n . \"usu_password = '%s'\", $this->usu_login, $this->usu_password));\n\n if ($queri) {\n $dados = $queri->fetch_assoc();\n if ($dados) {\n $new_session_id = hash('sha256', $dados['senha'] . time());\n $queri2 = parent::query(\"update \" . table_prefix . \"usuario set usu_token_sessao = '$new_session_id' where usu_id = \" . $dados['codigo']);\n\n if ($queri2) {\n $dados['token_sessao'] = $new_session_id;\n parent::commit();\n parent::desconectarBD();\n return $dados;\n } else {\n parent::rollback();\n parent::desconectarBD();\n return false;\n }\n } else {\n parent::desconectarBD();\n return false;\n }\n } else {\n parent::desconectarBD();\n return false;\n }\n }", "private function usuarios(){\n\t\tif ($_SERVER['REQUEST_METHOD'] != \"GET\") {\n\t\t\t# no se envian los usuarios, se envia un error\n\t\t\t$this->mostrarRespuesta($this->convertirJson($this->devolverError(1)), 405);\n\t\t}//es una petición GET\n\t\t//se realiza la consulta a la bd\n\t\t$query = $this->_conn->query(\n\t\t\t\"SELECT id, nombre, email \n\t\t\t FROM usuario\");\n\t\t//cantidad de usuarios\n\t\t$filas = $query->fetchAll(PDO::FETCH_ASSOC); \n \t$num = count($filas);\n \t//si devolvio un resultado, se envia al cliente\n \tif ($num > 0) { \n\t $respuesta['estado'] = 'correcto'; \n\t $respuesta['usuarios'] = $filas; \n\t $this->mostrarRespuesta($this->convertirJson($respuesta), 200); \n\t } //se envia un error \n\t $this->mostrarRespuesta($this->devolverError(2), 204);\n\t}", "function login() {\n /**\n * This array will hold the errors we found\n */\n $errors = [];\n\n /**\n * Check whether a POST request was made\n * If a POST request was made, we can authorize and authenticate the user\n */\n if($_POST) {\n /**\n * Decode the received data to associative array\n */\n $data = json_decode($_POST[\"data\"], true);\n\n /**\n * Check whether user name and password were inputed\n */\n if(!$data[\"userName\"]) {\n $errors[] = \"Моля, въведете потребителско име.\";\n }\n\n if(!$data[\"password\"]) {\n $errors[] = \"Моля, въведете парола.\";\n }\n\n /** \n * If the user name and password were inputed we can validate them\n */\n if($data[\"userName\"] && $data[\"password\"]) {\n $user = new User($data[\"userName\"], $data[\"password\"]);\n $isValid = $user->isValid();\n\n /**\n * If the inputed user name and password were valid, we can store the to the session\n */\n if($isValid[\"success\"]){\n $_SESSION[\"userName\"] = $user->getUsername();\n $_SESSION[\"password\"] = $user->getPassword();\n } else {\n $errors[] = $isValid[\"error\"];\n }\n }\n \n $response;\n\n if($errors) {\n $response = [\"success\" => false, \"data\" => $errors];\n } else {\n $response = [\"success\" => true];\n }\n\n /**\n * Return response to the user\n */\n echo json_encode($response);\n } else {\n echo json_encode(array(\"succes\" => false, \"error\" => \"Не е изпратена правилна заявка\"));\n }\n }", "function login(){\n\t\t$apikey = $this->get_api_key();\n\t\t$apisecret = $this->get_api_secret();\n\t\t$authorization = $this->get_authorization();\n\t\t$user = new \\gcalc\\db\\api_user( $apikey, $apisecret, $authorization );\n\t\tif ( $user->login() ) {\n\t\t\t$credetials = $user->get_credentials();\t\t\t\t\n\t\t} else {\n\t\t\t$credetials = array(\n\t\t\t\t'login' => 'anonymous',\n\t\t\t\t'access_level' => 0\n\t\t\t);\n\t\t}\n\t\treturn $credetials;\n\t}", "public function login(){\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\" && isset($_POST[\"Anmelden\"]) && $_POST[\"Anmelden\"] == \"Anmelden\") {\n if ($this->error == false) {\n $datenbank = new DatenbankAufrufe;\n #Prüfung ob der Benutzer bereits existiert\n $result = $datenbank->existBenutzer();\n if ($result == true) {\n $dbPasswort = $datenbank->passwortAuslesen();\n $pwKrypto = new PasswortSpeichern;\n $result2 = $pwKrypto->passwortAbgleich($_POST['passwort'], $dbPasswort);\n if ($result2 == true) {\n #SESSION\n $session = new sessionClass;\n $name = $datenbank->benutzernameAuslesen();\n $session->SessionStart($name, $datenbank);\n\n header(\"Location: index.php?site=main\");\n }\n else {\n echo \"Das Passwort ist nicht korrekt\";\n }\n } else {\n echo \"Bitte zuerst Registrieren\";\n }\n }\n }\n }", "private function login(){\n \n }", "public function get_login($data=array()){\n if(array_key_exists('username', $data)){\n $this->query = \" SELECT t1.cod_usuario,CONCAT(t1.nom_usuario,' ',t1.ape_usuario) as nom_usuario,t1.email_usuario,t1.tel_usuario,t1.tw_usuario,\n t1.fb_usuario,t1.intro_usuario,t1.linkid_usuario,t1.usuario_usuario,\n t1.cod_estado,concat('modules/sistema/adjuntos/',t1.img_usuario) as img_usuario,t2.cod_perfil,t2.des_perfil,t1.cod_proveedores\n FROM sys_usuario as t1, sys_perfil as t2\n WHERE t1.cod_perfil=t2.cod_perfil\n AND usuario_usuario = '\" .$data['username']. \"'\n AND password_usuario = '\" .md5($data['password']). \"'\";\n $this->get_results_from_query();\n }\n if(count($this->rows) == 1){\n foreach ($this->rows[0] as $propiedad=>$valor) {\n Session::set(str_replace('_usuario','',$propiedad), $valor);\n }\n if(Session::get('cod_estado') != 'AAA'){\n $this->msj = 'La sesi&oacute;n esta desactivada, consulte al administrador. ';\n $this->err = '1';\n return false;exit();\n }\n\n if( Session::get('cod_perfil')=='2'\n && Session::get('cod_perfil')=='6'\n && Session::get('cod_perfil')=='7'\n && Session::get('cod_perfil')=='8'\n && Session::get('cod_perfil')=='9'){\n $this->msj = 'El usuario no tiene permisos para accder, consulte al administrador. ';\n $this->err = '1';\n if(!Session::get('usuario'))\n redireccionar(array('modulo'=>'sistema','met'=>'cerrar'));\n\n return false;\n }\n return true;\n }else{\n $this->msj = 'Informaci&oacute;n incorrecta, revise los datos. ';\n $this->err = '0';\n return false;exit();\n }\n }", "public function getLogin();", "public function getLogin();", "public function getLogin();", "public function logUser(){\r\n\t\t$email = $_POST['login_email'];\r\n\t\t$password = $_POST['login_password'];\r\n\r\n\t\t$sql = \"SELECT * FROM users where email = ? and password = ? \";\r\n\t\t$query = $this->db->prepare($sql);\r\n\t\t$query->execute([$email,$password]);\r\n\t\t//rezultat smestamo u promenljivu loggedUser i stavljamo samo fetch zzbog toga sto vraca jedan rezultat\r\n\r\n\t\t$loggedUser = $query->fetch(PDO::FETCH_OBJ);\r\n\r\n\t\tif ($loggedUser != NULL) {\r\n\t\t\t//dodeljujemo sesiji celog usera (OBJEKAT)\r\n\t\t\t$_SESSION['loggedUser'] = $loggedUser;\r\n\t\t\t//ovde dodeljujemo usera iz baze varijabli login_result!!!\r\n\t\t\t$this->login_result = $loggedUser;\r\n\t\t}\r\n\t}", "public function getAllFromLogin()\n {\n $sql = \"SELECT * FROM login;\";\n $res = $this->db->executeFetchAll($sql);\n\n return $res;\n }", "public function hacerLogin() {\n $user = json_decode(file_get_contents(\"php://input\"));\n\n if(!isset($user->email) || !isset($user->password)) {\n http_response_code(400);\n exit(json_encode([\"error\" => \"No se han enviado todos los parametros\"]));\n }\n \n //Primero busca si existe el usuario, si existe que obtener el id y la password.\n $peticion = $this->db->prepare(\"SELECT id,idRol,password FROM users WHERE email = ?\");\n $peticion->execute([$user->email]);\n $resultado = $peticion->fetchObject();\n \n if($resultado) {\n \n //Si existe un usuario con ese email comprobamos que la contraseña sea correcta.\n if(password_verify($user->password, $resultado->password)) {\n \n //Preparamos el token.\n $iat = time();\n $exp = $iat + 3600*24*2;\n $token = array(\n \"id\" => $resultado->id,\n \"iat\" => $iat,\n \"exp\" => $exp\n );\n \n //Calculamos el token JWT y lo devolvemos.\n $jwt = JWT::encode($token, CJWT);\n http_response_code(200);\n exit(json_encode($jwt . \"?\" . $resultado->idRol));\n \n } else {\n http_response_code(401);\n exit(json_encode([\"error\" => \"Password incorrecta\"]));\n }\n \n } else {\n http_response_code(404);\n exit(json_encode([\"error\" => \"No existe el usuario\"])); \n }\n }", "function getDataForm(){\r\n\t\t\t\t$login = $_REQUEST['login']; //login\r\n\t\t\t\t$password = $_REQUEST['password'];//pas\r\n\t\t\t\t$dni = $_REQUEST['dni'];//dni\r\n\t\t\t\t$nombre = $_REQUEST['nombre'];//nombre\r\n\t\t\t\t$apellidos = $_REQUEST['apellidos'];//apellidos\r\n\t\t\t\t$telefono = $_REQUEST['telefono'];//telefono\r\n\t\t\t\t$email = $_REQUEST['email'];//email\r\n\t\t\t\t$fechanacimiento = $_REQUEST['fecha'];//fecha de nacimiento\r\n\t\t\t\t$tipo = $_REQUEST['tipo']; //tipo de usuario\r\n\t\t\t\t\r\n\t\t\t\t$usuario = new Usuarios_Model ($login,$password,$dni,$nombre,$apellidos,$telefono,$email,$fechanacimiento,$tipo); //creamos el objeto usuario\r\n\t\t\t\t\r\n\t\t\t\treturn $usuario; //devolvemos el objeto usuario\r\n\t\t\t}", "public function login();", "public function login();", "function recuperarDatosEstablecimiento($login) {\n\t\t\t$usuario = new Usuarios();\n\t\t\t$establecimento = new Establecimiento();\n\t\t\t$res1 = $usuario->recuperar($login);\n\t\t\tif($res1===0) return false;\n\t\t\t$res2 = $establecimento->recuperar($login);\n\t\t\tif($res2===0) return false;\n\t\t\t$aux1 = mysqli_fetch_assoc($res1);\n\t\t\t$aux2 = mysqli_fetch_assoc($res2);\n\t\t\t$result = array(\n\t\t\t\t\t\t\t\"login\" => $login,\n\t\t\t\t\t\t\t\"password\" => $aux1[\"password\"],\n\t\t\t\t\t\t\t\"email\" => $aux1[\"email\"],\n\t\t\t\t\t\t\t\"nombre\" => $aux2[\"nombre\"],\n\t\t\t\t\t\t\t\"direccion\" => $aux2[\"direccion\"],\n\t\t\t\t\t\t\t\"telefono\" => $aux2[\"telefono\"],\n\t\t\t\t\t\t\t\"web\" => $aux2[\"web\"],\n\t\t\t\t\t\t\t\"horario\" => $aux2[\"horario\"],\n\t\t\t\t\t\t\t\"descripcion\" => $aux2[\"descripcionestablecimiento\"]\n\t\t\t\t\t);\n\t\t\treturn $result;\n\t}", "public function login (){\n\n $dao = DAOFactory::getUsuarioDAO(); \n $GoogleID = $_POST['GoogleID']; \n $GoogleName = $_POST['GoogleName']; \n $GoogleImageURL = $_POST['GoogleImageURL']; \n $GoogleEmail = $_POST['GoogleEmail'];\n $usuario = $dao->queryByGoogle($GoogleID); \n if ($usuario == null){\n $usuario = new Usuario();\n $usuario->google = $GoogleID;\n $usuario->nombre = $GoogleName;\n $usuario->avatar = $GoogleImageURL;\n $usuario->correo = $GoogleEmail;\n print $dao->insert($usuario);\n $_SESSION[USUARIO] = serialize($usuario);\n //$usuario = unserialize($_SESSION[USUARIO]);\n } else {\n $_SESSION[USUARIO] = serialize($usuario);\n }\n }", "public function postLogin(){\n\n\t\t\t//Guardamos los datos recibidos\n\t\t\t$userdata = array(\n\t\t\t\t'user' => Input::get('username'),\n\t\t\t\t'password' => Input::get('password')\n\t\t\t);\n\n\t\t\t//Validamos los datos y mandamos como segundo parametro la opcion de recordar usuario\n\t\t\tif(\n\t\t\t\tAuth::attempt(\n\t\t\t\t\t$userdata,\n\t\t\t\t\tInput::get('remember-me', 0)\n\t\t\t\t)\n\t\t\t){\n\t\t\t\t//Si son validos nos mandara al inicio\n\t\t\t\treturn Redirect::to('/');\n\t\t\t} else {\n\n\t\t\t\t//En caso de que no sean validos los datos nos mandara de nuevo al login con un mensaje de error\n\t\t\t\treturn Redirect::to('/login')\n\t\t\t\t\t\t\t\t\t\t->with('mensaje_error', 'Usuario y/o contrase&ntilde;a incorrecta')\n\t\t\t\t\t\t\t\t\t\t->withInput();\n\n\t\t\t}\n\n\t\t}", "public function Login($dados){\n // //$conexao = $c->conexao();\n\n $email = $dados[0];\n $senha = md5($dados[1]);\n\n $sql = \"SELECT a.*, c.permissao FROM tbusuarios a, tbpermissao c WHERE email = '$email' and senha = '$senha' and a.idpermissao = c.idpermissao limit 1 \";\n $row = $this->ExecutaConsulta($this->conexao, $sql);\n\n // print_r($sql);\n\n // $sql=ExecutaConsulta($this->conecta,$sql);\n // $sql = $this->conexao->query($sql);\n // $sql = $this->conexao->query($sql);\n // $row = $sql->fetch_assoc();\n // print_r($row); \n\n if ($row) {\n $_SESSION['chave_acesso'] = md5('@wew67434$%#@@947@@#$@@!#54798#11a23@@dsa@!');\n $_SESSION['email'] = $email;\n $_SESSION['nome'] = $row['nome'];\n $_SESSION['permissao'] = $row['permissao'];\n $_SESSION['idpermissao'] = $row['idpermissao'];\n $_SESSION['last_time'] = time();\n $_SESSION['usuid'] = $row['idusuario'];\n $_SESSION['ip'] = $_SERVER[\"REMOTE_ADDR\"];\n $mensagem = \"O Usuário $email efetuou login no sistema!\";\n $this->salvaLog($mensagem);\n return 1;\n }else{\n return 0;\n }\n\n }", "public function login() {\r\n if (!empty($_POST)) {\r\n $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\r\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\r\n\r\n $hash = hash('sha512', $password . Configuration::USER_SALT);\r\n unset($password);\r\n\r\n $user = UserModel::getByUsernameAndPasswordHash($username, $hash);\r\n unset($hash);\r\n\r\n if ($user) {\r\n Session::set('user_id', $user->user_id);\r\n Session::set('username', $username);\r\n Session::set('ip', filter_input(INPUT_SERVER, 'REMOTE_ADDR'));\r\n Session::set('ua', filter_input(INPUT_SERVER, 'HTTP_USER_AGENT', FILTER_SANITIZE_STRING));\r\n\r\n Misc::redirect('');\r\n } else {\r\n $this->set('message', 'Nisu dobri login parametri.');\r\n sleep(1);\r\n }\r\n }\r\n }", "public function login($datos)\n {\n \n $ok = true;\n $sql = \"SELECT id, nombre , mail \n FROM \" . $this->tabla . \"\n WHERE mail='\" . $datos['mail'] . \"' AND clave='\" . md5($datos['clave']) . \"';\";\n\n $bd = new Bd($this->tabla);\n\n $res = $bd->consultaSimple($sql);\n \n if (!$res) {\n $ok = false;\n } else {\n\n session_start();\n $_SESSION['id'] = $res['id'];\n $_SESSION['nombre'] = $res['nombre'];\n $ok = true;\n }\n return $ok;\n }", "public function loginForm(){\n self::$loginEmail = $_POST['login-email'];\n self::$loginPassword = $_POST['login-password'];\n \n self::sanitize();\n $this->tryLogIn();\n }", "public function loginUsuario($login = '', $clave = '') {\n $password = md5($clave);\n $this->consulta = \"SELECT * \n FROM usuario \n WHERE login = '$login' \n AND password = '$password' \n AND estado = 'Activo' \n LIMIT 1\";\n\n if ($this->consultarBD() > 0) {\n $_SESSION['LOGIN_USUARIO'] = $this->registros[0]['login'];\n $_SESSION['ID_USUARIO'] = $this->registros[0]['idUsuario'];\n $_SESSION['PRIVILEGIO_USUARIO'] = $this->registros[0]['privilegio'];\n $_SESSION['ACTIVACION_D'] = 0;\n// $_SESSION['ACCESOMODULOS'] = $this->registros[0]['accesoModulos'];\n\n $tipoUsuario = $this->registros[0]['tipoUsuario'];\n\n switch ($tipoUsuario) {\n case 'Empleado':\n $idEmpleado = $this->registros[0]['idEmpleado'];\n $this->consulta = \"SELECT primerNombre, segundoNombre, primerApellido, segundoApellido, cargo, cedula, tipoContrato \n FROM empleado \n WHERE idEmpleado = $idEmpleado \n LIMIT 1\";\n $this->consultarBD();\n// $apellidos = explode(' ', $this->registros[0]['apellidos']);\n $_SESSION['ID_EMPLEADO'] = $idEmpleado;\n $_SESSION['NOMBRES_APELLIDO_USUARIO'] = $this->registros[0]['primerNombre'] . ' ' . $this->registros[0]['primerApellido'];\n $_SESSION['CARGO_USUARIO'] = $this->registros[0]['cargo'];\n $_SESSION['TIPO_CONTRATO'] = $this->registros[0]['tipoContrato'];\n\n $_SESSION['NOMBRES_USUARIO'] = $this->registros[0]['primerNombre'] . ' ' . $this->registros[0]['segundoNombre'];\n $_SESSION['APELLIDOS_USUARIO'] = $this->registros[0]['primerApellido'] . ' ' . $this->registros[0]['segundoApellido'];\n $_SESSION['CEDULA_USUARIO'] = $this->registros[0]['cedula'];\n break;\n case 'Cliente Residencial':\n $idResidencial = $this->registros[0]['idResidencial'];\n $this->consulta = \"SELECT nombres, apellidos, cedula \n FROM residencial \n WHERE idResidencial = $idResidencial \n LIMIT 1\";\n $this->consultarBD();\n $apellidos = explode(' ', $this->registros[0]['apellidos']);\n $_SESSION['NOMBRES_APELLIDO_USUARIO'] = $this->registros[0]['nombres'] . ' ' . $apellidos[0];\n $_SESSION['CARGO_USUARIO'] = 'Cliente Residencial';\n\n $_SESSION['NOMBRES_USUARIO'] = $this->registros[0]['nombres'];\n $_SESSION['APELLIDOS_USUARIO'] = $this->registros[0]['apellidos'];\n $_SESSION['CEDULA_USUARIO'] = $this->registros[0]['cedula'];\n break;\n case 'Cliente Corporativo':\n $idCorporativo = $this->registros[0]['idCorporativo'];\n $this->consulta = \"SELECT razonSocial, nit \n FROM corporativo \n WHERE idCorporativo = $idCorporativo \n LIMIT 1\";\n\n $this->consultarBD();\n $_SESSION['NOMBRES_APELLIDO_USUARIO'] = $this->registros[0]['razonSocial'];\n $_SESSION['CARGO_USUARIO'] = 'Cliente Corporativo';\n\n $_SESSION['NOMBRES_USUARIO'] = $this->registros[0]['razonSocial'];\n $_SESSION['APELLIDOS_USUARIO'] = $this->registros[0]['razonSocial'];\n $_SESSION['CEDULA_USUARIO'] = $this->registros[0]['nit'];\n break;\n case 'Administrador':\n $_SESSION['NOMBRES_APELLIDO_USUARIO'] = 'Administrador';\n $_SESSION['CARGO_USUARIO'] = 'Administrador';\n $_SESSION['TIPO_CONTRATO'] = 'Laboral Administrativo';\n\n $_SESSION['NOMBRES_USUARIO'] = 'Administrador';\n $_SESSION['APELLIDOS_USUARIO'] = 'Administrador';\n $_SESSION['CEDULA_USUARIO'] = '10297849';\n $_SESSION['ID_EMPLEADO'] = '12';\n $_SESSION['ID_CAJA_MAYOR_FNZAS'] = 2;\n $idEmpleado = 12;\n break;\n default:\n break;\n }\n\n //******************************************************************\n // VARIABLES DE SESSION PARA EL ACCESO AL MODULO RECAUDOS Y FACTURACION DE swDobleclick\n\n $_SESSION['user_name'] = $_SESSION['NOMBRES_APELLIDO_USUARIO'];\n $_SESSION['user_charge'] = $_SESSION['CARGO_USUARIO'];\n\n $_SESSION['user_id'] = 0; //$this->getIdUsuarioOLD($idEmpleado);\n $_SESSION['user_privilege'] = 0; //$this->getPrivilegioUsuarioOLD($idEmpleado);\n\n //******************************************************************\n\n $fechaHora = date('Y-m-d H:i:s');\n $idUsuario = $_SESSION['ID_USUARIO'];\n $consultas = array();\n $consultas[] = \"UPDATE usuario \n SET fechaHoraUltIN = '$fechaHora' \n WHERE idUsuario = $idUsuario\";\n $this->ejecutarTransaccion($consultas);\n return true;\n } else {\n return false;\n }\n }", "static public function ctrLoginUser(){ \n\t\t\tif(isset($_POST[\"ingUser\"])){\n\t\t\t\t//Intento de Logeo\n\t\t\t\tif((preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingUser\"]))\n\t\t\t\t && (preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingPassword\"]))){\n\t\t\t\t\t\t$tabla = \"usuarios\";\t//Nombre de la Tabla\n\n\t\t\t\t\t\t$item = \"usuario\";\t\t//Columna a Verficar\n\t\t\t\t\t\t$valor = $_POST[\"ingUser\"];\n\n\t\t\t\t\t\t//Encriptar contraseña\n\t\t\t\t\t\t$crPassword = crypt($_POST[\"ingPassword\"], '$2a$08$abb55asfrga85df8g42g8fDDAS58olf973adfacmY28n05$');\n\n\t\t\t\t\t\t$respuesta = ModelUsers::mdlMostrarUsuarios($tabla, $item, $valor);\n\n\t\t\t\t\t\tif($respuesta[\"usuario\"] == $_POST[\"ingUser\"]\n\t\t\t\t\t\t\t&& $respuesta[\"password\"] == $crPassword){\n\t\t\t\t\t\t\t\tif($respuesta[\"estado\"] == '1'){\n\t\t\t\t\t\t\t\t\t//Coincide \n\t\t\t\t\t\t\t\t\t$_SESSION[\"login\"] = true;\n\t\t\t\t\t\t\t\t\t//Creamos variables de Sesion\n\t\t\t\t\t\t\t\t\t$_SESSION[\"user\"] = $respuesta;\n\t\t\t\t\t\t\t\t\t//Capturar Fecha y Hora de Login\n\t\t\t\t\t\t\t\t\tdate_default_timezone_set('America/Mexico_City');\n\t\t\t\t\t\t\t\t\t$fechaActual = date('Y-m-d H:i:s');\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t$item1 = \"ultimo_login\";\n\t\t\t\t\t\t\t\t\t$valor1 = $fechaActual;\n\t\t\t\t\t\t\t\t\t$item2 = \"id_usuario\";\n\t\t\t\t\t\t\t\t\t$valor2 = $respuesta[\"id_usuario\"];\n\n\t\t\t\t\t\t\t\t\t$ultimoLogin = ModelUsers::mdlActualizarUsuario($tabla, $item1, $valor1, $item2, $valor2);\n\n\t\t\t\t\t\t\t\t\tif($ultimoLogin)\t//Redireccionando\n\t\t\t\t\t\t\t\t\t\techo '<script>location.reload(true);</script>';\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\techo '<br><div class=\"alert alert-danger\">El usuario no esta activado</div>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\techo '<br><div class=\"alert alert-danger\">Error al ingresar, vuelve a intentarlo</div>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t}", "public function singkronisasi_login(){\n $url = env(\"KLOLA_BASE_URL\").\"/api/auth/login\";\n $header = array();\n $param_body = [\n \"email\"=> env(\"KLOLA_LOGIN_USER\"),\n \"password\"=> env(\"KLOLA_LOGIN_PASSWORD\")\n ];\n $result_curl = Utils::curl_post($url, $header, $param_body);\n\n if($result_curl[\"code\"] == 200) {\n $deSerialise = json_decode($result_curl[\"result\"], true);\n if(array_key_exists(\"access_token\", $deSerialise)) {\n Session::set(\"klola_access_token\", $deSerialise[\"access_token\"]);\n }\n\n return [\n \"status\" => true,\n \"result\" => $deSerialise\n ];\n }\n\n return [\n \"status\" => false\n ];\n }", "public function login(){\n if (!isset($_GET['response']) && $_SERVER['REQUEST_METHOD'] === 'POST') {\n $email = $_POST[\"email\"];\n $password = trim($_POST[\"password\"]);\n }\n //if data comes from loginFrom, it is in requests body\n else if (isset($_GET['response'])) {\n $json_str = file_get_contents('php://input');\n $requestBody = json_decode($json_str, true);\n $email = $requestBody[\"email\"];\n $password = trim($requestBody[\"password\"]);\n }\n $msg = \"\";\n if(isset($email)){\n $realPassword = UserDao::getPassByEmail($email);\n if($realPassword == null){\n $msg .= \"Невалиден email\";\n $this->triggerError($msg, 'login.tpl');\n }\n else{\n if(password_verify($password, $realPassword)) {\n $user = UserDao::getByEmail($email);\n $_SESSION[\"user\"]= $user;\n //if request comes from loginForm we must return that login is successful\n if (isset($_GET['response']) && $_GET['response']==\"json\") {\n $response = array();\n $response[\"success\"]= \"true\";\n echo json_encode($response);\n die();\n }\n if($user->getIsAdmin() != null){\n $_SESSION[\"user\"]= $user;\n include_once URI . \"view/adminPanel.php\";\n }\n else {\n header(\"Location: \".BASE_PATH);\n }\n }\n else {\n if (isset($_GET['response']) && $_GET['response']==\"json\") {\n $response = array();\n $response[\"success\"]= \"false\";\n echo json_encode($response);\n die();\n }\n $msg .= \"Грешен email или парола\";\n $this->triggerError($msg, 'login.tpl');\n }\n }\n }\n else {\n $GLOBALS[\"smarty\"]->assign('msg', $msg);\n $GLOBALS[\"smarty\"]->assign('isLoggedIn', isset($_SESSION[\"user\"]));\n $GLOBALS[\"smarty\"]->display('login.tpl');\n }\n }", "private function user_login() {\n\t\t\t// Cross validation if the request method is POST else it will return \"Not Acceptable\" status\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\tif(!isset($_POST['password']) && !isset($_POST['email'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter email and password is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tif(!isset($_POST['email'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter email is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tif(!isset($_POST['password'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter password is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\t$email = $this->_request['email'];\n\t\t\t$password = $this->_request['password'];\n\t\t\t$hashed_password = sha1($password);\n\t\t\t\t\t\t\t\t\t\t// Input validations\n\t\t\tif(!empty($email) and !empty($password)) {\n\t\t\t\tif(filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t\t\t\t$sql = \"SELECT user_name, user_email, user_phone_no, user_pic, user_address, remember_token\n\t\t\t\t\t\t\t\t\tFROM table_user\n\t\t\t\t\t\t\t\t\tWHERE user_email = '$email'\n\t\t\t\t\t\t\t\t\tAND user_password = '\".$hashed_password.\"'\n\t\t\t\t\t\t\t\t\tLIMIT 1\";\n\t\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t\t$stmt->execute();\n\t\t\t\t $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n if($stmt->rowCount()=='0') {\n $error = array('status' => \"Failed\", \"msg\" => \"Invalid Email address or Password\");\n $this->response($this->json($error), 200);\n }\n\t\t\t\t\t\t$error = array('status' => \"Success\", \"msg\" => \"Sucessfully Login!\", \"data\" => json_encode($results) );\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Fields are required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\t// If invalid inputs \"Bad Request\" status message and reason\n\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Invalid Email address or Password\");\n\t\t\t$this->response($this->json($error), 200);\n\t\t}", "public function usersLogin() {\n // login uses its own handle\n $httpLogin = $this->_prepareLoginRequest();\n $url = $this->_appendApiKey($this->uriBase . '/users/login.json');\n $data = array('login' => $this->username, 'password' => $this->password);\n return $this->_processRequest($httpLogin, $url, 'post', $data);\n }", "private function getLoginInfos()\r\n\t\t{\t\r\n\t\t\t$request = \"SELECT * FROM `bpcms_users` WHERE Username='\".$this->logInfos['username'].\"'\";\r\n\t\t\t$request = mysql_query($request);\r\n\t\t\t$result = mysql_fetch_assoc($request);\r\n\t\t\t\r\n\t\t\treturn $result;\r\n\t\t}", "public function login($datos)\n {\n $stmt = Conexion::conectar()->prepare('SELECT *from usuarios WHERE nombre_usuario=:correo && password=:contrasena');\n $stmt->bindParam(\":correo\", $datos[\"correo\"] , PDO::PARAM_STR);\n $stmt->bindParam(\":contrasena\", $datos[\"contrasena\"] , PDO::PARAM_STR);\n if($stmt->execute())\n {\n $respuesta = $stmt->rowCount();\n $resultado =$stmt->fetch();\n //Si el resultado returna mayor que uno es que si existe el usuario asi que inicia la sesion\n if($resultado[\"count(*)\"]>0)\n {\n return \"Datos no validos\";\n }else\n {\n session_start();\n $_SESSION[\"correo\"]=$resultado[\"correo\"];\n $_SESSION[\"nombre\"]=$resultado[\"nombre\"];\n return \"Correcto\";\n }\n\n \n }else\n {\n return \"error\";\n }\n }", "function login(){\n\t\t$this->init(new User());\n\n\t\tif(isset($_POST['login_user'])){\n\t\t\t$this->record = array();\n\n\t\t\t// $row = $this->model->get_by_property(array('username'=>$_POST['email']));\n\t\t\t$record = Model::get_sql_data(\"select u.*,df.value as date_format_primary,df2.value date_format_short,\n\t\t\t d.value as first_day_week,l.locale as 'locale', l.value as 'language' from `user` u \n\t\t\tinner join user_settings us on (us.user_id=u.id)\n\t\t\tinner join `date_format` df on (df.id=us.date_format_id)\n\t\t\tinner join `date_format` df2 on (df2.id=us.date_format_short_id)\n\t\t\tinner join `day` d on (us.first_day_week_id=d.id)\n\t\t\tinner join `language` l on (l.id=us.language_id)\n\t\t\twhere u.username=? or u.mail=?\", array('username'=>$_POST['email'],'mail'=>$_POST['email']) , false);\n\n\t\t\t$row = empty($record)? $this->model->get_by_property(array('username'=>$_POST['email'])):$record;\n\n\t\t\tif(!$row){\n\t\t\t\t$row = $this->model->get_by_property(array('mail'=>$_POST['email']));\n\t\t\t}\n\n\t\t\tif(isset($row) && isset($row['id'])){\n\t\t\t\tif($row['password'] == $_POST['password']){\n\t\t\t\t\tSession::set_user_session_data($row);\n\t\t\t\t\theader('location: '.CoreUtils::base_url().'index/index');\n\t\t\t\t}else{\n\t\t\t\t\t$this->record['error_message']='error_msg_password';\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->record['error_message']='error_msg_email';\n\t\t\t}\n\t\t}else{\n\t\t\tSession::unset_user_session_data();\n\t\t}\n\t\t$this->render(\"login\");\t\n\t}", "public function loginPost()\n {\n if ($_SERVER['REQUEST_METHOD'] === \"POST\") {\n if (!empty($_POST['email']) && !empty($_POST['password'])) {\n $email = $this->secureHTML($_POST['email']);\n $password = $this->secureHTML($_POST['password']);\n\n if ($this->usersManager->getByUserFromEmail($email)) {\n $user = $this->usersManager->getByUserFromEmail($email);\n if (password_verify($password, $user['password'])) {\n $_SESSION[\"profil\"] = [\n \"id\" => $user['id'],\n \"firstname\" => $user['firstname'],\n \"lastname\" => $user['lastname'],\n \"email\" => $user['email'],\n \"role\" => $user['role']\n ];\n $_SESSION[\"auth\"] = true;\n $this->addFlash(\"success\", \"Bon retour parmis nous :)\");\n $this->redirectReponse(\"profile\");\n } else {\n $this->addFlash(\"danger\", \"Votre email ou votre mot de passe est incorrect\");\n $this->redirectReponse(\"login\");\n }\n } else {\n $this->addFlash(\"danger\", \"Votre email ou votre mot de passe est incorrect\");\n $this->redirectReponse(\"login\");\n }\n } else {\n $this->addFlash(\"danger\", \"Veuillez compléter tous les champs...\");\n $this->redirectReponse(\"login\");\n }\n }\n }", "public function loginValidated()\n\t\t{\n\t\t\t$campos = array('*');\n\t\t\t\n\t\t\t$pw = $this->_objCrypt->encrypt($this->_password);\n\n\t\t\t# Campos que se incluyen en la validacion WHERE DE LA SQL\n\t\t\t$field['userName'] = $this->_userName;\n\t\t\t$register = Usuario::findCustom($campos, $field);\n\n\t\t\t# Validación nombre usuario en BD\n\t\t\tif (empty($register)) {\n\t\t\t\t$json_error = array('success' => 'error', 'error' => 'error1');\n\t\t\t\t$success = json_encode($json_error);\n\t\t\t\tsetcookie(\"success\", $success, time() + 60, \"/\"); \n\t\t\t\theader('location:../views/users/login.php');\n\t\t\t}else{\n\t\t\t\t# pw que se obtiene de BD\n\t\t\t\t$pw_DB = $register[0]->getPassword();\n\n\t\t\t\t# Validacion coincidencia de contraseñas\n\t\t\t\tif ($pw !== $pw_DB) {\n\t\t\t\t\t$json_error = array('success' => 'error', 'error' => 'error2');\n\t\t\t\t\t$success = json_encode($json_error);\n\t\t\t\t\tsetcookie(\"success\", $success, time() + 60, \"/\"); \n\t\t\t\t\theader('location:../views/users/login.php');\n\t\t\t\t}else{\n\t\t\t\t\t$data_session['id_user'] \t= $register[0]->getId();\t\t\t\t\t\n\t\t\t\t\t$data_session['nombre'] \t= $register[0]->getNombre();\t\t\t\n\t\t\t\t\t$data_session['apellido'] \t\t= $register[0]->getApellido();\t\t\t\n\t\t\t\t\t$data_session['tipoUsuario']\t= $register[0]->getTipoUsuario();\t\t\t\n\t\t\t\t\t$data_session['userName'] \t\t= $register[0]->getUserName();\t\t\t\n\t\t\t\t\t$data_session['email'] \t\t = $register[0]->getEmail();\t\t\t\n\t\t\t\t\t$data_session['telFijo'] \t\t= $register[0]->getTelFijo();\t\t\t\n\t\t\t\t\t$data_session['telMovil'] \t\t= $register[0]->getTelMovil();\t\t\t\n\t\t\t\t\t$data_session['estado'] \t\t= $register[0]->getEstado();\n\t\t\t\t\t$data_session['lan']\t\t\t= $_COOKIE['lan'];\n\t\t\t\t\t\n\t\t\t\t\t$obj_Session = new Simple_sessions();\n\t\t\t\t\t$obj_Session->add_sess($data_session);\n\n\t\t\t\t\theader('location:../views/users/crearUsuario.php');\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function login()\n {\n \t \t$data = file_get_contents('php://input');\n \t\t$this->logservice->log($this->module_name, \"DEBUG\",\"EVENT\",$this->IP,\"$data \");\n\t\t$busData = json_decode($data ,true);\n\t\t//查找该用户名与密码\n\t\t$criteria = array();\n\t\t$criteria[\"and\"] = array(\"Name\" => $busData[\"name\"],\"Password\" => $busData[\"password\"]);\n\t\t$userDat = $this->User->read($criteria);\n\t\tif (!empty($userDat)) {\n\t\t\t\t\n\t\t\t//更新用户的状态\n\t\t\t$data_in = array('Status' => 1);\n \t\t$upd_criteria['and'] = array('User_Id' => $userDat[0]['User_Id']);\n \t\t$result = $this->User->update($data_in, $upd_criteria);\n\t \tif($result !== false)\n\t \t{\n\t\t\t\t$rspData[\"userID\"] =$userDat[0][\"User_Id\"];\n\t\t\t\t$rspData[\"state\"] = \"OK\";\n\t\t\t\t$rspData[\"erroInfo\"] = \"登陆成功ID为\".$userDat[0][\"User_Id\"];\n\n\t\t\t\t$rspInfo = json_encode($rspData);\n\t\t\t\techo $rspInfo;\n\t\t }\n\n\t\t}\n }", "public function loginUser($user,$pwd){\n \n $pwdCr = mkpwd($pwd);\n \n \n \n $sql = new Sql();\n $userData = $sql->select('SELECT * FROM usuarios \n WHERE email_usuario = :email_usuario\n AND pwd_usuario = :pwd_usuario',array(':email_usuario'=>$user,':pwd_usuario'=>$pwdCr));\n \n if(!isSet($userData) || count($userData)==0){//CASO NADA RETORNADO\n return false;\n }elseif(count($userData)>0){//CASO DADOS RETORNADOS CONFERE O STATUS\n \n if($userData[0]['status_usuario']==0){\n \n return 0;//caso INATIVO entao retorna ZERO indicando cadastro NAO ATIVO\n \n }elseif($userData[0]['status_usuario']==1){//CASO USUARIO ATIVO GERA SESSION DO LOGIN\n \n \n //permissao do cliente\n $_SESSION['_uL'] = encode($userData[0]['permissao_usuario']);\n $_SESSION['logado'] = 'sim';\n \n //dados do usuario\n $_SESSION['_iU'] = encode($userData[0]['id_usuario']);\n $_SESSION['_iE'] = encode($userData[0]['id_empresa']);\n $_SESSION['_nU'] = encode($userData[0]['nome_usuario'] . ' ' . $userData[0]['sobrenome_usuario']);\n $_SESSION['_eU'] = encode($userData[0]['email_usuario']);\n \n return 1;\n }\n \n }\n \n \n }", "public function loginTraitement(){\n\n $identifiant = $this->verifierSaisie(\"identifiant\");\n $password = $this->verifierSaisie(\"password\");\n\n //securite\n if (($identifiant != \"\") && ($password != \"\")){\n\n //on crée un objet de la classe \\W\\Security\\AuthentificationModel\n //ce qui nous permet d'utiliser la methode isValidLoginInfo\n $objetAuthentificationModel = new \\W\\Security\\AuthentificationModel;\n\n $idUser = $objetAuthentificationModel->isValidLoginInfo($identifiant, $password);\n\n if($idUser > 0){\n\n // recuperer les infos de l'utilisateur\n //requete base de donnée pour les recuperer\n //je crée un objet de la classe \\W\\Model\\UsersModel\n $objetUsersModel = new \\W\\Model\\UsersModel;\n // je retrouve les infos de la ligne grace à la colonne ID\n // La classe UsersModel herite de la classe Model je peu donc faire un find pour recupeerr les infos\n $tabUser = $objetUsersModel->find($idUser);\n\n // Je vais ajouter des infos dans la session\n $objetAuthentificationModel->logUserIn($tabUser);\n\n // recuperer l'username\n $username = $tabUser[\"username\"];\n\n\n $GLOBALS[\"loginRetour\"] = \"Bienvenue $username\";\n\n $this->redirectToRoute(\"admin_accueil\");\n }\n else{\n $GLOBALS[\"loginRetour\"] = \"Identifiant incorrects \";\n }\n }else{\n\n $GLOBALS[\"loginRetour\"] = \"Identifiant incorrects \";\n }\n }", "public function postLogin() //Debo tener también para post porque es el método del formulario y aquí es donde se llenará y enviará.\n {\n \n global $pdo;\n\n $errors = [];\n\n $validator = new Validator();\n $validator->add('name', 'required');\n $validator->add('password', 'required');\n\n if ($validator->validate($_POST)) { //Para verificar que cumpla con las validaciones.\n $sql = 'SELECT * FROM users WHERE name = :name';\n $query = $pdo->prepare($sql);\n $query->execute(['name' => $_POST['name']]);\n\n $user = $query->fetch(PDO::FETCH_OBJ); //Para convertir la consulta en un objeto con nombres de propiedades que se corresponden a los nombres de las columnas.\n if ($user) { //Si existe el usuario\n if (password_verify($_POST['password'], $user->password)) { //Si la contraseña es correcta. El password_verify() es para descifrar la contraseña ingresada con el método password_hash() de encriptación usado.\n $_SESSION['userID'] = $user->id; //Guardo el id del usuario en una variable de sesión para poder identificar si hay una sesión iniciada, además así la puedo usar en el RolController.\n header('Location:' . BASE_URL . 'rol'); //Redireccionar a la ruta para identificar el tipo de rol del usuario.\n return null;\n }\n }\n\n $validator->addMessage('name', 'Nombre de usuario y/o contraseña incorrectos.'); //Si no se encuentra el usuario, se deja la duda en el mensaje de si estuvo mal la contraseña o el nombre para mayor seguridad.\n }\n\n $errors = $validator->getMessages();\n\n //Vista a la que se quiere acceder\n return render('../views/login.php', ['errors' => $errors]);\n }", "public function login()\n {\n\t if( !isset( $_POST[\"username\"] ) || preg_match( '/[a-zA-Z]{1, 20}/', $_POST[\"username\"] ) )\n {\n $x = new UsersController;\n $x->index();\n }\n\n // Možda se ne šalje password; u njemu smije biti bilo što.\n if( !isset( $_POST[\"password\"] ) )\n {\n $x = new UsersController;\n $x->index();\n }\n \n $provjera = new ChatService;\n $row = $provjera->loginUser();\n\n if( $row === false )\n {\n // Taj user ne postoji, ili nije registriran upit u bazu nije vratio ništa.\n $x = new UsersController;\n $x->index();\n return;\n }\n else\n {\n\n // Postoji user. Dohvati hash njegovog passworda.\n $hash = $row['password_hash'];\n\n // Da li je password dobar?\n if( password_verify( $_POST['password'], $hash ) )\n {\n // Dobar je. Ulogiraj ga.\n $y = new ChatService;\n $_SESSION['id_user'] = $y->getUserId($_POST['username']);\n\n $x = new ChannelsController;\n $x->naslovna();\n \n return;\n }\n else\n {\n // Nije dobar. Crtaj opet login formu s pripadnom porukom.\n $x = new UsersController;\n $x->index();\n return;\n }\n }\n }", "public function login(Request $request)\n {\n // return response()->json($request);\n $logi = DB::table('login')->where('correo',$request->email)->get();\n //empty\n // return response()->json($logi);\n if ($logi=='[]') {\n return response()->json([\"RES\"=>false]);\n }else{\n // return $logi[0]->pass;\n if($request->pass == $logi[0]->contraseña){\n return response()->json([\"RES\"=>[\n 'id' => $logi[0]->cedula, \n 'nombres'=> $logi[0]->nombres,\n 'email'=> $logi[0]->correo,\n 'direccion'=> $logi[0]->direccion,\n 'telefono'=> $logi[0]->telefono,\n 'password'=> $logi[0]->contraseña,\n \n ]\n ]); \n } else {\n return response()->json([\"RES\"=>false]);\n }\n \n }\n }", "public function autualizar_dados_login()\n {\n \ttry {\n \t\t \n \t\t$con = FabricaDeConexao::conexao();\n \t\t \n \t\t$sqlquery = 'update usuario set usuario = :usuario,senha=md5(:senha),email = :email where id = :id; ';\n \t\t$stmt->$con-> prepare($sqlquery);\n \t\t$stmt->bindValue(':usuario',$dados->usuario);\n \t\t$stmt->bindValue(':senha',$dados->senha);\n \t\t$stmt->bindValue(':email',$dados->email);\n \t\t$stmt->bindValue(':id',$dados->id);\n \t\t\n \t\t$stmt->execute();\n \t\t$rowaf = $stmt->rowCount();\n \t\treturn $rowaf;\n \t}\n \tcatch (PDOException $ex)\n \t{\n \t\techo \"Erro: \".$ex->getMessage();\n \t}\n }", "public function authentification(){\n $mail = $_POST['email'];\n $password = $_POST['password'];\n\n $checkPass = $this->checkPassword($mail, $password);\n\n //check if email and password are corrects\n if ($checkPass){\n require_once 'ressources/modele/ModelLogin.php';\n $modelLogin = new ModelLogin();\n $user_check = $modelLogin->getUserByEmail($mail);\n\n\n while($row = $user_check->fetch()) {\n // redirect to layout with her Identifiant and Level and check if an user's birthday\n //Create SESSION\n\n $_SESSION['User_ID'] = $row['Id'];\n\n $_SESSION['Level'] = $row['Level'];\n\n $_SESSION['Last_name'] = $row['Last_name'];\n\n $_SESSION['First_name'] = $row['First_name'];\n\n }\n\n header('Location: /');\n exit();\n\n } else {\n header('Location: /login');\n exit();\n }\n }", "function loginUser($da){\r\n\t\t\tglobal $PDO;\r\n\t\t\t$req = $PDO->prepare(\"SELECT users.id, users.login, users.roleid, users.firstlogin, employes.lastname, employes.firstname, employes.photo, employes.sex , employes.phone, employes.email, employes.position, employes.adresse, employes.extension FROM users LEFT JOIN employes ON users.id = employes.iduser\r\n\t\t\t\tWHERE users.login=:connectname AND users.password=:connectpass AND users.status=1 LIMIT 1\");\r\n\r\n\t\t\t\ttry{\r\n\t\t\t\t\t$req->execute($da);\r\n\t\t\t\t\t$data = $req->fetchAll();\r\n\t\t\t\t\tif(count($data)>0){\r\n\r\n\t\t\t\t\t\t$req = $PDO->prepare(\"SELECT roles.id, roles.name, roles.level FROM roles WHERE id = \".$data[0]->roleid);\r\n\t\t\t\t\t\t$req->execute();\r\n\t\t\t\t\t\t$temp = $req->fetchAll();\r\n\r\n\t\t\t\t\t\t$_SESSION['Auth'] = $data[0];\r\n\t\t\t\t\t\t$_SESSION['Auth']->name=$temp[0]->name;\r\n\t\t\t\t\t\t$_SESSION['Auth']->level=$temp[0]->level;\r\n\t\t\t\t\t\t$_SESSION['Auth']->timeout = date(\"H:i:s\");\r\n\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcatch (PDOException $e){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t}", "public function loginTrainer(){\r\n\t\t\t$objDBConn = DBManager::getInstance();\t\r\n\t\t\tif($objDBConn->dbConnect()){\r\n\t\t\t\t$result = mysql_query(\"SELECT * from trainer where username='\".$_REQUEST[\"username\"].\"' and password='\".$_REQUEST[\"pass\"].\"'\");\r\n\t\t\t\t$row = mysql_fetch_array($result);\r\n\t\t\t\tif($row == false){\r\n\t\t\t\t\t//echo \"No records\";\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$_SESSION['trainer'] = $row;\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//echo 'Something went wrong ! ';\r\n\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public function loginData()\n {\n return ([\n [3, \"12345678\", 302, \"admin\"]\n ]);\n }", "public function access()\n\t{\n\t\t// validamos que sea una peticion por post\n\t\t$this->__post();\n\t\t// validamos que existan los campos\n\t\t$errors = $this->validate( $_POST, [\n\t\t\t'username|usuario' => 'required',\n\t\t\t'password|contraseña' => 'required',\n\t\t] );\n\n\t\tif( $errors )\n\t\t{\n\t\t\techo $this->errors();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// enviamos peticion al modelo para que inicie la sesion\n\t\t$login = $this->auth->login( $_POST['username'], $_POST['password'] );\n\t\t// explotamos el resultado\n\t\t$login = explode(\"|\", $login);\n\t\t// validamos si se logueo o no\n\t\tif( $login[0] != 'logueado' )\n\t\t{\n\t\t\t// agregamos a las variables de error la respuesta del servidor\n\t\t\tarray_push($this->errors, $login[0]);\n\t\t\t// agregamos los errores obtenidos desde la peticion hecha al model\n\t\t\techo $this->errors();\n\t\t\treturn;\n\t\t}\n\t\t// retornamos a la vista de acceso cuando se satisfatorio el logueo\n\t\techo \"true|\".$login[1];\n\t}", "private static function login() {\n if ( !self::validatePost() ) {\n return;\n }\n $_POST['email'] = strtolower($_POST['email']);\n \n $password = Helper::hash($_POST['password'].$_POST['email']);\n \n $result = Database::getUser($_POST['email'],$password);\n \n if ( $result === false || !is_array($result) ) {\n self::setError('Unbekannter Benutzername oder Passwort!<br>');\n return;\n }\n \n if ( count($result) != 1 ) {\n self::setError('Unbekannter Benutzername oder Passwort!<br>');\n return;\n }\n \n $_SESSION['user']['id'] = $result[0]['id'];\n $_SESSION['user']['email'] = $result[0]['email'];\n $_SESSION['user']['nickname'] = $result[0]['nickname'];\n $_SESSION['user']['verified'] = $result[0]['verified'];\n $_SESSION['user']['moderator'] = $result[0]['moderator'];\n $_SESSION['user']['supermoderator'] = $result[0]['supermoderator'];\n $_SESSION['loggedin'] = true;\n self::$loggedin = true;\n }", "public function postLogin()\n {\n $data = [\n 'username' => Input::get('username'),\n 'password' => Input::get('password')\n ];\n \n if (Auth::attempt($data)) // Como segundo parámetro pasámos el checkbox para sabes si queremos recordar la contraseña\n {\n // Si nuestros datos son correctos mostramos la página de inicio\n return Redirect::intended('/cbtis');\n }\n // En caso de que la autenticación haya fallado manda un mensaje al formulario de login y también regresamos los valores enviados con withInput().\n return Redirect::to('/')\n ->with('mensaje_error', 'Tus datos son incorrectos')\n ->withInput();\n }", "public function login(){\n\n if(isset($_POST)){\n \n /* identificar al usuario */\n /* consulta a la base de datos */\n $usuario = new Usuario();\n \n $usuario->setEmail($_POST[\"email\"]);\n $usuario->setPassword($_POST[\"password\"]);\n \n $identity = $usuario->login();\n \n\n if($identity && is_object($identity)){\n \n $_SESSION[\"identity\"]= $identity;\n\n if($identity->rol == \"admin\"){\n var_dump($identity->rol);\n\n $_SESSION[\"admin\"] = true;\n }\n }else{\n $_SESSION[\"error_login\"] = \"identificacion fallida\";\n }\n\n\n /* crear una sesion */\n \n }\n /* redireccion */\n header(\"Location:\".base_url);\n\n }", "private function telaRecuperaSenha() {\n //self::getObjSmarty()->assign(\"POST_LOGIN\",\"?c=\".self::getObjCrypt()->cryptData(\"Login\"));\n //$this->getObjJs()->addJs(FWK_JS.\"validaLogin.js\");\n try {\n //self::getObjHttp()->escreEm(\"RODAPE_LOGIN_ADMIN\",self::getRodapeRecuperaSenha());\n self::getObjHttp()->escreEm(\"CORPO\", self::getTplRecuperaSenha());\n } catch (HtmlException $e) {\n die(\"ViewAdminPage()->telaLogin(): \" . self::getTplRecuperaSenha() . $e->__toString());\n }\n }", "public function usuario_post() {\n $respuesta = $this->Account_model->selectUsuario($this->post('usuario'), $this->post('contraseña'));\n if(!$respuesta) {\n $this->response('', 204);\n } else {\n $this->response($respuesta, 200);\n }\n }", "private function sessionLogin() {\r\n $this->uid = $this->sess->getUid();\r\n $this->email = $this->sess->getEmail();\r\n $this->fname = $this->sess->getFname();\r\n $this->lname = $this->sess->getLname();\r\n $this->isadmin = $this->sess->isAdmin();\r\n }", "private function loginWithPostData() {\n \n $this->user_name = $this->connection->real_escape_string($_POST['user_name']); \n $checklogin = $this->connection->query(\"SELECT user_name, user_email, user_password_hash FROM users WHERE user_name = '\".$this->user_name.\"';\");\n \n if($checklogin->num_rows == 1) {\n \n $result_row = $checklogin->fetch_object();\n \n if (crypt($_POST['user_password'], $result_row->user_password_hash) == $result_row->user_password_hash) {\n \n /**\n * write user data into PHP SESSION [a file on your server]\n */\n $_SESSION['user_name'] = $result_row->user_name;\n $_SESSION['user_email'] = $result_row->user_email;\n $_SESSION['user_logged_in'] = 1;\n $_SESSION['user_name'] = $result_row->user_name;\n \n\t\t\t\t\t// session security\n $_SESSION['agent'] = $_SERVER['HTTP_USER_AGENT'] ;\n\t\t\t\t\t$_SESSION['ip'] = $_SERVER['REMOTE_ADDR'];\n\t\t\t\t\t$_SESSION['count'] = 0; \n\t\t\t\t\t\t\t\t\t\t \n /**\n * write user data into COOKIE [a file in user's browser]\n */\n setcookie(\"user_name\", $result_row->user_name, time() + (3600*24*100));\n setcookie(\"user_email\", $result_row->user_email, time() + (3600*24*100));\n $this->user_is_logged_in = true;\n return true; \n \n } else {\n $this->errors[] = \"Wrong password or username. Try again.\";\n $this->login_delay();\n return false; \n } \n \n } else {\n $this->errors[] = \"Wrong password or username. Try again.\";\n $this->login_delay();\n return false;\n } \n }", "public function login2(){\n $row = $this->_usuarios->getUsuario1(\n $this->getAlphaNum('usuario2'),\n $this->getSql('pass2')\n );\n \n // si no existe la fila.\n if(!$row){\n echo \"Nombre y/o contraseña incorrectos\";\n exit;\n }\n \n //Inicia session y define las variables de session \n Session::set('autenticado', true);\n Session::set('usuario', $row['usuario']);\n Session::set('id_role', $row['role']);\n Session::set('nombre', $row['nombre']);\n Session::set('ape_pat', $row['ape_pat']);\n Session::set('ape_mat', $row['ape_mat']);\n Session::set('clave_cetpro', $row['cetpro']);\n Session::set('id_usuario', $row['id']);\n Session::set('admin', $this->_usuarios->checkAdmin());\n Session::set('tiempo', time());\n \n echo \"ok\";\n }", "public function loginUsers($data) {\n try {\n $sql = \"SELECT usua_cedula, usua_contrasena FROM usuario WHERE usua_cedula = ?\";\n $query = $this->pdo->prepare($sql);\n $valid = $query->execute(array($data[0]));\n $valid= $query->fetch();\n\n if (password_verify($data[1], $valid[1])) { // Condicional para validar contrasena si es igual\n $sql1 = \"SELECT u.usua_id, CONCAT(UPPER(LEFT(u.usua_nombre1, 1)), LOWER(SUBSTRING(u.usua_nombre1,2))) AS usua_nombre1, u.usua_nombre2, CONCAT(UPPER(LEFT(u.usua_apellido1, 1)), LOWER(SUBSTRING(u.usua_apellido1,2))) AS usua_apellido1, u.usua_apellido2, u.usua_cedula, u.carg_id,\n u.usua_contrasena, u.clien_id, u.usua_estado, u.usua_modifica, u.usua_ingreso, u.sed_id, u.area_id\n FROM usuario AS u\n WHERE usua_cedula = ? \";\n $query = $this->pdo->prepare($sql1);\n $const= $query->execute(array($data[0]));\n $const= $query->fetch();\n\n if ($const[9] === \"1\" && $const[11] === \"1\") {\n session_start(); // Variables para iniciar session\n $_SESSION[\"validar\"] = true;\n $_SESSION[\"nombre\"] = $const[1];\n $_SESSION[\"apellido\"] = $const[3];\n $_SESSION[\"idusuario\"] = $const[0];\n $_SESSION[\"cargo\"] = $const[6];\n $_SESSION[\"idcliente\"] = $const[8];\n $_SESSION[\"sede\"] = $const[12];\n return true;\n }else if ($const[11] === \"0\" && $const[9] === \"1\"){\n session_start(); // Variables para iniciar session\n $_SESSION[\"cedula\"] = $const[5];\n return \"successpassword\";\n }\n }else {\n return \"authentication\";\n }\n\n } catch (Exception $e) {\n die($e->getMessage());\n }\n\n }", "public function login(){\n\t\t\tValidator::validateOrRedirect($_POST,\n\t\t\t\t\t[\n\t\t\t\t\t\t\t\"required\" => [\"txt-input\", \"password\",\"action\"],\n\t\t\t\t\t\t\t\"email\" => \"txt-input\",\n\t\t\t\t\t],\n\t\t\t\t\t\"/login\");\n\t\t\t$this->resetMessage();\n\t $username=$_POST[\"txt-input\"];\n\t $password=$_POST[\"password\"];\n\t $action=$_POST[\"action\"];\n\t\t\t$userList =[];\n\t\t\t$column_value=array('email'=>$username,'password'=>$password);\n\t\t\t$uss=new User();\n\t\t\t$login=$uss->getBy($column_value);\n\t\t\tif (is_array($login)) {\n\t\t\t\tif (count($login)>0) {\n\t\t\t\t\tforeach ($login as $user)\n\t\t\t {\n\t\t\t\t\t\t$userList[]= array(\n\t\t\t 'user' =>$user['user_name'],\n\t\t\t 'email' =>$user['email'],\n\t\t\t 'password' =>$user['password']);\n\t\t\t\t\t}\n\n\t\t\t\t\t$user=$userList[0][\"email\"];\n\t\t $pass=$userList[0][\"password\"];\n\t\t Redirect::to(\"/products\")->with([\n\t\t 'name'=>$userList[0][\"email\"],\n\t\t 'check'=>\"true\",\n\t\t ])->do();\n\t\t\t\t}\n\t\t\t\telse{\n\n\t\t\t\t\tRedirect::to(\"/login\")->with([\n\t\t \"message\" => \"Ha ocurrido un error: usuario o contraseña incorrectos.</br> Revise por favor\",\n\t\t \"type\" => \"danger\",\n\t\t ])\n\t\t ->do();\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse{\n\n\t\t\t\tRedirect::to(\"/login\")->with([\n\t \"message\" => $login,\n\t \"type\" => \"danger\",\n\t ])\n\t ->do();\n\t\t\t}\n\t }", "public function Login(){\n \t$usuarios=new UsuariosModel();\n \n \t//Conseguimos todos los usuarios\n \t$allusers=$usuarios->getLogin();\n \t \n \t//Cargamos la vista index y l e pasamos valores\n \t$this->view(\"Login\",array(\n \t\t\t\"allusers\"=>$allusers\n \t));\n }", "public function checkLogin(){\n $dbQuery = new DBQuery(\"\", \"\", \"\");\n $this->email = $dbQuery->clearSQLInjection($this->email);\n $this->senha = $dbQuery->clearSQLInjection($this->senha);\n \n // Verificar quantas linhas um Select por Email e Senha realiza \n $resultSet = $this->usuarioDAO->select(\" email='\".$this->email.\"' and senha='\".$this->senha.\"' \");\n $qtdLines = mysqli_num_rows($resultSet);\n \n // Pegar o idUsuario da 1ª linha retornada do banco\n $lines = mysqli_fetch_assoc($resultSet);\n $idUsuario = $lines[\"idUsuario\"];\n \n\n \n // retorna aonde a função foi chamada TRUE ou FALSE para se tem mais de 0 linhas\n if ( $qtdLines > 0 ){\n // Gravar o IdUsuario e o Email em uma Sessão\n session_start();\n $_SESSION[\"idUsuario\"] = $idUsuario;\n $_SESSION[\"email\"] = $this->email;\n return(true);\n }else{\n // Gravar o IdUsuario e o Email em uma Sessão\n session_start();\n unset($_SESSION[\"idUsuario\"]);\n unset($_SESSION[\"email\"]);\n return(false);\n }\n }", "public function login(){\n $query = \"SELECT * FROM users where username = '$this->username' && password = '$this->password' \";\n $pdo = new Connection();\n $pdo = $pdo->open();\n $results = $pdo->query($query);\n $rows = [];\n foreach($results->fetchAll() as $row){\n $rows[] = new User($row['username'], null, $row['id']);\n }\n return $rows;\n }", "function login() {\n if (isset($_POST[\"email\"]) && isset($_POST[\"password\"])) {\n\n // Put parameters into local variables\n $email = $_POST[\"email\"];\n $password = $_POST[\"password\"];\n\n if ($_POST[\"user\"] == 'landlord') {\n $stmt = $this->db->prepare('SELECT id FROM user_landlord WHERE email=? AND password=?');\n } \n else if ($_POST[\"user\"] == 'tenant') {\n $stmt = $this->db->prepare('SELECT id FROM user_tenant WHERE email=? AND password=?');\n }\n \n $stmt->bind_param(\"ss\", $email, $password);\n $stmt->execute();\n\t $stmt->bind_result($id);\n\t \t \n\t $i = 0;\n\t $id_array = array();\n\t while ($stmt->fetch()) {\n\t array_push($id_array, $id);\n \t}\n \t $stmt->close();\n \t \n \t if (count($id_array) == 1) {\n \t echo '{\"success\":1}';\n \t } else {\n \t echo '{\"success\":0, error_message\":\"Email and/or password is invalid.\"}';\n \t }\n }\n }", "function compruebaLoginUsuario($bd){\n //Hago un filtrado previo por si hay valores indeseables en el array\n $arrayFiltrado=array();\n foreach ($_POST as $k => $v)\n $arrayFiltrado[$k] = filtrado($v);\n\n //Utilizo los objetos DAO para añadir el usuario a la BD\n $daoUsuario = new Usuarios($bd);\n $usuario = new Usuario();\n $usuario->setPassword($arrayFiltrado[\"password\"]);\n $usuario->setUsuario($arrayFiltrado[\"usuario\"]);\n $resultado = $daoUsuario->compruebaCredenciales($usuario);\n //Compruebo si tengo usuario\n if($resultado!=false) {\n $usuario->setPassword(null);\n $usuario->setId($resultado[\"id\"]);\n $usuario->setImagen($resultado[\"imagen\"]);\n return $usuario;\n }\n else\n return false;\n}", "function login() {\n\n if(empty($this->data['btnSubmit']) == false)\n {\n // Here we validate the user by calling that method from the User model\n if(($user = $this->Usuario->validateLogin($this->data)) != false)\n {\n // Write some Session variables and redirect to our next page!\n $this->setMessage('success', \"Bienvenido a fletescr.com!\");\n\n $roles = $user['Rol'];\n $userRoles = array();\n\n foreach($roles as $rol){\n $userRoles[] = $rol['id'];\n }\n $this->Auth->login($user);\n $this->Session->write('roles', $userRoles);\n\n // Go to our first destination!\n $this->Redirect(array('controller' => 'transport', 'action' => 'index', 'success' => '1'));\n exit();\n }\n else\n {\n $this->setMessage('error', \"El usuario o clave ingresados son incorrectos.\");\n $this->Redirect(array('controller' => 'transport', 'action' => 'index'));\n exit();\n }\n }\n }", "public function login()\n {\n if ($this->UserManager_model->verifUser($_POST['user_id'], $_POST['user_password'])) {\n\n $arrUser = $this->UserManager_model->getUserByIdentifier($_POST['user_id']);\n $data = array();\n $objUser = new UserClass_model;\n $objUser->hydrate($arrUser);\n $data['objUser'] = $objUser;\n\n $user = array(\n 'user_id' => $objUser->getId(),\n 'user_pseudo' => $objUser->getPseudo(),\n 'user_img' => $objUser->getImg(),\n 'user_role' => $objUser->getRole(),\n );\n\n $this->session->set_userdata($user);\n redirect('/');\n } else {\n $this->signin(true);\n }\n }", "function login() {\n $params = $this->objService->get_request_params();\n $isSuccess = $this->objQuery->count('user','email= ? AND password = ?', array($params->email,$params->password));\n echo $isSuccess;\n }", "private function _loginUser($data) { \n try {\n $username = mb_strtolower($data->username);\n $password = $data->password;\n\n require_once 'DBAdmin_Model.php';\n $this->model = new DBAdmin_Model();\n\n $conf = realpath('config');\n if (!is_file($conf.'/config.json')) {\n throw new Exception('Datei config.json nicht gefunden!');\n }\n\n $config = json_decode(file_get_contents($conf.'/config.json'));\n\n if (!isset($config->host)) {\n throw new Exception('Datei config.json ist fehlerhaft!');\n }\n $host = $config->host; \n \n try {\n $pdo = $this->model->openDbConnection($host, $username, $password);\n } catch (Throwable $ex) {\n throw new Exception('Benutzername oder Passwort falsch!');\n }\n $this->model->closeDbConnection($pdo);\n\n // conf-File für Benutzer erstellen\n $confFile = fopen($conf.'/user_'.$username.'.conf', 'w');\n\n if (!$confFile) {\n throw new Exception('fopen ist fehlgeschlagen!');\n }\n $txt = \"[client]\\r\\nhost=\".$host.\"\\r\\nuser=\".$username.\"\\r\\npassword=\\\"\".$password.\"\\\"\";\n $write = fwrite($confFile, $txt);\n\n if ($write === false) {\n throw new Exception('fwrite ist fehlgeschlagen!');\n }\n fclose($confFile);\n \n $return = array(\n 'username' => $username,\n 'id' => md5($password)\n );\n } catch (Throwable $ex) {\n $return = $ex;\n }\n return $return; \n }", "public function login(){\n\n }", "function read(){\n\t\t\t\t\tif(isset($_POST['username']) && isset($_POST['password']) ){\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t$this->_username = $_POST['username'];\n\t\t\t\t\t\t\t\t$this->_password = $_POST['password'];\n\t\t\t\t\t\t\t\t$this->_flag=true;\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}catch(Exception $e){\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}//if\n\t\t\t\t}", "public function login(){\n\t\t$this->user = $this->user->checkCredentials();\n\t\t$this->user = array_pop($this->user);\n\t\tif($this->user) {\n\t\t\t$_SESSION['id'] = $this->user['id'];\n\t\t\t$_SESSION['name'] = $this->user['name'];\n\t\t\t$_SESSION['admin'] = $this->user['admin'];\n\t\t\t$this->isAdmin();\n\t \t\theader('location: ../view/home.php');\n\t \t\texit;\n\t \t}\n\t\t$dados = array('msg' => 'Usuário ou senha incorreto!', 'type' => parent::$error);\n\t\t$_SESSION['data'] = $dados;\n\t\theader('location: ../view/login.php');\n \t\texit;\n\t}", "private function consultar_usuario_todos() {\n $sentencia = \"select id,nombrecompleto ,correo,token from usuario u;\";\n $this->respuesta = $this->obj_master_select->consultar_base($sentencia);\n }", "public function procesarLogin()\n {\n global $URL_PATH;\n\n $usuario = new Usuario;\n $usuario->login_usu = strtolower(sanitizar($_REQUEST[\"cliente\"]));\n $usuario->password = password_hash($_REQUEST[\"password\"], PASSWORD_DEFAULT);\n $usuario->email = sanitizar($_REQUEST[\"email\"]);\n $usuario->direccion = sanitizar($_REQUEST[\"direccion\"]);\n\n $totalArticulos =(new Orm)->sumaTotalArticulos(session_id());\n $sumaTotal =$totalArticulos->suma;\n\n (new Orm)->insertarUsuario($usuario);\n \n $_SESSION['login'] = $usuario->login_usu;\n $cesta = (new Orm)->sacarProductosDeUnCliente(session_id());\n (new Orm)->guardarPedido($_SESSION['login']);\n $id_pedido = (new Orm)->idPedido($_SESSION['login']);\n\n //sacamos la id y la cantidad de la cesta uno a uno y lo vamos insertando en la tabla de producto que ha comprado el cliente.\n foreach($cesta as $sacarProductos){\n (new Orm)->guardarProductos($id_pedido[\"id\"],$sacarProductos->id_producto,$sacarProductos->cantidad);\n }\n sleep(3);\n $cod_comercio = 2222;\n $cod_pedido = $id_pedido[\"id\"];\n $concepto = \"Mercadito Plaza Turia\";\n header(\"Location: http://localhost/pasarela/index.php?cod_comercio=$cod_comercio&cod_pedido=$cod_pedido&importe=$sumaTotal&concepto=$concepto\");\n \n }", "public function login() {\n\n $user_login = trim(in('id'));\n $user_pass = in('password');\n $remember_me = 1;\n\n $credits = array(\n 'user_login' => $user_login,\n 'user_password' => $user_pass,\n 'rememberme' => $remember_me\n );\n\n $re = wp_signon( $credits, false );\n\n if ( is_wp_error($re) ) {\n $user = user( $user_login );\n if ( $user->exists() ) ferror( -40132, \"Wrong password\" );\n else ferror( -40131, \"Wrong username\" );\n }\n else if ( in('response') == 'ajax' ) {\n // $this->response( user($user_login)->session() ); // 여기서 부터..\n }\n else {\n $this->response( ['data' => $this->get_button_user( $user_login ) ] );\n }\n\n }", "function _genLogin()\n {\n $this->mismatch = false;\n if (isset($_POST['login']) && $this->_verify() == \"\") {\n $this->name_post = $_POST['gebruikersnaam'];\n $this->pass_post = $_POST['wachtwoord'];\n\n $this->_getFromGebruikersDb($this->name_post);\n if ($this->_isMatch()) {\n $_SESSION['ingelogd'] = true;\n //toegevoegd door rens om een gebruikersnaam en rol te krijgen\n $_SESSION['gebruikersnaam'] = $this->name_post;\n $_SESSION['Rol'] = $this->role_db;\n header('location: Login_Redir.php');\n }\n }\n }", "function login($user, $pass) {\n require(\"..\\datos_conexion.php\");\n\n $conexion=mysqli_connect($db_host, $db_user, $db_pass);\n // Si habido un error en la conexion\n if (mysqli_connect_errno()) {\n echo \"Fallo al conectar con la base de datos\";\n exit();\n }\n\n mysqli_select_db($conexion, $db_name) or die (\"No se encuentra la base de datos\");\n mysqli_set_charset($conexion, \"utf8\");\n\n // Para evitar que usen la inyección SQL\n $user=mysqli_real_escape_string($conexion, $user);\n $pass=mysqli_real_escape_string($conexion, $pass);\n\n $consulta=\"SELECT * FROM usuarios WHERE user='$user' AND pass='$pass'\";\n $resultados=mysqli_query($conexion, $consulta);\n\n echo \"<p>$consulta</p>\";\n ?>\n <table>\n <thead>\n <tr>\n <th>Usuario</th>\n <th>Password</th>\n <th>Teléfono</th>\n <th>Direccion</th>\n </tr>\n </thead>\n <tbody>\n \n <?php\n while ($fila=mysqli_fetch_array($resultados, MYSQLI_ASSOC)) {\n echo \"<tr>\";\n echo \"<td>\".$fila[\"user\"].\"</td>\";\n echo \"<td>\".$fila[\"pass\"].\"</td>\";\n echo \"<td>\".$fila[\"tfno\"].\"</td>\";\n echo \"<td>\".$fila[\"direccion\"].\"</td>\";\n echo \"</tr>\";\n }\n\n mysqli_close($conexion);\n\n ?>\n </tbody>\n </table>\n<?php\n }", "function login() {\n\t\tif (isset($_REQUEST['username']) && !empty($_REQUEST['username'])) {\n\t\t\t$username = $_REQUEST['username'];\n\n\t\t\t$userDAO = implementationUserDAO_Dummy::getInstance();\n\t\t\t$users = $userDAO->getUsers();\n\n\t\t\tforeach ($users as $key => $user) {\n\t\t\t\tif ($user->getUsername() === $username) {\n\t\t\t\t\t$userFound = $user;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($userFound) && $userFound != null) {\n\n\t\t\t\tif (isset($_REQUEST['password']) && !empty($_REQUEST['password'])) {\n\t\t\t\t\t$password = $_REQUEST['password'];\n\n\t\t\t\t\tif ($userFound->getPassword() === $password) {\n\n\t\t\t\t\t\tsession_start();\n\t\t\t\t\t\t$_SESSION['USERNAME']= $username;\n\n\t\t\t\t\t\t$url = getPreviousUrl();\n\t\t\t\t\t\t$newUrl = substr($url, 0, strpos($url, \"?\"));\n\n\t\t\t\t\t\tredirectToUrl($newUrl);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\t// redirecting to login with bad password alert\n\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\t// redirecting to login page with bad username alert\n\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t}\n\n\n\t}", "public function AdminLogin(){\n if($this->get_request_method()!= \"POST\"){\n $this->response('',406);\n }\n $username = $_POST['email'];\n $password = $_POST['password'];\n $format = $_POST['format'];\n $db_access = $this->dbConnect();\n $conn = $this->db;\n $res = new getService();\n if(!empty($username) && !empty($password)){\n $res->admin_login($username, $password, $conn);\n $this->dbClose();\n }\n else{\t\n $this->dbClose();\n $error = array('status' => \"0\", \"msg\" => \"Fill Both Fields !!\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($res->json($error), 200);\n }\n }", "public function logIn() {\n try {\n /* Check if for the empty or null email and password parameters */\n if (isset($_POST[\"email\"]) && isset($_POST[\"password\"])) {\n // Get the email and password parameters from POST request\n $form_data = array(\n ':email' => $_POST[\"email\"],\n ':password' => $_POST[\"password\"]\n );\n // Create a SQL query to check if exist this user with email and password\n $query = \"\n select id, username, access \n from tb_user \n where email = :email and password = :password and state = 1\n \";\n // Create object to connect to MySQL using PDO\n $mysqlPDO = new MySQLPDO();\n // Prepare the query\n $statement = $mysqlPDO->getConnection()->prepare($query);\n // Execute the query with passed parameters username and password\n $statement->execute($form_data);\n // Get affect rows in associative array\n $row = $statement->fetch(PDO::FETCH_ASSOC);\n // Check if any affected row\n if ($row) {\n // Check if there's any open session\n if (isset($_SESSION['views'])) {\n // Increment the open session + 1\n $_SESSION['views']++;\n } else {\n // Open new session\n $_SESSION['views'] = 1;\n }\n // Set user info into php session\n $_SESSION[$_SESSION['views'].'id'] = $row['id'];\n $_SESSION[$_SESSION['views'].'email'] = $form_data[':email'];\n $_SESSION[$_SESSION['views'].'password'] = $form_data[':password'];\n $_SESSION[$_SESSION['views'].'username'] = $row['username'];\n $_SESSION[$_SESSION['views'].'access'] = $row['access'];\n // data[] is a associative array that return json\n $data[] = array('result' => '1');\n } else {\n $data[] = array('result' => 'Please check your username or password!');\n }\n } else {\n // Check for missing parameters in POST data\n if (!isset($_POST[\"email\"]) && !isset($_POST[\"password\"])) {\n $data[] = array('result' => 'All parameters are missing for user authentication!');\n } elseif (!isset($_POST[\"email\"])) {\n $data[] = array('result' => 'Missing email parameter!');\n } else {\n $data[] = array('result' => 'Missing password parameter!!');\n }\n }\n return $data;\n } catch (PDOException $e) {\n die(\"Error message: \" . $e->getMessage());\n }\n }", "function login($user,$pass){\n \n try{\n include(\"../conexion/mysql.php\");\n\n $consulta=\"SELECT * FROM tbl_usuario WHERE usuario='$user' AND clave='$pass'\";\n \n $resultado= mysqli_query($link ,$consulta)or die('Error al consultar usuario');\n \n $perfil=null;\n $contador=0;\n while ($registro = mysqli_fetch_array($resultado)){\n $perfil=$registro[\"perfil\"];\n $contador++;\n }\n\n \n \n if($contador){\n \n $_SESSION[\"perfil\"]=$perfil;\n\t\t\t\t\t $_SESSION[\"usuario\"]=$user;//se almacena la sesion del usuario \n return true;\n }else{\n return false;\n }\n }catch(Exception $e){\n echo \"ERROR\" . $e->getMessage();\n }\n \n }", "public function ajaxLogin(){\n\n if(isset($_POST)){\n\n $email = $_POST['email'];\n $senha = md5($_POST['senha']);\n\n $dadosUsuario = $this->objUsuario->get([\"email\" => $email, \"senha\" => $senha]);\n $buscaUsuario = $dadosUsuario->fetch(\\PDO::FETCH_OBJ);\n $qtdeUsuario = $dadosUsuario->rowCount();\n\n if($qtdeUsuario == 1){\n\n $_SESSION['usuario']['nome'] = $buscaUsuario->nome;\n $_SESSION['usuario']['email'] = $buscaUsuario->email;\n $_SESSION['usuario']['senha'] = $buscaUsuario->senha;\n\n $dados = [\n \"tipo\" => true,\n \"mensagem\" => \"Logado com sucesso, aguarde...\"\n ];\n\n }else{\n $dados = [\n \"tipo\" => false,\n \"mensagem\" => \"Usuário não encontrado no sistema\"\n ];\n }\n\n }else{\n $dados = [\n \"tipo\" => false,\n \"mensagem\" => \"Dados não enviado\"\n ];\n }\n\n echo json_encode($dados);\n }", "public function postLogin(Request $request){\n $validator = Validator::make($request->all(), [\n 'usuario' => 'required',\n 'clave' => 'required|min:6',\n ]);\n\n if ($validator->fails()) {\n return redirect('/')\n ->withErrors($validator)\n ->withInput();\n } else {\n $UserVal = User::where('user', $request->input('usuario'))->where('estatus',1)->first();\n if ($UserVal == null) {\n Flash::error('Usuario Inexistente, Por favor verifica tus datos');\n return redirect('/')\n ->withErrors($validator)\n ->withInput();\n } else {\n if($UserVal->verificado == 0){\n Flash::error('Por favor, verifica tu correo electrónico.');\n return redirect('/')\n ->withErrors($validator)\n ->withInput();\n } else {\n $userPage = $request->input('usuario');\n $passpage = $request->input('clave');\n $userDB = $UserVal->id;\n $passDB = decrypt($UserVal->password);\n if ($passpage == $passDB) {\n Auth::login($UserVal);\n // Get users that have access to backend\n $roles = Role::whereNotIn('name', ['', 'Invitado VIP'])->pluck('name')->values()->all();\n $valid_user = Auth::user()->hasRole($roles);\n // If user has access, redirect to dashboard\n if ($valid_user) {\n return redirect('admin');\n }\n Flash::error('Acceso Denegado!');\n return redirect('/')\n ->withErrors($validator)\n ->withInput();\n } else {\n Flash::error('Usuario o Contraseña Incorrecta');\n return redirect('/')\n ->withErrors($validator)\n ->withInput();\n }\n }\n\n }\n }\n }", "function login() {\n \t$this->set('indata',$this->data);\n\t\tif(empty($this->data)){\n\t\t\t$this->pageTitle = 'Log in';\n\t\t\t$cookie = $this->Cookie->read('Auth.User');\n\t\t}\n }", "public function login_post(){\n\t\t$data=($_POST);\n\n\t\t$result = $this->login_model->login($data);\n\t\treturn $this->response($result);\t\t\t\n\t}", "function RellenaDatos()\n{\n $sql = \"SELECT *\n\t\t\tFROM USUARIOS\n\t\t\tWHERE (\n\t\t\t\t(login = '$this->login') \n\t\t\t)\";\n\n\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';\n\t}else\n\t{\n\t\t$tupla = $resultado->fetch_array();\n\t}\n\treturn $tupla;\n}", "public function login()\n {\n return ['Form' => $this->Form()];\n }", "public function login()\n\t{\n\t\t$mtg_login_failed = I18n::__('mtg_login_failed');\n\t\tR::selectDatabase('oxid');\n\t\t$sql = 'SELECT oxid, oxfname, oxlname FROM oxuser WHERE oxusername = ? AND oxactive = 1 AND oxpassword = MD5(CONCAT(?, UNHEX(oxpasssalt)))';\n\t\t$users = R::getAll($sql, array(\n\t\t\tFlight::request()->data->uname,\n\t\t\tFlight::request()->data->pw\n\t\t));\n\t\tR::selectDatabase('default');//before doing session stuff we have to return to db\n\t\tif ( ! empty($users) && count($users) == 1) {\n\t\t\t$_SESSION['oxuser'] = array(\n\t\t\t\t'id' => $users[0]['oxid'],\n\t\t\t\t'name' => $users[0]['oxfname'].' '.$users[0]['oxlname']\n\t\t\t);\n\t\t} else {\n\t\t\t$_SESSION['msg'] = $mtg_login_failed;\n\t\t}\n\t\t$this->redirect(Flight::request()->data->goto, true);\n\t}", "public function login(){\n\n $this->checkOptionsAndEnableCors();\n\n $email = $this->input->post('email');\n $password = $this->input->post('password');\n $user = $this->repository->findByEmailAndPassword($email, $password);\n\n if($user){\n echo json_encode($user);\n } else {\n http_response_code(401);\n }\n }", "public function loginAction()\n {\n $this->_helper->layout->disableLayout(); // desabilita Zend_Layout\n\n // recebe os dados do formulrio via post\n $post = Zend_Registry::get('post');\n $username = Mascara::delMaskCNPJ(Mascara::delMaskCPF($post->Login)); // recebe o login sem mscaras\n $password = $post->Senha; // recebe a senha\n\n //Pega o IP do usuario\n\n $ip = $this->buscarIp();\n\n $tbLoginTentativasAcesso = new tbLoginTentativasAcesso();\n $LoginAttempt = $tbLoginTentativasAcesso->consultarAcessoCpf($username, $ip);\n\n\n //Pega timestamp atual\n $data = new Zend_Date();\n $timestamp = $data->getTimestamp();\n\n $maxTentativas = 4;\n $tempoBan = 300; // segundos\n\n // VERIFICA SE USUARIO ESTA BANIDO\n if (isset($LoginAttempt)) {\n $tempoLogin = $timestamp - strtotime($LoginAttempt->dtTentativa);\n\n if ($tempoLogin <= $tempoBan && $LoginAttempt->nrTentativa >= $maxTentativas) {\n parent::message('Acesso bloqueado, aguarde '.gmdate(\"i\", ($tempoBan + 5 - $tempoLogin)).' minuto(s) e tente novamente!', \"/\", \"ERROR\");\n } else {\n try {\n // valida os dados\n if (empty($username) || empty($password)) { // verifica se os campos foram preenchidos\n throw new Exception(\"Login ou Senha invalidos!\");\n } elseif (strlen($username) == 11 && !Validacao::validarCPF($username)) { // verifica se o CPF ? v?lido\n throw new Exception(\"O CPF informado invalido!\");\n } elseif (strlen($username) == 14 && !Validacao::validarCNPJ($username)) { // verifica se o CNPJ ? v?lido\n throw new Exception(\"O CNPJ informado invalido!\");\n } else {\n // realiza a busca do usurio no banco, fazendo a autenticao do mesmo\n $Usuario = new Usuario();\n $buscar = $Usuario->login($username, $password);\n\n\n\n if ($buscar) { // acesso permitido\n $tbLoginTentativasAcesso->removeTentativa($username, $ip);\n\n $auth = Zend_Auth::getInstance(); // instancia da autenti��o\n\n // registra o primeiro grupo do usurio (pega unidade autorizada, org�o e grupo do usu�rio)\n $Grupo = $Usuario->buscarUnidades($auth->getIdentity()->usu_codigo, 21); // busca todos os grupos do usu�rio\n\n $GrupoAtivo = new Zend_Session_Namespace('GrupoAtivo'); // cria a sess�o com o grupo ativo\n $GrupoAtivo->codGrupo = $Grupo[0]->gru_codigo; // armazena o grupo na sess�o\n $GrupoAtivo->codOrgao = $Grupo[0]->uog_orgao; // armazena o org�o na sess�o\n $this->orgaoAtivo = $GrupoAtivo->codOrgao;\n\n // redireciona para o Controller protegido\n return $this->_helper->redirector->goToRoute(array('controller' => 'principal'), null, true);\n } // fecha if\n else {\n if ($tempoLogin > $tempoBan) {\n $tbLoginTentativasAcesso->removeTentativa($username, $ip);\n }\n $LoginAttempt = $tbLoginTentativasAcesso->consultarAcessoCpf($username, $ip);\n\n //se nenhum registro foi encontrado na tabela Usuario, ele passa a tentar se logar como proponente.\n //neste ponto o _forward encaminha o processamento para o metodo login do controller login, que recebe\n //o post igualmente e tenta encontrar usuario cadastrado em SGCAcesso\n\n //INSERE OU ATUALIZA O ATUAL ATTEMPT\n if (!$LoginAttempt) {\n $tbLoginTentativasAcesso->insereTentativa($username, $ip, $data->get('YYYY-MM-dd HH:mm:ss'));\n } else {\n $tbLoginTentativasAcesso->atualizaTentativa($username, $ip, $LoginAttempt->nrTentativa, $data->get('YYYY-MM-dd HH:mm:ss'));\n }\n\n $this->forward(\"login\", \"login\");\n //throw new Exception(\"Usurio inexistente!\");\n }\n } // fecha else\n } // fecha try\n catch (Exception $e) {\n parent::message($e->getMessage(), \"index\", \"ERROR\");\n }\n }\n }\n }", "public function login()\n\t{\n\t\t$this->load->model('Users_Customers');\n\n\t\tif (isset($_POST) && !empty($_POST)) {\n\t\t\tif ($this->session->has_userdata('isLogin')) {\n\t\t\t\techo \"shoma qablan login shodeid\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$userCustomer = new Users_Customers();\n\t\t\tif ($userCustomer->loginCustomers()) {\n\t\t\t\techo \"login shod\\n\";\n\t\t\t\t$this->load->model('Users_Customers');\n\t\t\t\t$user = new Users();\n\t\t\t\t$user->updateLoginAgentIp();\n\t\t\t\t$this->session->set_userdata('isLogin', $this->input->post('username'));\n\n\t\t\t\techo $this->session->has_userdata('isLogin');\n\n\t\t\t} else {\n\t\t\t\techo \"in hesab vojod nadrd ya password na dorost\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"request must be post\";\n\t\t}\n\t}", "public static function getlist(){\n $sql = new Sql();\n \n return $sql->select(\"SELECT * FROM tb_usuarios ORDER BY deslogin\");\n }", "function login2($_login, $_password){\n $this->login($_login,$_password);\n $resultado_login = mysql_query(\"SELECT * FROM registro\n\t\tWHERE login_reg = '$_login' AND clave_reg = '$_password'\");\n $num_rows = mysql_num_rows($resultado_login);\n if (isset($num_rows)&& $num_rows == 0){\n $this->mensaje = \"Login or Password incorrect!\";\n $_SESSION['estado_temp'] = -1;\n }\n else{\n $fila_login = mysql_fetch_assoc($resultado_login);\n $this->nombre = $fila_login[\"nombre_reg\"];\n $this->apellido = $fila_login[\"apellido_reg\"];\n $this->mensaje = \"Bienvenido $this->nombre $this->apellido.\";\n $_SESSION['estado_temporal'] = 1;\n $_SESSION['login_temporal'] = $fila_login[\"login_reg\"];\n $___login = $fila_login[\"login_reg\"];\n $_SESSION['nombre_temporal'] = $fila_login[\"nombre_reg\"];\n $_SESSION['apellido_temporal'] = $fila_login[\"apellido_reg\"];\n $_SESSION['id_temporal'] = $fila_login[\"id_reg\"];\n //mysql_query (\"UPDATE usuarios SET last_login = curdate()\n //WHERE login = $___login\");\n //if($_SESSION['_url'])\n header(\"location: panel_usuario.php#next\");\n }\n }", "public function getLogin($data){\n\t\n\t\t$passArray = array();\n\t\t$mod = new userModel();\n\t\t\n\t\t$email = $data['email'];\n\t\t$password = md5($data['password']);\n\t\t\n\t\t$res = $mod->loginCheck($email,$password);\n\t\t\n\t\tif(mysql_num_rows($res) > 0){\n\t\t\twhile($row = mysql_fetch_array($res)){\n\t\t\t\t$passArray['userDetails'] = array(\"id\"=>$row[\"id\"],\"UserName\"=>$row[\"username\"],\"Email\"=>$row[\"email\"]);\n\t\t\t}\n\t\t\t$status = SUCCESS;\n\t\t\t$message = MESSAGE;\n\t\t\t/* Set session and send session token */\n\t\t\t//$_SESSION['token'] =$this->rand_str();\n\t\t\t$_SESSION['id'] = $passArray['userDetails']['id'];\n\t\t\t$_SESSION['username'] = $passArray['userDetails']['UserName'];\n\t\t\t$_SESSION['email'] = $passArray['userDetails']['Email'];\n\t\t\n\t\t\t$passArray['token']=$this->newTokenEncode($passArray['userDetails']['UserName'],$passArray['userDetails']['id']);\n\t\t\t$_SESSION['token'] =$passArray['token'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$status =FAIL;\n\t\t\t$message = ERRORMESSAGE;\n\t\t}\n\t\t\n\t\t$response = array(\n\t\t\t\t\t\t\t\"Status\" => $status,\n\t\t\t\t\t\t\t\"Message\"=> $message,\n\t\t\t\t\t\t\t\"Result\"=>$passArray\n\t\t\t\t\t\t);\n\t\t\n\t\treturn $response;\n\t}" ]
[ "0.74820656", "0.72105795", "0.71590203", "0.71439654", "0.7050494", "0.7050494", "0.70038426", "0.68975925", "0.6807479", "0.67741525", "0.67594564", "0.6730741", "0.66997397", "0.66890484", "0.6686962", "0.6656941", "0.66182745", "0.6609685", "0.6603099", "0.6603099", "0.6603099", "0.6593003", "0.65897155", "0.65832883", "0.6579027", "0.65424013", "0.65424013", "0.65267456", "0.6507368", "0.64817214", "0.6480687", "0.6477951", "0.6471833", "0.6467956", "0.64665186", "0.6450101", "0.6447341", "0.644673", "0.6442543", "0.64399713", "0.6431646", "0.6415321", "0.6414558", "0.64129305", "0.6406867", "0.6403568", "0.63947767", "0.63943416", "0.6394056", "0.63862455", "0.6384027", "0.6373574", "0.6370578", "0.63674366", "0.636308", "0.6357727", "0.6346704", "0.6342872", "0.63377035", "0.63355136", "0.6335491", "0.63337266", "0.6330214", "0.63291687", "0.6322394", "0.6321388", "0.6319241", "0.6310842", "0.63102686", "0.63050205", "0.63020366", "0.6292206", "0.6281384", "0.62732804", "0.62665486", "0.62640506", "0.62585324", "0.6246492", "0.62461454", "0.6237699", "0.6218589", "0.6215175", "0.6213873", "0.62127775", "0.6206693", "0.6203775", "0.62027645", "0.6201386", "0.6199554", "0.61981153", "0.6184084", "0.6176593", "0.61747247", "0.61734587", "0.6165509", "0.6162255", "0.61604416", "0.61576825", "0.61496854", "0.6147429", "0.6143872" ]
0.0
-1
Retornamos vista del signup
public function showSignupForm() { return view('auth.signup'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sign_up()\n {\n\n }", "public function signup()\n\t{\n\t\t$data = $this->check($this->as_array());\n\t\t\n\t\t$user = Sprig::factory('user');\n\t\t$user->values($data);\n\t\treturn $user->signup();\n\t}", "public function signup(){\n \n $this->data[\"title_tag\"]=\"Lobster | Accounts | Signup\";\n \n $this->view(\"accounts/signup\",$this->data);\n }", "public function onSignUp()\n {\n $data = post();\n $data['requires_confirmation'] = $this->requiresConfirmation;\n\n if (app(SignUpHandler::class)->handle($data, (bool)post('as_guest'))) {\n if ($this->requiresConfirmation) {\n return ['.mall-signup-form' => $this->renderPartial($this->alias . '::confirm.htm')];\n }\n\n return $this->redirect();\n }\n }", "public function signup() {\n $this->template->content = View::instance(\"v_users_signup\");\n \n # Render the view\n echo $this->template;\n }", "public function signup()\n\t{\n\t\t$id_telefono = $this->session->userdata('username');\n\t\t$data['estado'] = $this->plataforma_model->getEstado($id_telefono); \n\t\t$data['saldo'] = $this->plataforma_model->getSaldo($id_telefono); \n\t\t$data['usuario'] = $this->plataforma_model->getUserInfo($id_telefono); \n\t\t$this->load->view('signup',$data);\n\t}", "function signup($name, $email, $pwd, $pwdr, $users){\n $check = $users->getUser(0, $name);\n if($check != NULL){\n echo \"<script>alert(\\\" Uživatel s tímto jménem už existuje \\\");</script>\";\n echo \"<script> window.history.back(); </script>\";\n }\n \n if($pwd != $pwdr){\n echo \"<script>alert(\\\" Hesla se neshodují \\\");</script>\";\n echo \"<script> window.history.back(); </script>\";\n }\n else{\n $pwd = md5($pwd);\n $users->insertUser($name, $email, $pwd);\n echo \"<script> window.history.back(); </script>\";\n }\n}", "public function postSignup()\n {\n \tif ($this->userForm->create(Input::all())) {\n \t\treturn Redirect::route('auth.getSignup')\n \t\t->with('message', 'Successfully registered. Please check your email and activate your account.')\n \t\t->with('messageType', \"success\");\n \t}\n \n \treturn Redirect::route('auth.getSignup')\n \t->withInput()\n \t->withErrors($this->userForm->errors());\n }", "public function signupForm()\n {\n \t# code...\n \treturn view(\"external-pages.sign-up\");\n }", "public function signup()\n\t{\n\t\treturn View::make('auth/signup', ['title' => 'Sign un']);\n\t}", "public function create()\n {\n // TODO: Algún parámetro para no permitir el registro.\n \n // Es ya un usuario?\n if (Core::isUser())\n {\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('') . '\\';');\n return;\n }\n \n // Tenemos datos?\n if ($this->request->is('email'))\n {\n // Validamos los datos\n $form = Core::getLib('form.validator');\n $form->setRules(Core::getService('account.signup')->getValidation());\n \n // Si no hay errores procedemos a capturar los datos.\n if ($form->validate())\n {\n // Agregamos usuario\n if (Core::getService('account.process')->add($this->request->getRequest()))\n {\n if (Core::getParam('user.verify_email_at_signup'))\n {\n // Vamos a que verifique su email\n Core::getLib('session')->set('email', $this->request->get('email'));\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.verify') . '\\';');\n }\n else\n {\n // Iniciamos sesión\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.login') . '\\';');\n }\n \n return;\n }\n }\n }\n \n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.signup') . '\\';');\n }", "public function sign_up()\n\t{\n\t\t$post = $this->input->post();\n\t\t$return = $this->accounts->register($post, 'settings'); /*this will redirect to settings page */\n\t\t// debug($this->session);\n\t\t// debug($return, 1);\n\t}", "public function signup()\n {\n return view('auth.signup');\n }", "public function signup()\n {\n $id = (int) Input::get(\"id\");\n $md5 = Input::get(\"secret\");\n if (!$id || !$md5) {\n Redirect::autolink(URLROOT, Lang::T(\"INVALID_ID\"));\n }\n $row = Users::getPasswordSecretStatus($id);\n if (!$row) {\n $mgs = sprintf(Lang::T(\"CONFIRM_EXPIRE\"), Config::TT()['SIGNUPTIMEOUT'] / 86400);\n Redirect::autolink(URLROOT, $mgs);\n }\n if ($row['status'] != \"pending\") {\n Redirect::autolink(URLROOT, Lang::T(\"ACCOUNT_ACTIVATED\"));\n die;\n }\n if ($md5 != $row['secret']) {\n Redirect::autolink(URLROOT, Lang::T(\"SIGNUP_ACTIVATE_LINK\"));\n }\n $secret = Helper::mksecret();\n $upd = Users::updatesecret($secret, $id, $row['secret']);\n if ($upd == 0) {\n Redirect::autolink(URLROOT, Lang::T(\"SIGNUP_UNABLE\"));\n }\n Redirect::autolink(URLROOT . '/login', Lang::T(\"ACCOUNT_ACTIVATED\"));\n }", "public function completeSignup()\n\t{\n\t\t$data = array(\n 'email'=>$_GET['email'],\n 'phone'=>$_GET['phone_number'],\n 'cityName'=>$_GET['city']\n );\n\t\t//print_r($data);\n\t\t$cities = Location::where(['Type' => 'City', 'visible' =>1,'name' =>$data['cityName']])->pluck('id');\n\t\t\n\t\t$data['city'] = $cities;\n\t\t$count = count($cities);\n\t\tif($count=='0')\n\t\t{\n\t\t\tdie(\"City name doesn't exist.\");\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn view('frontend.pages.completesignup',$data);\n\t\t}\n\t}", "public function signup() {\n $this->template->content = View::instance('v_users_signup');\n $this->template->title = \"Sign Up\";\n\n // Render the view\n echo $this->template;\n\n }", "public function signup()\n\t{\n\t\treturn View::make('users.signup');\n\t}", "public function signUpSubmit() {\n try {\n if (!$this->validate([\n 'email' => 'valid_email',\n 'password' => 'min_length[8]',\n ])) {\n return view(\"pages/SignUp\", ['errors' => $this->validator->getErrors()]);\n }\n $users = $this->doctrine->em->getRepository(\\App\\Models\\Entities\\Korisnik::class)\n ->findByUserName($this->request->getVar('username'));\n if ($users != null) {\n return view(\"pages/SignUp\", ['poruka' => 'Korisnicko ime je zauzeto']);\n }\n $users = $this->doctrine->em->getRepository(\\App\\Models\\Entities\\Korisnik::class)\n ->findByEmail($this->request->getVar('email'));\n if ($users != null) {\n $data['errorEmail'] = 'Email je zauzet';\n return view(\"pages/SignUp\", $data);\n }\n $user = new \\App\\Models\\Entities\\Korisnik();\n $user->setIme($this->request->getVar('name'));\n $user->setPrezime($this->request->getVar('surname'));\n $user->setMail($this->request->getVar('email'));\n $user->setKorisnickoime($this->request->getVar('username'));\n $user->setSifra($this->request->getVar('password'));\n $user->setTip(1);\n\n $this->doctrine->em->persist($user);\n\n $this->doctrine->em->flush();\n\n $this->session->set('theme', 'light');\n $this->session->set('korisnik', $user->getIdkorisnik());\n echo $this->session->get('korisnik');\n return redirect()->to(site_url('User'));\n } catch (\\Exception $e) {\n\n echo $e;\n }\n }", "public function p_signup() {\n\n $q= 'Select email \n From users \n WHERE email=\"'.$_POST['email'].'\"';\n # see if the email exists\n $emailexists= DB::instance(DB_NAME)->select_field($q);\n \n # email exists, throw an error\n if($emailexists){ \n \n Router::redirect(\"/users/signup/error\"); \n \n }\n \n #requires all fields to be entered if java script is disabled, otherwise thow a different error\n \n elseif (!$_POST['email'] OR !$_POST['last_name'] OR !$_POST['first_name'] OR !$_POST['password']) {\n Router::redirect(\"/users/signup/error2\"); \n }\n # all is well , proceed with signup\n else{\n \n $_POST['created']= Time::now();\n $_POST['password']= sha1(PASSWORD_SALT.$_POST['password']); \n $_POST['token']= sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string()); \n\n # add user to the database and redirect to users login page \n $user_id=DB::instance(DB_NAME)->insert_row('users',$_POST);\n # Create users first Notebook\n $notebook['name']= $_POST['first_name'].' Notebook';\n $notebook['user_id']= $user_id;\n $notebook['created']= Time::now(); \n $notebook['modified']= Time::now(); \n DB::instance(DB_NAME)->insert_row('notebooks',$notebook); \n\n Router::redirect('/users/login');\n }\n \n }", "public function p_signup(){\n\t\tforeach($_POST as $field => $value){\n\t\t\tif(empty($value)){\n\t\t\t\tRouter::redirect('/users/signup/empty-fields');\n\t\t\t}\n\t\t}\n\n\t\t#check for duplicate email\n\t\tif ($this->userObj->confirm_unique_email($_POST['email']) == false){\n\t\t\t#send back to signup page\n\t\t\tRouter::redirect(\"/users/signup/duplicate\");\n\t\t}\n\n\t\t#adding data to the user\n\t\t$_POST['created'] = Time::now();\n\t\t$_POST['modified'] = Time::now();\n\n\t\t#encrypt password\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t#create encrypted token via email and a random string\n\t\t$_POST['token'] = sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string());\n\n\t\t#Insert into the db\n\t\t$user_id = DB::instance(DB_NAME)->insert('users', $_POST);\n\n\t\t# log in the new user\n\n\t\tsetcookie(\"token\", $_POST['token'], strtotime('+2 weeks'), '/');\n\n\t\t# redirect to home\n\t\tRouter::redirect('/users/home');\n\t\t\n\t}", "public function signup()\n {\n if (isset($_POST['signUp'])) {\n $userExist = $this->checkIfUserExist($_POST['login']);\n $userPassword = $_POST['password'];\n \n if ($userExist === false) {\n if ($userPassword === $_POST['passwordConfirm']) {\n $hashPassword = password_hash($userPassword, PASSWORD_DEFAULT);\n \n $affectedUser = $this->usersManager->setNewUser($_POST['firstName'], $_POST['lastName'], $_POST['login'], $hashPassword, $_POST['email'], 'reader');\n \n if ($affectedUser === false) {\n header('Location: auth&alert=signup');\n exit();\n } else {\n header('Location: auth&alert=success');\n exit();\n }\n } else {\n header('Location: auth&alert=passwords');\n exit();\n }\n } else {\n header('Location: auth&alert=userSignup');\n exit();\n }\n } else {\n throw new Exception($this->datasError);\n }\n\n }", "static function signup($app) {\n $result = AuthControllerNative::signup($app->request->post());\n if($result['registered']) {\n return $app->render(200, $result);\n } else {\n return $app->render(400, $result);\n }\n }", "public function registrationForm() {\n\n }", "public function signupAction()\n {\n $form = new \\RTB\\Core\\ShopFrontOffice\\Forms\\RegisterForm;\n if ($this->request->isPost()) {\n $email = $this->request->getPost('email', 'email');\n $password = $this->request->getPost('password', 'string');\n $repeatPassword = $this->request->getPost('repeatPassword', 'string');\n $response = $this->userService->createContact($email, $password, $repeatPassword);\n if($response == UserServices::SIGNUPSUCCESS){\n if ($this->request->isAjax()) {\n return $response;\n }\n $this->flash->success((string) $response);\n return $this->response->redirect('login');\n }else{\n if ($this->request->isAjax()) {\n return $response;\n }\n $this->flash->error($response);\n }\n }\n $this->view->form = $form;\n }", "public function signUpUser()\r\n {\r\n $error = null;\r\n return callView('login/signup-user', ['error'=>$error]);\r\n }", "public function registerForm(): Response\n {\n $this->init('You\\'r already loggedIn', '/chatroom');\n return $this->render('register.html.twig');\n }", "public function getSignUp(){\n\t\t//make the sign up view\n\t\treturn View::make('account.signup');\n\t}", "public function signup()\n {\n return view('users.signup');\n }", "public function signUp()\n {\n switch ($_SERVER['REQUEST_METHOD'])\n {\n case 'GET':\n parent::view(\"Sign Up\", \"signup.php\");\n break;\n\n case 'POST':\n $newUser = new SignUpViewModel();\n $newUser->setEmail($_POST['email']);\n $newUser->setUsername($_POST['username']);\n $newUser->setPassword($_POST['password']);\n $newUser->setPassword2($_POST['password2']);\n\n $userManager = new UserManager($this->userRepository);\n $result = $userManager->signUp($newUser);\n if($result)\n {\n header(\"location:/\". APP_HOST . \"account/login\");\n }\n else\n {\n parent::view(\"Sign Up\",\"signup.php\",\n $newUser, null, $userManager->getMessages());\n }\n\n break;\n\n default:\n break;\n }\n }", "public function registrationForm(){\n self::$signUpName = $_POST['signup-name'];\n self::$signUpEmail = $_POST['signup-email'];\n self::$signUpPassword = $_POST['signup-password'];\n\n self::sanitize();\n if(self::checkIfAvailable()){\n self::$signUpName =\"\";\n self::$signUpEmail = \"\";\n self::$signUpPassword = \"\";\n }\n }", "public function getSignup()\n {\n return View::make('auth.signup');\n }", "public function success_signup(){\n if(isset($_GET['u'])){\n $data['u']=$this->f_usersmodel->getFirstRowWhere('users',array('md5_id'=>$_GET['u']));\n }\n $seo = array(\n 'title' => 'Đăng ký thành công'\n );\n $this->LoadHeader(null,$seo);\n $this->load->view('users/success_signup',$data);\n $this->LoadFooter();\n }", "public function signup()\n {\n if(isset($_SESSION['id'])) {\n return view('signup');\n }else {\n header('Location: login');\n }\n }", "public function createUser()\r\n {\r\n // use sign up in AuthController\r\n }", "public function createUser()\r\n {\r\n // use sign up in AuthController\r\n }", "public function signupAction()\n {\n $form = new SignUpForm();\n\n if ($this->request->isPost()) {\n if($this->security->checkToken())\n {\n if ($form->isValid($this->request->getPost()) != false) {\n $tampemail = $this->request->getPost('email');\n $user = new Users([\n 'name' => $this->request->getPost('name', 'striptags'),\n 'lastname' => $this->request->getPost('lastname', 'striptags'),\n 'email' => $this->request->getPost('email'),\n 'password' => $this->security->hash($this->request->getPost('password')),\n 'profilesId' => 2,\n 'type' => $this->request->getPost('type'),\n 'skype' => $this->request->getPost('skype'),\n 'phone' => $this->request->getPost('phone'),\n 'company' => $this->request->getPost('company'),\n 'address' => $this->request->getPost('address'),\n 'city' => $this->request->getPost('city'),\n 'country' => $this->request->getPost('country'),\n ]);\n\n if ($user->save()) {\n $this->flashSess->success(\"A confirmation mail has been sent to \".$tampemail);\n $this->view->disable();\n return $this->response->redirect('');\n }\n\n $this->flash->error($user->getMessages());\n }\n }\n else {\n $this->flash->error('CSRF Validation is Failed');\n }\n }\n\n $this->view->form = $form;\n }", "public function signup(){\n /* echo \"Signup called.\";*/\n\t# First, set the content of the template with a view file\n\t$this->template->content = View::instance('v_users_signup');\n\n\t# Now set the <title> tag\n\t$this->template->title = \"OPA! Signup\";\n\n\t# Render the view\n\techo $this->template;\n }", "protected function renderSignUp(){\n return '<form class=\"forms\" action=\"'.Router::urlFor('check_signup').'\" method=\"post\">\n <input class=\"forms-text\" type=\"text\" name=\"fullname\" placeholder=\"Nom complet\">\n <input class=\"forms-text\" type=\"text\" name=\"username\" placeholder=\"Pseudo\">\n <input class=\"forms-text\" type=\"password\" name=\"password\" placeholder=\"Mot de passe\">\n <input class=\"forms-text\" type=\"password\" name=\"password_verify\" placeholder=\"Retape mot de passe\">\n <button class=\"forms-button\" name=\"login_button\" type=\"submit\">Créer son compte</button>\n </form>';\n }", "public function signUp()\n {\n return view('user.signup');\n }", "public function getSignup(){\n return view('pages.signup');\n }", "public function signup ()\n {\n $baseUrl = Config::get('app.baseUrl');\n\n /**\n * Daten validieren\n */\n $validator = new Validator();\n $validator->validate($_POST['firstname'], 'Firstname', true, 'text', 2, 255);\n $validator->validate($_POST['lastname'], 'Lastname', true, 'text', 2, 255);\n $validator->validate($_POST['email'], 'Email', true, 'email');\n $validator->validate($_POST['password'], 'Passwort', true, 'password');\n $validator->compare($_POST['password'], $_POST['password2']);\n\n /**\n * Fehler aus dem Validator holen\n */\n $errors = $validator->getErrors();\n\n /**\n * Nachdem die eingegebenen Daten nun Validiert sind, möchten wir wissen, ob die Email-Adresse schon in unserer\n * Datenbank existiert oder nicht. Dazu nutzen wir die findByEmail-Methode der User Klasse, die wir extra so\n * gebaut haben, dass sie false zurück gibt, wenn kein Eintrag gefunden wurde. Existiert die Email-Adresse schon\n * und kann somit nicht mehr verwendet werden, geben wir einen Fehler aus.\n */\n if (User::findByEmail($_POST['email']) !== false) {\n $errors[] = \"Diese Email-Adresse wird bereits verwendet.\";\n }\n\n /**\n * Wenn Validierungsfehler aufgetreten sind, speichern wir die Fehler zur späteren Anzeige in die Session und\n * leiten zurück zum Registrierungsformular, wo die Fehler aus der Session angezeigt werden.\n */\n if (!empty($errors)) {\n Session::set('errors', $errors);\n header(\"Location: $baseUrl/sign-up\");\n exit;\n }\n\n /**\n * Wenn kein Validierungsfehler auftritt, wollen wir den Account speichern\n */\n $user = new User();\n $user->firstname = $_POST['firstname'];\n $user->lastname = $_POST['lastname'];\n $user->email = $_POST['email'];\n $user->setPassword($_POST['password']);\n $user->save();\n\n /**\n * Hier müssten wir eigentlich Fehler, die beim Speichern in die Datenbank auftreten könnten, handeln. Wir\n * werden aber für Übersichtichkeit und Einfachheit darauf verzichten.\n */\n\n /**\n * Die PHPMailer Klasse ist eine externe Klasse, die wir als Anbieter von dem MVC für unsere Anwender\n * mitliefern. Sie unterstützt mehrere Methoden Emails zu verschicken, mehr dazu in der Dokumentation:\n * https://github.com/PHPMailer/PHPMailer\n *\n * Grundsätzlich werdet ihr am Anfang eurer Developer-Karriere selbst keine Emails verschicken müssen sondern\n * über das verwendete Framework (bspw. Laravel) Emails zusammenbauen.\n *\n * Zum Testen von Emails bieten sich dienste wie Ethereal an, die genau dafür entwickelt wurden:\n * https://ethereal.email/\n */\n if (PHPMailer::ValidateAddress($user->email)) {\n $mail = new PHPMailer();\n $mail->isMail();\n $mail->AddAddress($user->email);\n $mail->SetFrom('[email protected]');\n $mail->Subject = 'Herzlich Wilkommen!';\n $mail->Body = 'Sie haben sich erfolgreich registriert!\\n\\rDanke dafür! :*';\n\n $mail->Send();\n\n header(\"Location: $baseUrl/login\");\n exit;\n } else {\n /**\n * Erkennt PHPMailer keine gültige Email-Adresse, müsste hier ein besserer Fehler ausgegeben werden. Wir\n * könnten beispielsweise einen eigenen Fehler-View bauen (ähnlich wie 404.view.php), werden das aber\n * vorerst einmal noch nicht machen und uns auf die wesentlicheren Dinge konzentrieren.\n */\n die('PHPMailer Error');\n }\n }", "public function postRegister()\n\t{\n\t\t$rules = array(\n\t\t\t'username' => 'required|unique:users',\n\t\t\t'email' => 'required|email|unique:users|confirmed',\n\t\t\t'password' => 'required|min:8',\n\t\t\t'checkbox' => 'accepted',\n\t\t\t);\n\t\t\n\t\t//validate form input with validation rules\n\t\t$validator = Validator::make(Input::all(),$rules);\n\n\t\t// if validator failed\n\t\tif($validator->fails()){\n\n\t\t\t// redirect back to form with errors from validator\n\t\t\treturn Redirect::route('login')->withErrors($validator)->withInput();\n\t\t}\n\t\telse{\n\t\t\t$user = Sentry::createUser(array(\n\t\t\t\t'username' => Input::get('username'),\n\t\t\t\t'email' => Input::get('email'),\n\t\t\t\t'password' => Input::get('password'),\n\t\t\t\t));\n\n\t\t\t$membergroup = Sentry::findGroupByName('Members');\n\t\t\t$user->addGroup($membergroup);\n\n\t\t\t// get activation code\n\t\t\t$activationCode = $user->getActivationCode();\n\n\t\t\t// send activation code to user so that he can activate account\n\t\t\t// link should be shopcaddy.com/verify-activate/{token}\n\t\t\t// http://shopcaddy.localhost/verify-activate/wk2dJHluf7GzO1uG0P04gSfTm9NdqE5DBc3vNBGHOe\n\n\t\t\t// redirect back\n\t\t\treturn Redirect::to('login')->with('message',\"Thanks for signing up.<br>You will receive a verification email to confirm your email address.<br>If you don't see the email in your inbox, please check your spam folder or <a href='/contact-us'>contact support</a>.\");\n\t\t}\n\t}", "public function handleSignUp()\n {\n $data = \\Request::all();\n $result = \\DB::transaction(function() use($data) {\n $data['type'] = Member::USER_TYPE_ID;\n // honeypot checking for valid submission\n $this->companyService->honeypotCheck($data);\n // get the plan\n $plan = Plan::findOrFail($data['plan_id']);\n // create the company\n list($company, $role) = $this->companyService->create($data);\n // create the user\n $data['company_id'] = $company->id;\n $data['roles'] = [$role->id];\n $data['is_owner'] = true;\n $user = $this->userService->create($data);\n // send confirmation email\n $mail_data = [\n 'plan' => $plan->name,\n 'price_month' => \\Format::currency($plan->price_month),\n 'price_year' => \\Format::currency($plan->price_year),\n 'trial_end_date' => \\Carbon::now()->addDays(14)->toFormattedDateString()\n ];\n \\Mail::to($company->email)->send(new SignUpConfirmation($mail_data));\n // find the user and log them in\n $auth_user = \\Auth::findById($user->id);\n \\Auth::login($auth_user, true);\n // set message and redirect\n \\Msg::success('Thank you for signing up with Tellerr!');\n return [\n 'route' => 'account'\n ];\n });\n return redir($result['route']);\n }", "public function getFbSignUp(){\n\t\t//make the sign up view\n\t\treturn View::make('account.fb-signup');\n\t}", "public function post_register() {\n try {\n $i = Input::post();\n $validation = \\Fuel\\Core\\Validation::forge();\n $validation->add('email', 'Email')\n ->add_rule('required')\n ->add_rule('valid_email');\n $validation->add('username', 'Username')\n ->add_rule('required')\n ->add_rule('min_length', 6)\n ->add_rule('max_length', 18);\n $validation->add('password', 'Password')\n ->add_rule('required')\n ->add_rule('min_length', 6)\n ->add_rule('max_length', 18);\n\n if ($validation->run()) {\n $email = $i['email'];\n if (\\Utils::isDisposableEmail($email)) throw new \\Craftpip\\Exception(\"$email is a disposable Email, please use a genuine Email-id to signup.\");\n\n $auth = new \\Craftpip\\OAuth\\Auth();\n\n $user = $auth->getByUsernameEmail($i['email']);\n if ($user) throw new \\Craftpip\\Exception('This Email-ID is already registered.');\n\n $user_id = $auth->create_user($i['username'], $i['password'], $i['email'], 1, array());\n $auth->setId($user_id);\n $auth->setAttr('verified', false);\n $auth->setAttr('project_limit', 2);\n\n\n $mail = new \\Craftpip\\Mail($user_id);\n $mail->template_signup();\n if (!$mail->send()) {\n $auth->removeUser($user_id);\n }\n }\n else {\n throw new \\Craftpip\\Exception('Something is not right. Please try again');\n }\n $response = array(\n 'status' => true\n );\n } catch (Exception $e) {\n $e = new \\Craftpip\\Exception($e->getMessage(), $e->getCode());\n $response = array(\n 'status' => false,\n 'reason' => $e->getMessage()\n );\n }\n\n echo json_encode($response);\n }", "public function signUp()\n\t{\n\t\t$user_name = Request::input('user_name');\n\n\t\treturn view('sign-up');\n\t}", "public function registration() {\r\n \r\n if (isset($_GET[\"submitted\"])) {\r\n $this->registrationSubmit();\r\n } else {\r\n \r\n }\r\n }", "public function signup()\n {\n return view('signup');\n }", "public function registradoAction()\n {\n //Vacio\n }", "public function index()\n {\n return $this->signup();\n }", "public function signupAction()\n {\n $this->tag->setTitle(__('Sign up'));\n $this->siteDesc = __('Sign up');\n\n if ($this->request->isPost() == true) {\n $user = new Users();\n $signup = $user->signup();\n\n if ($signup instanceof Users) {\n $this->flash->notice(\n '<strong>' . __('Success') . '!</strong> ' .\n __(\"Check Email to activate your account.\")\n );\n } else {\n $this->view->setVar('errors', new Arr($user->getMessages()));\n $this->flash->warning('<strong>' . __('Warning') . '!</strong> ' . __(\"Please correct the errors.\"));\n }\n }\n }", "public function showRegistrationForm()\n {\n return redirect()->route('frontend.account.register');\n //return theme_view('account.register');\n }", "public function register()\n {\n $vaksinasi = TypeOfVaccination::all();\n $hospital = Hospital::all();\n $provinsi = DB::table('provincies')->get();\n return view('main.auth.register', ['provinsi' => $provinsi, 'vaksinasi' => $vaksinasi, 'hospital' => $hospital]);\n }", "function register()\n\t\t{\n\n\t\t if(!empty($_POST['email']) && !empty($_POST['password'])&& !empty($_POST['nombre'])){\n\n\t\t $email=filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING);\n\t\t $password=filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n\t\t $name=filter_input(INPUT_POST, 'nombre', FILTER_SANITIZE_STRING);\n\t\t $new_user=$this->model->register($email,$password,$name);\n\n\t\t if ($new_user == TRUE){ \n\t\t // cap a la pàgina principal\n\t\t header('Location:'.APP_W.'home');\n\t\t }\n\t\t else{\n\t\t // no hi és l'usuari, cal registrar\n\t\t header('Location:'.APP_W.'register');\n\t\t }\n\t\t \t\t}\n\t\t}", "public function signup()\n {\n if ($this->validate()) {\n $user = new User();\n $user->username = $this->username;\n $user->first_name = $this->firstName;\n $user->last_name = $this->lastName;\n $user->email = $this->email;\n $user->setPassword($this->password);\n $user->generateAuthKey();\n $user->ip = Yii::$app->request->getUserIP();\n $user->ua = Yii::$app->request->getUserAgent();\n if ($user->save()) {\n $this->user = $user;\n $this->sendMail();\n return $user;\n }\n }\n\n return false;\n }", "public function doAction() {\n if ($this->request->isPost() === false) {\n\n $this->flashSession->error('Invalid request');\n return $this->response->redirect('signup', false, 302);\n }\n\n // Validate the form\n $form = new \\Aiden\\Forms\\RegisterForm();\n if (!$form->isValid($this->request->getPost())) {\n foreach ($form->getMessages() as $message) {\n $this->flashSession->error($message);\n return $this->response->redirect('/#form-response', 302);\n }\n }\n\n $name = $this->request->getPost(\"name\", \"string\");\n $email = $this->request->getPost(\"email\", \"string\");\n $password = $this->request->getPost(\"password\");\n $websiteUrl = $this->request->getPost(\"websiteUrl\", \"string\");\n $companyName = $this->request->getPost(\"companyName\", \"string\");\n $companyCountry = $this->request->getPost(\"companyCountry\", \"string\");\n $companyCity = $this->request->getPost(\"companyCity\", \"string\");\n $checkfirst = \\Aiden\\Models\\Users::findFirst(array(\n \"email = ?1\",\n \"bind\" => array(\n 1 => $email,\n )));\n\n if ($checkfirst) {\n $errorMessage = 'Email is already existed, please try another.';\n $this->flashSession->error($errorMessage);\n return $this->response->redirect('signup', false, 302);\n }\n $user = new \\Aiden\\Models\\Users();\n $user->setName($name);\n $user->setEmail($email);\n $user->setWebsiteUrl($websiteUrl);\n $user->setCompanyName($companyName);\n $user->setCompanyCountry($companyCountry);\n $user->setCompanyCity($companyCity);\n $user->setPasswordHash($this->security->hash($password));\n $user->setLevel(\\Aiden\\Models\\Users::LEVEL_USER);\n $user->setCreated(new \\DateTime());\n $user->setLastLogin(new \\DateTime());\n $user->setImageUrl(BASE_URI.\"dashboard_assets/images/avatars/avatar.jpg\");\n $user->setSeenModal(0);\n $user->setPhraseDetectEmail(0);\n $user->setSubscriptionStatus('trial');\n\n if ($user->save()) {\n\n $this->session->set('auth', [\n 'user' => $user\n ]);\n\n // Log message\n $message = sprintf('User with email [%s] has successfully registered.', $email);\n $this->logger->info($message);\n\n return $this->response->redirect('leads', false, 302);\n }\n else {\n\n // Client message\n $errorMessage = 'Something went wrong, please try again.';\n $this->flashSession->error($errorMessage);\n\n // Log message\n $message = sprintf('Could not signup user [%s]. (Model error: %s)', $email, print_r($user->getMessages(), true));\n $this->logger->error($message);\n\n return $this->response->redirect('signup', false, 302);\n }\n\n }", "public function p_signup() \n {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n $q = 'SELECT user_id\n FROM users \n WHERE email = \"'.$_POST['email'].'\"';\n $user_id = DB::instance(DB_NAME)->select_field($q);\n if ($user_id!=NULL)\n {\n $error=\"User account already exists.\";\n $this->template->content = View::instance('v_users_signup');\n $this->template->content->error=$error;\n echo $this->template;\n }\n else\n {\n\t\t\n //Inserting the user into the database\n\t\t\t$_POST['created']=Time::now();\n\t\t\t$_POST['modified']=Time::now();\n\t\t\t$_POST['password']=sha1(PASSWORD_SALT.$_POST['password']);\n\t\t\t$_POST['token']=sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string());\n\t\t\t$_POST['activation_key']=str_shuffle($_POST['password'].$POST['token']);\n\t\t\t$activation_link=\"http://\".$_SERVER['SERVER_NAME'].\"/users/p_activate/\".$_POST['activation_key'];\n\t\t\t$name=$_POST['first_name'];\n\t\t\t$name.=\" \";\n\t\t\t$name.=$_POST['last_name'];\n\t\t\t$user_id = DB::instance(DB_NAME)->insert('users', $_POST);\n\t\t\t\n\t\t//Sending the confirmation mail\n\t\t\t$to[]=Array(\"name\"=>$name, \"email\"=>$_POST['email']);\n\t\t\t$subject=\"Confirmation letter\";\n\t\t\t$from=Array(\"name\"=>APP_NAME, \"email\"=>APP_EMAIL); \n $body = View::instance('signup_email');\n $body->name=$name;\n $body->activation_link=$activation_link;\n\n\n\t\t\t$email = Email::send($to, $from, $subject, $body, false, $cc, $bcc);\n\t\t\t\n\t\t\tRouter::redirect('/');\n } \n }", "public function signUp(Request $request)\n {\n $validation = Validator::make($request->all(),[\n 'matricule' => 'bail|required|min:6|max:6',\n 'nom' => 'required',\n 'prenom' => 'required',\n 'email' => 'required',\n 'password' => 'bail|required|min:6',\n 'confirmation' => 'bail|required|min:6'\n ]);\n if ($validation->fails()) {\n return view('auth.register')->withErrors($validation);\n }\n \n $data = $validation->attributes();\n $matricule = strtoupper($data['matricule']);\n\n if (!preg_match('/^[0-9]{2}P[0-9]{3}$/',$matricule)) {\n return view('auth.register')->withMessage(\"Matricule Invalide\");\n }\n\n $user = User::where('matricule',$matricule)->get()->first();\n if ($user!=null) {\n return view('auth.register')->withMessage(\"Matricule déjà inscrit\");\n }\n\n $email = $data['email'];\n if (!preg_match('/^\\w+@[A-Za-z]+\\.[A-Za-z]/',$email)) {\n return view('auth.register')->withMessage(\"Addresse Mail Invalide\");\n }\n\n $password = $data['password'];\n if ($password!=$data['confirmation']) {\n return view('auth.register')->withMessage('Les deux mot de passes ne correspondent pas');\n }\n \n User::create([\n 'matricule' => $matricule,\n 'email' => $email,\n 'password' => bcrypt($password),\n 'nom'=> strtoupper($data['nom']),\n 'prenom' => strtoupper($data['prenom'])\n ]);\n\n return redirect()->route('req_connexion');\n }", "public function create()\n {\n return view('sign_up');\n }", "public function testSignup()\n\t{\n\t\t$crawler = $this->client->request('post', 'account/sigup');\n\n\t\t$this->assertTrue($this->client->getResponse()->isOk());\n\t}", "public function signup()\n {\n if ($this->model->signup())\n $this->redirect(\"home\");\n }", "public function tut_register1(Request $req){\n\t\t\t$userData = array(\n\t\t\t'username' => $req->get('username'),\n\t\t\t'email' => $req->get('email'),\n\t\t\t'password' => $req->get('password'),\n\t\t\t'pp' => $req->get('pp'),\n\t\t\t);\n\t\t\t\n\t\t\t/* Initializing validator */\n\t\t\t$validator = $this->validator($userData);\n\t\t\t\n\t\t\t/* validating user input */\n\t\t\tif($validator->fails()){\n\t\t\t\treturn redirect()->back()->withErrors($validator, 'tutorsignup');\n }else{\n\t\t\t\t$userData['role']=1;\n\t\t\t\t$Crostutor = new Crostutor();\n\t\t\t\t$response = $Crostutor->register($userData);\n\t\t\t\t\n\t\t\t\tif(isset($response['status']) && $response['status'] == 0){\n\t\t\t\t\t$userData['uid']=$response['message']['uid'];\n\t\t\t\t\t$userData['token']=$response['message']['token'];\n\t\t\t\t\t//session('userdata',$userData);\n\t\t\t\t\t$parameter = array(\n\t\t\t\t\t'email' => $req->get('email'),\n\t\t\t\t\t'password' => $req->get('password'),\n\t\t\t\t\t);\n\t\t\t\t\t$response1 = $Crostutor->login($parameter);\n\t\t\t\t\tif(isset($response1['status']) && $response1['status'] == 0){\n\t\t\t\t\t\t$userData1 = array_merge($response1['message'],$parameter);\n\t\t\t\t\t\tsession($userData1);\n\t\t\t\t\t\tToastr::success('Account created successfully.', 'Success', ['options']);\n\t\t\t\t\t\treturn redirect(url('tutor/dashboard'));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn redirect(url('/'));\n\t\t\t\t\t}else{ \n\t\t\t\t\t$validator->errors()->add('custom_error', $response['message']); \n\t\t\t\t\treturn redirect()->back()->withErrors($validator, 'signupErrors');\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function testSignUp()\n {\n $rand = rand();\n $this->visit('/register')\n ->type('ruchi', 'name')\n ->type('ruchi' .$rand.'@in.com', 'email')\n ->type('qwerty', 'password')\n ->type('qwerty', 'password_confirmation')\n ->press('Register')\n ->seePageIs('/');\n }", "public function showSignUpForm() {\n if(!config('springintoaction.signup.allow')) {\n return view('springintoaction::frontend.signup_closed');\n }\n\n return view('springintoaction::frontend.signup');\n }", "public function newRegistration() {\n $this->registerModel->getUserRegistrationInput();\n $this->registerView->setUsernameValue($this->registerView->getUsername());\n $this->registerModel->validateRegisterInputIfSubmitted();\n if ($this->registerModel->isValidationOk()) {\n $this->registerModel->hashPassword();\n $this->registerModel->saveUserToDatabase();\n $this->loginView->setUsernameValue($this->registerView->getUsername());\n $this->loginView->setLoginMessage(\"Registered new user.\");\n $this->layoutView->render(false, $this->loginView);\n } else {\n $this->layoutView->render(false, $this->registerView);\n }\n \n }", "public function signupAction()\n {\n $form = new SignUpForm();\n\n if ($this->request->isPost()) {\n\n if ($form->isValid($this->request->getPost()) != false) {\n\n $user = new Users();\n\n $user->assign(array(\n 'name' => $this->request->getPost('name', 'striptags'),\n 'email' => $this->request->getPost('email'),\n 'password' => $this->security->hash($this->request->getPost('password')),\n 'profilesId' => 2\n ));\n\n if ($user->save()) {\n return $this->dispatcher->forward(array(\n 'controller' => 'index',\n 'action' => 'index'\n ));\n }\n\n $this->flash->error($user->getMessages());\n }\n }\n\n $this->view->form = $form;\n }", "public function signupAction()\n {\n $form = new SignUpForm();\n\n if ($this->request->isPost()) {\n\n if ($form->isValid($this->request->getPost()) != false) {\n\n $user = new Users();\n\n $user->assign(array(\n 'name' => $this->request->getPost('name', 'striptags'),\n 'email' => $this->request->getPost('email'),\n 'password' => $this->security->hash($this->request->getPost('password')),\n 'profilesId' => 2\n ));\n\n if ($user->save()) {\n return $this->dispatcher->forward(array(\n 'controller' => 'index',\n 'action' => 'index'\n ));\n }\n\n $this->flash->error($user->getMessages());\n }\n }\n\n $this->view->form = $form;\n }", "abstract public function newSignup($name);", "public function guest_completed_registration_form_Successfully_registered_and_checked_in_DB()\n {\n $this->visit('/register')\n ->seePageIs('/register')\n ->type($this->user->name, 'name')\n ->type($this->user->email, 'email')\n ->type($this->user->password, 'password')\n ->type($this->user->password, 'password_confirmation')\n ->press('Register');\n\n\n $this->seeInDatabase('users', ['name' => $this->user->name]);\n }", "public function ulogiraj_registiraj()\r\n\t{\r\n\t\tif(isset($_POST['ulogiraj']))\r\n\t\t{\r\n\t\t\t$this->registry->template->title = 'Login';\r\n\t\t\t$this->registry->template->show( 'login' );\r\n\t\t}\r\n\t\tif(isset($_POST['registriraj']))\r\n\t\t{\r\n\t\t\t$this->registry->template->title = 'Registriraj se';\r\n\t\t\t$this->registry->template->show( 'register' );\r\n\t\t}\r\n\r\n\t}", "private function signupValid(){\n if ($this->checkMail($_POST['email'])){\n if ($this->checkUsername($_POST['username'])){\n if ($this->checkPass($_POST['pass']) && $this->checkPass($_POST['pass2'])){\n if($_POST['pass'] === $_POST['pass2']){\n if(!$this->checkUsernameExist()){\n if(!$this->checkMailExist()){\n return 'OK';\n }else{\n return \"Cette adresse e-mail est deja utilisée\";\n }\n }else{\n return \"Ce nom d'utilisateur est deja pris\";\n }\n }else{\n return \"Le mot de passe et la confirmation sont différents\";\n }\n }else{\n return \"Mot de passe invalide\";\n }\n }else{\n return \"Nom d'utilisateur invalide\";\n }\n }else{\n return 'Adresse e-mail invalide';\n } \n }", "function SignupAction($data, $form) {\n \n\t\t\n\t\t// Create a new object and load the form data into it\n\t\t$entry = new SearchContestEntry();\n\t\t$form->saveInto($entry);\n \n\t\t// Write it to the database.\n\t\t$entry->write();\n\t\t\n\t\tSession::set('ActionStatus', 'success'); \n\t\tSession::set('ActionMessage', 'Thanks for your entry!');\n\t\t\n\t\t//print_r($form);\n\t\tDirector::redirectBack();\n \n\t}", "public function registrar()\r\n\t{\r\n\t\t//Se debe agregar el checkbox de terminos y condiciones y debe ser un enlace tipo _blank\r\n\t\tView::template('default');\r\n\t\tif(Input::hasPost('correo')){\r\n\t\t\tif((New Proveedor)->registrar()){\r\n\t\t\t\tFlash::valid('Registro exitoso, ya puede iniciar sesión con su cuenta, lo estamos redirigiendo al inicio de sesión');\r\n \t\tInput::delete();\r\n \t\tRedirect::to('', '5');\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tFlash::error('No se pudo registrar, intente más tarde o comuniquese con soporte');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function create()\n {\n return view('login.signup');\n }", "function signUp($post)\n{\n $email = $post['email'];\n $password = $post['password'];\n $password_confirm = $post['password_confirm'];\n // for showing error when input are empty or mail doesn't match\n if (!preg_match(\"/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,})$/i\", $email))\n {\n $error_msg = \"Format de mail non valide.\";\n }\n // If password input length is less than 6 chars, show error.\n elseif (strlen($password) < 6)\n {\n $error_msg = \"Mot de passe incorrect. Min. 6 caractères.\";\n }\n // If both password don't match, show error.\n elseif ($password != $password_confirm)\n {\n $error_msg = \"Les mots de passes ne correspondent pas.\";\n }\n else {\n $data = new stdClass();\n $data->email = $email;\n $data->password = $password;\n $user = new User( $data );\n $userData = $user->getUserByEmail();\n if ($userData && sizeof( $userData ) > 0) // If email address is already in used, show error.\n {\n $error_msg = \"Cette adresse mail est déjà utilisée.\";\n }\n elseif (strlen($password) < 5) // If password input length is less than 6 chars, show error.\n {\n $error_msg = \"Mot de passe incorrect. Min. 5 caractères.\";\n }\n elseif ($password != $password_confirm) // If both password don't match, show error.\n {\n $error_msg = \"Les mots de passes ne correspondent pas.\";\n }\n else\n {\n // Create new user.\n $password = hash('sha256', $password);\n $user = new User();\n $user->setEmail($email);\n $user->setPassword($password);\n $user->createUser();\n $success_msg = \"Votre inscription s'est déroulée avec succès, vous allez recevoir un mail d'activation.\";\n }\n\n }\n\n //require ('view/auth/signupView.php');\n}", "function register(){\n $title = \"Inscription\";\n\n if (isset($_GET['pseudo'])){\n if($_GET['pseudo'] != \"\"){\n $test = selectInfoUser($_GET['pseudo']);\n print_r($_GET);\n if (!$test) {\n if (isset($_GET['pw']) && isset($_GET['pwV']) && $_GET['pwV'] == $_GET['pw'] && $_GET['pw'] != \"\" ){\n addUser($_GET['pseudo'],$_GET['pw']);\n $_SESSION['error'] = \"\";\n connection($_GET);\n }else{\n $_SESSION['error'] = \"Erreur : les mots de passe ne correspondent pas !\";\n header('Location: index.php?action=register');\n }\n }else{\n $_SESSION['error'] = \"Erreur : Compte déjà existant !\";\n header('Location: ./index.php?action=register');\n }\n }else {\n $_SESSION['error'] = \"Erreur : Un des champs est mal rempli.\";\n header('Location: ./index.php?action=register');\n }\n }else{\n require('view/template/navbar.php');\n require('view/template/top.php');\n require('view/formRegister.php');\n require('view/template/bottom.php');\n }\n}", "public static function signUp()\n {\n global $cont;\n $name = $_POST['name'];\n $email = $_POST['email'];\n $password = SHA1($_POST['password']);\n\n $signup = $cont->prepare(\"INSERT INTO users(`name`, `email`, `password` , `role`) VALUES (? , ? , ? , ?) \");\n $signup->execute([$name , $email , $password , 0]);\n\n session_start();\n $_SESSION['message'] = \"Data entering correctly\";\n header(\"location:../login.php\");\n }", "public function registerNewUser()\n\t{\n\t\t# make the call to the API\n\t\t$response = App::make('ApiClient')->post('register', Input::all());\n\n\t\t# if we successfully register a new user\n\t\tif(isset($response['success']))\n\t\t{\n\t\t\tUser::startSession($response['success']['data']['user']);\n\n\t\t\t# grab the data array from the response\n\t\t\tSession::flash('success', $response['success']['data']);\n\n\t\t\t# show the user profile screen\n\t\t\treturn Redirect::route('profile');\n\t\t}\n\t\t# there was a problem registering the user\n\t\telse \n\t\t{\n\t\t\t# save the API response to some flash data\n\t\t\tSession::flash('registration-errors', getErrors($response));\n\n\t\t\t# also flash the input so we can replay it out onto the reg form again\n\t\t\tInput::flash();\n\n\t\t\t# ... and show the sign up form again\n\t\t\treturn Redirect::back();\n\t\t}\n\t}", "public function signUp() {\n if ($this->request->is('post')) {\n\n $this->User->create();\n\n if ($this->User->save($this->request->data['signUp'])) {\n $this->Flash->set(__(\"Your user has been created\"),array(\n 'element' => 'success'\n ));\n return $this->redirect(array('action' => 'index'));\n }\n $this->Flash->set(\n __('The user could not be saved. Please, try again.',\n array(\n 'element' => 'error.ctp'\n ))\n );\n }\n\n $this->autoRender = false;\n }", "protected function RegisterIfNew(){\n // Si el sitio es de acceso gratuito, no debe registrarse al usuario.\n // Luego debe autorizarse el acceso en el metodo Authorize\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return;\n }\n\t\t\n\t\t// Crear la cuenta de usuarios nuevos\n // if (!DBHelper::is_user_registered($this->user)){\n // if (!(int)$this->data->mobile || \n // (int)($this->data->client_app_version) < AU_NEW_USER_MIN_VERSION_CODE){\n // // Force update\n // $this->url = Url::Parse(\"http://\". HTTP_HOST .\"/__www/new_user_update_required.php\");\n // }else{\n // DBHelper::createNewAccount($this->user, DIAS_PRUEBA);\n // }\n // }\n \n // No crear cuenta. En su lugar mostrar una pagina notificando\n // E:\\XAMPP\\htdocs\\__www\\no_registration_allowed.html\n \n if (!DBHelper::is_user_registered($this->user)){\n DBHelper::storeMailAddress($this->user);\n $this->url = Url::Parse(\"http://auroraml.com/__www/no_registration_allowed.html\");\n }\n }", "public function signup()\n\t{\n $user = new User();\n\n // If user can succesfully signup then signin\n if ($user->signup(Database::connection(), $_POST['username'], $_POST['password']))\n {\n $_SESSION['id'] = $user->id;\n return True;\n }\n\n return False;\n }", "public function signUpAction() {\n //initialize an emtpy message string\n $message = '';\n //check if we have a logged in user\n if ($this->has('security.context') && $this->getUser() && TRUE === $this->get('security.context')->isGranted('ROLE_NOTACTIVE')) {\n //set a hint message for the user\n $message = $this->get('translator')->trans('you will be logged out and logged in as the new user');\n }\n //initialize the form validation groups array\n $formValidationGroups = array('signup');\n $container = $this->container;\n //get the login name configuration\n $loginNameRequired = $container->getParameter('login_name_required');\n //check if the login name is required\n if ($loginNameRequired) {\n //add the login name group to the form validation array\n $formValidationGroups [] = 'loginName';\n }\n //get the request object\n $request = $this->getRequest();\n //create an emtpy user object\n $user = new User();\n //this flag is used in the view to correctly render the widgets\n $popupFlag = FALSE;\n //check if this is an ajax request\n if ($request->isXmlHttpRequest()) {\n //create a signup form\n $formBuilder = $this->createFormBuilder($user, array(\n 'validation_groups' => $formValidationGroups\n ))\n ->add('email')\n ->add('firstName', null, array('required' => false))\n ->add('userPassword');\n //use the popup twig\n $view = 'ObjectsUserBundle:User:signup_popup.html.twig';\n $popupFlag = TRUE;\n } else {\n //create a signup form\n $formBuilder = $this->createFormBuilder($user, array(\n 'validation_groups' => $formValidationGroups\n ))\n ->add('email', 'email')\n ->add('firstName', null, array('required' => false))\n ->add('userPassword', 'repeated', array(\n 'type' => 'password',\n 'first_name' => 'Password',\n 'second_name' => 'RePassword',\n 'invalid_message' => \"The passwords don't match\",\n ));\n //use the signup page\n $view = 'ObjectsUserBundle:User:signup.html.twig';\n }\n //check if the login name is required\n if ($loginNameRequired) {\n //add the login name field\n $formBuilder->add('loginName');\n }\n //create the form\n $form = $formBuilder->getForm();\n //check if this is the user posted his data\n if ($request->getMethod() == 'POST') {\n //fill the form data from the request\n $form->handleRequest($request);\n //check if the form values are correct\n if ($form->isValid()) {\n //get the user object from the form\n $user = $form->getData();\n if (!$loginNameRequired) {\n $user->setLoginName($this->suggestLoginName($user->__toString()));\n }\n //user data are valid finish the signup process\n return $this->finishSignUp($user);\n }\n }\n $twitterSignupEnabled = $container->getParameter('twitter_signup_enabled');\n $facebookSignupEnabled = $container->getParameter('facebook_signup_enabled');\n $linkedinSignupEnabled = $container->getParameter('linkedin_signup_enabled');\n $googleSignupEnabled = $container->getParameter('google_signup_enabled');\n return $this->render($view, array(\n 'form' => $form->createView(),\n 'loginNameRequired' => $loginNameRequired,\n 'message' => $message,\n 'popupFlag' => $popupFlag,\n 'twitterSignupEnabled' => $twitterSignupEnabled,\n 'facebookSignupEnabled' => $facebookSignupEnabled,\n 'linkedinSignupEnabled' => $linkedinSignupEnabled,\n 'googleSignupEnabled' => $googleSignupEnabled\n ));\n }", "public function showRegisterForm(){\n return view('auth.entreprise-register');\n }", "public function postSignup()\n\t{\n\t\t$v = Validator::make($input = Input::all(), $this->rules->signupRules);\n\t\tif($v->fails())\n\t\t\treturn Redirect::back()->withInput()->withErrors($v);\n\n\t\tif($this->user->createNewUser($input)) {\n\t\t\treturn Redirect::action('UsersController@index');\n\t\t}\t\t\n\t\telse {\n\t\t\treturn Redirect::back()-withInput();\n\t\t}\n\t}", "public function register()\n\t{\n\t\tif ($this->session->userdata('isValid') == 0) {\n\t\t\t$this->load->view('v_register');\n\t\t}\n\n\t\t// Jika user masuk dari link baru, memastikan isi data session kosong dengan men-destroy data session\n\t\telse\n\t\t{\n\t\t\t$this->session->sess_destroy();\n\t\t\t$this->load->view('v_register');\n\t\t}\n\t}", "public function create()\n {\n if (! Session::has('userGithubData')) {\n return Redirect::route('login');\n }\n $githubUser = array_merge(Session::get('userGithubData'), Session::get('_old_input', []));\n return View::make('auth.signupconfirm', compact('githubUser'));\n }", "public function postRegister()\n {\n global $pdo;\n\n $result = false;\n $errors = [];\n\n $validator = new Validator();\n $validator->add('name', 'required');\n $validator->add('email', 'required');\n $validator->add('email', 'email'); //Para comprobar que tenga el formato de email.\n $validator->add('rol_id', 'required');\n $validator->add('password', 'required');\n\n if ($validator->validate($_POST)) { //Para validar lo que viene del global $_POST con la info de la base de datos.\n $sql = 'INSERT INTO users (name, email, rol_id, password) VALUES (:name, :email, :rol_id, :password)';\n $query = $pdo->prepare($sql);\n $result = $query->execute([\n 'name' => $_POST['name'],\n 'email' => $_POST['email'],\n 'rol_id' => $_POST['rol_id'],\n 'password' => password_hash($_POST['password'], PASSWORD_DEFAULT) //Para ponerle un encriptado de seguridad al password.\n ]);\n } else {\n $errors = $validator->getMessages();\n }\n\n //Vista a la que se quiere acceder\n return render('../views/register.php', [\n 'result' => $result,\n 'errors' => $errors\n ]);\n }", "function validate_user_signup()\n {\n }", "function viewSignUpForm() {\n\t$view = new viewModel();\n\t$view->showSignUpForm();\t\n}", "function signUp() {\n if ($this->getRequestMethod() != 'POST') {\n $this->response('', 406);\n }\n \n $user = json_decode(file_get_contents('php://input'),true);\n if (!self::validateUser($user['username'], $user['password'])) {\n $this->response('', 406);\n }\n\t \n\t // check if user already exists\n\t $username_to_check = $user['username'];\n\t $query = \"select * from users where username='$username_to_check'\";\n\t $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\t\n\t if ($r->num_rows > 0) {\n\t \t$this->response('', 406);\n\t }\t\n\t\n $user['password'] = self::getHash($user['username'], $user['password']);\n $keys = array_keys($user);\n $columns = 'username, password';\n $values = \"'\" . $user['username'] . \"','\" . $user['password'] . \"'\"; \n $query = 'insert into users (' . $columns . ') values ('. $values . ');';\n \n if(!empty($user)) {\n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n $success = array('status' => 'Success', 'msg' => 'User Created Successfully.', 'data' => $user);\n $this->response(json_encode($success),200);\n } else {\n $this->response('',204);\n }\n }", "function registrasi_post()\n {\n $validasi = [\n [\n 'field' => 'fullname',\n 'label' => 'Fullname',\n 'rules' => 'required|min_length[5]',\n 'errors' => [\n 'required' => 'Masukan nama lengkap',\n 'min_length' => 'Minimum fullname length is 5 characters',\n 'alpha_dash' => 'You can only use a-z 0-9 _ . – characters for input',\n ],\n ],\n [\n 'field' => 'password',\n 'label' => 'Password',\n 'rules' => 'required|min_length[8]',\n 'errors' => [\n 'required' => 'You must provide a Password.',\n 'min_length' => 'Minimum Password length is 8 characters',\n ],\n ],\n [\n 'field' => 'email',\n 'label' => 'Email',\n 'rules' => 'required|trim|valid_email|is_unique[auth_user.email]',\n 'errors' => [\n 'required' => 'email is registration',\n ],\n ],\n [\n 'field' => 'phone',\n 'label' => 'Phone',\n 'rules' => 'required|min_length[10]',\n 'errors' => [\n 'required' => 'You must provide a phone.',\n 'min_length' => 'Minimum Phone length is 10 characters',\n ],\n ],\n [\n 'field' => 'role_id',\n 'label' => 'Role ID',\n 'rules' => 'required',\n 'errors' => [\n 'required' => 'You must provide a role ID.',\n ],\n ],\n ];\n\n $data_v = $this->input->get();\n $this->form_validation->set_data($data_v);\n $this->form_validation->set_rules($validasi);\n\n if ($this->form_validation->run() == false) {\n $this->response([\n 'status' => FALSE,\n 'message' => $this->form_validation->error_array()\n ], REST_Controller::HTTP_NOT_FOUND);\n } else {\n\n $fullname = $data_v['fullname'];\n $email = $data_v['email'];\n $password = $data_v['password'];\n $phone = $data_v['phone'];\n $role_id = $data_v['role_id'];\n\n\n\n $data = array(\n 'fullname' => htmlspecialchars($fullname, true),\n 'email' => htmlspecialchars($email, true),\n 'password' => password_hash($password, PASSWORD_DEFAULT),\n 'phone' => htmlspecialchars($phone, true),\n 'image' => 'default.jpg',\n 'role_id' => 2,\n // 'role_id' => htmlspecialchars($role_id, true),\n 'is_active' => 0,\n 'date_created' => date('Y-m-d H:i:s')\n );\n\n // token email url activated\n $token = base64_encode(random_bytes(64));\n $user_token = [\n 'email' => $email,\n 'token' => $token,\n 'date_created' => date('Y-m-d H:i:s')\n\n ];\n\n $insert = $this->db->insert('auth_user', $data);\n $insert = $this->db->insert('auth_user_token', $user_token);\n\n $this->_sendEmail($token, 'activated');\n\n if ($insert == true) {\n // $this->response($data, 200);\n $this->response([\n 'status' => FALSE,\n 'message' => 'registration succses'\n ], REST_Controller::HTTP_OK);\n } else {\n // $this->response(array('status' => 'failed', 502));\n $this->response([\n 'status' => FALSE,\n 'message' => 'registration filed'\n ], REST_Controller::HTTP_NOT_FOUND);\n }\n }\n }", "public function postRegister()\n\t{\n\t\t$user = $this->userService->create(Input::all());\n\n\t\tif (!$user)\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($this->userService->errors())->withInput();\n\t\t}\n\n\t\tAlert::success('You have successfully registered yourself!')->flash();\n\n\t\t// set flag for login page\n\t\tSession::flash('just_registered', '1');\n\n\t\treturn Redirect::route('auth-login');\n\t}", "public function registered()\n { \n $data = [\n 'judul_seminar' => $this->judul_seminar,\n 'nama_pembicara' => $this->nama_pembicara,\n 'tulisan_seminar' => $this->tulisan_seminar\n ];\n $this->load->view('seminar/form_registered', $data); \n }", "private static function signup() {\r\n\t\t$user = new User($_POST);\r\n\t\t$_SESSION['badUser'] = new User($user->getParameters()); // used by view to temporarily store signup form input\r\n\t\t$_SESSION['badUser']->setErrors($user->getErrors());\r\n\t\t$_SESSION['badUser']->clearPassword();\r\n\r\n\t\t// check for validation errors\r\n\t\tif ($user->getErrorCount() > 0) {\r\n\t\t\tself::alertMessage('danger', 'One or more fields contained errors. Check below for details. Make any needed corrections and try again.');\r\n\t\t\tSignupView::show();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// make sure user name is not already taken\r\n\t\tif (UsersDB::userExists($user->getUserName())) {\r\n\t\t\tself::alertMessage('danger', 'User name already exists. You must choose another.');\r\n\t\t\tSignupView::show();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// make sure main character name is not already taken\r\n\t\tif (UsersDB::mainExists($user->getMainName())) {\r\n\t\t\tself::alertMessage('danger', 'The main character name is already associated with another user.');\r\n\t\t\tSignupView::show();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// user name available. send add request to database and check for success\r\n\t\tUsersDB::addUser($user);\r\n\t\tif ($user->getErrorCount() > 0) {\r\n\t\t\tself::alertMessage('danger', 'Failed to add user to database. Contact support.');\r\n\t\t\tSignupView::show();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// user is valid and should be logged in at this point\r\n\t\tunset($_SESSION['badUser']);\r\n\t\t$_SESSION['user'] = $user;\r\n\r\n\t\t// create a random verification code, text it to the user's phone, and display verification page\r\n\t\tTextMessageController::sendVerificationCode();\r\n\t\tVerificationView::show();\r\n\t}", "public function getRegisterSuccess()\n {\n return view(\"Home::auth.registersuccess\");\n }", "public function register() {\n // Check for POST\n if($_SERVER['REQUEST_METHOD'] == 'POST') {\n\n // Array bereinigen\n // INPUT_POST ruft alle POST-Variablen auf\n // FILTER_SANITIZE_STRING entfernt HTML-Tags \n // und encodiert oder entfernt Special-Chars\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n \n // Datenarray für view befüllen\n $data = [\n 'head' => 'Registrieren',\n\n 'name' => trim($_POST['name']),\n 'name_err' => '',\n\n 'email' => trim($_POST['email']),\n 'email_err' => '',\n \n 'password' => trim($_POST['password']),\n 'password_err' => '',\n\n 'confirm_password' => trim($_POST['confirm-password']),\n 'confirm_password_err' => '',\n\n 'title' => 'Register'\n ];\n\n // Namen-Validierung\n if (empty($data['name'])) {\n $data['name_err'] = \"Bitte geben sie Ihren Namen an.\";\n }\n // Email-Validierung\n if (empty($data['email'])) {\n $data['email_err'] = \"Bitte geben sie eine Email-Adresse an.\";\n } \n elseif ($this->userModel->getUserByEmail($data['email'])) {\n $data['email_err'] = \"Die Email-Adresse ist schon vergeben.\";\n }\n \n // Passwort-Validierung\n if (empty($data['password'])) {\n $data['password_err'] = \"Bitte geben sie ein Passwort an.\";\n } \n elseif (strlen($data['password']) < 6) {\n $data['password_err'] = 'Passwort muss mindestens 6 Zeichen lang sein';\n }\n \n // Passwort-Validierung\n if (empty($data['confirm_password'])) {\n $data['confirm_password_err'] = \"Bitte wiederholen Sie das Passwort.\";\n } \n elseif ($data['password'] != $data['confirm_password']) {\n $data['confirm_password_err'] = \"Die beiden Passwörter stimmen ncht überein.\";\n }\n \n // Kontrollieren ob es Fehler gibt\n if (empty($data['name_err']) &&\n empty($data['email_err']) &&\n empty($data['password_err']) &&\n empty($data['confirm_password_err'])\n ) {\n // Passwort hashen\n $data['password'] = password_hash($data['password'], PASSWORD_DEFAULT);\n\n // Nutzer registrieren\n if ($this->userModel->register($data)) {\n flash('register_success', 'Du bist registriert und kannst dich nun einloggen.');\n redirect('user/login');\n } \n else {\n die('Da ist irgendwas falsch gelaufen');\n }\n }\n else {\n // Das Formular mit den Fehlern anzeigen\n $this->view('user/register', $data);\n }\n }\n else {\n // Datenarray anlegen\n $data = [\n 'head' => 'Registrieren',\n\n 'name' => '',\n 'name_err' => '',\n\n 'email' => '',\n 'email_err' => '',\n \n 'password' => '',\n 'password_err' => '',\n\n 'confirm_password' => '',\n 'confirm_password_err' => '',\n\n 'title' => 'Register'\n ];\n // Das Formular laden\n $this->view('user/register', $data);\n } // ende if-else\n }", "function register()\n{\n if (isset($_POST['submitregister'])) {\n global $connection;\n\n $Nome = $_POST['Nome'];\n $Cognome = $_POST['Cognome'];\n $Email = $_POST['Email'];\n $Telefono = $_POST['Telefono'];\n $Password = $_POST['Password'];\n $Cita = $_POST['Cita'];\n\n $query_count = \"SELECT COUNT(*) AS TotalUsers from users WHERE user_username='$Email'\";\n $result_count = mysqli_query($connection, $query_count);\n $row_count = mysqli_fetch_assoc($result_count);\n if ($row_count['TotalUsers'] < 1) {\n $queryinstert = \"INSERT INTO users(user_name,user_surname,user_username,user_email,user_city,user_livel,user_phone,user_password) VALUES ('$Nome','$Cognome','$Email','$Email','$Cita','1','$Telefono','$Password')\";\n $result_insert = mysqli_query($connection, $queryinstert);\n if ($result_insert) {\n return header('Location: index.php');\n }\n } else {\n echo '<script>alert(\"Attenzione! Con questo email esiste gia un accaunt creato.\")</script>';\n }\n }\n}", "private function _signUpPageRequested()\n {\n $this->utility->redirect('signup');\n }", "function registrati()\n{\n global $connection;\n if (isset($_POST['registrati'])) {\n $name = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['name']);\n $cognome = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['cognome']);\n $email = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['email']);\n $citta = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['citta']);\n $telefono = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['telefono']);\n $username = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['username']);\n $password = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['password']);\n\n $select_username = \"SELECT * FROM users WHERE user_username='$username'\";\n $result_select = mysqli_query($connection, $select_username);\n\n if (mysqli_num_rows($result_select) == 0) {\n $registrati_dati_user = \"INSERT INTO users (user_name,user_surname,user_username,user_password,user_email,user_phone,user_city,user_livel) VALUES ('$name','$cognome','$username','$password','$email','$telefono','$citta',1)\";\n\n $result_registrati = mysqli_query($connection, $registrati_dati_user);\n\n if ($result_registrati) {\n echo \"<script>\n alert('I datti sono stati registrati');\n window.location.href='loginPage.php';\n </script>\";\n }\n } else {\n echo \"<script>\n alert('Non puoi usare questo username');\n window.location.href='registrati.php';\n </script>\";\n }\n }\n}" ]
[ "0.72885686", "0.7177277", "0.71085703", "0.705001", "0.7016478", "0.7000323", "0.6994176", "0.69622046", "0.69166756", "0.6913767", "0.6899461", "0.68003833", "0.6796162", "0.67950934", "0.678543", "0.6776235", "0.6762969", "0.67415667", "0.67321587", "0.6721957", "0.670534", "0.6686139", "0.6680934", "0.66730493", "0.6668903", "0.6666887", "0.6665618", "0.6664901", "0.6603138", "0.6600114", "0.658455", "0.6582796", "0.6575253", "0.65713304", "0.65713304", "0.65702754", "0.6564587", "0.6560618", "0.65594655", "0.6546384", "0.65380186", "0.6536695", "0.65306646", "0.65248555", "0.65208393", "0.65065265", "0.6505032", "0.6481214", "0.6477778", "0.6477041", "0.6476428", "0.64693755", "0.6463278", "0.64331377", "0.64325935", "0.6430425", "0.642909", "0.64084256", "0.63911676", "0.6375436", "0.63691187", "0.6364703", "0.63646686", "0.6351746", "0.63495505", "0.63445693", "0.63445693", "0.634376", "0.6340631", "0.6339636", "0.6334207", "0.6332732", "0.6330992", "0.63278526", "0.63245994", "0.6317194", "0.6316496", "0.6311916", "0.6307723", "0.63036364", "0.63023496", "0.6292923", "0.62746274", "0.6264949", "0.62634677", "0.6259378", "0.62547123", "0.62531936", "0.62508506", "0.6249042", "0.6247279", "0.624313", "0.62396824", "0.62319994", "0.6229698", "0.62283206", "0.6217891", "0.62167525", "0.62155575" ]
0.64262277
58
Recibimos los datos para crear un nuevo usuario
public function signup(Request $request) { $request->validate([ 'name' => 'required|min:5', 'email' => 'required|email|unique:users,email', 'password' => 'required|min:8|confirmed' ]); $user = new User; $user->name = $request->name; $user->email = $request->email; $user->password = Hash::make($request->password); $user->save(); Auth::login($user); return redirect('/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function crearUsuario() {\n\n\n if ($this->seguridad->esAdmin()) {\n $id = $this->usuario->getLastId();\n $usuario = $_REQUEST[\"usuario\"];\n $contrasenya = $_REQUEST[\"contrasenya\"];\n $email = $_REQUEST[\"email\"];\n $nombre = $_REQUEST[\"nombre\"];\n $apellido1 = $_REQUEST[\"apellido1\"];\n $apellido2 = $_REQUEST[\"apellido2\"];\n $dni = $_REQUEST[\"dni\"];\n $imagen = $_FILES[\"imagen\"];\n $borrado = 'no';\n if (isset($_REQUEST[\"roles\"])) {\n $roles = $_REQUEST[\"roles\"];\n } else {\n $roles = array(\"2\");\n }\n\n if ($this->usuario->add($id,$usuario,$contrasenya,$email,$nombre,$apellido1,$apellido2,$dni,$imagen,$borrado,$roles) > 1) {\n $this->perfil($id);\n } else {\n echo \"<script>\n i=5;\n setInterval(function() {\n if (i==0) {\n location.href='index.php';\n }\n document.body.innerHTML = 'Ha ocurrido un error. Redireccionando en ' + i;\n i--;\n },1000);\n </script>\";\n } \n } else {\n $this->gestionReservas();\n }\n \n }", "private function crearUsuario(){\n \t\t#valida que la solicitud sea mediante un post \n\t if ($_SERVER['REQUEST_METHOD'] != \"POST\") {\n\t \t//envia un error \n\t $this->mostrarRespuesta($this->convertirJson($this->devolverError(1)), 405); \n\t }\n\t //valida que los datos a incorporar no sean vacios \n\t if (isset($this->datosPeticion['nombre'], $this->datosPeticion['email'], $this->datosPeticion['pwd'])){\n\t $nombre = $this->datosPeticion['nombre']; \n\t $pwd = $this->datosPeticion['pwd']; \n\t $email = $this->datosPeticion['email'];\n\n\t //valida la existemcia del usuario mediante el email \n\t if (!$this->existeUsuario($email)){ \n\t $query = $this->_conn->prepare(\n\t \t\"INSERT into usuario (nombre,email,password,fRegistro) \n\t \t VALUES (:nombre, :email, :pwd, NOW())\");\n\t //se le asignan los valores a las variables de la consulta \n\t $query->bindValue(\":nombre\", $nombre); \n\t $query->bindValue(\":email\", $email); \n\t $query->bindValue(\":pwd\", sha1($pwd)); \n\t $query->execute(); \n\t if ($query->rowCount() == 1){ // se inserto bien \n\t $id = $this->_conn->lastInsertId(); \n\t $respuesta['estado'] = 'correcto'; \n\t $respuesta['msg'] = 'usuario creado correctamente'; \n\t $respuesta['usuario']['id'] = $id; \n\t $respuesta['usuario']['nombre'] = $nombre; \n\t $respuesta['usuario']['email'] = $email; \n\t $this->mostrarRespuesta($this->convertirJson($respuesta), 200); \n\t } else //se envia un error de insercion en la bd\n\t $this->mostrarRespuesta($this->convertirJson($this->devolverError(7)), 400); \n\t } else //se envia un error del usuario no existe\n\t $this->mostrarRespuesta($this->convertirJson($this->devolverError(8)), 400); \n\t } else { \n\t $this->mostrarRespuesta($this->convertirJson($this->devolverError(7)), 400); \n\t } \n\t}", "function createUsers(){\n\n\t\t\n\t\t\n\t\t$this->copyFrom('POST');\n\t\t$this->save(); // execute\n\t}", "function crearUsuario(){\n\t\t$params = array(\n\t\t\t':nombres' => $_POST['nombres'],\n\t\t\t':apellidos' => $_POST['apellidos'],\n\t\t\t':direccion' => $_POST['direccion'],\n\t\t\t':foto' => $_POST['foto'],\n\t\t\t':email' => $_POST['email'],\n\t\t\t':usuario' => $_POST['usuario'],\n\t\t\t':contrasena' => $_POST['contrasena'],\n\t\t\t\n\t\t);\n\t\n\t\t/* Preparamos el query apartir del array $params*/\n\t\t$query = 'INSERT INTO usuarios \n\t\t\t\t\t(nombres, apellidos, direccion, foto, email, usuario, contrasena, permisos) \n\t\t\t\tVALUES \n\t\t\t\t\t(:nombres,:apellidos,:direccion,:foto,:email,:usuario,:contrasena, 2)';\n\n\t\t/* Ejecutamos el query con los parametros */\n\t\t$result = excuteQuery(\"blogs\",\"\", $query, $params);\n\t\tif ($result > 0){\n\t\t\theader('Location: formlogin.php?result=true');\n\t\t}else{\n\t\t\theader('Location: addUser.php?result=false');\n\t\t}\n\t}", "static public function createPost(){\n\t\tinclude ($GLOBALS['PATH'] . '/classes/requests/users/CreateRequest.php');\n\n\t\t$requests = new CreateRequest;\n\t\t$errors = $requests->validate();\n\t\t\n\t\t//Criar url de redirecionar\n\t\t$back = explode('?', $_SERVER['HTTP_REFERER'])[0] ?? '/users/create';\n\n\t\tif(count($errors) > 0){\n\t\t\t//seta os params de retorno\n\t\t\t$back .= '?errors=' . json_encode($errors) . '&name='. $_POST['name'] . '&email='. $_POST['email'];\n\n\t\t}else{\n\n\t\t\t$conn = Container::getDB();\n\t\t\t$user = new User;\n\t\t\t\n\t\t\t//Cria criptografia de senha\n\t\t\t$password = crypt($_POST['password'], SALT);\n\n\t\t\t//seta os dados do usuario na instância da class User\n\t\t\t$user->setName($_POST['name'])\n\t\t\t\t->setEmail($_POST['email'])\n\t\t\t\t->setPassword($password);\n\t\t\n\t\t\t$crud = new CrudUser($conn, $user);\n\n\t\t\ttry {\n\t\t\t\t//metodo save(), salva os dados do usuario no banco de dados\n\t\t\t\t$save = $crud->save();\n\n\t\t\t\t//Verificação se o cadastro foi com successo\n\t\t\t\tif($save){\n\t\t\t\t\t$back .= '?success=Usuário cadastrado com sucesso!';\n\t\t\t\t}else{\n\n\t\t\t\t\t//cria message de retorno com erro\n\t\t\t\t\t$messageError = ['Error' => 'Erro ao salvar usuario'];\n\t\t\t\t\t$back .= '?errors=' . json_encode($messageError) . '&name='. $_POST['name'] . '&email='. $_POST['email'];\n\t\t\t\t\n\t\t\t\t}\n\t\t\t} catch (\\Throwable $th) {\n\t\t\t\techo '<pre>';\n\t\t\t\t\tprint_r($th);\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t//Redireciona para $back\n\t\theader('Location: ' . $back);\n\t}", "static public function ctrCreateUser(){\n\t\t\tif(isset($_POST[\"nuevoUsuario\"])){\n\t\t\t\tif(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/',$_POST[\"nuevoNombre\"]) &&\n\t\t\t\t\tpreg_match('/^[a-zA-Z0-9]+$/',$_POST[\"nuevoUsuario\"]) &&\n\t\t\t\t\tpreg_match('/^[a-zA-Z0-9]+$/',$_POST[\"nuevoPassword\"])){\n\n\t\t\t\t\t/*========================================\n\t\t\t\t\t\tV A L I D A R I M A G E N\n\t\t\t\t\t========================================*/\n\t\t\t\t\t\n\t\t\t\t\t$ruta = NULL;\n\n\t\t\t\t\tif(isset($_FILES[\"nuevaFoto\"][\"tmp_name\"]) && $_FILES[\"nuevaFoto\"][\"tmp_name\"] != \"\"){\n\t\t\t\t\t\tlist($ancho, $alto) = getimagesize($_FILES[\"nuevaFoto\"][\"tmp_name\"]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$nuevoAncho = 500;\n\t\t\t\t\t\t$nuevoAlto = 500;\n\n\t\t\t\t\t\t/*---------------------------------------------\n\t\t\t\t\t\t\tCREAR DIRECTORIO DONDE SE GUARDA LA FOTO\n\t\t\t\t\t\t---------------------------------------------*/\n\t\t\t\t\t\t$directorio = \"view/img/usuarios/\".$_POST[\"nuevoUsuario\"];\n\t\t\t\t\t\tmkdir($directorio, 0755);\n\n\t\t\t\t\t\t/*---------------------------------------------\n\t\t\t\t\t\t\tDE ACUERDO AL TIPO DE IMAGEN ACCIONES\n\t\t\t\t\t\t---------------------------------------------*/\n\t\t\t\t\t\t$rand = mt_rand(100, 999);\n\n\t\t\t\t\t\t//------------------ IMAGEN JPEG ------------------\n\t\t\t\t\t\tif($_FILES[\"nuevaFoto\"][\"type\"] == \"image/jpeg\"){\n\t\t\t\t\t\t\t//Guardamos Imagen en el Directorio\n\t\t\t\t\t\t\t$ruta = \"view/img/usuarios/\".$_POST[\"nuevoUsuario\"].\"/\".$rand.\".jpeg\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$origen = imagecreatefromjpeg($_FILES[\"nuevaFoto\"][\"tmp_name\"]);\n\t\t\t\t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\n\t\t\t\t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\t\t\t\t\t\t\timagejpeg($destino, $ruta);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($_FILES[\"nuevaFoto\"][\"type\"] == \"image/png\"){\n\t\t\t\t\t\t\t//Guardamos Imagen en el Directorio\n\t\t\t\t\t\t\t$ruta = \"view/img/usuarios/\".$_POST[\"nuevoUsuario\"].\"/\".$rand.\".png\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$origen = imagecreatefrompng($_FILES[\"nuevaFoto\"][\"tmp_name\"]);\n\t\t\t\t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\n\t\t\t\t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\t\t\t\t\t\t\timagepng($destino, $ruta);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$tabla = \"usuarios\";\n\n\t\t\t\t\t$crPassword = crypt($_POST[\"nuevoPassword\"], '$2a$08$abb55asfrga85df8g42g8fDDAS58olf973adfacmY28n05$');\n\t\t\t\t\t$datos = array(\n\t\t\t\t\t\t\"nombre\"=>$_POST[\"nuevoNombre\"],\n\t\t\t\t\t\t\"usuario\" => $_POST[\"nuevoUsuario\"],\n\t\t\t\t\t\t\"password\" => $crPassword,\n\t\t\t\t\t\t\"perfil\" => $_POST[\"nuevoPerfil\"],\n\t\t\t\t\t\t\"ruta\" => $ruta);\n\n\t\t\t\t\t$respuesta = ModelUsers::mdlAddUser($tabla, $datos);\n\n\t\t\t\t\tif($respuesta){\n\t\t\t\t\t\techo '<script>\n\t\t\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\t\t\t\ttitle: \"El usuario se ha guardado correctamente\",\n\t\t\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t\t\t\t}).then((result=>{\n\t\t\t\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\t\t\t\twindow.location = \"users\"\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</script>';\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo '<script>\n\t\t\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\t\t\t\ttitle: \"Error al añadir usuario\",\n\t\t\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t\t\t\t}).then((result=>{\n\t\t\t\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\t\t\t\twindow.location = \"users\"\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</script>';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\techo '<script>\n\t\t\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\t\t\t\ttitle: \"El usuario no puede ir vacio ni llevar caracteres especiales\",\n\t\t\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t\t\t\t}).then((result=>{\n\t\t\t\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\t\t\t\twindow.location = \"users\"\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</script>';\n\t\t\t\t} \n\t\t\t\t\n\t\t\t}\n\t\t}", "public function crearUsuario(){\n\t\t\n\t\t$fecha = date('dmYHis');\n\n\t\techo 'Ahora son las: ' . $fecha;\n\n\t\t/* User::create([\n\t\t\t'name' => 'Nombre ' . $fecha,\n\t\t\t'email' => 'email' . $fecha . '@gmail.com',\n\t\t\t'password' => Hash::make($fecha . $fecha),\n\t\t\t'descripcion' => 'Una descripción: ' . $fecha,\n\t\t\t'admin' => 0,\n\t\t]); */\n\n\t\tUser::create([\n\t\t\t'name' => 'Jorge Cortazar',\n\t\t\t'email' => '[email protected]',\n\t\t\t'password' => Hash::make('jorge'),\n\t\t\t'descripcion' => 'Si... de INTA',\n\t\t\t'admin' => '0',\n\t\t]);\n\n\t\techo '<br><br>Usuario creado';\n\t}", "public function agregar_usuario_controlador()\n {\n $nombres = strtoupper(mainModel::limpiar_cadena($_POST['usu_nombres_reg']));\n $apellidos = strtoupper(mainModel::limpiar_cadena($_POST['usu_apellidos_reg']));\n $identidad=mainModel::limpiar_cadena($_POST['usu_identidad_reg']);\n $puesto=mainModel::limpiar_cadena($_POST['usu_puesto_reg']);\n $unidad=mainModel::limpiar_cadena($_POST['usu_unidad_reg']);\n $rol = mainModel::limpiar_cadena($_POST['usu_rol_reg']);\n $celular = mainModel::limpiar_cadena($_POST['usu_celular_reg']);\n $usuario = strtolower(mainModel::limpiar_cadena($_POST['usu_usuario_reg']));\n $email=$usuario . '@didadpol.gob.hn' ;\n\n\n /*comprobar campos vacios*/\n if ($nombres == \"\" || $apellidos == \"\" || $usuario == \"\" || $email == \"\" || $rol == \"\" || $identidad == \"\" || $puesto == \"\" || $unidad == \"\") {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO HAS COMPLETADO TODOS LOS CAMPOS QUE SON OBLIGATORIOS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n if (mainModel::verificar_datos(\"[A-ZÁÉÍÓÚáéíóúñÑ ]{3,35}\", $nombres)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO NOMBRES SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 3 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n if (mainModel::verificar_datos(\"[A-ZÁÉÍÓÚáéíóúñÑ ]{3,35}\", $apellidos)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO APELLIDOS SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 3 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n if ($celular != \"\") {\n if (mainModel::verificar_datos(\"[0-9]{8}\", $celular)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE CELULAR NO COINCIDE CON EL FORMATO SOLICITADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n }\n if (mainModel::verificar_datos(\"[0-9]{13}\", $identidad)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE IDENTIDAD NO COINCIDE CON EL FORMATO SOLICITADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n /*validar DNI*/\n $check_dni = mainModel::ejecutar_consulta_simple(\"SELECT identidad FROM tbl_usuarios WHERE identidad='$identidad'\");\n if ($check_dni->rowCount() > 0) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE IDENTIDAD YA ESTÁ REGISTRADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n if (mainModel::verificar_datos(\"[a-z]{3,15}\", $usuario)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO NOMBRE DE USUARIO SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 5 Y UN MAXIMO DE 15 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n /*validar usuario*/\n $check_user = mainModel::ejecutar_consulta_simple(\"SELECT nom_usuario FROM tbl_usuarios WHERE nom_usuario='$usuario'\");\n if ($check_user->rowCount() > 0) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL USUARIO YA ESTÁ REGISTRADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n /*validar email*/\n\n \n $caracteres = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n $pass = \"\";\n for ($i = 0; $i < 8; $i++) {\n $pass .= substr($caracteres, rand(0, 64), 1);\n }\n $message = \"<html><body><p>Hola, \" . $nombres . \" \" . $apellidos;\n $message .= \" Estas son tus credenciales para ingresar al sistema de DIDADPOL\";\n $message .= \"</p><p>Usuario: \" . $usuario;\n $message .= \"</p><p>Correo: \" . $email;\n $message .= \"</p><p>Contraseña: \" . $pass;\n $message .= \"</p><p>Inicie sesión aquí para cambiar la contraseña por defecto \" . SERVERURL . \"login\";\n $message .= \"<p></body></html>\";\n\n $res = mainModel::enviar_correo($message, $nombres, $apellidos, $email);\n if (!$res) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO SE ENVIÓ CORREO ELECTRÓNICO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n $passcifrado = mainModel::encryption($pass);\n\n $datos_usuario_reg = [\n \"rol\" => $rol,\n \"puesto\"=>$puesto,\n \"unidad\"=>$unidad,\n \"usuario\" => $usuario,\n \"nombres\" => $nombres,\n \"apellidos\" => $apellidos,\n \"dni\"=>$identidad,\n \"clave\" => $passcifrado,\n \"estado\" => \"NUEVO\",\n \"email\" => $email,\n \"celular\" => $celular\n ];\n $agregar_usuario = usuarioModelo::agregar_usuario_modelo($datos_usuario_reg);\n if ($agregar_usuario->rowCount() == 1) {\n $alerta = [\n \"Alerta\" => \"limpiar\",\n \"Titulo\" => \"USUARIO REGISTRADO\",\n \"Texto\" => \"LOS DATOS DEL USUARIO SE HAN REGISTRADO CON ÉXITO\",\n \"Tipo\" => \"success\"\n ];\n } else {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO SE HA PODIDO REGISTRAR EL USUARIO\",\n \"Tipo\" => \"error\"\n ];\n }\n echo json_encode($alerta);\n }", "public function agregarUsuario(){\n \n }", "public function createUser($correo)\n {\n $query = $this->connect()->prepare('SELECT * FROM users WHERE Correo = :correo');\n $query->execute(['correo' => $correo]);\n //Guardo el obj PDO en cadenaValida\n $this->cadenaValida = $query->fetch();\n\n //si el resultado retorna true no inserta, de lo contrario inserta\n if ($this->cadenaValida) {\n //El usuario ya existe, hay que retornar mensaje de lo que paso\n\n return $resultado = true;\n }else\n {\n //El correo buscado no existe, hay que insertar en tabla users\n //Obtenemos el ultimo valor de ID de usuario para agregar al nuevo\n $idTemp = $this->connect()->query('SELECT MAX(IDUsuario) FROM users');\n \n $a = $idTemp->fetch(PDO::FETCH_BOTH);\n\n $this->idu = $a[0];\n\n $this->idu = (int) $this->idu + 1;\n $this->nombre = $_POST['name'];\n $this->apellidoP = $_POST['ap'];\n $this->apellidoM = $_POST['am'];\n $this->correo = $_POST['correo'];\n $this->pass = md5($_POST['pass']);\n $this->rol = 1;\n\n $query = $this->connect()->prepare(\n 'INSERT INTO users VALUES(\n :idTemp,\n :nombre,\n :apellidoP,\n :apellidoM,\n :correo,\n :pass,\n :rol)'\n );\n\n $query->execute([\n 'idTemp' => $this->idu,\n 'nombre' => $this->nombre,\n 'apellidoP' => $this->apellidoP,\n 'apellidoM' => $this->apellidoM,\n 'correo' => $this->correo,\n 'pass' => $this->pass,\n 'rol' => $this->rol]);\n\n return $resultado = false;\n }\n }", "public function registrar_usuario($nombre,$apellido,$genero,$fecha_nacimiento,$correo,$imagen,$contraseña, $type){\n \n \n $nodo_usuario = new Usuario();\n $mysql = new Conexion();\n\n $nodo_usuario->nombre = $nombre;\n $nodo_usuario->apellido = $apellido; \n $nodo_usuario->genero = $genero;\n $nodo_usuario->fecha_nacimiento = $fecha_nacimiento;\n $nodo_usuario->correo = $correo; \n $nodo_usuario->imagen = $imagen; \n $nodo_usuario->contraseña = $contraseña;\n $nodo_usuario->type = $type;\n \n /* aun no esta funcionando esto\n\t $nodo_usuario->nick = $nik;\n\t $nodo_usuario->ciudad_origen = $orig;\n\t $nodo_usuario->lugar_recidencia = $reci; \n\t $nodo_usuario->sitio_web = $web; \n\t $nodo_usuario->facebook = $face;\n\t $nodo_usuario->twitter = $twit;\n\t $nodo_usuario->youtube = $you;\n */ \n \n ModelUsuarios::crearNodoUsuario($nodo_usuario); //crea el nodo del Usuario \n\n $idneo4j = $nodo_usuario->id; //obtengo el id del nodo creado\n \n\n /*\n * Registro de usuario en Mysql\n * \"la url de facebook es importante y no se esta capturando\"\n */\n \n $sql = \"INSERT INTO usuario (\n email,\n idfacebook,\n idneo4j,\n password\n )VALUES(\n '\".$correo.\"',\n '12345678',\n '\".$idneo4j.\"',\n '\".$contraseña.\"'\n );\";\n \n return $mysql->ejecutar_query($sql); \n \n \n \n \n }", "public function crearusuarios($nombre,$primer_apellido,$segundo_apellido,$fechanacimento,$email,$telefono,$password,$comprobacion,$alias,$foto)\n { //busca en la tabla usuarios los campos donde el alias sea igual a admin si no encuentra nada devuelve null\n $usuarios = R::findOne('usuarios', 'alias=?', [\n $alias\n ]);\n \n \n // ok es igual a true siempre y cuando usuarios sea distinto de null\n $ok = ($usuarios == null );\n if ($ok) {\n // crea la tabla usuarios\n $usuarios = R::dispense('usuarios');\n //crea los campos de la tabla usuarios\n $usuarios->nombre=$nombre;\n $usuarios->primer_apellido=$primer_apellido;\n $usuarios->segundo_apellido=$segundo_apellido;\n $usuarios->fecha_nacimiento=$fechanacimento;\n $usuarios->fecha_de_registro=date('Y-m-d');\n $usuarios->email=$email;\n $usuarios->telefono=$telefono;\n $usuarios->contrasena=password_hash($password, PASSWORD_DEFAULT);\n $usuarios->confirmar_contrasena=password_hash($comprobacion, PASSWORD_DEFAULT);\n $usuarios->alias=$alias;\n //verifico si las fotos exiten en el directorio assets/fotosperfil\n $sustitutuirespaciosblancos = str_replace(\" \",\"_\",$alias);\n $directorio = \"assets/fotosperfil/usuario-\".$sustitutuirespaciosblancos.\".png\";\n \n $existefichero = is_file( $directorio );\n //si la foto exite se guarda en la base de datos se guarda el campo extension como png si la foto no exite se guarda como null\n if($foto!=null){\n \n if ( $existefichero==true ){\n $extension=\"png\";\n }else{\n \n \n \n \n \n \n \n }}\n $usuarios->foto = $extension;\n //almacena los datos en la tabla usuarios\n R::store($usuarios);\n \n \n //rdirege al controlador principal\n redirect(base_url());\n \n \n }\n \n }", "public function create()\n {\n $this->resetFields();\n //DAN MEMBUKA AREA\n $this->openUser();\n }", "function nuevoUsuario($arrayData, $arrayPerfil){\n\t\t/*\n\t\tIngresa un nuevo usuario. Una vez grabado, deben actualizarse sus datos de\n\t\tpertenencia a perfiles de acuerdo a lo seleccionado en el formulario\n\t\t*/\n\t\t$existeUsu=$this->checkUsernameExists($arrayData['user_name']);\n\t\t//$existePass=$this->checkPasswordExists($arrayData['user_pass']);\n\t\t\n\t\tif($existeUsu){\n\t\t\t$this->aErrors[]='El nombre de usuario ya fue utilizado';\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$idUsuario=$this->insert($arrayData);\n\t\tif ($idUsuario){\n\t\t\t$okPerfilUsuario=$this->actualizarPerfilesUsuario($arrayPerfil,$idUsuario);\n\t\t}\n\t\treturn $idUsuario;\n\t}", "function agregar($nombre_usuario, $nick_usuario, $clave, $apellido_usuario, $direccion_usuario, $telefono_usuario, $email_usuario, $genero_usuario, $id_rol){\n\t\tinclude 'data_bd.inc';\n\t\tinclude 'databaseClass.php';\n\t\t//creo mi cadena de conexion\n\t\t$conexion = new DB($host, $user, $pass, $bd);\n\t\t//Creo mi conexión\n\t\t$status = $conexion->conectar();\n\t\t//En caso de que devuelva una falla\n\t\tif($status === FALSE){\n\t\t\tdie('No se pudo conectar');\n\t\t}\n\t\t//Creo mi query\n\t\t$consulta = \"INSERT INTO\n\t\t\t\t\t\t\t\tusuario(nombre_usuario, nick_usuario, clave, apellido_usuario, direccion_usuario, telefono_usuario, email_usuario, genero_usuario, id_rol)\n\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t'$nombre_usuario',\n\t\t\t\t\t\t\t\t'$nick_usuario',\n\t\t\t\t\t\t\t\t'$clave',\n\t\t\t\t\t\t\t\t'$apellido_usuario',\n\t\t\t\t\t\t\t\t'$direccion_usuario',\n\t\t\t\t\t\t\t\t'$telefono_usuario',\n\t\t\t\t\t\t\t\t'$email_usuario',\n\t\t\t\t\t\t\t\t'$genero_usuario',\n\t\t\t\t\t\t\t\t$id_rol\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\";\n\t\t//Ejecuto la consulta\n\t\t$resultado = $conexion -> ejecutarConsulta($consulta);\n\t\t//Si fue una falla\n\t\tif($conexion === FALSE){\n\t\t\t$conexion -> cerrar();\t\n\t\t\treturn FALSE;\n\t\t}\n\t\t//Cierro la conexion\n\t\t$id = $resultado;\n\t\t$conexion -> cerrar();\n\t\trequire('usuarioClass.php');\n\t\t$usuario = new Usuario($id, $nombre_usuario, $nick_usuario, $clave, $apellido_usuario, $direccion_usuario, $telefono_usuario, $email_usuario, $genero_usuario, $id_rol);\n\t\t//Regreso los productos\n\t\treturn $usuario;\n\t}", "public function crear_usuario_admin()\n {\n \n $nombre = $_REQUEST['Name'];\n $correo = $_REQUEST['Email'];\n $password = $_REQUEST['Password'];\n $type = $_REQUEST['Type'];\n $nombre_proveedor = $_REQUEST['nombre_proveedor'];\n\n if (isset($correo) && isset($password) && isset($type)) {\n\n\n $consulta_correo_admin = $this->db->query(\"SELECT * FROM MA_LOGIN_ADMIN WHERE correo = '$correo'\");\n $respuesta_correo_admin = $consulta_correo_admin->row();\n\n\n //comprobacion de si el correo del usuario existe\n if ($respuesta_correo_admin != null) {\n \n $respuesta = '0';\n\n $response = array(\n\n 'respuesta' => $respuesta\n\n );\n\n echo json_encode($response);\n\n return;\n }\n\n //crear correlativo de numero de registro para el usuario\n $this->load->model('functions_model');\n $valor = $this->functions_model->GetCorrelative(\"REGISTRO_USER\",true);\n\n \n $token = bin2hex( openssl_random_pseudo_bytes(20) );\n\n $token_correo = hash( 'ripemd160', $correo );\n\n $token_clave= hash('ripemd160', $password);\n\n //data que se enviar a la tabla MA_LOGIN_ADMIN\n $data_reg_admin = array(\n\n 'num_registro' => $valor,\n 'correo' => $correo,\n 'nombre_proveedor' => $nombre_proveedor,\n 'clave' => $token_clave,\n 'token' => $token_correo,\n 'tipo' => $type,\n 'description' => $nombre\n\n );\n\n\n //metodo para insertar en la tabla de usuarios admin\n //$consulta_registro = $this->db->query(\"INSERT INTO MA_LOGIN_ADMIN (correo, nombre_proveedor, )\")\n\n if ($this->db->insert('MA_LOGIN_ADMIN', $data_reg_admin)) {\n \n $respuesta = '1';\n\n $response = array(\n\n 'respuesta' => $respuesta\n\n );\n\n echo json_encode($response);\n\n } else {\n \n $respuesta = '2';\n\n $response = array(\n\n 'respuesta' => $respuesta\n\n );\n\n echo json_encode($response);\n\n }\n \n\n }\n\n }", "public function createUser(){\n //richiamo le classi di cui avrò bisogno\n require_once \"./application/models/input_manager.php\";\n require_once \"./application/models/mail_manager.php\";\n\n $errors = array();\n\n //verifico il metodo di richiesta\n if($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n //verifico che i campi siano impostati e che non siano stringhe vuote\n if (isset($_POST['firstname']) && !empty($_POST['firstname']) && isset($_POST['lastname']) && !empty($_POST['lastname'])\n && isset($_POST['username']) && !empty($_POST['username']) &&\n isset($_POST['email']) && !empty($_POST['email'])) {\n\n //genero un nuovo input_manager e testo gli inserimenti\n $exists = false;\n $im = new input_manager();\n $firstname = filter_var($im->checkInputSpace($_POST['firstname']), FILTER_SANITIZE_STRING);\n $lastname = filter_var($im->checkInputSpace($_POST['lastname']), FILTER_SANITIZE_STRING);\n $username = filter_var($im->checkInput($_POST['username']), FILTER_SANITIZE_STRING);\n $email = filter_var($im->checkInput($_POST['email']), FILTER_SANITIZE_EMAIL);\n\n //verifico che la lunghezza dei campi corrisponda con quella consentita\n if(!(strlen($firstname) > 0 && strlen($firstname) <= 50) || !preg_match('/^[\\p{L}a-zA-Z\\' ]+$/', $firstname)){\n array_push($errors, \"Il nome deve essere lungo tra gli 1 e 50 caratteri\");\n }\n if(!(strlen($lastname) > 0 && strlen($lastname) <= 50) || !preg_match('/^[\\p{L}a-zA-Z\\' ]+$/', $lastname)){\n array_push($errors, \"Il cognome deve essere lungo tra gli 1 e 50 caratteri\");\n }\n if(!(strlen($username) > 0 && strlen($username) <= 50) || !preg_match('/^[\\p{L}a-zA-Z0-9\\d._\\- ]+$/', $username)){\n array_push($errors, \"Lo username deve essere lungo tra gli 1 e 50 caratteri\");\n }\n if(!(strlen($email) > 0 && strlen($email) <= 50) || !filter_var($email, FILTER_VALIDATE_EMAIL)){\n array_push($errors, \"L'email deve essere formattata nel seguente modo: [email protected]\");\n }\n\n //se sono di lunghezze sbagliate ritorno l'errore\n if(count($errors) != 0){\n $_SESSION['errors'] = $errors;\n $data = array(\n 'firstname' => $firstname,\n 'lastname' => $lastname,\n 'username' => $username,\n 'email' => $email\n );\n $_SESSION['data'] = $data;\n header('Location: ' . URL . 'newUser');\n exit();\n }\n\n //verifico che la password sia la stessa in entrambi i campi\n\n $users = (new utente_model)->getUsers();\n //verifico che l'email non sia già in uso\n foreach ($users as $row) {\n if ($row['email'] == $email) {\n array_push($errors, \"L'email è già in uso\");\n $exists = true;\n }\n }\n //se non esiste inserisco il nuovo utente nel db\n if(!$exists) {\n try {\n $password = bin2hex(random_bytes(4));\n (new utente_model)->addUser($firstname, $lastname, $username, $email, $password, true);\n unset($_POST);\n $mm = new mail_manager();\n $body = \"<h3>Un admin di Grotti Ticinesi ha creato un account con la tua email</h3>La password per accedervi è la seguente: <br><b>\" . $password . \"</b><br><br>Accedi dal seguente link: <a href='\" . URL . \"login'>Grotti ticino</a>\";\n $mm->sendMail($email, $body, \"Grotti Ticinesi - Benvenuto\");\n header('Location: ' . URL . 'admin');\n exit();\n }catch(Exception $e){\n $_SESSION['warning'] = $e->getCode() . \" - \" . $e->getMessage();\n header('Location: ' . URL . 'warning');\n exit();\n }\n }else{\n //se è già in uso ritorno l'errore\n $_SESSION['errors'] = $errors;\n $data = array(\n 'firstname' => $firstname,\n 'lastname' => $lastname,\n 'username' => $username,\n 'email' => $email\n );\n $_SESSION['data'] = $data;\n header('Location: ' . URL . 'newUser');\n exit();\n }\n //se le password non sono uguali ritorno l'errore\n }else{\n //se non sono stati inseriti tutti i dati ritorno l'errore\n array_push($errors, \"Inserire tutti i dati\");\n $_SESSION['errors'] = $errors;\n header('Location: ' . URL . 'newUser');\n exit();\n }\n }\n }", "public static function createUser($data){\n global $dbh;\n\t\tif( !is_array($data) ){\n\t\t\tThrow new Exception(\"Los datos de usuario deben ser un arreglo.\");\n\t\t\texit;\n\t\t}\n $remember = (isset($data['remember']) && strtolower($data['remember'])=='on');\n $model = new \\Modelos\\Cliente($dbh);\n $model->setNew(true);\n $dataModel = $model->getValidFields();\n foreach( $dataModel as $name=>$format ){\n if( isset($data[$name]) ){\n $value = $data[$name];\n switch( $format['type'] ){\n case 'mail':\n if( !filter_var($value, FILTER_VALIDATE_EMAIL) ){\n throw new \\Exception(\"E-Mail inv&aacute;lido.\");\n }\n break;\n case 'text':\n break;\n }\n }\n }\n $id = $model->setValues($data);\n if( is_numeric($id) && (int)$id>0 ){\n if( $remember ){\n setcookie(USER_COOKIE_ID,$id,time()+3600*24*360,\"/\"); //3600=segundos, 24=horas, 360=dias\n } else {\n $_SESSION['cliente'] = $id;\n }\n $cli = new ClienteControl($id);\n // $cli->sendMail(\"registro\");\n return $cli;\n }\n throw new \\Exception(\"No se pudo crear el cliente en la base de datos.\");\n\t}", "public function create(){\n\t\t$this->autenticate();\n\t\t$user_id = $_POST['id'];\n\t\t$nombre = \"'\".$_POST['nombre'].\"'\";\n\t\t$cedula = \"'\".$_POST['cedula'].\"'\";\n\t\t$nacimiento = \"'2000/1/1'\"; //fecha de nacimiento default, despues el mismo usuario la puede editar\n\t\trequire_once(\"../app/models/administrativo.php\");//conexion entre los controladores\n\t\t$administrativo=new Administrativo();// crea el perfil administrativo vacio\n\t\t$administrativo->new($nombre,$cedula,$nacimiento); // inserta la informacion antes ingresada en la base de datos\n\t\t$administrativo_id = $administrativo->where(\"cedula\",$cedula); // se trae el perfil administrativo recien creado con la cedula\n\t\t$administrativo_id = $administrativo_id[0][\"id\"];\n\t\t$administrativo->attach_user($user_id,$administrativo_id); // amarra el usuario a su nuevo perfil docente\n\t\t$administrativo_id = strval($user_id);//convierte el user_id de entero a string\n\t\theader(\"Location: http://localhost:8000/usuarios/show/$user_id\");\n\t\texit;\n\t\t$this->view('administrativos/index', []);\n\t}", "final public function Crear() : array {\n global $http;\n\n # Capturamos el error\n $error = $this->Errors($http);\n if (!is_bool($error)) {\n return $error;\n }\n \n # Insertamos datos\n $this->db->insert('users', array(\n 'name'=> $this->name, \n 'email'=> $this->email,\n 'pass'=> Strings::hash($this->pass),\n 'fecha_reg' => time()\n ));\n\n # Si existe una imagen la guardamos\n if (null != $this->file) {\n # Obtenemos el id de este ultimo usuario insertado\n $this->setId( $this->db->lastInsertId() );\n\n # Capturamos el nombre de la imagen\n $avatar = $this->uploadImage($this->file, self::AVATARS_DIR);\n\n # Actualiamos los datos con el nombre de la imagen a este usuario\n $this->db->update('users', array('avatar' => $avatar), \"id_user = '$this->id'\", 'LIMIT 1');\n }\n\n \n return array('success' => 1, 'message' => 'Administrador creado exitosamente.');\n }", "static public function ctrCrearUsuario(){\n \t\tif(isset($_POST[\"nuevoUsuario\"])){\n \t\t\tif(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevoNombre\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"nuevoUsuario\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"nuevoPassword\"])){\n\n\n\t\t\t\t//Inicializamos la ruta de la foto por si no hay foto.\n\t\t\t\t$ruta =\"\";\n\n\n \t\t\t\t$tabla = \"usuarios\";\n\n \t\t\t\t//$encriptar = crypt($_POST[\"nuevoPassword\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n \t\t\t\t$encriptar = $_POST[\"nuevoPassword\"];\n\n\n \t\t\t\t$datos = array (\"nombre\" => $_POST[\"nuevoNombre\"],\n \t\t\t\t\t\t\t\t\"usuario\" => $_POST[\"nuevoUsuario\"],\n \t\t\t\t\t\t\t\"password\" => $encriptar ,\n \t\t\t\t\t\t\"perfil\" => $_POST[\"nuevoPerfil\"]);\n\t\t\t\t\t\t \n\t\t\t\t$nombreValido = ModeloUsuarios::mdlValidadUsuario($tabla, $_POST[\"nuevoUsuario\"]);\n\t\t\t\t$respuesta = \"\";\n\t\t\t\tif($nombreValido)\n\t\t\t\t \t$respuesta = ModeloUsuarios::mdlIngresarUsuario($tabla, $datos);\n\n \t\t\t\tif($respuesta == \"ok\" AND $nombreValido ){\n\n \t\t\t\techo '<script>\n\n\t\t\t\t\tswal({\n\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\ttitle: \"¡El usuario ha sido guardado correctamente!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\twindow.location = \"usuarios\";\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\t\t\t\t\n\n\t\t\t\t</script>';\n\n \t\t\t\t}else \t\t\n \t\t\t\techo '<script>\n\n\t\t\t\t\tswal({\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"¡El usuario no se ha logrado ingresar!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t});\n\t\t\t\t\n\n\t\t\t\t</script>';\n\n \t\t\t\t\n\n \t\t\t}else {\n \n \t\t\t\techo '<script>\n\n\t\t\t\t\tswal({\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"¡El usuario no puede ir vacío o llevar caracteres especiales!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\twindow.location = \"usuarios\";\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\t\t\t\t\n\n\t\t\t\t</script>';\n\n\n \t\t\t}\n \n \n\n\n \t\t}\n\n\t}", "public function new_user( $data ){\n\t\t$query =\n\t\t'INSERT INTO Usuario\n\t\t(\tUsuarioAcceso,\n\t\t\tUsuarioPassword,\n\t\t\tUsuarioEmail,\n\t\t\tNivelUsuId,\n\t\t\tTipoUsuId,\n\t\t\tUsuarioNombre,\n\t\t\tUsuarioApellidos,\n\t\t\tFacultadId,\n\t\t\tLicenciaturaId\n\t\t)\n\t\tVALUES ( ?,?,?,?,?,?,?,?,? )\n\t\t';\n\t\t// Valores\n\t\t$values = array(\n\t\t\t$data['username'],\n\t\t\t$data['pass'],\n\t\t\t$data['email'],\n\t\t\t$data['nivel'],\n\t\t\t$data['tipo'],\n\t\t\t$data['nombre'],\n\t\t\t$data['apellidos'],\n\t\t\t$data['facultad'],\n\t\t\t$data['licenciatura']\n\t\t);\n\n\t\t$result = $this->db->query( $query,$values );\n\n\t\treturn $this->db->insert_id();\n\t}", "public function registrar_registro()\n \n {\n /** \n * @brief : Metodos para ingresar registro en la base de datos.\n * @return :Vista donde nos mostrara todos lo registro.\n */\n \n $data =Request()->all();\n registro::create($data);\n\n }", "public function registrar_usuario($nombre, $apellido, $cedula, $telefono, $email, $direccion, $cargo, $usuario, $password1, $password2, $estado, $permisos)\n {\n $conectar = parent::conexion();\n parent::set_names();\n $sql = \"insert into usuarios \n values(null,?,?,?,?,?,?,?,?,?,?,now(),?);\";\n $sql = $conectar->prepare($sql);\n $sql->bindValue(1, $_POST[\"nombre\"]);\n $sql->bindValue(2, $_POST[\"apellido\"]);\n $sql->bindValue(3, $_POST[\"cedula\"]);\n $sql->bindValue(4, $_POST[\"telefono\"]);\n $sql->bindValue(5, $_POST[\"email\"]);\n $sql->bindValue(6, $_POST[\"direccion\"]);\n $sql->bindValue(7, $_POST[\"cargo\"]);\n $sql->bindValue(8, $_POST[\"usuario\"]);\n $sql->bindValue(9, $_POST[\"password1\"]);\n $sql->bindValue(10, $_POST[\"password2\"]);\n $sql->bindValue(11, $_POST[\"estado\"]);\n $sql->execute();\n //obtenemos el valor del id del usuario\n $id_usuario = $conectar->lastInsertId();\n //insertamos los permisos\n //almacena todos los checkbox que han sido marcados\n //este es un array tiene un name=permiso[]\n $permisos = $_POST[\"permiso\"];\n // print_r($_POST);\n $num_elementos = 0;\n while ($num_elementos < count($permisos)) {\n $sql_detalle = \"insert into usuario_permiso\n values(null,?,?)\";\n $sql_detalle = $conectar->prepare($sql_detalle);\n $sql_detalle->bindValue(1, $id_usuario);\n $sql_detalle->bindValue(2, $permisos[$num_elementos]);\n $sql_detalle->execute();\n //recorremos los permisos con este contador\n $num_elementos = $num_elementos + 1;\n }\n }", "public function create(Request $r){\n $usuario = new User();\n $usuario->name = $r->input(\"nombre\");\n $usuario->email = $r->input(\"email\");\n $usuario->password = bcrypt($r->input(\"password\"));\n $usuario->rol = $r->input(\"rol\");\n\n\n if($r->input(\"pnichos\") != null)\n {\n $usuario->nichos = 1;\n }\n\n if($r->input(\"ppanteones\") != null)\n {\n $usuario->panteones = 1;\n }\n\n if($r->input(\"pcalles\") != null)\n {\n $usuario->calle = 1;\n }\n\n if($r->input(\"pdifuntos\") != null)\n {\n $usuario->difuntos = 1;\n }\n\n if($r->input(\"precibos\") != null)\n {\n $usuario->recibos = 1;\n }\n\n if($r->input(\"pfacturas\") != null)\n {\n $usuario->facturas = 1;\n }\n\n if($r->input(\"ptarifas\") != null)\n {\n $usuario->tarifas = 1;\n }\n\n if($r->input(\"plibro\") != null)\n {\n $usuario->libro_registros = 1;\n }\n\n if($r->input(\"pusuarios\") != null)\n {\n $usuario->usuarios = 1;\n }\n\n $usuario->save();\n\n }", "function newUser($data){\n\t\t$this->db->insert('usuarios', array(\n\t\t\t\t\t\t\t\t\t\t\t'rol' \t\t=> $data['rol'],\n\t\t\t\t\t\t\t\t\t\t\t'nombre' \t=> $data['nombre'],\n\t\t\t\t\t\t\t\t\t\t\t'empresa' \t=> $data['empresa'],\n\t\t\t\t\t\t\t\t\t\t\t'direccion' => $data['direccion'],\n\t\t\t\t\t\t\t\t\t\t\t'tel' \t\t=> $data['tel'],\n\t\t\t\t\t\t\t\t\t\t\t'cif' \t\t=> $data['cif'],\n\t\t\t\t\t\t\t\t\t\t\t'mail' \t\t=> $data['mail'],\n\t\t\t\t\t\t\t\t\t\t\t'password' \t=> $data['password']\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t}", "public function usuario_post() {\n $respuesta = $this->Account_model->selectUsuario($this->post('usuario'), $this->post('contraseña'));\n if(!$respuesta) {\n $this->response('', 204);\n } else {\n $this->response($respuesta, 200);\n }\n }", "private function _create() {\n\n $this->db->insert(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->set(\"id\", $this->db->insert_id());\n\n }", "function crearUsuario($correo,$nombre,$contrasenya){\n require (\"../configuracion/conexion.php\");\n \n //COMPROBAR SI EL CORREO YA ESTA EN USO\n $comprobarCorreo =\"SELECT correo FROM Usuarios WHERE correo='$correo'\";\n $resultCorreo = mysqli_query($conn, $comprobarCorreo);\n \n $filasCorreo=mysqli_num_rows($resultCorreo);\n if($filasCorreo==0){\n \n //COMPROBAR SI YA EXISTE EL NOMBRE DE USUARIO\n \n $comprobarNombre =\"SELECT nombre_usuario FROM Usuarios WHERE nombre_usuario='$nombre'\";\n $resultNombre = mysqli_query($conn, $comprobarNombre);\n \n $filasNombre=mysqli_num_rows($resultNombre);\n if($filasNombre==0){\n \n //AUTOINCREMENTAR ID\n $cons = \"SELECT ID_usuario FROM Usuarios ORDER BY ID_usuario DESC LIMIT 1;\";\n $result = mysqli_query($conn, $cons);\n \n while($fila = mysqli_fetch_array($result)){\n \n $ID = $fila[0] + 1;\n }\n //METER USUARIO\n $addUsuario = \"INSERT INTO Usuarios VALUES('$ID','$nombre','$contrasenya','$correo');\";\n $result = mysqli_query($conn, $addUsuario);\n \n \n //INICIAR SESION DESPUES DE CREARLO\n \n $cons=\"SELECT * FROM Usuarios WHERE correo='$correo' and password='$contrasenya'\";\n $result = mysqli_query($conn, $cons);\n \n if ($fila = mysqli_fetch_array($result)) {\n \n session_start();\n \t $_SESSION[\"correo\"] = $fila['correo'];\n \t $_SESSION[\"usuario\"] = $fila['nombre_usuario'];\n \t $_SESSION[\"id\"] = $fila['ID_usuario'];\n \t $_SESSION[\"idAlbum\"] = \"\";\n\t $_SESSION[\"nombre_album\"] = \"\";\n }\n \n return 0;\n \n }else{\n return 2;\n }\n }else{\n return 1;\n }\n \n mysqli_free_result($result);\n mysqli_close($conn);\n\n //LISTA DE ERRORES Y CORRECTO:\n //0 Funciona todo bien\n //1 Correo en uso\n //2 Nombre en uso\n }", "public function create(Users $usuario){\r\n\r\n // QUERY SQL PARA INSERIR REGISTRO NO BANCO\r\n\t\t$sql = 'INSERT INTO usuarios (nome,email,senha) VALUES (?,?,?)';\r\n\r\n\t\t// PREPARANDO CONEXÃO COM O BANCO\r\n\t\t$stmt = Conexao::getConn()->prepare($sql);\r\n\r\n\t\t// PEGANDO ATRIBUTOS DO USUARIO \r\n\t\t$stmt->bindValue(1, $usuario->getNome());\r\n\t\t$stmt->bindValue(2, $usuario->getEmail());\r\n $stmt->bindValue(3, $usuario->getSenha());\r\n\r\n\t\t// EXECUTANDO QUERY\r\n\t\t$stmt->execute();\r\n\r\n }", "public function create() {\n /*$id = json_decode($_POST['id']);\n $name = json_decode($_POST['name']);\n $usr = User();\n $usr->id = $id;\n $usr->name = $name;\n $usr->save();*/\n }", "protected function create(array $data)\n {\n //genera un password random de 8 caracteres y crea una sesion con ese password\n $password = Str::random(8);\n session(['pass' => $password]);\n session(['empleado' => false]);\n\n $cadena = strtolower($data['nombreComercio']);\n $username = str_replace(' ', '',Str::finish('admin@', $cadena)); \n \n DB::begintransaction(); //iniciar transacción para grabar\n try{ \n $comercio = Comercio::create([\n 'nombre' => strtoupper($data['nombreComercio']), \n 'tipo_id' => $data['tipo'] \n ]);\n $this->comercio = $comercio->nombre;\n \n $user = User::create([ \n 'name' => ucwords($data['name']),\n 'apellido' => ucwords($data['apellido']),\n 'sexo' => $data['sexo'],\n 'username' => $username,\n 'email' => strtolower($data['email']),\n 'password' => Hash::make($password),\n 'pass' => $password,\n 'abonado' => 'Si'\n ]);\n \n UsuarioComercio::create([\n 'usuario_id' => $user->id, \n 'comercio_id' => $comercio->id \n ]);\n //creo los roles Admin, No Usuario y Repartidor \n $rolAdmin = Role::create([\n 'name' => 'Admin'. $comercio->id,\n 'alias' => 'Admin',\n 'comercio_id' => $comercio->id \n ]); \n \n Role::create([\n 'name' => 'No Usuario'. $comercio->id,\n 'alias' => 'No Usuario',\n 'comercio_id' => $comercio->id \n ]);\n \n Role::create([\n 'name' => 'Repartidor'. $comercio->id,\n 'alias' => 'Repartidor',\n 'comercio_id' => $comercio->id \n ]);\n //Asigno el rol Admin al nuevo Usuario\n ModelHasRole::create([\n 'role_id' => $rolAdmin->id,\n 'model_type' => 'App\\User', \n 'model_id' => $user->id \n ]);\n \n $rolAdmin->givePermissionTo([\n 'Estadisticas_index','Abm_index','Config_index','Empresa_index','Permisos_index','Productos_index',\n 'Productos_create','Productos_edit','Productos_destroy','Categorias_index','Categorias_create','Categorias_edit',\n 'Categorias_destroy','Empleados_index','Empleados_create','Empleados_edit','Empleados_destroy',\n 'Clientes_index','Clientes_create','Clientes_edit','Clientes_destroy', 'Proveedores_index',\n 'Proveedores_create','Proveedores_edit','Proveedores_destroy','Gastos_index','Gastos_create',\n 'Gastos_edit','Gastos_destroy','Facturas_index','Facturas_create_producto','Facturas_edit_item',\n 'Facturas_destroy_item', 'Compras_index','Compras_create_producto','Compras_edit_item',\n 'Compras_destroy_item','Caja_index','CorteDeCaja_index','MovimientosDiarios_index','CajaRepartidor_index',\n 'Reportes_index','VentasDiarias_index','VentasPorFechas_index','Usuarios_index','Usuarios_create','Usuarios_edit',\n 'Usuarios_destroy','Movimientos_create','Movimientos_edit','Movimientos_destroy','Facturas_imp','Fact_delivery_imp' \n ]); \n \n $usercomercio = UsuarioComercio::select('id')->orderBy('id', 'desc')->get();\n $plan = Plan::select('*')->where('id', '1')->get(); \n \n $fecha_inicio = Carbon::now()->locale('en'); //inicializo fecha_inicio con la fecha en que se suscribe al sistema\n $mes = $fecha_inicio->monthName; //recupero el mes\n Carbon::setTestNow($fecha_inicio); //habilito a Carbon para que actúe sobre fecha_inicio\n $fecha_fin = new Carbon('last day of ' . $mes); //inicializo fecha_fin con el último día del mes en curso\n $diferencia = $fecha_inicio->diffInDays($fecha_fin); //efectúo la diferencia entre fechas para saber los días que las separan\n \n if($diferencia < 15) //si son menos de 15 días\n { \n $fecha_fin = Carbon::now()->addMonthsNoOverflow(1)->locale('en'); //agrego un mes a fecha_fin a partir del corriente mes\n $mes = $fecha_fin->monthName; //recupero el mes\n Carbon::setTestNow($fecha_fin); //habilito a Carbon para que actúe sobre fecha_fin\n $fecha_fin = new Carbon('last day of ' . $mes); //modifico fecha_fin con el último día del mes siguiente\n }\n Carbon::setTestNow(); //IMPORTANTE: resetea la fecha actual para grabarla en create_at y update_at\n \n UsuarioComercioPlanes::create([\n 'usuariocomercio_id' => $usercomercio[0]->id,\n 'plan_id' => $plan[0]->id,\n 'estado_plan' => 'activo',\n 'importe' => $plan[0]->precio,\n 'estado_pago' => 'no corresponde',\n 'fecha_inicio_periodo' => Carbon::parse($fecha_inicio)->format('Y,m,d') . ' 00:00:00',\n 'fecha_fin' => Carbon::parse($fecha_fin)->format('Y,m,d') . ' 23:59:59',\n 'fecha_vto' => Carbon::parse($fecha_fin)->format('Y,m,d') . ' 23:59:59',\n 'comentarios' => 'Inicio plan de prueba'\n ]);\n \n $this->sendEmail($user, $this->comercio);\n DB::commit();\n return $user;\n }catch (Exception $e){\n DB::rollback(); //en caso de error, deshacemos para no generar inconsistencia de datos \n session()->flash('msg-error', '¡¡¡ATENCIÓN!!! El registro no se grabó...');\n }\n }", "public function registrarUsuario()\n {\n $datos = array();\n\n //guardamos los datos del formulario en un array \n foreach ($_POST as $clave => $valor) {\n $datos[$clave] = $valor;\n }\n\n //añadimos una clave por defecto y generamos el ciu\n $datos['clave'] = hash('sha512', \"12345678\");\n $datos['ciu'] = self::generarCiu($datos['nombre'], $datos['apellidos'], $datos['fecha_nacimiento']);\n\n //insertamos los datos y mostramos un error en funcion de si ha habido error o no\n echo $this->Usuarios_model->registrarUsuario($datos) ? 1 : 0;\n }", "public function createUsuario()\n {\n $hash = password_hash($this->contra, PASSWORD_DEFAULT);\n $sql = 'INSERT INTO administradores(nombre, apellido, correo, usuario, contra)\n VALUES(?, ?, ?, ?, ?)';\n $params = array($this->nombre, $this->apellido, $this->correo, $this->usuario, $hash);\n return Database::executeRow($sql, $params);\n }", "static private function createNewUserFromPost() {\r\n\t\t$errors = array();\r\n\r\n\t\t$activationHash = (System::isAtLocalhost()) ? '' : self::getRandomHash();\r\n\t\t$newAccountId = DB::getInstance()->insert('account',\r\n\t\t\t\tarray('username', 'name', 'mail', 'password', 'registerdate', 'activation_hash'),\r\n\t\t\t\tarray($_POST['new_username'], $_POST['name'], $_POST['email'], self::passwordToHash($_POST['password']), time(), $activationHash));\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = true;\r\n\t\tself::$NEW_REGISTERED_ID = $newAccountId;\r\n\r\n\t\tif ($newAccountId === false)\r\n\t\t\t$errors[] = __('There went something wrong. Please contact the administrator.');\r\n\t\telse {\r\n\t\t\tself::importEmptyValuesFor($newAccountId);\r\n\t\t\tself::setSpecialConfigValuesFor($newAccountId);\r\n\r\n\t\t\tif ($activationHash != '')\r\n\t\t\t\tself::setAndSendActivationKeyFor($newAccountId, $errors);\r\n\t\t}\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = false;\r\n\t\tself::$NEW_REGISTERED_ID = -1;\r\n\r\n\t\treturn $errors;\r\n\t}", "public function addNewUser($args=array()){\n \n //conferimos se o email informado não esta em uso\n $sql = new Sql();\n $res = $sql->select('SELECT * FROM usuarios WHERE email_usuario = :email_usuario',array(':email_usuario'=>$args['email_usuario']));\n if(count($res)==0){\n \n //geramos uma chave de validacao com base no email do usuario\n //esta chave será utilizada para a ativação do cadastro dele\n $userKEY= encode($args['email_usuario']);\n \n $query = 'INSERT INTO usuarios (\n id_empresa, nome_usuario, sobrenome_usuario, email_usuario, \n pwd_usuario, permissao_usuario, dt_usuario, cod_ativacao_usuario, status_usuario) \n VALUES (\n :id_empresa, :nome_usuario, :sobrenome_usuario, :email_usuario,\n :pwd_usuario, :permissao_usuario, :dt_usuario, :cod_ativacao_usuario, :status_usuario)'; \n \n $params = array(\n ':id_empresa'=>UIDEMPRESA,\n ':nome_usuario'=>$args['nome_usuario'],\n ':sobrenome_usuario'=>$args['sobrenome_usuario'],\n ':email_usuario'=>$args['email_usuario'],\n ':pwd_usuario'=>mkpwd($args['password']),\n ':permissao_usuario'=>'cliente',\n ':dt_usuario'=>time(),\n ':cod_ativacao_usuario'=>$args['cod_ativacao'],\n ':status_usuario'=>0);\n \n \n $res = $sql->query($query,$params); \n \n return $res; \n }else{//SE EMAIL JA CADASTRADO RETORNA FALSE\n return 'erro1001';\n }\n \n }", "public function create()\n\t{\n\t\tif (!isset($_POST) || empty($_POST))\n\t\t{\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// TODO need to validate data\n\t\t$data = array('username' => $_POST['username'], 'password' => $_POST['password'], 'cpassword' => $_POST['cpassword'], 'email' => $_POST['email']);\n\t\t// validate the input data\n\t\t$errorArray = User::validates($data);\n\t\tif (count($errorArray))\n\t\t{\n\t\t\t// store errors in session and redirect\n\t\t\t$_SESSION['user'] = $data;\n\t\t\t$_SESSION['user']['errors'] = $errorArray;\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// create a new user, assume all new users are not staff\n\t\t$values = array('username'=>$_POST['username'],'password'=>$_POST['password'],'email'=>$_POST['email'],'user_type'=>'1');\n\t\t$id = User::createUser($values);\n\t\t// log the user in\n\t\t$_SESSION['user']['id'] = $id;\n\t\t$_SESSION['user']['name'] = $_POST['username'];\n\t\t$_SESSION['user']['type'] = '1';\n\t\techo \"id = \" . $id;\n\t\theader(\"Location: /myrecipe/users/\" . $id);\n\t\texit;\n\t}", "function newuser(){\n\t\t\tif(!empty($_POST['newemail']) && !empty($_POST['newpassword']) && !empty($_POST['newnombre']) && !empty($_POST['newpoblacion']) && !empty($_POST['newrol'])){\n\t\t\t\t$poblacion = filter_input(INPUT_POST,'newpoblacion',FILTER_SANITIZE_STRING);\n\t\t\t\t$nombre = filter_input(INPUT_POST,'newnombre',FILTER_SANITIZE_STRING);\n\t\t\t\t$password = filter_input(INPUT_POST,'newpassword',FILTER_SANITIZE_STRING);\n\t\t\t\t$email = filter_input(INPUT_POST,'newemail',FILTER_SANITIZE_STRING);\n\t\t\t\t$rol = filter_input(INPUT_POST,'newrol',FILTER_SANITIZE_STRING);\n\t\t\t\t$list = $this -> model -> adduser($nombre,$password,$email,$poblacion,$rol);\n \t\t$this -> ajax_set(array('redirect'=>APP_W.'admin'));\n\t\t\t}\n\t\t}", "static public function ctrCrearUsuario(){\n\n\n if(isset($_POST[\"nuevoUsuario\"])){\n\n\t\t\tif(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevoNombre\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"nuevoUsuario\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"nuevoPassword\"])){\n\n\n //Validar la imagen\n\n $revisar = getimagesize($_FILES[\"nuevaFoto\"][\"tmp_name\"]);\n\n if($revisar !== false){\n\n //Crear directorio\n $directorio = \"vistas/img/usuarios/\".$_POST[\"nuevoUsuario\"];\n\t\t\t\t mkdir($directorio, 0755);\n\n //Asignar nombre a la foto\n $aleatorio = mt_rand(100,999);\n $pname = $aleatorio.\"-\".$_FILES[\"nuevaFoto\"][\"name\"];\n\n $tname = $_FILES[\"nuevaFoto\"][\"tmp_name\"];\n\n $ruta = $directorio.\"/\".$pname;\n\n move_uploaded_file($tname, $directorio.'/'.$pname);\n\n } else {\n $ruta = \"\";\n }\n\n \n\n $tabla = \"tblusuarios\";\n\n $encriptar = crypt($_POST[\"nuevoPassword\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\n $datos = array(\"nombre\" => $_POST[\"nuevoNombre\"],\n \"usuario\" => $_POST[\"nuevoUsuario\"],\n \"password\" => $encriptar,\n \"perfil\" => $_POST[\"nuevoPerfil\"],\n \"foto\" => $ruta\n );\n \n $respuesta = ModeloUsuarios::MdlIngresarUsuario($tabla, $datos);\n\n if($respuesta == \"ok\"){\n\n echo '<script>\n\n\t\t\t\t\tSwal.fire({\n\n\t\t\t\t\t\ticon: \"success\",\n\t\t\t\t\t\ttitle: \"El usuario ha sido guardado correctamente\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n closeOnConfirm: false\n\n\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\twindow.location = \"usuarios\";\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\t\t\t\t\n\n\t\t\t\t</script>';\n \n }else{\n\n '<script>\n alert(\"Error al guardar el usuario\");\n\n\t\t\t\t\t</script>';\n\n }\n\n\n\n\t\t\t}else{\n\n\t\t\t\techo '<script>\n\n\t\t\t\t\tSwal.fire({\n\n\t\t\t\t\t\ticon: \"error\",\n\t\t\t\t\t\ttitle: \"¡El usuario no puede ir vacío o llevar caracteres especiales!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n closeOnConfirm: false\n\n\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\twindow.location = \"usuarios\";\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\t\t\t\t\n\n\t\t\t\t</script>';\n\n\t }\t}\n\n\n\t}", "static public function ctrCrearUsuario(){\n\n\t\tif (isset($_POST['newUser'])) {\n\t\t\tif (preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"newName\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9 ]+$/', $_POST[\"newUsername\"])) {\n\t\t\t \t/*======================================\n\t\t\t \t= Validar Imagen =\n\t\t\t \t======================================*/\n\t\t\t \t$ruta=\"\";\n\t\t\t \tif (isset($_FILES['photo']['tmp_name']) && !empty($_FILES['photo']['tmp_name'])) {\n\t\t\t \t\tlist($ancho,$alto) = getimagesize($_FILES['photo']['tmp_name']);\n\t\t\t \t\t$nuevoAncho = 500;\n\t\t\t \t\t$nuevoAlto = 500;\n\t\t\t \t\t/*==========================================\n\t\t\t \t\t= CREANDO DIRECTORIO =\n\t\t\t \t\t==========================================*/\n\t\t\t \t\t$directorio = \"Views/img/usuarios/\".$_POST['newUsername'];\n\t\t\t \t\tmkdir($directorio,0755);\n\t\t\t \t\t/*===========================================================================\n\t\t\t \t\t= Funciones defecto PHP dependiendo de tipo de imagen =\n\t\t\t \t\t===========================================================================*/\n\t\t\t \t\tswitch ($_FILES['photo']['type']) {\n\t\t\t \t\t\tcase 'image/jpeg':\n\t\t\t \t\t\t\t$preruta = date('Y-m-d_his');\n\t\t\t \t\t\t\t$preruta = (string)$preruta;\n\t\t\t \t\t\t\t$ruta = $directorio.'/'.$_POST['newUsername'].'_'.$preruta.'.jpg';\n\t\t\t \t\t\t\t$origen = imagecreatefromjpeg($_FILES['photo']['tmp_name']);\n\t\t\t \t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\t\t\t \t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\t\t\t \t\t\t\timagejpeg($destino,$ruta);\n\t\t\t \t\t\t\tbreak;\n\t\t\t \t\t\tcase 'image/png':\n\t\t\t \t\t\t\t$preruta = date('Y-m-d_his');\n\t\t\t \t\t\t\t$preruta = (string)$preruta;\n\t\t\t \t\t\t\t$ruta = $directorio.'/'.$_POST['newUsername'].'_'.$preruta.'.png';\n\t\t\t \t\t\t\t$origen = imagecreatefrompng($_FILES['photo']['tmp_name']);\n\t\t\t \t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\t\t\t \t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\t\t\t \t\t\t\timagepng($destino,$ruta);\n\t\t\t \t\t\t\tbreak;\n\t\t\t \t\t\tdefault:\n\t\t\t \t\t\t\t# code...\n\t\t\t \t\t\t\tbreak;\n\t\t\t \t\t}\n\t\t\t \t\t\n\t\t\t \t\t\n\t\t\t \t}\n\t\t\t \t$answer = new adminph\\User();\n\t\t\t \t$answer->name = $_POST['newName'];\n\t\t\t \t$answer->username = $_POST['newUsername'];\n\t\t\t \t$answer->password = password_hash($_POST[\"newPassword\"], PASSWORD_DEFAULT);\n\t\t\t \t$answer->type = $_POST['rol'];\n\t\t\t \t$answer->code = $_POST['newOrganizationCode'];\n\t\t\t \t$answer->photo = $ruta;\n\t\t\t if ($answer->save()) {\n\t\t\t \treturn redirect('usuarios');\n\t\t\t }\n\t\t\t } else {\n\t\t\t \treturn view('layouts.users_error');\n\t\t\t }\n\t\t}\n\n\t}", "function agregarUsuarioBD($objeto) {\n\n $user = strtoupper(htmlentities($objeto->getUsuario(), ENT_QUOTES));\n \n $pass = $objeto->getContrasena();\n\n $conexion = $this->conectar(\"ADMIN\",\"1234\");\n\n $agrego = oci_parse($conexion,'CREATE USER '.$user.' IDENTIFIED BY '.$pass);\n oci_execute($agrego);\n\n $agrego = oci_parse($conexion,'GRANT ALL PRIVILEGES TO '.$user);\n oci_execute($agrego);\n\n $string = \"INSERT INTO UsuarioCtx_TAB VALUES ('\".$user.\"')\";\n $result = oci_parse($conexion, $string);\n oci_execute($result);\n\n $result = oci_parse($conexion, \"INSERT INTO MEDICO VALUES (\".$objeto->getCI().\", '\".$objeto->getNombres().\"', '\".$objeto->getApellidos().\"', '\".$user.\"', '\".$pass.\"', \".$objeto->isFisio().\")\");\n oci_execute($result);\n\n $this->desconectar($conexion);\n return $result;\n }", "private function preAddUser(){\n $LMS = new LMS();\n $api = $LMS->getDataXUserPass($this->_user, $this->_pass, 'https://www.sistemauno.com/source/ws/uno_wsj_login.php');\n $this->_person = \"\";\n if ($this->isObjectAPI($api)) {\n //validar Permisos\n $FilterAPI = new FilterAPI($api);\n $this->_datPerson = $FilterAPI->runFilter($this->_user, $this->_pass);\n if (is_array($this->_datPerson)) {\n //si el usuario cuenta con un perfil apropiado se le pide que valide sus coreo\n $this->validateEmailUser();\n if($this->validUniqueMail()){\n $this->sendMail();\n $this->_response = \"1|\" . $this->_datPerson[email] . \"|\" . $this->_datPerson[personId] . \"|\" . $this->_code . \"|\" . $this->_datPerson['name'];\n }else{\n $this->_response = \"2|\" . $this->_datPerson[email] . \"|\" . $this->_datPerson[personId] . \"|\" . $this->_code . \"|\" . $this->_datPerson['name'];\n }\n } else {\n $this->_response = $this->_datPerson;\n }\n } else {\n $this->_response = $api;\n }\n }", "protected function create(array $data)\n {\n ini_set('max_execution_time', '300');\n\n \n $user = User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'username' => $data['username'],\n 'isAdmin' => true,\n 'password' => Hash::make($data['password']),\n 'periode_essai' => now()->addDays(config('app.free_trial_days')),\n\n ]);\n\n // structure par defaut\n $struc = new StructureRegroupement;\n\n $struc->code_regroupement = \"SIEGE\";\n $struc->nom_regroupement = \"SIEGE\";\n\n $struc->save();\n\n // fin structure par defaut\n\n\n // type entite par defaut\n $ent = new TypeEntite;\n $ent->type_entite = \"SIEGE\";\n $ent->save();\n\n // fin type entite par defaut\n\n\n // fournisseur par defaut\n\n $tier = new Tier;\n\n $tier->code = \"FOURNISSEUR PAR DEFAUT\";\n\n $tier->save();\n\n // fin fournisseur par defaut\n\n\n // personne par Par defaut \n $pers = new Personnel;\n\n $pers->nom = \"PERSONNE PAR DEFAUT\";\n $pers->default = 1;\n $pers->personne_prioritaire = 1;\n // $pers->entite_affectation = $request->get('nom');\n $pers->save();\n\n // fin personne par par defaut\n\n // theme par defaut \n $theme = new Theme;\n $theme->navbar = \"app-header header-shadow bg-primary header-text-light\";\n $theme->sidebar = \"app-sidebar sidebar-shadow\";\n $theme->save();\n\n\n // fin theme\n\n return $user;\n\n \n }", "public function postNuevo()\n\t{\n\t\t$user = new User;\n\t\t$reglas = array(\n\t\t\t'apellidos'=>'required',\n\t\t\t'nombres'=>'required',\n\t\t\t'cedula'=> array('required','unique:users,cedula'),\n\t\t\t'direccion'=>'required',\t\t\t\t\t\t\n\t\t\t'email'=> array('required','email'),\n\t\t\t'password'=>'required',\n\t\t\t'password2'=>'required',\n\t\t\t'sucursal'=>'required',\n\t\t\t'rol'=>'required',\n\t\t\t'username' => array('required','unique:users,username'),\n\t\t\t'telefono'=> 'numeric',\n\t\t\t'celular' => 'numeric',\n\t\t\t);\n\t\t$validador = Validator::make(Input::all(),$reglas);\t\t\n\t\tif($validador->passes() && $user->validarCI(Input::get('cedula')) && $user->validaTel(Input::get('telefono'))\n\t\t\t&& $user->validaCel(Input::get('celular'))){\n\t\t\tif(Input::get('password') == Input::get('password2')){\n\t\t\t\tif(Input::get('sucursal')!= '0'){\n\t\t\t\t\t$user->apellidos = Input::get('apellidos');\n\t\t\t\t\t$user->nombres = Input::get('nombres');\n\t\t\t\t\t$user->cedula = Input::get('cedula');\n\t\t\t\t\t$user->direccion = Input::get('direccion');\n\t\t\t\t\t$user->telefono = Input::get('telefono');\n\t\t\t\t\t$user->celular = Input::get('celular');\n\t\t\t\t\t$user->email = Input::get('email');\n\t\t\t\t\t$user->password = Hash::make(Input::get('password'));\n\t\t\t\t\t$user->rol = Input::get('rol');\n\t\t\t\t\t$user->username = Input::get('username');\n\t\t\t\t\t$user->sucursal_id = Input::get('sucursal');\n\t\t\t\t\t$user->estado = '1';\n\t\t\t\t\t$user->save();\n\t\t\t\t\treturn Redirect::to('user')->with('status','okCreado');\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\treturn Redirect::to('user')->with('status','errorSuc');\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn Redirect::to('user')->with('status','errorPass');\n\t\t\t}\n\t\t}else{\n\t\t\treturn Redirect::to('user')->with('status','error');\n\t\t}\n\t}", "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser();", "function CreateUser() {\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_USER_TYPE] = $this->reseller->getUserType();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_USERNAME] = $this->reseller->getUserLoginName();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_EMAIL_ID] = $this->reseller->getEmailId();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_CONTACT_NO] = $this->reseller->getMobileNo();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_FULL_NAME] = $this->reseller->getFullName();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_ADDRESS] = $this->reseller->getAddress();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_CITY] = $this->reseller->getCity();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_REGION] = $this->reseller->getRegion();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_COUNTRY] = $this->reseller->getCountry();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_DOMAIN_NAME] = $this->reseller->getDomainName();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_EXPIRY_DATE] = $this->reseller->getExpiryDate();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_ENABLE_CMS] = $this->reseller->getEnableCMS();\n $this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_DLT_ENTITY_ID] = $this->reseller->getDltEntityId();\n\t\t\t$response = new sgc_callapi(sgc_constant::SGC_API, sgc_constant::SGC_ENDPOINT_RESELLER_CREATE_USER, $this->data, $this->header, sgc_common_api_params::API_COMMON_METHOD_POST, $this->useRestApi);\n\t\t\treturn $response->getResponse();\n\t\t}", "public static function setNewUser($request){\r\n \t//Post vars\r\n\t \t$postVars = $request->getPostVars();\r\n\t\t$nome = $postVars['nome'] ?? '';\r\n\t\t$email = $postVars['email'] ?? '';\r\n\t\t$senha = $postVars['senha'] ?? '';\r\n\r\n\t\t//Valida email\r\n\t\t$obUser = EntityUser::getUserByEmail($email);\r\n\t\tif($obUser instanceof EntityUser){\r\n\r\n\t\t\t$request->getRouter()->redirect('/admin/users/new?status=duplicated');\r\n\t\t}\r\n\r\n\t\t//NOVA INSTANCIA DE FEEDBACK\r\n\t\t$obUser = new EntityUser;\r\n\t\t$obUser->nome = $nome;\r\n\t\t$obUser->email = $email;\r\n\t\t$obUser->senha = password_hash($senha,PASSWORD_DEFAULT);\r\n\t\t$obUser->cadastrar();\r\n\r\n\t\t//REDIRECIONA O USUARIO\r\n\t\t$request->getRouter()->redirect('/admin/users/'.$obUser->id.'/edit?status=created');\r\n\r\n\t}", "public function doCreate() {\n if(\n isset($_POST['email']) &&\n isset($_POST['password']) &&\n isset($_POST['lastName']) &&\n isset($_POST['firstName']) &&\n isset($_POST['address']) &&\n isset($_POST['postalCode']) &&\n isset($_POST['city'])\n ) {\n $alreadyExist = $this->userManager->findByEmail($_POST['email']);\n\n if(!$alreadyExist) {\n $newUser = new User($_POST);\n $this->userManager->create($newUser);\n $page = 'login';\n }\n else {\n $error = \"ERROR : This email (\".$_POST['email'].\") is used by another user\";\n $page = 'create';\n }\n }\n\n require('./View/default.php');\n }", "public function save_user()\n\t{\n $user= new Users();\n $user->setNom($_POST['nom']);\n $user->setPrenom($_POST['prenom']);\n $user->setDate_naissance($_POST['date_naiss']);\n $user->setEmail($_POST['mail']);\n $user->setPassword($_POST['pwd']); \n\n $user->Create_user();\n\t}", "protected function create(array $data)\n {\n // dd($data); \n // $ruta_imagen= $data['imagen']->store('upload-usuarios', 'public'); \n\n //Resize de la imagen: \n //$img = Image::make(public_path(\"storage/{$ruta_imagen}\"))->fit(500,500); \n //$img->save(); \n \n return User::create([\n 'name' => $data['name'],\n 'apellido' => $data['apellido'],\n 'fechaN' => $data['fechaN'],\n 'sexo' => $data['sexo'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'tipoUser' => $data['tipoUser'],\n \n ]);\n \n }", "protected function create(array $data)\n {\n $user = new User;\n $user->name = $data['name'];\n $user->email = $data['email'];\n $user->password = bcrypt($data['password']);\n $user->save();\n\n return User_bio::create([\n 'id_user' => $user->id,\n 'nama' => $data['name'].\" \".$data['namabelakang'],\n 'id_tempat_lahir' => $data['id_tempat_lahir'],\n 'id_kota' => $data['id_kota'],\n 'tanggal_lahir' => $data['tanggallahir'],\n 'gender' => $data['gender'],\n 'id_status' => $data['status'],\n 'nohp' => $data['nohp'],\n 'alamat' => $data['tempattinggal'],\n 'profesi' => $data['profesi'],\n 'foto' => \"asd\",\n 'transfer' => 0,\n ]);\n }", "public function testCreateUser()\n {\n $dados = [\n 'unidade_id' => 1,\n 'chave' => '1111',\n 'name' => 'Fulano',\n 'email' => '[email protected]',\n 'password' => 'Gerente',\n 'password_confirmation' => 'Gerente',\n 'ativo' => true,\n 'perfil_id' => 1,\n ];\n\n $this->post('/api/users', $dados, $this->api_token);\n\n $this->assertResponseOk();\n\n $reposta = (array) json_decode($this->response->content());\n\n $this->assertArrayHasKey('unidade_id', $reposta);\n $this->assertArrayHasKey('chave', $reposta);\n $this->assertArrayHasKey('name', $reposta);\n $this->assertArrayHasKey('email', $reposta);\n $this->assertArrayHasKey('ativo', $reposta);\n $this->assertArrayHasKey('perfil_id', $reposta);\n $this->assertArrayHasKey('id', $reposta);\n }", "protected function create(array $data)\n { \n if ($data['tipo_user_id'] == 1) {\n return User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'universidade_id'=>$data['universidade_id'],\n 'cursos_id'=>$data['cursos_id'],\n 'departamento_id'=>$data['departamento_id'],\n 'tipo_user_id'=>$data['tipo_user_id'],\n 'biografia'=>$data['biografia']\n ]);\n }\n else{\n return User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'universidade_id'=>$data['universidade_id'],\n 'departamento_id'=>$data['departamento_id'],\n 'tipo_user_id'=>$data['tipo_user_id'],\n 'biografia'=>$data['biografia']\n ]);\n }\n }", "public function newUser(Request $request, Response $response){\n\n $nombre = $request->getParam('nombre');\n $telefono = (string)$request->getParam('telefono');\n $direccion = $request->getParam('direccion');\n $email = $request->getParam('email');\n $username = $request->getParam('username');\n $pass = $request->getParam('pass');\n\n $sql = \"INSERT INTO usuarios (nombre, telefono, direccion, email, username, pass) VALUES\n (:nombre, :telefono, :direccion, :email, :username, :pass)\";\n\n try{\n\n $db = new db();\n $db = $db->connectionDB();\n\n $resultado = $db->prepare($sql);\n\n if($resultado->execute(array(\n 'nombre' => $nombre,\n 'telefono' => $telefono,\n 'direccion' => $direccion,\n 'email' => $email,\n 'username' => $username,\n 'pass' => md5($pass),\n )))\n echo json_encode(array('mensaje' => 'Usuario agregado'));\n else\n echo json_encode(array('mensaje:'=> 'Error al agregar usuario'));\n\n $resultado->closeCursor();\n $resultado = null;\n $db = null;\n\n\n }catch(PDOException $e){\n echo '{\"error\" : { \"text\": \"'.$e->getMessage().'\",\"sql\": \"'.$sql.'\"}';\n }\n }", "public function recibirdatos() {\n\t\t$passSha1 = sha1($this->input->post('password'));\n\t\t$datos = array(\n\t\t\t'usuario' => $this->input->post('usuario'),\n\t\t\t'password' => $passSha1\n\t\t\t);\n\t\t//Llamamos al modelo, Si la autentificacion es correcta damos paso a la aplicacion y sino devolvemos al login\n\t\tif($this->login_model->obtenerPass($datos) == true){\n\t\t\t//Cargamos la pagina principal\n\t\t\t$this->session->set_userdata('usuario', $datos['usuario']);\n\t\t\t//Llamamos a la clase que realiza los test de caja blanca\n\t\t\t$this->testCajaBlanca($datos);\n\t\t\t$this->mostrarDatosUser();\n\t\t\t$this->session->set_userdata('Token', true);\n\t\t}else{\n\t\t\t$this->load->view('login');\n\t\t}\n\t}", "function crearEntrenador(){\n\t\tglobal $con;\n\t\t$Nombre = $_POST['Nombre'];\n\t\t$Apellido = $_POST['Apellido'];\n\t\t$Telefono = $_POST['Telefono'];\n\t\t$Club = $_POST['Club'];\n\t\t$Email = $_POST['Email'];\n\t\t$Password = $_POST['Password'];\n\t\t$user = strstr($Email, '@', true);\n\n\t\t$crear_entrenador = \"INSERT INTO User(Name, LastName, UserName, Password, Phone, Email, Role)\n\t\t\t\t\t\t\tVALUES('$Nombre', '$Apellido', '$user', '$Password', '$Telefono','$Email', 'Entrenador')\";\n\t\t$send_query = mysqli_query($con, $crear_entrenador);\n\n\t\t$login = \"INSERT INTO Coachs(UserID, Role, Asociacion)\n\t\t\t\t\tVALUES( LAST_INSERT_ID(),'Entrenador','$Club')\";\n\t\t$send_query2 = mysqli_query($con, $login);\n\n\t\tif(!$send_query or !$send_query2){\n\t\t\t\tdie('Could not update data: ');\n\t\t}\n\t\telse{\n\t\t\t\techo \"Updated data successfully\\n\";\n\t\t\t\tunset($_POST);\n\t\t\t\tunset($_REQUEST);\n\t\t\t\techo \"<script>location.href='tablaEntrenadoresAdmin.php';</script>\";\n\t\t}\n}", "public function newUser() {\n\t\t\tif (!empty($_POST['username']) AND !empty($_POST['password']) AND !empty($_POST['email']) AND !empty($_POST['nom']) AND !empty($_POST['prenom']) AND !empty($_POST['adresse']) AND !empty($_POST['code_postal'])) {\n\t\t\t\t$errors = array();\n\t\t\t\t$username = htmlspecialchars($_POST['username']);\n\t\t\t\t$password = sha1($_POST['password']);\n\t\t\t\t$email = htmlspecialchars($_POST['email']);\n\t\t\t\t$nom = htmlspecialchars($_POST['nom']);\n\t\t\t\t$prenom = htmlspecialchars($_POST['prenom']);\n\t\t\t\t$adresse = htmlspecialchars($_POST['adresse']);\n\t\t\t\t$code_postal = htmlspecialchars($_POST['code_postal']);\n\n\t\t\t\t$users = new Model_Users();\n\t\t\t\t\n\t\t\t\tif(empty($_POST['username']) || !preg_match('/^[a-zA-Z0-9_]+$/', $_POST['username'])) {\n\t\t\t\t\t$errors['username'] = \"Votre pseudo n'est pas valide (alphanumérique)\";\n\t\t\t\t} else {\n\t\t\t\t\t$userExist = $users->userExist($username);\n\t\t\t\t\tif($userExist == true) {\n\t\t\t\t\t\t$errors['username'] = \"Ce pseudo est déjà pris\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (empty($_POST['email']) || !filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {\n\t\t\t\t\t$errors['email'] = \"Votre email n'est pas valide\";\n\t\t\t\t} else {\n\t\t\t\t\t$emailExist = $users->emailExist($email);\n\t\t\t\t\tif($emailExist == true) {\n\t\t\t\t\t\t$errors['email'] = \"Cet email est déjà utilisée\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (empty($_POST['password']) || $_POST['password'] != $_POST['password_confirm']) {\n\t\t\t\t\t$errors['password'] = \"Vous devez rentrer un mot de passe valide\";\n\t\t\t\t}\n\t\t\t\t$utilisateurDetails = $users->newUsers($username, $password, $email, $nom, $prenom, $adresse, $code_postal, $errors);\n\t\t\t}\n\t\t\n\trequire_once ($_SERVER['DOCUMENT_ROOT'].\"/ecommerce/views/pages/inscription.php\");\n}", "public function create(){\n \n $data = array();\n $data['login'] = $_POST['login'];\n $data['password'] = Hash::create('sha256', $_POST['password'], HASH_KEY);\n $data['role'] = $_POST['role'];\n \n //Do the Error checking\n \n $this->model->RunCreate($data);\n /*\n * After we Post the user info to create, the header is refereshed so that the data appears dynamically \n * below in the users list\n */\n header('location: ' . URL . 'users');\n }", "public function createAction()\n {\n if (!$this->request->isPost()) {\n $this->dispatcher->forward([\n 'controller' => \"usuario\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $usuario = new Usuario();\n $usuario->loginUsuario = $this->request->getPost(\"Login_usuario\");\n $usuario->senhaUsuario = $this->request->getPost(\"Senha_usuario\");\n $usuario->nomeUsuario = $this->request->getPost(\"Nome_usuario\");\n $usuario->idadeUsuario = $this->request->getPost(\"Idade_usuario\");\n $usuario->enderecoUsuario = $this->request->getPost(\"Endereco_usuario\");\n $usuario->cIDADECodCidade = $this->request->getPost(\"CIDADECod_cidade\");\n $usuario->tIPOUSUARIOCodTipoUsuario = $this->request->getPost(\"TIPO_USUARIOCod_tipo_usuario\");\n \n\n if (!$usuario->save()) {\n foreach ($usuario->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward([\n 'controller' => \"usuario\",\n 'action' => 'new'\n ]);\n\n return;\n }\n\n $this->flash->success(\"usuario was created successfully\");\n\n $this->dispatcher->forward([\n 'controller' => \"usuario\",\n 'action' => 'index'\n ]);\n }", "public function RegistrarUsuarios()\n{\n\tself::SetNames();\n\tif(empty($_POST[\"nombres\"]) or empty($_POST[\"usuario\"]) or empty($_POST[\"password\"]))\n\t{\n\t\techo \"1\";\n\t\texit;\n\t}\n\t$sql = \" select cedula from usuarios where cedula = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array($_POST[\"cedula\"]) );\n\t$num = $stmt->rowCount();\n\tif($num > 0)\n\t{\n\n\t\techo \"2\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\t$sql = \" select email from usuarios where email = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_POST[\"email\"]) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 0)\n\t\t{\n\n\t\t\techo \"3\";\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sql = \" select usuario from usuarios where usuario = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array($_POST[\"usuario\"]) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0)\n\t\t\t{\n\t\t\t\t$query = \" insert into usuarios values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?); \";\n\t\t\t\t$stmt = $this->dbh->prepare($query);\n\t\t\t\t$stmt->bindParam(1, $cedula);\n\t\t\t\t$stmt->bindParam(2, $nombres);\n\t\t\t\t$stmt->bindParam(3, $nrotelefono);\n\t\t\t\t$stmt->bindParam(4, $cargo);\n\t\t\t\t$stmt->bindParam(5, $email);\n\t\t\t\t$stmt->bindParam(6, $usuario);\n\t\t\t\t$stmt->bindParam(7, $password);\n\t\t\t\t$stmt->bindParam(8, $nivel);\n\t\t\t\t$stmt->bindParam(9, $status);\n\n\t\t\t\t$cedula = strip_tags($_POST[\"cedula\"]);\n\t\t\t\t$nombres = strip_tags($_POST[\"nombres\"]);\n\t\t\t\t$nrotelefono = strip_tags($_POST[\"nrotelefono\"]);\n\t\t\t\t$cargo = strip_tags($_POST[\"cargo\"]);\n\t\t\t\t$email = strip_tags($_POST[\"email\"]);\n\t\t\t\t$usuario = strip_tags($_POST[\"usuario\"]);\n\t\t\t\t$password = sha1(md5($_POST[\"password\"]));\n\t\t\t\t$nivel = strip_tags($_POST[\"nivel\"]);\n\t\t\t\t$status = strip_tags(strtoupper($_POST[\"status\"]));\n\t\t\t\t$stmt->execute();\n\n################## SUBIR FOTO DE USUARIOS ######################################\n//datos del arhivo \n\t\t\t\tif (isset($_FILES['imagen']['name'])) { $nombre_archivo = $_FILES['imagen']['name']; } else { $nombre_archivo =''; }\n\t\t\t\tif (isset($_FILES['imagen']['type'])) { $tipo_archivo = $_FILES['imagen']['type']; } else { $tipo_archivo =''; }\n\t\t\t\tif (isset($_FILES['imagen']['size'])) { $tamano_archivo = $_FILES['imagen']['size']; } else { $tamano_archivo =''; } \n//compruebo si las características del archivo son las que deseo \n\t\t\t\tif ((strpos($tipo_archivo,'image/jpeg')!==false)&&$tamano_archivo<50000) \n\t\t\t\t{ \n\t\t\t\t\tif (move_uploaded_file($_FILES['imagen']['tmp_name'], \"fotos/\".$nombre_archivo) && rename(\"fotos/\".$nombre_archivo,\"fotos/\".$_POST[\"cedula\"].\".jpg\"))\n\t\t\t\t\t{ \n## se puede dar un aviso\n\t\t\t\t\t} \n## se puede dar otro aviso \n\t\t\t\t}\n################## FINALIZA SUBIR FOTO DE USUARIOS ######################################\n\n\t\t\t\techo \"<div class='alert alert-success'>\";\n\t\t\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\t\t\techo \"<span class='fa fa-check-square-o'></span> EL USUARIO FUE REGISTRADO EXITOSAMENTE\";\n\t\t\t\techo \"</div>\";\t\t\n\t\t\t\texit;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"4\";\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t}\n}", "static public function ctrCrearUsuario()\n\t{\n\t\t// $usu = $_POST['nuevoUsuario'];\n\t\t// echo \"<script>console.log( 'Debug Objects: \" . $usu . \"' );</script>\";\n\n\n\t\t// hacemos el filtro cuando llegan por post\n\n\t\t// Devuelve true si la variable existe y tiene un valor distinto de null, false de lo contrario.\n\t\t// if(isset($_POST['nuevoUsuario']) && !empty($_POST['nuevoUsuario']))\n\t\tif(isset($_POST['nuevoUsuario']))\n\t\t{\n\n\t\t\t// $usu = $_POST['nuevoUsuario'];\n\t\t\t// echo \"<script>console.log( 'Debug Objects: \" . $usu . \"' );</script>\";\n\t\t\t// echo \"<script>alert( 'Debug Objects: \" . $usu . \"' );</script>\";\n\t\t\t\n\t\t\t//vamos a permitir caracteres especiales con tilde,espacio en blanco y numericos con expresion regular\n\t\t\tif(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓü ]+$/', $_POST['nuevoNombre']) &&\n\t\t\tpreg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓü ]+$/', $_POST['nuevoUsuario']) &&\n\t\t\tpreg_match('/^[a-zA-Z0-9]+$/', $_POST['nuevoPassword']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t/*=============================================\n\t\t\t\t\t\t\tVALIDAR IMAGEN\n\t\t\t\t=============================================*/\n\n\n\t\t\t\t$ruta = \"\";\n\n\t\t\t\t// si existe el archivo temporal del archivo file\n\t\t\t\tif(isset($_FILES['nuevaFoto']['tmp_name']))\n\t\t\t\t{\n\t\t\t\t\t// vamos a recortar la imagen 500 x 500 px\n\n\t\t\t\t\t// list — Asignar variables como si fueran un array\n\t\t\t\t\t// getimagesize — Obtener el tamaño de una imagen\n\t\t\t\t\t//en list() toma el indice 0 de [nuevaFoto][tmp_name](los indice del archivo temporal son medidas de la imagen) y asigna a $ancho y el indice 1 asigna a $alto \n\t\t\t\t\tlist($ancho, $alto) = getimagesize($_FILES['nuevaFoto']['tmp_name']);\n\n\t\t\t\t\t// redimensionamos\n\t\t\t\t\t$nuevoAncho = 500;\n\t\t\t\t\t$nuevoAlto = 500;\n\n\t\t\t\t\t// creamos la ruta donde se va a guardar la imagen\n\t\t\t\t\t$directorio = 'vistas/img/usuarios/'.$_POST['nuevoUsuario'];\n\n\t\t\t\t\t// vamos a crear el directorio\n\t\t\t\t\tmkdir($directorio, 0755);\n\n\n\t\t\t\t\t/*====================================================================\n\t\t\t\t\tDEACUERDO AL TIPO DE IMAGEN APLICAMOS LAS FUNCIONES POR DEFECTO DE PHP \n\t\t\t\t\t======================================================================*/\n\n\t\t\t\t\tif($_FILES['nuevaFoto']['type'] == \"image/jpeg\")\n\t\t\t\t\t{\n\t\t\t\t\t\t/*=============================================\n\t\t\t\t\t\t\tGUARDAR LA IMAGEN EN EL DIRECTORIO\n\t\t\t\t\t\t=============================================*/\n\n\t\t\t\t\t\t$aleatorio = mt_rand(100,999);\n\n\t\t\t\t\t\t// le damos nombre a la imagen , y puede ser un nro aleaterio del 100 al 999\n\t\t\t\t\t\t$ruta = \"vistas/img/usuarios/\".$_POST['nuevoUsuario'].\"/\".$aleatorio.\".jpg\";\n\n\t\t\t\t\t\t// imagecreatefromjpeg — Crea una nueva imagen a partir de un fichero o de una URL\n\t\t\t\t\t\t// imagecreatefromjpeg() devuelve un identificador de imagen que representa la imagen obtenida desde el nombre de fichero dado.\n\t\t\t\t\t\t$origen = imagecreatefromjpeg($_FILES['nuevaFoto']['tmp_name']);\n\n\t\t\t\t\t\t// imagecreatetruecolor — Crear una nueva imagen de color verdadero\n\t\t\t\t\t\t// imagecreatetruecolor() devuelve un identificador de imagen que representa una imagen en negro del tamaño especificado.\n\t\t\t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\n\n\t\t\t\t\t\t// imagecopyresized — Copia y cambia el tamaño de parte de una imagen\n\t\t\t\t\t\t// imagecopyresized() copia una porción de una imagen a otra imagen. dst_image es la imagen de destino, src_image es el identificador de la imagen de origen.\n\t\t\t\t\t\t// imagecopyresized(resource $dst_image(destino) , resource $src_image(origen) , int $dst_x(eje x izq) , int $dst_y(eje y up) , int $src_x(desde donde el corte) , int $src_y(dese el eje y) , int $dst_w(ancho de corte) , int $dst_h(alto de corte) , int $src_w(ancho de original) , int $src_h(alto original) )\n\t\t\t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\n\t\t\t\t\t\t// imagejpeg — Exportar la imagen al navegador o a un fichero\n\t\t\t\t\t\t// imagejpeg() crea un archivo JPEG desde image.\n\t\t\t\t\t\t// $destino es donde quedo la foto recortada\n\t\t\t\t\t\t//$ruta donde vmos a guardar la foto \n\t\t\t\t\t\timagejpeg($destino, $ruta);\n\t\t\t\t\t}\n\n\t\t\t\t\tif($_FILES['nuevaFoto']['type'] == \"image/png\")\n\t\t\t\t\t{\n\t\t\t\t\t\t/*=============================================\n\t\t\t\t\t\t\tGUARDAR LA IMAGEN EN EL DIRECTORIO\n\t\t\t\t\t\t=============================================*/\n\n\t\t\t\t\t\t$aleatorio = mt_rand(100,999);\n\n\t\t\t\t\t\t// le damos nombre a la imagen , y puede ser un nro aleaterio del 100 al 999\n\t\t\t\t\t\t$ruta = \"vistas/img/usuarios/\".$_POST['nuevoUsuario'].\"/\".$aleatorio.\".png\";\n\n\t\t\t\t\t\t// imagecreatefromjpeg — Crea una nueva imagen a partir de un fichero o de una URL\n\t\t\t\t\t\t// imagecreatefromjpeg() devuelve un identificador de imagen que representa la imagen obtenida desde el nombre de fichero dado.\n\t\t\t\t\t\t$origen = imagecreatefrompng($_FILES['nuevaFoto']['tmp_name']);\n\n\t\t\t\t\t\t// imagecreatetruecolor — Crear una nueva imagen de color verdadero\n\t\t\t\t\t\t// imagecreatetruecolor() devuelve un identificador de imagen que representa una imagen en negro del tamaño especificado.\n\t\t\t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\n\n\t\t\t\t\t\t// imagecopyresized — Copia y cambia el tamaño de parte de una imagen\n\t\t\t\t\t\t// imagecopyresized() copia una porción de una imagen a otra imagen. dst_image es la imagen de destino, src_image es el identificador de la imagen de origen.\n\t\t\t\t\t\t// imagecopyresized(resource $dst_image(destino) , resource $src_image(origen) , int $dst_x(eje x izq) , int $dst_y(eje y up) , int $src_x(desde donde el corte) , int $src_y(dese el eje y) , int $dst_w(ancho de corte) , int $dst_h(alto de corte) , int $src_w(ancho de original) , int $src_h(alto original) )\n\t\t\t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\n\t\t\t\t\t\t// imagejpeg — Exportar la imagen al navegador o a un fichero\n\t\t\t\t\t\t// imagejpeg() crea un archivo JPEG desde image.\n\t\t\t\t\t\t// $destino es donde quedo la foto recortada\n\t\t\t\t\t\t//$ruta donde vmos a guardar la foto \n\t\t\t\t\t\timagepng($destino, $ruta);\n\t\t\t\t\t}\n\n\t\t\t\t\t// var_dump($_FILES['nuevaFoto']['tmp_name']);\n\t\t\t\t\t// var_dump(getimagesize($_FILES['nuevaFoto']['tmp_name']));\n\n\t\t\t\t}\n\n\n\t\t\t\t// $usu = $_POST['nuevoUsuario'];\n\t\t\t\t// echo \"<script>alert( 'Debug Objects: \" . $usu . \"' );</script>\";\n\t\t\t\t// echo \"<script>console.log( 'Debug Objects: \" . $usu . \"' );</script>\";\n\n\t\t\t\t$tabla = \"usuarios\";\n\n\t\t\t\t// crypt — Hash de cadenas de un sólo sentido\n\t\t\t\t$encriptar = crypt($_POST['nuevoPassword'], '$2a$07$usesomesillystringforsalt$');\n\n\t\t\t\t$datos = array\n\t\t\t\t(\n\t\t\t\t\t\"nombre\"=> $_POST['nuevoNombre'],\n\t\t\t\t\t\"usuario\"=> $_POST['nuevoUsuario'],\t\n\t\t\t\t\t\"password\"=> $encriptar,\t\n\t\t\t\t\t\"perfil\"=> $_POST['nuevoPerfil'],\n\t\t\t\t\t\"ruta\" => $ruta\t\n\t\t\t\t);\n\n\t\t\t\t\n\t\t\t\t// $usu = $_POST['nuevoUsuario'];\n\t\t\t\t// $nom = $_POST['nuevoNombre'];\n\t\t\t\t// $per = $_POST['nuevoPerfil'];\n\t\t\t\t// echo \"<script>alert( 'Debug Objects: \" . $usu . \"' );</script>\";\n\t\t\t\t// echo \"<script>console.log( 'Debug Objects: \" . $usu . \" \" . $nom . \" \" . $per . \"' );</script>\";\n\n\t\t\t\t$respuesta = ModeloUsuarios::mdlIngresarUsuario($tabla, $datos);\n\n\t\t\t\t// var_dump($respuesta);\n\t\t\t\t// die();\n\n\t\t\t\t// echo \"<script>console.log( 'Debug Objects: \" . $respuesta . \"' );</script>\";\n\t\t\t\t// echo \"<script>alert( \" . $respuesta . \" );</script>\";\n\n\t\t\t\tif($respuesta == \"ok\")\n\t\t\t\t{\n\t\t\t\t\techo '<script>\n\t\t\t\t\n\t\t\t\t\t\tSwal.fire({\n\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\ttitle: \"El usuario se guardado correctamente!\",\n\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t}).then((result)=>{\n\t\t\t\t\t\t\tif(result.value)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twindow.location = \"usuarios\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t\t</script>';\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<script>\n\t\t\t\t\n\t\t\t\tSwal.fire({\n\t\t\t\t\ttype: \"error\",\n\t\t\t\t\ttitle: \"El usuario no puede ir vacio o lleva caracteres especiales\",\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\t if(result.value)\n\t\t\t\t\t {\n\t\t\t\t\t\t window.location = \"usuarios\";\n\t\t\t\t\t }\n\t\t\t\t });\n\t\t\t\t\n\t\t\t\t</script>';\n\t\t\t}\n\t\t}\n\t}", "function create_cuenta_registro($data) {\n\t\t$data['fecha_alta'] = date('Y-m-d H:i:s');\n\t\t//Audit field\n\t\t$data['user'] = $this->auth_frr->is_logged_in();\n\n\t\tif ($this -> db -> insert('cuentas_registro', $data)) {\n\t\t\t$cr_id = $this -> db -> insert_id();\n\t\t\treturn array('cuentaregistro_id' => $cr_id);\n\t\t}\n\t\treturn NULL;\n\t}", "function registrarUsuario(){\n\n\t require(\"Conexion.php\");\t\n\t \n if(isset($_POST['insertar'])){\n\t\n\t $nombre=$_POST[\"nombre\"];\n $apellido=$_POST[\"apellido\"];\n\t $correo=$_POST[\"correo\"];\n\t $direccion=$_POST[\"direccion\"];\n\t $username=$_POST[\"nombre\"];\n\t $password=$_POST[\"password\"];\n\n\t $db=new Conexion();\n\t\n\t\t /* evitar duplicaciones*/\t\t\n $sql = \"select count(*) from datos_usuario where nombre ='$nombre'\";\n\t\t\n if ($resultado = $db->connect()-> query($sql)) {\n\n /* Comprobar el número de filas que coinciden con la sentencia SELECT */\n if ($resultado->fetchColumn() > 0) {\n\n /* Ejecutar la sentencia SELECT para mostrar el nombre duplicado*/\n $sql = \"select nombre from datos_usuario where nombre = '$nombre'\";\n foreach ($db->connect()->query($sql) as $fila) {\n \n\t\t $duplicado=$nombre;\n }\t\n\n\t echo '<script language=\"javascript\">alert(\"Usuario duplicado: '.$duplicado.' ya esta en uso.\");</script>';\n\n echo \"<script>\n setTimeout(function() {\n location.href = '../vista/registro_user.php';\n }, 0001);\n </script>\";\t\t\t \n }\n \n /* No coincide ningua fila inserta */\n else {\t\t\n\t\t\t/*no hay duplicaciones insertamos*/\n\t\n $query=$db->connect()->prepare(\"insert into datos_usuario (nombre, apellido, correo, direccion)\n\t values (:nombre, :apellido, :correo,:direccion)\");\t\t\t \n $query->execute(array(\":nombre\"=>$nombre, \":apellido\"=>$apellido,\":correo\"=>$correo,\"direccion\"=>$direccion));\n\t\n\t/*----------------segunda tabla-----------------------------*/\n\t $db=new Conexion();\n\t \n\t $sql2=\"insert into usuarios(username, password, rol_id) values (:username, :password, :rol_id)\";\n\t $query=$db->connect()->prepare($sql2);\n\t\t\t \n $query->execute(array(\":username\"=>$nombre, \":password\"=>$password, \":rol_id\"=>2));\n\t\n\t\t echo'<script type=\"text/javascript\">\n alert(\"Usuario registrado\");\n </script>';\n\t\n\t \n\t echo \"<script>\n setTimeout(function() {\n location.href = '../vista/login.php';\n }, 0001);\n </script>\";\t\n\t\t } \t\n }\n }\n }", "public function create()\n {\n try {\n\n $sesion = Auth::guest();\n\n if ($sesion) {\n return response()->json([\n 'response' => -3,\n 'sesion' => $sesion,\n ]);\n }\n\n $data = GrupoUsuario::select('idrol as id', 'nombre', 'descripcion')\n ->where([ ['estado', '=', 'A'], ['idrol', '<>', '1'], ['idrol', '<>', '3'] ])\n ->get();\n\n return response()->json([\n 'response' => 1,\n 'data' => $data,\n ]);\n\n }catch(\\Exception $th) {\n return response()->json([\n 'response' => 0,\n 'message' => 'Error al procesar la solicitud',\n 'error' => [\n 'file' => $th->getFile(),\n 'line' => $th->getLine(),\n 'message' => $th->getMessage()\n ]\n ]);\n }\n }", "function recuperarDatos(){\r\n\t\t\t\t$this->objFunc=$this->create('MODEmpresa');\r\n\t\t\t\t$objetoFuncion = $this->create('MODEmpresa');\r\n\t\t\t\t$this->res=$this->objFunc->insertarEmpresa($this->objParam);\t//esta bien\t\t\t\r\n\t\t\t\t$this->res->imprimirRespuesta($this->res->generarJson());\r\n\t\t}", "function newUsuario($usuario)\n{\n\t$con = getDBConnection();\n\t$stmt = $con->prepare(\"INSERT INTO usuarios (nombre, apellidos, user_name, password, email) VALUES (:nombre, :apellidos, :user_name, :password, :email)\");\n\t$stmt->bindParam(':nombre', $usuario->nombre);\n\t$stmt->bindParam(':apellidos', $usuario->apellidos);\n\t$stmt->bindParam(':user_name', $usuario->user_name);\n\t$stmt->bindParam(':password', $usuario->password);\n\t$stmt->bindParam(':email', $usuario->email);\n\t$stmt->execute();\n}", "private function processInsertUser(){\n\t\t//Comprueba que la variable tipo exista, sino pondra 1 por defecto\n\t\tif(isset($_REQUEST[\"tipo\"]))\n\t\t\t$tipo = $_REQUEST[\"tipo\"];\n\t\telse \n\t\t\t$tipo = 1;\n\n\t\tif($_FILES[\"foto_usuario\"][\"error\"] == 0){\n\t\t\t$randNumber = rand(0, 999999);\n\t\t\t$imgName = $randNumber . $_FILES['foto_usuario']['name'];\n\t\t\t$image_upload = Config::$userDirImage . $imgName;\n\t\t\tif (move_uploaded_file($_FILES['foto_usuario']['tmp_name'], $image_upload)) {\n\t\t\t\t$result = $this->users->insertUser($tipo, $imgName); //Devuelve 1 si inserta user\n\t\t\t\tif($result){\n\t\t\t\t\tif (Seguridad::getTipo() == \"0\"){\n\t\t\t\t\t\tView::redireccion(\"user\", \"userController\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\theader('Location: index.php');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tunlink($image_upload);\n\t\t\t\t\techo \"Ocurrio un error al insertar el usuario.\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo \"Ocurrio un error al guardar el archivo.\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"Ocurrio un error al cargar el archivo.\";\n\t\t}\n\t}", "public function store(Request $request)\n {\n $user = new User;\n $user->id = $request->input('id');\n $user->name = $request->input('nombre');\n $user->apellido = $request->input('apellido');\n $user->email = $request->input('email');\n $user->usuario = ucwords($user->name) . \"\". ucwords($user->apellido[0]);\n $user->password = Hash::make($request->input('password'));\n $user->rol = $request->input('rol');\n $user->save();\n\n $correo = new newusuario($user);\n Mail::to('[email protected]')->send($correo);\n \n if($user->rol == 0){\n $superAdministrador = new super_administrador();\n $superAdministrador->id = $user->id;\n $superAdministrador->save();\n }\n if($user->rol == 1){\n $administrador = new administrador;\n $administrador->id = $user->id;\n $administrador->save();\n }\n if($user->rol == 2){\n $asesor = new asesor;\n $asesor->id = $user->id;\n $asesor->save();\n }\n if($user->rol == 3){\n $tutor = new tutor;\n $tutor->id = $user->id;\n $tutor->save();\n }\n\n \n return redirect('logged_in');\n /*\n if (isset($_POST[\"usu\"])) {\n echo \"LLEGO\";\n $array = json_decode($_POST[\"usu\"]);\n echo \"LLEGO\";\n $usuario = new User;\n $usuario->usuario = $array->user;\n $usuario->rol = $array->rol;\n $usuario->password = $array->contrasena;\n $usuario->id = $array->id;\n $usuario->name = $array->name;\n $usuario->apellido = $array->apellido;\n $usuario->email = $array->email;\n $usuario->save();\n\n if ($usuario->rol == 0) {\n $superAdministrador = new super_administrador();\n $superAdministrador->id = $usuario->id;\n $superAdministrador->save();\n }\n if ($usuario->rol == 1) {\n $administrador = new administrador;\n $administrador->id = $usuario->id;\n $administrador->save();\n }\n if ($usuario->rol == 2) {\n $asesor = new asesor;\n $asesor->id = $usuario->id;\n $asesor->save();\n }\n if ($usuario->rol == 3) {\n $tutor = new tutor;\n $tutor->id = $usuario->id;\n $tutor->save();\n }\n\n\n if ($usuario->id != \"\") {\n $message = \"No Funciono\";\n redirect('logged_in');\n return response()->json([\n 'status' => 'Error',\n 'message' => $message,\n ]);\n }\n } else {\n echo \"something went wrong\";\n }\n return redirect('logged_in');\n */\n }", "public function voxy_create_new_user()\n {\n $data = $this->input->post();\n\n if(!(isset($data['external_user_id']) && $data['external_user_id'])){\n $this->ajax_data_return['msg'] = 'ID người dùng không hợp lệ !';\n return $this->ajax_response();\n }\n if(isset($data['expiration_date']) && $data['expiration_date'] != ''){\n $data['expiration_date'] = strtotime($data['expiration_date']);\n }\n if(isset($data['date_of_next_vpa']) && $data['date_of_next_vpa'] != ''){\n $data['date_of_next_vpa'] = strtotime($data['date_of_next_vpa']);\n }\n if(isset($data['can_reserve_group_sessions']) && $data['can_reserve_group_sessions'] != ''){\n $data['can_reserve_group_sessions'] = strtolower($data['can_reserve_group_sessions']);\n }\n\n $api_data = $this->m_voxy_connect->register_a_new_user($data['external_user_id'], $data);\n if($api_data && isset($api_data['error_message'])) {\n $this->ajax_data_return['msg'] = $api_data['error_message'];\n } else {\n $this->ajax_data_return['status'] = TRUE;\n $this->ajax_data_return['msg'] = 'Tạo tài khoản người dùng thành công !';\n $this->ajax_data_return['data'] = $api_data;\n }\n\n return $this->ajax_response();\n }", "public function store_user(Request $request)\n {\n //Genera user, password e email se non forniti\n if(isset($request['genera_email'])){\n $user = new User;\n $email = \"\";\n do{\n $email = str_random(20);\n $user = User::where([['email', $email.'@segresta.it'], ['username', $email]])->get();\n }while(count($user)>0);\n\n $request['email'] = $email.'@segresta.it';\n $request['username'] = $email;\n }\n\n if(isset($request['genera_password'])){\n $request['password'] = str_random(40);\n }\n\n $this->validate($request, [\n 'name' => 'required',\n 'cognome' => 'required',\n 'nato_il' => 'required|date_format:d/m/Y',\n 'nato_a' => 'required',\n 'email' =>'required|unique:users',\n 'username' => 'required|unique:users',\n 'password' => 'required'\n ]);\n $input = $request->all();\n $date = Carbon::createFromFormat('d/m/Y', $input['nato_il']);\n if(Input::hasFile('photo')){\n $file = $request->photo;\n $filename = $request->photo->store('profile', 'public');\n $path = Storage::disk('public')->getDriver()->getAdapter()->getPathPrefix().$filename;\n $image = Image::make($path);\n $image->resize(500,null, function ($constraint) {$constraint->aspectRatio();});\n $image->save($path);\n $input['photo'] = $filename;\n }\n $input['password'] = Hash::make($input['password']);\n //salvo l'utente\n $user = User::create($input);\n //salvo il link utente-oratorio\n $orat = new UserOratorio;\n $orat->id_user=$user->id;\n $orat->id_oratorio = Session::get('session_oratorio');\n $orat->save();\n\n //salvo attributi\n $i=0;\n if(isset($input['id_attributo']) && count($input['id_attributo'])>0){\n foreach($input['id_attributo'] as $id) {\n $attrib = AttributoUser::create(['id_user' => $user->id, 'id_attributo' => $id, 'valore' => $input['attributo'][$i]]);\n $i++;\n }\n }\n\n //aggiungo il ruolo\n $roles = Role::where([['name', 'user'], ['id_oratorio', Session::get('session_oratorio')]])->get();\n if(count($roles)>0){\n //creo il ruolo\n $role = new RoleUser;\n $role->user_id = $user->id;\n $role->role_id = $roles[0]->id;\n $role->save();\n }\n Session::flash('flash_message', 'Utente aggiunto!');\n return redirect()->route('user.index');\n }", "public function create() {\n\t\t$db = Database::getInstance();\n\t\t$stmt = $db->prepare(\"INSERT INTO users (id, mail, name, password, role, state) VALUES (?, ?, ?, ?, ?, ?)\");\n\t\t$stmt->execute(array($this->id, $this->mail, $this->name, $this->password, $this->role, $this->state));\n\t}", "function autoregister_create_new_user($itemId)\n {\n $item = Item::newInstance()->findByPrimaryKey($itemId['pk_i_id']);\n // if not exist user\n if( $item['fk_i_user_id'] == NULL ) {\n // create new user + send email\n $name = $item['s_contact_name'];\n $email = $item['s_contact_email'];\n // prepare data for register user\n $aux_password = osc_genRandomPassword();\n // clear params ....\n $input = array();\n $input['s_name'] = Params::getParam('s_name') ;\n Params::setParam('s_name', $name ); // from inserted item\n $input['s_email'] = Params::getParam('s_email') ;\n Params::setParam('s_email', $email ); // from inserted item\n $input['s_password'] = Params::getParam('s_password') ;\n Params::setParam('s_password', $aux_password ); // generated\n $input['s_password2'] = Params::getParam('s_password2') ;\n Params::setParam('s_password2', $aux_password ); // generated\n $input['s_website'] = Params::getParam('s_website') ;\n Params::setParam('s_website', '');\n $input['s_phone_land'] = Params::getParam('s_phone_land') ;\n Params::setParam('s_phone_land', '');\n $input['s_phone_mobile'] = Params::getParam('s_phone_mobile') ;\n Params::setParam('s_phone_mobile', '');\n $input['countryId'] = Params::getParam('countryId');\n Params::setParam('countryId', '');\n $input['regionId'] = Params::getParam('regionId');\n Params::setParam('regionId', '');\n $input['cityId'] = Params::getParam('cityId');\n Params::setParam('cityId', '');\n $input['cityArea'] = Params::getParam('cityArea') ;\n Params::setParam('cityArea', '');\n $input['address'] = Params::getParam('address') ;\n Params::setParam('address', '');\n $input['b_company'] = (Params::getParam('b_company') != '' && Params::getParam('b_company') != 0) ? 1 : 0 ;\n Params::setParam('b_company', '0');\n\n require_once LIB_PATH . 'osclass/UserActions.php' ;\n $userActions = new UserActions(false) ;\n $success = $userActions->add() ;\n\n switch($success) {\n case 1: osc_add_flash_ok_message( _m('The user has been created. An activation email has been sent')) ;\n $success = true;\n break;\n case 2: osc_add_flash_ok_message( _m('Your account has been created successfully')) ;\n $success = true;\n break;\n case 3: osc_add_flash_warning_message( _m('The specified e-mail is already in use')) ;\n $success = false;\n break;\n case 4: osc_add_flash_error_message( _m('The reCAPTCHA was not entered correctly')) ;\n $success = false;\n break;\n case 5: osc_add_flash_warning_message( _m('The email is not valid')) ;\n $success = false;\n break;\n case 6: osc_add_flash_warning_message( _m('The password cannot be empty')) ;\n $success = false;\n break;\n case 7: osc_add_flash_warning_message( _m(\"Passwords don't match\")) ;\n $success = false;\n break;\n }\n\n if($success) {\n Log::newInstance()->insertLog('plugin_autoregister', 'autoregister', '', $email.' '.$_SERVER['REMOTE_ADDR'], 'autoregister', osc_logged_admin_id()) ;\n // update user of item\n $user = User::newInstance()->findByEmail($email);\n Item::newInstance()->update(array('fk_i_user_id' => $user['pk_i_id'] ), array('pk_i_id' => $itemId ) );\n $item = Item::newInstance()->findByPrimaryKey($itemId);\n\n autoregister_sendMail($email, $user, $aux_password);\n\n // not activated\n if( $item['b_active'] != 1 ) {\n osc_run_hook('hook_email_item_validation', $item);\n }\n }\n\n // set params again\n Params::setParam('s_name', $input['s_name']);\n Params::setParam('s_email', $input['s_email']);\n Params::getParam('s_password', $input['s_password']) ;\n Params::getParam('s_password2', $input['s_password2']) ;\n Params::setParam('s_website', $input['s_website']);\n Params::setParam('s_phone_land', $input['s_phone_land']);\n Params::setParam('s_phone_mobile', $input['s_phone_mobile']);\n Params::setParam('countryId', $input['countryId']);\n Params::setParam('regionId', $input['regionId']);\n Params::setParam('cityId', $input['cityId']);\n Params::setParam('cityArea', $input['cityArea'] );\n Params::setParam('address', $input['address']);\n Params::setParam('b_company', $input['b_company']);\n // end\n }\n }", "public function store(CreateUsuarioRequest $request)\n {\n $empresa_id = $request->EMPRESA_ID;\n $codigoProveedorSap = $request->codigoProveedorSap;\n //dd($request->all());\n\n $usuario = new User();\n\n $usuario->nombre = $request->nombre;\n $usuario->email = $request->email;\n $usuario->password = bcrypt($request->password);\n $usuario->tel_codpais = $request->tel_codpais;\n $usuario->telefono = $request->telefono;\n //$usuario->usersap_id = $request->usersap_id;\n $usuario->activo = $request->activo;\n $usuario->anulado = $request->anulado;\n\n if ($usuario->anulado === null) {\n $usuario->anulado = 0;\n }\n\n $usuario->save();\n\n /** Esto debe ser reubicado queda pendiete\n UsuarioEmpresa::insert( ['USER_ID' => $usuario->id, 'EMPRESA_ID' => $empresa_id, 'CODIGO_PROVEEDOR_SAP' => $codigoProveedorSap, 'ANULADO' => 0] );\n **/\n\n return redirect::to('usuarios');\n\n }", "public function store(Request $request) // almacena los datos que son pasados por el form\n {\n $credentials = Request()->validate([ //validar los datos\n 'name' => ['required'],\n 'carnet' => ['required'],\n 'email' => ['required'],\n 'password' => ['required'],\n\n ]);\n $tipo_vendedor = $request['tipo_vendedor'];\n $tipo_visita = $request['tipo_visita'];\n $tipo_cliente = $request['tipo_cliente'];\n $tipo_administrador = $request['tipo_administrador'];\n if($tipo_vendedor==null)\n $tipo_vendedor=0;\n else\n $tipo_vendedor=1;\n if($tipo_visita==null)\n $tipo_visita=0;\n else\n $tipo_visita=1;\n if($tipo_cliente==null)\n $tipo_cliente=0;\n else\n $tipo_cliente=1;\n if($tipo_administrador==null)\n $tipo_administrador=0;\n else\n $tipo_administrador=1;\n\n $user= User::create([\n 'name'=>request('name'),\n 'carnet'=>request('carnet'),\n 'email'=>request('email'),\n 'password'=> bcrypt(request('password')),\n 'tipo_vendedor'=>$tipo_vendedor,\n 'tipo_visita'=>$tipo_visita,\n 'tipo_cliente'=>$tipo_cliente,\n 'tipo_administrador'=>$tipo_administrador,\n 'url_foto'=>null,\n 'estado'=>1,\n ]);\n BitacoraController::store($user->id);\n NotaController::store(Auth::user()->id,'El administrador creo un nuevo usuario');\n //NotaController::store($user->id,'El usuario fue creado correctamente');\n // NotaUsuario::crear($user,'Usuario creado');\n\n return redirect()->route('user.index');\n }", "function agregar($nombre,$correo,$usuario,$rol,$zonah,$estado,$psw)\n {\n $Valores = \"'\".$usuario.\"','\".$psw.\"','\".$nombre.\"','\".$correo.\"',\".$estado.\",\".$zonah.\",\".$rol;\n $this->Insertar(\"usuarios\",\"usuario,password,nombre,correo,activo,zonashorarias_id,roles_id\",$Valores);\n }", "protected function create(array $data) {\n $password = rand(150000, 150000000);\n $number = '+' . $data['phone_code'] . '' . $data['phone'];\n $message = 'Hello ' . $data['first_name'] . ', your username is : ' . $data['email'] . '. Password : ' . $password \n . '. Login and change it now at ' . url('/');\n\n $user = User::create([\n 'name' => $data['first_name'] . ' ' . $data['last_name'],\n 'email' => $data['email'],\n 'phone' => $data['phone'],\n 'phone_code' => $data['phone_code'],\n 'age' => $data['age'],\n 'role_id' => 2,\n 'password' => Hash::make($password),\n 'gender' => $data['gender']\n ]);\n\n $blackList = array(\n 'localhost',\n '127.0.0.1',\n '::1'\n );\n\n if (!in_array($_SERVER['REMOTE_ADDR'], $blackList)) {\n try {\n Twilio::message($number, $message);\n Mail::send('admin.users.view', ['user_detail' =>\n array('name' => $data['first_name'], 'username' => $data['email'], \n 'password' => $password)], function ($message) use ($data) {\n $message->from('[email protected]', 'Numa Health');\n\n $message->to($data['email'])->subject('Welcome to your Numa account');\n });\n $apikey = '8954af9a4315019f1d0f8082f8925744-us9';\n $auth = base64_encode('user:' . $apikey);\n\n $datas = array(\n 'apikey' => $apikey,\n 'email_address' => $data['email'],\n 'status' => 'subscribed',\n 'merge_fields' => array(\n 'FNAME' => $data['first_name'] . ' ' . $data['last_name']\n )\n );\n $json_data = json_encode($datas);\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, 'https://us9.api.mailchimp.com/3.0/lists/d29163d261/members/');\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json',\n 'Authorization: Basic ' . $auth));\n curl_setopt($ch, CURLOPT_USERAGENT, 'PHP-MCAPI/2.0');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);\n $result = curl_exec($ch);\n } catch (Exception $exc) {\n //echo $exc->getTraceAsString();\n } catch (ErrorException $exc) {\n //echo $exc->getTraceAsString();\n }\n }\n return $user;\n }", "public function create(Request $request)\n {\n //creating a validator\n $validator = Validator::make($request->all(), [\n 'Id_Historia_Antecedentes' => 'required|unique:Historia_antecedentes',\n 'Numero_Expediente' => 'required',\n 'Codigo_Historia_Laboral' => 'required',\n 'Fecha_Inicio' => 'required',\n 'Fecha_Conclusion' => 'required',\n 'Años_Trabajados' => 'required',\n 'Puesto_Trabajo' => 'required'\n \n ]);\n \n //if validation fails \n if ($validator->fails()) {\n return array(\n 'error' => true,\n 'message' => $validator->errors()->all()\n );\n }\n \n //creating a new user\n $historia_antecedentes = new Historia_antecedentes();\n \n //adding values to the users\n $historia_antecedentes->Id_Historia_Antecedentes = $request->input('Id_Historia_Antecedentes');\n $historia_antecedentes->Numero_Expediente = $request->input('Numero_Expediente');\n $historia_antecedentes->Codigo_Historia_Laboral = $request->input('Codigo_Historia_Laboral');\n $historia_antecedentes->Fecha_Inicio = $request->input('Fecha_Inicio');\n $historia_antecedentes->Fecha_Conclusion = $request->input('Fecha_Conclusion');\n $historia_antecedentes->Años_Trabajados = $request->input('Años_Trabajados');\n $historia_antecedentes->Puesto_Trabajo = $request->input('Puesto_Trabajo');\n \n //saving the user to database\n $historia_antecedentes->save();\n \n //unsetting the password so that it will not be returned \n // unset($user->password);\n \n //returning the registered user \n return array('error' => false, 'historia_antecedentes' => $historia_antecedentes);\n }", "public function create(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'email' => 'required|email',\n 'password' => 'required',\n //'confirm_password' => 'required|same:password',\n ]);\n\n if ($validator->fails()) {\n return response()->json(['error' => $validator->errors()], 422);\n }\n\n $dni = $request->get('numdoc');\n $essalud = new \\jossmp\\essalud\\asegurado();\n\n $person = $essalud->consulta($dni);\n\n if ($person->success == false) {\n return response()->json([\n 'message' => 'DNI no encontrado',\n 'code' => 404,\n 'estado' => false,\n ]);\n }\n //print_r($person->result);\n if ($person->result->dni != ' ') {\n // comparando la fecha de emision\n // estableciendo los parametros a almacenar\n $name = $person->result->nombre;\n $last_name =\n $person->result->paterno .\n ' ' .\n $person->result->materno;\n $birth_date =\n explode('/', $person->result->nacimiento)[2] .\n '/' .\n explode('/', $person->result->nacimiento)[1] .\n '/' .\n explode('/', $person->result->nacimiento)[0];\n if ($person->result->sexo == 'Masculino') {\n $genero = 1;\n } else {\n $genero = 2;\n }\n } else {\n return response()->json([\n 'message' => 'DNI no encontrado',\n 'code' => 404,\n 'estado' => false,\n ]);\n }\n\n $user_to_create = User::where('email', $request->get('email'))->get();\n\n if (count($user_to_create) > 0) {\n return response()->json([\n 'message' => 'El usuario con este Correo electronico ya existe',\n 'code' => 206,\n 'estado' => false,\n ]);\n }\n\n //user sinch\n $user_sinch = strtolower(explode(' ', $name)[0]) . time();\n\n // validar ubicacion\n $image_bd = 'https://telemedicina.today/images/user/default/default.jpg';\n if ($request->get('image')) {\n $imageBase64 = $request->get('image');\n $image = base64_decode($imageBase64);\n $image_path = $request->get('name') . time() . '.jpg';\n \\Storage::disk('imagesPaciente')->put($image_path, $image);\n $image_bd =\n 'https://telemedicina.today/images/user/paciente/' . $image_path;\n }\n\n $fingerprint = '';\n if ($request->get('fingerprint')) {\n $fingerprint = $request->get('fingerprint');\n }\n\n $pacienteUser = User::create([\n 'email' => $request->get('email'),\n 'password' => bcrypt($request->get('password')),\n 'fingerprint' => $fingerprint,\n 'last_login' => $request->get('last_login'),\n 'name' => $name,\n 'last_name' => $last_name,\n 'img' => $image_bd,\n 'gender' => $genero,\n 'state' => $request->get('state'),\n 'address' => 'direccion desconocida',\n 'postal' => '07001',\n 'numdoc' => $request->get('numdoc'),\n 'type_document_id' => $request->get('type_document_id'),\n 'ubigeo_id' => '1404',\n 'user_sinch' => $user_sinch,\n 'password_sinch' => $user_sinch,\n 'tel' => $request->get('tel'),\n 'birth_date' => $birth_date,\n 'country' => 'Lima - Peru',\n 'estado' => 1,\n 'usuario_created_id' => $request->get('usuario_created_id'),\n 'usuario_upd_id' => $request->get('usuario_upd_id'),\n 'terminal' => $request->get('terminal'),\n 'terminal_upd' => $request->get('terminal_upd'),\n ]);\n\n $request['users_id'] = $this->userRepo->findUserIdEmail(\n $request->get('email')\n )->id;\n $request['user_id'] = $this->userRepo->findUserIdEmail(\n $request->get('email')\n )->id;\n\n $role = $this->roleRepo->find('3');\n\n $pacienteUser->roles()->attach($role);\n\n //$pacienteUser->roles()->attach($role);\n\n $patient = $this->patientRepo->getModel();\n $manager = new PatientManager($patient, $request->all());\n $manager->save();\n\n if (\n $request->get('provider') != null &&\n $request->get('id_provider') != null\n ) {\n $userProvider = $this->socialProviderRepo->loginSocial(\n $request->get('provider'),\n $request->get('id_provider')\n );\n if ($userProvider) {\n } else {\n return response()->json([\n 'estado' => false,\n 'code' => 400,\n 'message' =>\n 'El ID_PROVIDER no coincide con el PROVIDER, ingresar otro ID_PROVIDER',\n 'data' => [],\n ]);\n }\n $request['social_provider_id'] = $userProvider->social_provider_id;\n\n $detUserSocialProvider = $this->detUserSocialProviderRepo->find(\n $userProvider->id\n );\n $managerUserSocialProvider = new DetUserSocialProviderManager(\n $detUserSocialProvider,\n $request->all()\n );\n $managerUserSocialProvider->save();\n\n $userData = $this->userRepo->findUserUserSocialProvider(\n $userProvider->social_provider_id,\n $request->get('id_provider')\n );\n return response()->json([\n 'estado' => true,\n 'code' => 201,\n 'message' => 'Login Exitoso',\n 'data' => $userData,\n ]);\n }\n\n $user = \\DB::table('users')\n ->where('users.email', $request->get('email'))\n ->first();\n\n $activation = new Activation([\n 'user_id' => $user->id,\n 'code' => str_random(60),\n 'completed' => 0,\n ]);\n $activation->save();\n\n // if ($request->get('token_mobile')) {\n // $user_to_update = User::findOrFail($user[0]->id);\n //$user_to_update->token_mobile = $request->get('token_mobile');\n // $user_to_update->save();\n //} else\n //{\n $user_to_update = User::findOrFail($user->id);\n $user_to_update->token_mobile = '{\"tokens\":{\"ios\":\"\",\"android\":\"\",\"web\":\"\"}}';\n $user_to_update->save();\n //}\n\n if ($activation) {\n $data = [\n 'user_name' => $user->name . ' ' . $user->last_name,\n 'user_email' => $user->email,\n 'user_password' => $request->get('password'),\n 'activationUrl' => URL::route(\n 'activate.api',\n $activation->code\n ),\n ];\n // $data->user_name =$user->name .' '. $user->last_name;\n // $data->user_email = $user->email;\n // $data->user_password = $request->get('password');\n // $data->activationUrl = URL::route('activate.api', $activation->code);\n // Mail::to($user->email)->send(new Restore($data));\n }\n //$activation->notify(new SignupActivate($activation));\n /*$activation = Activation::where('user_id', $user[0]->id)->get();\n $activation_update = Activation::findOrFail($activation[0]->id);\n $activation_update->completed = 0;\n $activation_update->save();*/\n\n return response()->json([\n 'estado' => true,\n 'message' => 'Registro exitoso',\n 'code' => 200,\n 'data' => $user,\n ]);\n }", "protected function create(array $data)\n {\n $codigo = $this->generarCodigo(6);\n \n $dates = array(\"nombre\"=>$data[\"nombre\"],\n \"apellido\"=>$data[\"apellido\"],\n \"email\"=>$data[\"email\"],\n \"codigo\"=>$codigo);\n $this->Email($dates);\n return User::create([\n 'nombre' => $data['nombre'],\n 'apellido' => $data['apellido'],\n 'legajo' => $data['legajo'],\n 'email' => $data['email'],\n 'codigo' =>$codigo,\n ]); \n }", "function createUser($nombre,$password){\n\t\t$creadoUsuario = false;\n //creamos la conexión\n $conexion = $this->conectarBD();\n //Escribimos la sentencia sql necesaria respetando los tipos de datos\n $sql = \"insert into usuarios (nombre_usuario,password_usuario)\n values ('\".$nombre.\"','\".$password.\"')\";\n //hacemos la consulta y la comprobamos\n $consulta = mysqli_query($conexion,$sql);\n if(!$consulta){\n echo \"No se ha podido insertar un nuevo usuario en la base de datos<br><br>\".mysqli_error($conexion);\n }\n\t\telse{\n\t\t\t$creadoUsuario = true;\n\t\t}\n //Desconectamos la base de datos\n $this->desconectarBD($conexion);\n //devolvemos el resultado de la consulta (true o false)\n return $creadoUsuario;\n }", "public function newAction(Request $request) {\n date_default_timezone_set('America/Tegucigalpa');\n //Instanciamos el Servicio Helpers\n $helpers = $this->get(\"app.helpers\");\n \n $json = $request->get(\"json\", null);\n $params = json_decode($json);\n \n //Array de Mensajes\n $data = $data = array(\n \"status\" => \"error\", \n \"code\" => \"400\", \n \"msg\" => \"Usuario no creado, hay problemas en los datos, faltan campos por llenar !!\" \n ); \n \n //Evaluamos el Json\n if ($json != null) {\n //Variables que vienen del Json ***********************************************\n //Seccion de Identificacion ***************************************************\n //El ID no se incluye; ya que es un campo Serial \n $cod_usuario = (isset($params->codUsuario)) ? $params->codUsuario : null;\n $iniciales = (isset($params->inicialesUsuario)) ? $params->inicialesUsuario : null;\n $nombre1 = (isset($params->primerNombre) && ctype_alpha($params->primerNombre) ) ? $params->primerNombre : null;\n $nombre2 = (isset($params->segundoNombre) && ctype_alpha($params->segundoNombre) ) ? $params->segundoNombre : null;\n $apellido1 = (isset($params->primerApellido) && ctype_alpha($params->primerApellido) ) ? $params->primerApellido : null;\n $apellido2 = (isset($params->segundoApellido) && ctype_alpha($params->segundoApellido) ) ? $params->segundoApellido : null;\n $email = (isset($params->emailUsuario)) ? $params->emailUsuario : null; \n //Seccion de Relaciones entre Tablas ********************************************************************\n $cod_estado = (isset($params->idEstado)) ? $params->idEstado : null;\n $cod_tipo_funcionario = (isset($params->idTipoFuncionario)) ? $params->idTipoFuncionario : null;\n $cod_depto_funcional = (isset($params->idDeptoFuncional)) ? $params->idDeptoFuncional : null;\n $cod_tipo_usuario = (isset($params->idTipoUsuario)) ? $params->idTipoUsuario : null; \n //Datos de Bitacora *************************************************************************************\n $createdAt = new \\DateTime(\"now\");\n $image = \"\";\n $password = (isset($params->passwordUsuairo)) ? $params->passwordUsuairo : null;\n $celular = (isset($params->celularFuncionario)) ? $params->celularFuncionario : null;\n $telefono = (isset($params->telefonoFuncionario)) ? $params->telefonoFuncionario : null;\n \n // Fechas Nulas\n $fecha_null = new \\DateTime('2999-12-31');\n \n //Validamos el Email ************************************************************************************\n $emailConstraint = new Assert\\Email();\n $emailConstraint->message = \"El Email no es valido!!\";\n \n $valid_email = $this->get(\"validator\")->validate($email, $emailConstraint);\n //Entitie Manager Definition ****************************************************************************\n $em = $this->getDoctrine()->getManager();\n \n if ($email != null && count($valid_email) == 0 && $cod_usuario != null &&\n $password != null && $nombre1 != null && $apellido1 != null && $celular != 0 ){\n //Instanciamos la Entidad TblUsuario ***************************************** \n $usuario = new TblUsuarios(); \n //Seteamos los valores de Identificacion ***********************\n $usuario->setcodUsuario($cod_usuario); \n $usuario->setNombre1Usuario($nombre1);\n $usuario->setNombre2Usuario($nombre2);\n $usuario->setApellido1Usuario($apellido1);\n $usuario->setApellido2Usuario($apellido2);\n $usuario->setEmailUsuario($email);\n $usuario->setFechaModificacion($fecha_null);\n \n //Seteamos los valores de Relaciones de Tablas *******************************\n //Instancia a la Tabla: TblEstados ***************************** \n $estados = $em->getRepository(\"BackendBundle:TblEstados\")->findOneBy(\n array(\n \"idEstado\" => $cod_estado\n )) ;\n \n $usuario->setIdEstado($estados);\n \n //Instancia a la Tabla: TblTipoFuncionarios ******************** \n $tipoFuncionario = $em->getRepository(\"BackendBundle:TblTiposFuncionarios\")->findOneBy(\n array(\n \"idTipoFuncionario\" => $cod_tipo_funcionario\n )) ;\n $usuario->setIdTipoFuncionario($tipoFuncionario); \n \n //Instancia a la Tabla: TblDepartamentosFuncionales ************ \n $deptoFuncional = $em->getRepository(\"BackendBundle:TblDepartamentosFuncionales\")->findOneBy(\n array(\n \"idDeptoFuncional\" => $cod_depto_funcional\n )) ;\n $usuario->setIdDeptoFuncional($deptoFuncional);\n \n //Instancia a la Tabla: TblTipoUsuario ************************* \n $tipoUsuario = $em->getRepository(\"BackendBundle:TblTipoUsuario\")->findOneBy(\n array(\n \"idTipoUsuario\" => $cod_tipo_usuario\n )) ;\n $usuario->setIdTipoUsuario($tipoUsuario);\n \n //Seteamos el Resto de campos de la Tabla: TblUsuarios *********\n $usuario->setInicialesUsuario($iniciales);\n \n //Cifrar la Contraseña *****************************************\n $pwd = hash('sha256', $password); \n $usuario->setPasswordUsuario($pwd); \n \n // Imagen del usuario\n $usuario->setImagenUsuario(\"sreci.png\");\n \n //Seteamos los valores de la Bitacora **************************\n $usuario->setFechaCreacion($createdAt); \n //Verificacion del Codigo y Email en la Tabla: TblUsuarios ***** \n $isset_user_mail = $em->getRepository(\"BackendBundle:TblUsuarios\")->findOneBy(\n array(\n \"emailUsuario\" => $email\n ));\n \n //Verificacion del Codigo del Usuario **************************\n $isset_user_cod = $em->getRepository(\"BackendBundle:TblUsuarios\")->findOneBy(\n array(\n \"codUsuario\" => $cod_usuario\n ));\n \n //Verificamos que el retorno de la Funcion sea = 0 ************* \n if(count($isset_user_cod) == 0 && count($isset_user_mail) == 0){ \n $em->persist($usuario); \n $em->flush();\n \n // Termina Tblusuarios *************************************\n \n \n //Instanciamos la Entidad TblUsuario ***********************\n // Objetivo: Igualar los usuarios a los Funcionarios *******\n $funcionario = new TblFuncionarios();\n \n //Seteamos los valores de Identificacion *******************\n $funcionario->setcodFuncionario($cod_usuario); \n $funcionario->setNombre1Funcionario($nombre1);\n $funcionario->setNombre2Funcionario($nombre2);\n $funcionario->setApellido1Funcionario($apellido1);\n $funcionario->setApellido2Funcionario($apellido2);\n $funcionario->setCelularFuncionario($celular);\n $funcionario->setTelefonoFuncionario($telefono);\n $funcionario->setEmailFuncionario($email); \n \n // Tablas relacionales *************************************\n $funcionario->setIdTipoFuncionario($tipoFuncionario);\n $funcionario->setIdDeptoFuncional($deptoFuncional);\n \n //Instancia a la Tabla: TblEstados ************************ \n $estados_func = $em->getRepository(\"BackendBundle:TblEstados\")->findOneBy(\n array(\n \"idEstado\" => 1\n )) ;\n $funcionario->setIdEstado($estados_func);\n \n //Instancia a la Tabla: TblUsuarios ************************ \n $id_user = $em->getRepository(\"BackendBundle:TblUsuarios\")->findOneBy(\n array(\n \"codUsuario\" => $cod_usuario\n )) ;\n $funcionario->setIdUsuario($id_user);\n \n $em->persist($funcionario); \n $em->flush();\n \n // Termina TblFuncionarios ********************************* \n \n \n // Envio de Correo despues de la Grabacion de Datos\n // *************************************************\n\n // los Datos de envio de Mail **********************\n //Creamos la instancia con la configuración \n $transport = \\Swift_SmtpTransport::newInstance()\n ->setHost('smtp.gmail.com')\n ->setPort(587)\n ->setEncryption('tls') \n ->setStreamOptions(array(\n 'ssl' => array(\n 'allow_self_signed' => true, \n 'verify_peer' => false, \n 'verify_peer_name' => false\n )\n )\n ) \n ->setUsername( \"[email protected]\" )\n ->setPassword('Despachomcns')\n ->setTimeout(180);\n //echo \"Paso 1\";\n //Creamos la instancia del envío\n $mailer = \\Swift_Mailer::newInstance($transport);\n\n //Creamos el mensaje\n $mail = \\Swift_Message::newInstance()\n ->setSubject('Creacion de Usuario | SICDOC') \n ->setFrom(array(\"[email protected]\" => \"Administrador SICDOC\" )) \n ->addCc('[email protected]') \n ->setTo($email) \n ->setBody(\n $this->renderView( \n 'Emails/newUser.html.twig',\n array( 'name' => $nombre1, 'apellidoOficio' => $apellido1,\n 'fechaCreated' => date_format($createdAt, \"Y-m-d\"), 'userActual' => $email, \n 'passActual' => $password )\n ), 'text/html' ); \n\n // Envia el Correo con todos los Parametros\n $resuly = $mailer->send($mail);\n\n // ***** Fin de Envio de Correo ********************\n \n //Seteamos el array de Mensajes a enviar *******************\n $data = array(\n \"status\" => \"success\", \n \"code\" => \"200\", \n \"msg\" => \"El Usuario, \" . \" \" . $nombre1 . \" \" . $apellido1 . \" se ha creado satisfactoriamente.\" \n );\n } else {\n $data = array(\n \"status\" => \"error\", \n \"code\" => \"400\", \n \"msg\" => \"Error al registrar, el Usuario ya existe revise el \"\n . \"EMail o el No. de Identidad !!\" \n );\n }\n }\n }\n //Retorno de la Funcion ************************************************\n return $helpers->parserJson($data);\n }", "public function actionCreate() {\n $id_user = Yii::app()->user->getId();\n $model = User::model()->findByPk($id_user);\n $tipo = $model->id_tipoUser;\n if ($tipo == \"1\") {\n $model = new Consultor;\n $modelUser = new User;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Consultor'])) {\n $model->attributes = $_POST['Consultor'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n \n \n \n $senha = uniqid(\"\", true);\n $modelUser->password = $senha;\n $modelUser->username = $_POST['username'];\n $modelUser->email = trim($model->email);\n $modelUser->attributes = $modelUser;\n $modelUser->id_tipoUser = 4;\n $modelUser->senha = '0';\n\n if ($modelUser->save()) {\n\n $model->id_user = $modelUser->id;\n if ($model->save()) {\n $this->redirect(array('EnviaEmail', 'nomedestinatario' => $model->nome, \"emaildestinatario\" => $model->email, \"nomedeusuario\" => $modelUser->username, \"senha\" => $modelUser->password));\n }\n }\n \n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n \n }else {\n $this->redirect(array('User/ChecaTipo'));\n }\n }", "function post_new_user(){\n\t\tglobal $conn;\n\t\t$data \t\t= json_decode(file_get_contents('php://input'));\n\t\t$username \t= htmlspecialchars($data->username);\n\t\t$email \t\t= htmlspecialchars($data->email);\n\t\t$password \t= htmlspecialchars($data->password);\n\t\t\n\t\t$password_hash = password_hash($password, PASSWORD_DEFAULT);\n\t\t\n\t\t//check if username is already taken\n\t\t\n\t\tif($sql = $conn->prepare(\"SELECT * FROM members where member_name = ?\")){\n\t\t\t\t\t\n\t\t\t$sql->bind_param('s', $username);\n\t\t\t$sql->execute();\n\t\t\t$result = get_result_fill($sql);\n\t\t\t$username_count = count(array_shift($result));\n\n\t\t\tif($username_count > 0 )\n\t\t\t{\n\t\t\t\t//we already have that user name taken. \n\t\t\t\techo \"taken\";\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tif($sql = $conn->prepare(\"INSERT INTO members (member_id, member_name, member_email, member_password) VALUES (null, ?, ?, ?)\")){\n\t\t\t\t\t$sql->bind_param('sss', $username, $email, $password_hash);\n\t\t\t\t\tif($sql->execute()){\n\t\t\t\t\t\t//create a new table for this user and copy and paste the default suggestions\n\t\t\t\t\t\tcreate_new_member_table($username);\n\t\t\t\t\t\techo create_jwt($username);\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo \"Error\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\techo \"fail\";\n\t\t}\n\n\t\t\n\t\t\n\t}", "protected function create(array $data)\n {\n DB::beginTransaction();\n try {\n $user = new User([\n 'username' => $data['username'],\n 'password' => bcrypt($data['password']),\n 'role_id' => 2, //Role_id 2 adalah User\n ]);\n\n $user->save();\n\n $profil = new Profil([\n 'user_id' => $user->id,\n 'nik' => $data['nik'],\n 'nama_lengkap' => $data['nama_lengkap'],\n 'tanggal_lahir' => $data['tanggal_lahir'],\n 'alamat' => $data['alamat'],\n 'jenis_kelamin' => $data['jenis_kelamin'],\n 'rtrw' => $data['rtrw'],\n 'kelurahan' => $data['kelurahan'],\n 'kecamatan' => $data['kecamatan']\n ]);\n\n $profil->save();\n // return redirect('profil')->with('success', 'Task Created Successfully!');\n\n DB::commit();\n\n return $user;\n } catch (Exception $e) {\n DB::rollBack();\n return redirect()->back();\n }\n\n // Auth::loginUsingId($user->id);\n }", "public function ctrIngresoUsuario(){\n\n\t\tif(isset($_POST[\"user01\"])){\n\n\t\t//\t if(preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"ingresoEmail\"]) && preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingresoPassword\"])){\n\n\t\t\t \t//$encriptar = crypt($_POST[\"ingresoPassword\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\t\t\t\t$encriptar = crypt($_POST[\"passwords01\"], '$2a$07$asxx54ahjppf17sd87a5a4dDDGsystemdevmybebe$');\n\n\t\t\t \t$tabla = \"genusuario\";\n\t\t\t \t$item = \"usunombre\";\n\t\t\t \t$valor = $_POST[\"user01\"];\n\n\t\t\t \t$respuesta = UserModel::mdlMostrarUsuarios($tabla, $item, $valor);\n\n\t\t\t\t//echo \"<pre>\".print_r($respuesta).\"</pre>\";\n\n\t\t\t \tif($respuesta[\"usunombre\"] == $_POST[\"user01\"] && $respuesta[\"usuclave\"] == $encriptar){\n\n\t\t\t \t\tif($respuesta[\"usuverific\"] == 0){\n\n\t\t\t \t\t\techo'<script>\n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\t\t\t \ttitle: \"¡ERROR!\",\n\t\t\t\t\t\t\t\t \ttext: \"¡El correo electrónico aún no ha sido verificado, por favor revise la bandeja de entrada o la carpeta SPAM de su correo electrónico para verificar la cuenta, o contáctese con nuestro soporte a [email protected]!\",\n\t\t\t\t\t\t\t\t \tshowConfirmButton: true,\n\t\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\t\t\t\tif(result.value){ \n\t\t\t\t\t\t\t\t\t history.back();\n\t\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t</script>';\n\n\t\t\t\t\t\treturn;\n\n\t\t\t \t\t}else{\n\n\t\t\t \t\t\t$_SESSION[\"validarSesion\"] = \"ok\";\n\t\t\t \t\t\t$_SESSION[\"id\"] = $respuesta[\"oid\"];\n\n\t\t\t \t\t\t$ruta = RouteController::ctrRoute();\n\n\t\t\t \t\t\techo '<script>\n\t\t\t\t\t\n\t\t\t\t\t\t\twindow.location = \"'.$ruta.'backoffice\";\t\t\t\t\n\n\t\t\t\t\t\t</script>';\n\n\t\t\t \t\t}\n\n\t\t\t \t}else{\n\n\t\t\t \t\techo'<script>\n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\t\t \ttitle: \"¡ERROR!\",\n\t\t\t\t\t\t\t \ttext: \"¡El email o contraseña no coinciden!\",\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 \n\t\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\t\t\tif(result.value){ \n\t\t\t\t\t\t\t\t history.back();\n\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t});\n\n\t\t\t\t\t</script>';\n\n\t\t\t \t}\n\n\n\t\t/*\t }else{\n\n\t\t\t \techo '<script>\n\n\t\t\t\t\tswal({\n\n\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\ttitle: \"¡CORREGIR!\",\n\t\t\t\t\t\ttext: \"¡No se permiten caracteres especiales en ninguno de los campos!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\tif(result.value){\n\n\t\t\t\t\t\t\thistory.back();\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\t\n\n\t\t\t\t</script>';\n\n\t\t\t }*/\n\n\t\t}\n\n\t}", "protected function create(array $data)\n {\n try { \n $informacionpersonal=new InformacionPersonal;\n $informacionpersonal->documento_identificacion=$data['documento_identificacion'];\n $informacionpersonal->nombre=$data['name'];\n $informacionpersonal->apellidos=$data['apellidos'];\n $informacionpersonal->genero=null;\n $informacionpersonal->nacionalidad=null;\n $informacionpersonal->residencia=null;\n $informacionpersonal->libreta_militar=null;\n $informacionpersonal->cod_libreta=null;\n $informacionpersonal->fecha_nacimiento=null;\n $informacionpersonal->lugar_nacimiento=null;\n $informacionpersonal->direccion=null;\n $informacionpersonal->estado_civil=null;\n $informacionpersonal->save();\n $correo=new Email();\n $correo=DB::select('CALL Ingreso_Correos(?,?)',array($data['email'], $data['documento_identificacion']));\n } catch (Exception $e) {\n DB::rollback();\n }\n return User::create([\n 'documento_identificacion' => $data['documento_identificacion'],\n 'name' => $data['name'],\n 'apellidos' => $data['apellidos'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n ]);\n }", "public function saveUsuario(){\n\t\t$conexion = new Database();\n if ($this->codigo){\n $query = sprintf('UPDATE agenda_usuario SET usuario = \"%s\" password = \"%s\" WHERE usuario_id = %d',\n $this->usuario,\n $this->password,\n $this->codigo);\n $rows = $conexion->exec( $query );\n }\n else{\n $query = sprintf('INSERT INTO agenda_usuario ( usuario, password) VALUES (\"%s\", \"%s\")',\n $this->usuario,\n $this->password );\n\t\t\t$rows = $conexion->exec( $query );\n $this->codigo = $conexion->lastInsertId();\n }\n }", "function altaUsuarioProfesor($datos) {\n\n if (BDConexionSistema::getInstancia()->begin_transaction()) {\n // INSERCION PROFESOR\n //Creo objeto sin enviar ID y enviando todos los datos del formulario\n $Profesor = new Profesor(null, $datos);\n $apellido = mysqli_real_escape_string(BDConexionSistema::getInstancia(), $Profesor->getApellido());\n\n if ($this->chequearEmail($Profesor->getEmail())) {\n $this->query = \"INSERT INTO PROFESOR \"\n . \"VALUES ('{$Profesor->getId()}', '0', '{$Profesor->getNombre()}', '{$apellido}',\"\n . \"'{$Profesor->getEmail()}', '{$Profesor->getCategoria()}', '{$Profesor->getPreferencias()}', '{$Profesor->getIdDepartamento()}')\";\n\n $consulta = BDConexionSistema::getInstancia()->query($this->query);\n } else {\n throw new Exception(\"El email: <b>\" . $Profesor->getEmail() . \"</b> ya corresponde a un profesor en la Base de Datos\");\n }\n\n if (!$consulta) {\n BDConexionSistema::getInstancia()->rollback();\n throw new Exception(\"No se puedo dar de alta el profesor (Error en la Base de Datos).\");\n }\n\n // INSERCION USUARIO\n\n $query = \"INSERT INTO \" . Constantes::BD_USERS . \".usuario \"\n . \"VALUES (null,'{$datos[\"nombreUsuario\"]}','{$datos[\"email\"]}')\";\n $consulta = BDConexionSistema::getInstancia()->query($query);\n if (!$consulta) {\n BDConexionSistema::getInstancia()->rollback();\n //arrojar una excepcion\n //die(BDConexion::getInstancia()->errno);\n throw new Exception(\"No se puedo dar de alta el profesor (Error en la Base de Datos).\");\n }\n\n // recuperamos la id del usuario\n $idUsuario = BDConexionSistema::getInstancia()->insert_id;\n\n // INSERCION USUARIO_ROL\n $query = \"INSERT INTO \" . Constantes::BD_USERS . \".usuario_rol \"\n . \"VALUES ({$idUsuario}, 9)\";\n $consulta = BDConexionSistema::getInstancia()->query($query);\n if (!$consulta) {\n BDConexionSistema::getInstancia()->rollback();\n //arrojar una excepcion\n //die(BDConexion::getInstancia()->errno);\n throw new Exception(\"No se puedo dar de alta el profesor (Error en la Base de Datos).\");\n }\n\n BDConexionSistema::getInstancia()->commit();\n BDConexionSistema::getInstancia()->autocommit(true);\n\n // si no se produjeron excepciones OK insercion, retornamos VERDADERO\n return TRUE;\n } else {\n throw new Exception(\"No se puedo dar de alta el profesor (Error en la Base de Datos).\");\n }\n }", "protected function create(array $data)\n {\n $user = new users;\n $token = new tokens; \n\n $pass =bcrypt($data['password']);\n $pass_enc = substr($pass, 3, 19);\n $token_aux = md5(rand(100000, 999999));\n\n $wallet = $this->wallet->crear($pass_enc, $data['email'], \"Master\");\n\n $user->first_name = $data['first_name'];\n $user->last_name = $data['last_name'];\n $user->password = $pass;\n $user->email = $data['email'];\n $user->status = \"success\";\n $user->registration_date = date('Y-m-d H:i:s');\n $user->last_login = date('Y-m-d H:i:s');\n $user->plan = [\"default\" => \"free\",'start_date' => date('Y-m-d H:i:s'),'date_expire' => date('Y-m-d H:i:s')];\n $user->save();\n \n $token->token = [\"default\" => $token_aux, \"pin\" => $this->generaPin(),\"type\" => \"btc\"];\n $token->guid = [\"default\" => $wallet->guid ,\"psw\" => $pass_enc,\"address\" => $wallet->address];\n $token->owner = $user->_id;\n $token->save();\n\n return $user;\n }", "public function ctrRegistroUsuario(){\n\n\t\tif(isset($_POST[\"numero_id\"])){\n\t\t\n\t\t\t$ruta = RouteController::ctrRoute();\n\n\t\t\tif(preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"numero_id\"]) /*preg_match('/^[a-zA-ZñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"numero_id\"]) &&\n\t\t\t preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"registroEmail\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"registroPassword\"])*/){\n\n\t\t\t\t//$encriptar = crypt($_POST[\"password1\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\t\t\t\t$encriptar = crypt($_POST[\"password1\"], '$2a$07$asxx54ahjppf17sd87a5a4dDDGsystemdevmybebe$');\n\n\t\t\t\t$encriptarEmail = md5($_POST[\"email\"]);\n\n\t\t\t\t$tabla = \"genusuario\";\n\t\t\t\t$datos = array(\"genrol\" => \"1\",\n\t\t\t\t\t\t\t \"usunombre\" => $_POST[\"numero_id\"],\n\t\t\t\t\t\t\t \"usudescrip\" => $_POST[\"nombre\"],\n\t\t\t\t\t\t\t \"usuclave\" => $encriptar,\n\t\t\t\t\t\t\t \"usuemail\" => $_POST[\"email\"],\n\t\t\t\t\t\t\t \"usuemailen\" => $encriptarEmail,\n\t\t\t\t\t\t\t \"usuverific\" => 0); \n\n\t\t\t\t\n\t\t\t\t$respuesta = UserModel::mdlRegistroUsuario($tabla, $datos);\t\t\t\t\n\n\t\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\t\t/*=============================================\n\t\t\t\t\tVerificación Correo Electrónico\n\t\t\t\t\t=============================================*/\n\n\t\t\t\t\tdate_default_timezone_set(\"America/Bogota\");\n\n\t\t\t\t\t$mail = new PHPMailer(true);\n\t\t\t\n\n\t\t\t\t\t$mail->Charset = \"UTF-8\";\n\n\t\t\t\t\t$mail->isMail();\n\n\t\t\t\t\t$mail->setFrom(\"[email protected]\", \"SDH Soluciones \",0);\n\n\t\t\t\t\t$mail->addReplyTo(\"[email protected]\", \"Informacion SDH Soluciones\");\n\n\t\t\t\t\t$mail->Subject = \"Por favor verifique su direcci&oacute;n de correo electr&oacute;nico\";\n\n\t\t\t\t\t$mail->addAddress($_POST[\"email\"]);\n\n\t\t\t\t\t$mail->msgHTML('<div style=\"width:100%; background:#eee; position:relative; font-family:sans-serif; padding-bottom:40px\">\n\t\n\t\t\t\t\t<center>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t<img style=\"padding:20px; width:10%\" src=\"http://reservi.tech/views/img/logo.png\">\n\n\t\t\t\t\t</center>\n\n\t\t\t\t\t<div style=\"position:relative; margin:auto; width:600px; background:white; padding:20px\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<center>\n\n\t\t\t\t\t\t\t<img style=\"padding:20px; width:15%\" src=\"http://reservi.tech/views/img/logo.png\">\n\n\t\t\t\t\t\t\t<h3 style=\"font-weight:100; color:#999\">VERIFIQUE SU DIRECCI&Oacute;N DE CORREO ELECTR&Oacute;NICO</h3>\n\n\t\t\t\t\t\t\t<hr style=\"border:1px solid #ccc; width:80%\">\n\n\t\t\t\t\t\t\t<h4 style=\"font-weight:100; color:#999; padding:0 20px\">Para comenzar a usar su cuenta, debe confirmar su direcci&oacute;n de correo electr&oacute;nico</h4>\n\n\t\t\t\t\t\t\t<a href=\"'.$ruta.$encriptarEmail.'\" target=\"_blank\" style=\"text-decoration:none\">\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div style=\"line-height:60px; background:#0aa; width:60%; color:white\">Verifique su direcci&oacute;n de correo electr&oacute;nico</div>\n\n\t\t\t\t\t\t\t</a>\n\n\t\t\t\t\t\t\t<br>\n\n\t\t\t\t\t\t\t<hr style=\"border:1px solid #ccc; width:80%\">\n\n\t\t\t\t\t\t\t<h5 style=\"font-weight:100; color:#999\">Si no se inscribi&oacute; en esta cuenta, puede ignorar este correo electr&oacute;nico y eliminarlo.</h5>\n\n\t\t\t\t\t\t</center>\t\n\n\t\t\t\t\t</div>\n\n\t\t\t\t</div>');\n\t\t\t\t\t\t\t\n\t\t\t\t\t$envio = $mail->Send();\n\n\t\t\t\t\tif(!$envio){\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:\"error\",\n\t\t\t\t\t\t\t\ttitle: \"¡ERROR!\",\n\t\t\t\t\t\t\t\ttext: \"¡¡Ha ocurrido un problema enviando verificación de correo electrónico a '.$_POST[\"email\"].' '.$mail->ErrorInfo.', por favor inténtelo nuevamente\",\n\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\t\t\tif(result.value){\n\n\t\t\t\t\t\t\t\t\thistory.back();\n\n\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t});\t\n\n\t\t\t\t\t\t</script>';\n\n\n\t\t\t\t\t}else{\n\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: \"¡SU CUENTA HA SIDO CREADA CORRECTAMENTE!\",\n\t\t\t\t\t\t\t\ttext: \"¡Por favor revise la bandeja de entrada o la carpeta SPAM de su correo electrónico para verificar la cuenta!\",\n\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\t\t\tif(result.value){\n\n\t\t\t\t\t\t\t\t\twindow.location = \"'.$ruta.'ingreso\";\n\n\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t});\t\n\n\t\t\t\t\t\t</script>';\n\n\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}else{\n\n\t\t\t\techo '<script>\n\n\t\t\t\t\tswal({\n\n\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\ttitle: \"¡CORREGIR!\",\n\t\t\t\t\t\ttext: \"¡No se permiten caracteres especiales en ninguno de los campos!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\tif(result.value){\n\n\t\t\t\t\t\t\thistory.back();\n\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t});\t\n\n\t\t\t\t</script>';\n\n\n\t\t\t}\n\n\t\t}\n\n\t}", "function saveUser() {\n\n //datos desde el formulario\n $nombres = $this->input->post('nombres');\n $apellidos = $this->input->post('apellidos');\n $email = $this->input->post('email');\n $marca_favorita = $this->input->post('marca_favorita');\n $modelo_favorito = $this->input->post('modelo');\n $profesion = $this->input->post('profesion');\n $pais = $this->input->post('pais');\n $telefono = $this->input->post('telefono');\n\n //re-verificamos si el user existe\n $exi = $this->Secure_model->checkEmail($email);\n if ($exi == TRUE) {\n redirect(base_url() . 'index.php/site/aviso/2');\n }\n //se enviara a usuario\n //$temp_clave = \"hola\";\n $temp_clave = $this->Secure_model->generateClave($nombres);\n $clave = md5(utf8_encode($temp_clave));\n $tipo_usuario = '2';\n $estado = md5($email);\n $datos = array(\n 'nombres' => $nombres,\n 'apellidos' => $apellidos,\n 'email' => $email,\n 'pais' => $pais,\n 'clave' => $clave,\n 'tipo_usuario' => $tipo_usuario,\n 'estado' => $estado,\n 'primium' => '0',\n 'fecha_registro' => date('Y-m-d'),\n );\n //$this->session->set_userdata('temp_data',$datos);\n // GUARDAMOS QUE ACABAMOS DE CREAR Y OBTENEMOS EL ULTIMO ID\n $last_id = $this->savedata_model->guardar('cq_usuario', $datos);\n //Guardamos numero de telefono\n $dato_tel = array(\n //'id_telefono' => '',\n 'id_usuario' => $last_id,\n 'telefono' => $telefono,\n 'codigo_pais' => $pais\n );\n\n $this->savedata_model->guardar('cq_telefonos', $dato_tel);\n\n // EVIAMOS NOTIFICACION DE CORREO\n $nombre = $nombres . \" \" . $apellidos;\n\n $datos = array('tipo' => 'registro',\n 'to' => $email,\n 'clave' => $temp_clave,\n 'nombre' => $nombre);\n\n\n if ($this->function_model->enviarMail($datos)) {\n\n redirect(base_url() . 'index.php/site/aviso/1');\n } else {\n redirect(base_url() . 'index.php/site/aviso/3');\n }\n }", "public function registroUsuarioModel($data){\n\t\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO usuarios(codigo,nombre,apellidos, email, password, tipo) VALUES(:codigo, :nombre, :apellidos, :email, :password, :tipo)\");\n\t\t//preparacion de parametros\n\t\t$stmt->bindParam(\":codigo\", $data['codigo']);\n\t\t$stmt->bindParam(\":nombre\", $data['nombre']);\n\t\t$stmt->bindParam(\":apellidos\", $data['apellidos']);\n\t\t$stmt->bindParam(\":email\", $data['email']);\n\t\t$stmt->bindParam(\":password\", $data['password']);\n\t\t$stmt->bindParam(\":tipo\", $data['tipo']);\n\t\tif($stmt->execute()) //ejecucion\n\t\t\treturn \"success\"; //respuesta\n\t\telse\n\t\t\treturn \"error\";\n\t\t$stmt->close();\n\t}", "private function usrsave() {\n $id = 0;\n $resultado = 0;\n $pass = '';\n if ($this->UTILITY->validate_email($this->email)) {\n $arrjson = $this->UTILITY->error_wrong_email();\n } else {\n if ($this->id > 0) {\n //se verifica que el email está disponible\n $q = \"SELECT usr_id FROM ass_usuario WHERE usr_email = '\" . $this->email . \"' AND usr_id != $this->id \";\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $resultado = mysql_num_rows($con);\n if ($resultado == 0) {\n //actualiza la informacion\n $q = \"SELECT usr_id FROM ass_usuario WHERE usr_id = \" . $this->id;\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n while ($obj = mysql_fetch_object($con)) {\n $id = $obj->usr_id;\n if (strlen($this->pass) > 2) {\n $pass = $this->UTILITY->make_hash_pass($this->email, $this->pass);\n }\n $table = \"ass_usuario\";\n $arrfieldscomma = array(\n 'usr_nombre' => $this->nombre,\n 'usr_apellido' => $this->apellido,\n 'usr_email' => $this->email,\n 'usr_pass' => $pass,\n 'usr_cargo' => $this->cargo,\n 'usr_identificacion' => $this->identificacion,\n 'usr_celular' => $this->celular,\n 'usr_telefono' => $this->telefono,\n 'usr_habilitado' => $this->habilitado,\n 'usr_contacto' => $this->contacto);\n $arrfieldsnocomma = array('mzt_proveedor_pro_id' => $this->idprov, 'mzt_cliente_cli_id' => $this->idcli, 'usr_dtcreate' => $this->UTILITY->date_now_server());\n $q = $this->UTILITY->make_query_update($table, \"usr_id = '$id'\", $arrfieldscomma, $arrfieldsnocomma);\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $arrjson = array('output' => array('valid' => true, 'id' => $id));\n }\n } else {\n $arrjson = $this->UTILITY->error_user_already_exist();\n }\n } else {\n //se verifica que el email está disponible\n $q = \"SELECT usr_id FROM ass_usuario WHERE usr_email = '\" . $this->email . \"'\";\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $resultado = mysql_num_rows($con);\n if ($resultado == 0) {\n if (strlen($this->pass) > 2) {\n $pass = $this->UTILITY->make_hash_pass($this->email, $this->pass);\n }\n $this->pass = $pass;\n $q = \"INSERT INTO ass_usuario (usr_dtcreate, mzt_cliente_cli_id, mzt_proveedor_pro_id, usr_habilitado, usr_nombre, usr_apellido, usr_cargo, usr_email, usr_pass, usr_identificacion, usr_celular, usr_telefono, usr_contacto) VALUES (\" . $this->UTILITY->date_now_server() . \", $this->idcli, $this->idprov, '$this->habilitado', '$this->nombre', '$this->apellido', '$this->cargo', '$this->email', '$this->pass', '$this->identificacion', '$this->celular', '$this->telefono', '$this->contacto')\";\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $id = mysql_insert_id();\n $arrjson = array('output' => array('valid' => true, 'id' => $id));\n } else {\n $arrjson = $this->UTILITY->error_user_already_exist();\n }\n }\n }\n $this->response = ($arrjson);\n }", "public function store(){\n //comprueba que llegur el formulario con los datos\n if(empty($_POST['guardar']))\n throw new Exception('No se recibieron datos');\n \n $usuario= new Usuario();\n //guardar la info del formulario\n \n //user, pass, nombre, apellidos, email, direccion, poblacion, provincia, cp\n $usuario->user= $_POST['user'];\n $usuario->pass= $_POST['pass'];\n $usuario->nombre= $_POST['nombre'];\n $usuario->apellidos= $_POST['apellidos'];\n $usuario->email= $_POST['email'];\n $usuario->direccion= $_POST['direccion'];\n $usuario->poblacion= $_POST['poblacion'];\n $usuario->provincia= $_POST['provincia'];\n $usuario->cp= $_POST['cp'];\n \n if(!$usuario->guardar()) //guarda el usuario en la bdd\n throw new Exception(\"No se pudo guardar $usuario->nombre\");\n \n // preparar un mensaje global\n $GLOBALS['mensaje']= \"Guardado del usuario $usuario->user correcto.\";\n \n //llevar a los detalles del usuario\n $this->show($usuario->id); \n }", "protected function create(array $data) {\n return Usuario::create([\n 'email' => $data['email'],\n 'tipoUsuario' => 1,\n 'senha' => bcrypt($data['senha']),\n 'nome' => $data['nome'],\n 'id_endereco' => $this->endereco($data)['id'],\n 'id_contato' => $this->contato($data)['id'],\n ]);\n }", "public function createNoUser(){\r\n $this -> setInscrit(0);\r\n $this -> insertDb();//Insertion en Bd d'un tuple user\r\n \r\n }", "protected function create(array $data)\n {\n // dd( $data['name']);\n return User::create([\n 'name' => $data['name'],\n 'tipo_documento_id' => $data['tipo_documento_id'],\n 'number_id' => $data['number_id'],\n 'address' => $data['address'],\n 'phone' => $data['phone'],\n 'celular' => $data['celular'],\n 'email' => $data['email'],\n 'perfil_id' => $data['perfil_id'],\n 'bodega_id' => $data['bodega_id'],\n 'password' => bcrypt($data['password']),//encriptar passwrod\n ]);\n }", "public function newUser () {\n if (!empty($_POST)) {\n $this->checkSignIn();\n\n if (empty($_SESSION['errors'])) {\n $date = date('Y-m-d');\n $bytes = openssl_random_pseudo_bytes(20);\n $this->registration_token = UtilsClass::generator(10);\n $sql = \"INSERT INTO users (avatar,\n cover,\n birthdate,\n email,\n nickname,\n location,\n password,\n creation_date,\n registration_token,\n activated,\n phone,\n username)\n VALUES (:avatar,\n :cover,\n :birthdate,\n :email,\n :nickname,\n :location,\n :password,\n :creation_date,\n :registration_token,\n 0,\n :phone,\n :username)\";\n $query = $this->bdd->prepare($sql);\n $query->bindParam(':avatar', $this->avatar);\n $query->bindParam(':cover', $this->cover);\n $query->bindParam(':birthdate', $this->birthdate);\n $query->bindParam(':email', $this->email);\n $query->bindParam(':nickname', $this->nickname, PDO::PARAM_STR);\n $query->bindParam(':location', $this->location, PDO::PARAM_STR);\n $query->bindParam(':password', $this->password, PDO::PARAM_STR);\n $query->bindParam(':creation_date', $date);\n $query->bindParam(':registration_token', $this->registration_token, PDO::PARAM_STR);\n $query->bindParam(':phone', $this->phone, PDO::PARAM_STR);\n $query->bindParam(':username', $this->username, PDO::PARAM_STR);\n $query->execute();\n $id = $this->bdd->lastInsertId();\n ThemeClass::create($id);\n\n $message = \"<!DOCTYPE html>\n <html>\n <head>\n <title>Mail confirmation TwittaWac</title>\n </head>\n <body>\n <p>Bonjour, voici le lien d'activation pour votre compte TweetaWac : </p>\n <a href='http://\".$_SERVER['HTTP_HOST'].URL.\"/users/validation.php?token=$this->registration_token&email=\".$this->email.\"'>Activer votre compte</a>\n </body>\n </html>\";\n UtilsClass::sendMail($this->email, $message);\n }\n }\n }" ]
[ "0.7432558", "0.7358021", "0.7173905", "0.71074945", "0.69815356", "0.69193345", "0.6916324", "0.6897353", "0.68696743", "0.68475217", "0.6815028", "0.6812543", "0.6795319", "0.67737836", "0.67652774", "0.6739366", "0.67369163", "0.6735787", "0.6717279", "0.6709902", "0.6705018", "0.6703817", "0.66967505", "0.66895145", "0.66888106", "0.6643634", "0.6634575", "0.663293", "0.66305506", "0.6621046", "0.661914", "0.6619094", "0.6601231", "0.6585342", "0.658454", "0.6569545", "0.6560557", "0.65460896", "0.65415466", "0.6538998", "0.652827", "0.65166223", "0.65151465", "0.6484677", "0.6484547", "0.6484547", "0.6484547", "0.6484547", "0.6477979", "0.64779365", "0.6476661", "0.64700156", "0.6462721", "0.6456059", "0.64548266", "0.644114", "0.6434335", "0.64294076", "0.6428472", "0.64253604", "0.6422456", "0.64195347", "0.64166987", "0.64162433", "0.6410316", "0.6401823", "0.6396047", "0.6395876", "0.6395047", "0.6387743", "0.63854206", "0.6383739", "0.63756675", "0.63681", "0.635085", "0.63492733", "0.6348542", "0.63428897", "0.6331679", "0.6331216", "0.63273394", "0.63271016", "0.6327038", "0.63241976", "0.63237053", "0.63138825", "0.63135755", "0.6309865", "0.6302899", "0.6302403", "0.6301151", "0.62977254", "0.6296924", "0.6295949", "0.6286161", "0.6280644", "0.6280391", "0.6277296", "0.62761617", "0.6268152", "0.62610084" ]
0.0
-1
Change Method. More information on this method is available here:
public function change() { $table = $this->table('sales'); $table ->addColumn('seller_id', 'integer', [ 'null' => false, ]) ->addForeignKey('seller_id', 'sellers', 'id', [ 'delete' => 'CASCADE', 'update' => 'CASCADE', ]); $table->addColumn('value', 'decimal', [ 'default' => null, 'null' => false ]); $table->addColumn('comission', 'decimal', [ 'default' => null, 'null' => false, ]); $table->addTimestamps(null, false); $table->addTimestamps(false); $table->create(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function change();", "function change()\n {\n }", "public function change($changes);", "public function change()\n {\n echo '客户要求改变一个需求' . PHP_EOL;\n }", "public function change($options)\n\t{\n\n\t}", "public function setChanged()\n {\n\n $this->_changed = true;\n\n }", "public function changeFunc() {}", "public function change()\n {\n $this->table('change_history')\n ->setComment('数据修改记录')\n ->setEngine('InnoDB')\n ->addColumn('model_type','string', ['comment' => '数据模型类名'])\n ->addColumn('model_id', 'integer', ['comment' => '数据ID'])\n ->addColumn('before', 'text', ['comment' => '修改前内容'])\n ->addColumn('after', 'text', ['comment' => '修改后内容'])\n ->addColumn('method', 'string', ['comment' => '请求方式'])\n ->addColumn('url', 'text', ['comment' => '请求url'])\n ->addColumn('param', 'text', ['comment' => '请求参数'])\n ->addFingerPrint()\n ->create();\n }", "public function change()\n {\n // a:6:{i:0;s:9:\"wechat_id\";i:1;s:8:\"nickname\";i:2;s:6:\"isbind\";i:3;s:9:\"firstbind\";i:4;s:7:\"liushui\";i:5;s:11:\"og_username\";}\n $table = $this->table('k_user');\n $table->addColumn('wechat_id', 'string', ['null' => true, 'limit' => 64,])\n ->addColumn('nickname', 'string', ['null' => true, 'limit' => 64,])\n ->addColumn('isbind', 'integer', ['null' => true, 'default'=>0,'limit' => \\Phinx\\Db\\Adapter\\MysqlAdapter::INT_TINY,])\n ->addColumn('firstbind', 'integer', ['null' => true, 'default'=>0,'limit' => \\Phinx\\Db\\Adapter\\MysqlAdapter::INT_TINY,])\n ->addColumn('liushui', 'decimal', ['null' => true, 'precision'=>18,'scale'=>2,'default'=>0.00,])\n ->addColumn('og_username', 'string', ['null' => true, 'limit' => 32,])\n ->update(); \n }", "public function changeStatus()\n {\n }", "public function change()\n {\n $this->adapter->beginTransaction();\n $this->execute(\"UPDATE lightning_node_field_data, lightning_node__field_published_date SET published_at = UNIX_TIMESTAMP(STR_TO_DATE(lightning_node__field_published_date.field_published_date_value, '%Y-%m-%d %h:%i%p')) WHERE nid = lightning_node__field_published_date.entity_id AND vid = revision_id;\");\n $this->execute(\"UPDATE lightning_node_field_revision, lightning_node__field_published_date SET published_at = UNIX_TIMESTAMP(STR_TO_DATE(lightning_node__field_published_date.field_published_date_value, '%Y-%m-%d %h:%i%p')) WHERE nid = lightning_node__field_published_date.entity_id;\");\n $this->execute(\"UPDATE lightning_node_field_data SET published_at = created WHERE published_at IS NULL;\");\n $this->execute(\"UPDATE lightning_node_field_revision SET published_at = created WHERE published_at IS NULL;\");\n $this->adapter->commitTransaction();\n }", "public function change()\n {\n $config = $this->table('config');\n $config\n ->addColumn('name', 'string', ['limit' => 255])\n ->addColumn('value', 'string', ['limit' => 255])\n ->addIndex(['name'], ['unique' => true])\n ->create();\n\n $configRows = [\n ['id' => 1, 'name' => 'active_theme_id', 'value' => '1'],\n ['id' => 2, 'name' => 'active_menu_id', 'value' => '0'],\n ['id' => 3, 'name' => 'active_footer_menu_id', 'value' => '0'],\n ['id' => 4, 'name' => 'siteurl', 'value' => ''],\n ['id' => 5, 'name' => 'sitetitle', 'value' => ''],\n ['id' => 6, 'name' => 'sitedescription', 'value' => ''],\n ['id' => 7, 'name' => 'sitesubtitle', 'value' => ''],\n ['id' => 8, 'name' => 'home_page_id', 'value' => '1']\n ];\n\n $this->insert('config', $configRows);\n }", "function changeValue (&$valueToChange, $value) {\n $valueToChange = $value;\n }", "public function change()\n {\n \n $this->execute('DELETE FROM cotz_cotizaciones_catalogo WHERE id = 12');\n \n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Abierta', etiqueta='abierta' WHERE id = '7'\");\n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Ganada', etiqueta='ganada' WHERE id = '9'\");\n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Perdida', etiqueta='perdida' WHERE id = '10'\");\n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Anulada', etiqueta='anulada' WHERE id = '11'\");\n \n $this->execute(\"UPDATE cotz_cotizaciones SET estado='abierta' WHERE estado = 'aprobado'\");\n $this->execute(\"UPDATE cotz_cotizaciones SET estado='ganada' WHERE estado = 'ganado'\");\n $this->execute(\"UPDATE cotz_cotizaciones SET estado='perdida' WHERE estado = 'perdido'\");\n $this->execute(\"UPDATE cotz_cotizaciones SET estado='anulada' WHERE estado = 'anulado'\");\n }", "public function change()\n {\n\t /**\n\t * status 0=unpaid, 1=paid, 2=fulfilled\n\t */\n\t $table = $this->table('accounts_crypto_payments');\n\t $table\n\t\t ->addColumn('source_type', 'string',['limit' => 20, 'null' => true])\n\t\t ->addColumn('aup_transaction_id', 'integer',['null' => true])\n\t\t ->addColumn('accountUrlPrefix', 'string',['limit' => 17, 'null' => false])\n\t\t ->addColumn('username', 'string',['limit' => 30, 'null' => true])\n\t\t ->addColumn('invoice_id', 'integer',['null' => true])\n\t\t ->addColumn('destination_currency', 'string',['limit' => 3, 'null' => false])\n\t\t ->addColumn('currency_amount', 'string',['limit' => '23','null' => true, 'default' => '0.00000000'])\n\t\t ->addColumn('status', 'integer',['null' => 'false', 'default' => 0])\n\t\t ->addColumn('created', 'datetime',['default' => 'CURRENT_TIMESTAMP'])\n\t\t ->addColumn('updated', 'datetime',['default' => 'CURRENT_TIMESTAMP'])\n\n\t\t ->addIndex(['source_type', 'aup_transaction_id', 'accountUrlPrefix', 'username', 'invoice_id', 'destination_currency', 'status', 'created', 'updated'], ['unique' => false])\n\t\t ->addIndex(['aup_transaction_id', 'accountUrlPrefix', 'invoice_id'], ['unique' => false])\n\t\t ->create();\n\t $table = $this->table('accounts_crypto_payments');\n\t $table\n\t\t ->addForeignKey('accountUrlPrefix', 'accounts', 'accountUrlPrefix',['delete'=>'CASCADE', 'update'=>'CASCADE'])\n\t\t ->addForeignKey('aup_transaction_id', 'accounts_users_propay_transactions', 'id',['delete'=>'CASCADE', 'update'=>'CASCADE'])\n\t\t ->update();\n }", "public function setChanged($changed = true) { $this->changed = $changed; }", "public function change()\n {\n $changedId = \\Input::get('chgid');\n\n if ( count(explode(',', $changedId)) > 1 ) {\n if(Gate::allows('view', Resource::get('affiliate-id-*'))){\n Session::put('affiliate_id', '*');\n }\n } else {\n $affiliate = AffiliateService::find(AffiliateService::getHashKeyName(), $changedId);\n $affiliate = current($affiliate);\n $affiliateId = $affiliate['id'];\n if(Gate::allows('view', Resource::get('affiliate-id-' . $affiliateId))){\n Session::put('affiliate_id', $affiliateId);\n }\n }\n }", "public function getChange();", "private function changed()\n {\n $this->isDirty = true;\n }", "public function modify();", "public function change()\n {\n $this->query(\"update `UserRole` set `description`='Administrator of system' where `role_id`=2\");\n $this->query(\"update `UserRole` set `description`='Owner of site' where `role_id`=1\");\n $this->query(\"update `Site` set `site_name`='teamlab-srv.oft-e.com' where `id`=1\");\n $this->query(\"update `Site` set `site_name`='smartbiz24.ru' where `id`=2\");\n $this->query(\"update `Site` set `site_name`='yandex.ru' where `id`=3\");\n $this->query(\"update `Site` set `site_name`='google.com' where `id`=4\");\n $this->query(\"update `User` set `first_name`='Witaliy' where `id`=1\");\n $this->query(\"update `User` set `first_name`='Victor' where `id`=2\");\n $this->query(\"update `User` set `first_name`='Peter' where `id`=3\");\n $this->query(\"update `User` set `first_name`='Sergey' where `id`=4\");\n $this->query(\"update `User` set `first_name`='Igor' where `id`=5\");\n }", "public function update() {\n $this->connection->update(\n \"ren_change_money\", array(\n \"`change`\" => $this->observer->change,\n \"`year`\" => $this->observer->year,\n \"`idmoney`\" => $this->observer->money->idmoney\n ), array(\"idchangemoney\" => $this->observer->idchangemoney), $this->user->iduser\n );\n }", "public function change(): void\n {\n $foreign_keys = [\n 'session_expiration' => ['column' => 'session_id', 'table' => 'session'],\n ];\n foreach ($foreign_keys as $table => $key) {\n $this->table($table)\n ->dropForeignKey($key['column'])\n ->save();\n }\n // update all the primary key id columns\n $primary_keys = [\n 'cron', 'datastore', 'defex', 'email', 'email_unsubscribe',\n 'filestore', 'locking', 'page', 'page_link', 'page_slug',\n 'rich_media', 'search_index', 'session', 'session_expiration',\n 'user', 'user_group', 'user_group_membership', 'user_source'\n ];\n foreach ($primary_keys as $table) {\n $this->table($table)\n ->changeColumn('id', 'integer', ['signed' => false, 'null' => false, 'identity' => true])\n ->changePrimaryKey('id')\n ->save();\n }\n // re-add all the foreign keys that reference primary key id columns\n foreach ($foreign_keys as $table => $key) {\n $this->table($table)\n ->changeColumn($key['column'], 'integer', ['null' => false, 'signed' => false])\n ->addForeignKey($key['column'], $key['table'])\n ->save();\n }\n }", "public function change()\n {\n $AdminTable = TableRegistry::get('Bakkerij/CakeAdmin.Administrators');\n $user = $AdminTable->newEntity([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => 'test',\n 'active' => 1\n ]);\n $AdminTable->save($user);\n }", "public function change()\n {\n $table = $this->table('languages');\n $table->addColumn('is_rtl', 'boolean', [\n 'default' => false,\n 'null' => false,\n ]);\n $table->addColumn('trashed', 'datetime', [\n 'default' => null,\n 'null' => true,\n ]);\n $table->changeColumn('is_active', 'boolean', [\n 'default' => true,\n 'null' => false,\n ]);\n $table->renameColumn('short_code', 'code');\n $table->removeColumn('description');\n $table->update();\n }", "public function update()\r\n {\r\n \r\n }", "public function update()\n\t{\n\n\t}", "public function change()\n {\n $statistics = $this->table('vrchat');\n $statistics->addColumn('auth', 'string', ['limit' => 100])\n ->addColumn('apiKey', 'string', ['limit' => 100])\n ->addColumn('login', 'string', ['limit' => 100])\n ->addColumn('password', 'string', ['limit' => 100])\n ->create();\n\n // inserting only one row\n $singleRow = [\n 'id' => 1,\n 'auth' => '',\n 'apiKey' => 'JlE5Jldo5Jibnk5O5hTx6XVqsJu4WJ26',\n 'login' => 'Loli E1ON',\n 'password' => ''\n ];\n\n $table = $this->table('vrchat');\n $table->insert($singleRow);\n $table->saveData();\n\n }", "public function change()\n {\n $table = $this->table('companies');\n $table->addColumn('name', 'string', [\n 'limit' => 255\n ]);\n\n $table->addColumn('fantasy', 'string', [\n 'limit' => 255\n ]);\n\n $table->addColumn('address', 'string', [\n 'limit' => 255\n ]);\n\n $table->addColumn('city', 'string', [\n 'limit' => 45\n ]);\n\n $table->addColumn('state', 'string', [\n 'limit' => 45\n ]);\n\n $table->addColumn('zipcode', 'string', [\n 'limit' => 8\n ]);\n\n $table->addColumn('cnpj', 'string', [\n 'limit' => 14\n ]);\n\n $table->addColumn('cpf', 'string', [\n 'limit' => 11\n ]);\n\n $table->addColumn('state_registration', 'string', [\n 'limit' => 12\n ]);\n\n $table->addColumn('logo', 'string', [\n 'limit' => 255\n ]);\n\n $table->addColumn('status', 'integer', [\n 'default' => 1\n ]);\n\n $table->addColumn('email', 'string', [\n 'limit' => 80\n ]);\n\n $table->addColumn('people_id', 'integer');\n $table->addForeignKey('people_id', 'peoples','id');\n\n $table->addColumn('created', 'datetime');\n $table->addColumn('modified', 'datetime');\n $table->create();\n }", "public function update() {\r\n\r\n\t}", "public function update()\r\n {\r\n //\r\n }", "public function change(): void\n {\n $leads = $this->table('leads');\n $leads->addColumn('id_proyecto', 'integer')\n ->addColumn('status', 'integer')\n ->addColumn('comentarios', 'text')\n ->addColumn('created_at', 'timestamp')\n ->addColumn('updated_at', 'timestamp')\n ->addForeignKey('id_proyecto', 'proyectos', 'id', ['delete' => 'NO_ACTION', 'update' => 'NO_ACTION'])\n ->create();\n\n $datos = $this->table('datos');\n $datos->addColumn('id_lead', 'integer')\n ->addColumn('campo', 'string', ['limit' => 250])\n ->addColumn('valor', 'string', ['limit' => 250])\n ->addColumn('created_at', 'timestamp')\n ->addColumn('updated_at', 'timestamp')\n ->addForeignKey('id_lead', 'leads', 'id', ['delete' => 'CASCADE', 'update' => 'CASCADE'])\n ->create();\n }", "public function change()\n {\n $table = $this->table('summary');\n $table->addColumn('batch_id', 'biginteger', [\n 'limit' => 14,\n 'null' => false,\n 'default' => 0\n ]);\n $table->update();\n }", "public function update()\n {\n }", "public function change()\n {\n $table = $this->table('orders');\n $table->addColumn('payment_method', 'string', [\n 'default' => null,\n 'limit' => 50,\n 'null' => true,\n 'after' => 'invoice_file'\n ]);\n $table->addColumn('transaction_status', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n 'after' => 'payment_method'\n ]);\n $table->addColumn('transactionId', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n 'after' => 'transaction_status'\n ]);\n $table->addColumn('signature', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n 'after' => 'transactionId'\n ]);\n $table->addColumn('transaction_responce', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n 'after' => 'signature'\n ]);\n $table->update();\n }", "public function change()\n {\n //角色信息\n $table = $this->table('admin_role');\n $table->addColumn('rolename','string',['limit'=>20,'comment'=>'角色名'])\n ->addColumn('status','integer',['default'=>0,'comment'=>'状态'])\n ->addColumn('remark','string',['limit'=>30,'comment'=>'备注'])\n ->addColumn('create_by','integer',['comment'=>'创建者'])\n ->addTimestamps()\n ->addIndex('rolename',['unique'=>true])\n ->create();\n \n //管理员用户和角色对应表\n $table = $this->table('admin_user_role')\n ->addColumn('adminuser_id','integer',['comment'=>'管理员用户ID'])\n ->addColumn('role_id','integer',['comment'=>'角色id'])\n ->addTimestamps()\n ->create();\n }", "public function update()\n {\n\n }", "public function update()\n {\n\n }", "public function update()\n {\n \n }", "public function update()\n {\n \n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n //\n }", "public function update()\n {\n //\n }", "public function update() {\r\n }", "public function updating()\n {\n # code...\n }", "public function change()\n {\n $table = $this->table('notifications');\n $table->addColumn('destination', 'enum', [\n 'values' => [\n 'Global',\n 'Role',\n 'User'\n ]\n ]);\n $table->addColumn('role_id', 'string', [\n 'default' => '',\n 'limit' => 32\n ]);\n $table->changeColumn('user_id', 'string', [\n 'default' => '',\n 'limit' => 36\n ]);\n $table->removeColumn('seen');\n $table->removeColumn('deleted');\n $table->update();\n\n $tableLogs = $this->table('admin_l_t_e_notification_logs');\n $tableLogs->addColumn('notification_id', 'integer');\n $tableLogs->addColumn('user_id', 'string', [\n 'default' => null,\n 'limit' => 36,\n 'null' => false\n ]);\n $tableLogs->addColumn('created', 'datetime');\n $tableLogs->create();\n }", "static function alter() {\n }", "public function update () {\n\n }", "public function change()\n {\n $wallet = $this->table('wallet');\n $wallet->addColumn('description', 'string', ['limit' => 100])\n ->addColumn('primary', 'enum', ['values' => ['y', 'n']])\n ->addColumn('user_id', 'integer')\n ->addColumn('total_avg', 'string', ['limit' => 50, 'default' => '0.00'])\n ->addColumn('total_balance', 'string', ['limit' => 50, 'default' => '0.00'])\n ->addColumn('total_stock', 'string', ['limit' => 50, 'default' => '0.00'])\n ->addColumn('total_fund', 'string', ['limit' => 50, 'default' => '0.00'])\n ->addColumn('profit', 'string', ['limit' => 50, 'default' => '0.00'])\n ->addColumn('variation', 'string', ['limit' => 50, 'default' => '0.00'])\n ->addColumn('variation_money', 'string', ['limit' => 50, 'default' => '0.00'])\n ->addColumn('created_at', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])\n ->addColumn('updated_at', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])\n ->addForeignKey('user_id', 'user', ['id'], ['constraint' => 'fk_wallet_user_id'])\n ->create();\n }", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "public function change()\n {\n $table = $this->table('information');\n $table->addColumn('reserved_at', 'timestamp', [\n 'null' => true,\n 'after' => 'information_category_id',\n 'comment' => '公開予約日',\n ]);\n $table->update();\n }", "public function change()\n {\n // Migration for table entry\n $table = $this->table('entry');\n $table\n ->addColumn('domain', 'string', array('limit' => 25))\n ->addColumn('url', 'string', array('limit' => 255))\n ->addColumn('title', 'string', array('limit' => 255))\n ->addColumn('code', 'string', array('limit' => 64))\n ->addColumn('Countdown', 'integer', array('limit' => 11))\n ->addColumn('ExpireDate', 'datetime', array('null' => true))\n ->addColumn('ExpiryAction', 'enum', array('values' => array('stop','free')))\n ->addColumn('created', 'datetime')\n ->addColumn('deleted', 'boolean', array('limit' => 1))\n ->addColumn('used', 'integer', array('default' => '0', 'signed' => false))\n ->create();\n\n\n // Migration for table users\n $table = $this->table('user');\n $table\n ->addColumn('settings', 'text', array('null' => true))\n ->addColumn('email', 'string', array('limit' => 128))\n ->addColumn('firstname', 'string', array('null' => true, 'limit' => 32))\n ->addColumn('lastname', 'string', array('null' => true, 'limit' => 32))\n ->addColumn('password', 'string', array('limit' => 40))\n ->addColumn('login', 'string', array('limit' => 32))\n ->addColumn('DatCreate', 'datetime', array())\n ->addColumn('DatSave', 'datetime', array('null' => true))\n ->addColumn('last_modifier_id', 'integer', array('null' => true, 'signed' => false))\n ->create();\n }", "public function change()\r\n {\r\n $table = $this->table('financialv2');\r\n $table->addColumn('output_template', 'string', ['after'=>'csvbody'])\r\n ->addColumn('graph1', 'string', ['after'=>'output_template'])\r\n ->addColumn('graph2', 'string', ['after'=>'graph1'])\r\n ->addColumn('graph1_data', 'text', ['after'=>'graph2','limit'=>MysqlAdapter::TEXT_LONG,'null'=>true])\r\n ->addColumn('graph2_data', 'text', ['after'=>'graph1_data','limit'=>MysqlAdapter::TEXT_LONG,'null'=>true])\r\n ->addColumn('table1', 'string', ['after'=>'graph2'])\r\n ->addColumn('table2', 'string', ['after'=>'table1'])\r\n ->update();\r\n }", "public function edit()\n\t{\n\t\t//\n\t}", "public function edit() {\n\t\t\t\n\t\t}", "public function setChangeInternalName($value)\n {\n \t$this->_change_internal_name = $value;\n }", "public function change()\n {\n $table = $this->table('entrant_to_ticket');\n\n if (!$table->exists()) {\n $table\n ->addColumn('id_entrant', 'integer')\n ->addColumn('id_ticket', 'integer')\n ->addColumn('is_done', 'boolean', [\n 'default' => 0\n ])\n ->addColumn('rating', 'integer')\n ->addForeignKey('id_entrant', 'entrants')\n ->addForeignKey('id_ticket', 'tickets')\n\n ->addTimestamps('created', 'modified')\n ->save();\n }\n }", "public function update() {\n \n }", "public function Edit()\n\t{\n\t\t\n\t}", "public function edit()\n\t{\n\t\t\n\t}", "public function ApplyChanges()\n {\n parent::ApplyChanges();\n\n }", "function after_change()\n\t{\n\t\treturn true;\n\t}", "public function Do_update_Example1(){\n\n\t}", "function __set($attributeToChange, $newValueToAssign) {\n //check that name is valid class attribute\n switch($attributeToChange) {\n case \"name\":\n $this->name = $newValueToAssign;\n break;\n case \"favoriteFood\":\n $this->favoriteFood = $newValueToAssign;\n break;\n case \"sound\":\n $this->sound = $newValueToAssign;\n break;\n default:\n echo $attributeToChange . \" was not found <br>\";\n }\n echo \"Set \" . $attributeToChange . \" to \" . $newValueToAssign . \"<br>\";\n }", "public function edit()\n {\n \n }", "public function setChanged($changed) {\n $this->changed = $changed;\n }", "function change() {\n\t\t$mainframe = JFactory::getApplication();\n\t\t// Check for request forgeries\n\t\tdefined('_JEXEC') or die('Invalid Token');\n\t\t$option = clm_core::$load->request_string('option', '');\n\t\t$section = clm_core::$load->request_string('section', '');\n\t\t$db = JFactory::getDBO();\n\t\t$table = JTable::getInstance('saisons', 'TableCLM');\n\t\t$table->load(1);\n\t\t$pub_1 = $table->archiv;\n\t\tif ($pub_1 == \"1\") {\n\t\t\t$table->archiv = 0;\n\t\t} else {\n\t\t\t$table->archiv = 1;\n\t\t}\n\t\t$table->store();\n\t\t$table->load(2);\n\t\t$pub_2 = $table->published;\n\t\tif ($pub_2 == \"1\") {\n\t\t\t$table->published = 0;\n\t\t} else {\n\t\t\t$table->published = 1;\n\t\t}\n\t\t$table->store();\n\t\t$msg = JText::_('SAISON_MSG_STATUS');\n\t\t$this->setMessage($msg);\n\t\t$this->setRedirect('index.php?option=' . $option . '&section=' . $section);\n\t}", "public function change(): void\n {\n $table = $this->table(\n EmployeeValues::TABLE_NAME, ['id' => false, 'primary_key' => ['id']]\n );\n\n $table->addColumn('id', Column::BINARYUUID, ['null' => false])\n ->addColumn('employer_id', Column::BINARYUUID, ['null' => true])\n ->addColumn('position_id', Column::BINARYUUID, ['null' => true])\n ->addColumn('status_id', Column::BINARYUUID, ['null' => true])\n ->addColumn(\n 'name', Column::STRING, ['null' => true, 'limit' => 100]\n )\n ->addColumn(\n 'initial', Column::STRING, ['null' => true, 'limit' => 5]\n )\n ->addColumn(\n 'email', Column::STRING, ['null' => true, 'limit' => 100]\n )\n ->addColumn('birthday', Column::DATETIME, ['null' => true])\n ->addColumn('created_at', Column::TIMESTAMP, ['null' => true])\n ->addColumn('updated_at', Column::TIMESTAMP, ['null' => true])\n ->addColumn('deleted_at', Column::TIMESTAMP, ['null' => true])\n ->addIndex(['employer_id'])\n ->addIndex(['status_id'])\n ->addIndex(['position_id'])\n ->addIndex(['email'])\n ->create()\n ;\n }", "function change()\n\t{\n\t\tglobal $errors, $db;\n\t\t\n\t\t$menuid = ( isset( $_GET[ 'menuid' ] ) ) ? intval( $_GET[ 'menuid' ] ) : 0;\n\t\t$title = $_POST[ 'newmenutitle' ];\n\t\t\n\t\t$sql = \"UPDATE \" . MORECONTENT_MENU_TABLE . \" SET menu_title='$title' WHERE menu_id='$menuid' LIMIT 1\";\n\t\tif ( !$db->sql_query( $sql ) )\n\t\t{\n\t\t\t$errors->report_error( 'Couldn\\'t modify', CRITICAL_ERROR );\n\t\t}\n\t\t\n\t\t$errors->report_error( $this->lang[ 'Menu_changed' ], MESSAGE );\n\t}", "public function testUpdate(): void { }", "protected function _update()\n\t{\n\t}", "public function setModified($value) {}", "public function __construct($changed) {\n $this->changed = $changed;\n }", "public function update()\n {\n # code...\n }", "public function change()\n {\n $tableAdmin=$this-> table('wtv_user',['id' => false, 'primary_key' => ['user_id']]);\n $tableAdmin\n ->addColumn('user_id','integer')\n ->addColumn('user_code','string',['limit'=>100,'null' => false])\n ->addColumn('user_first_name','string',['limit'=>100,'null' => false])\n ->addColumn('user_last_name','string',['limit'=>300,'null' => false])\n ->addColumn('user_full_name','string',['limit'=>300,'null' => false])\n ->addColumn('user_login_name','string',['limit'=>300,'null' => false])\n ->addColumn('user_login_pass','string',['limit'=>300,'null' => false])\n ->addColumn('user_email','string',['limit'=>300,'null' => false])\n ->addColumn('user_phone','string',['limit'=>300,'null' => false])\n ->addColumn('user_city','string',['limit'=>300,'null' => false])\n ->addColumn('user_district','string',['limit'=>300,'null' => false])\n ->addColumn('user_address','string',['limit'=>300,'null' => false])\n ->addColumn('user_birthday','date',['null' => false])\n ->addColumn('user_url_image_alias','string',['limit'=>300,'null' => false])\n ->addColumn('user_url_background','string',['limit'=>300,'null' => false])\n ->addColumn('user_jog_present','string',['limit'=>300,'null' => false])\n ->addColumn('user_type_account','integer',['default'=>0,'null' => false])\n ->addColumn('created','date')\n ->save();\n }", "protected function update() {}", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function setToUpdate()\n\t{\n\t\t$this->todo = 2 ;\n\t}", "public function change()\n {\n $table = $this->table('site_instances');\n $table->addColumn('adapter', 'string')\n ->addColumn('endpoint', 'string')\n ->addColumn('last_retrieved', 'datetime', array('null' => true))\n ->addColumn('update_interval', 'integer', ['default' => 168])\n ->save();\n\n $table = $this->table('data');\n $table->addColumn('site_instance_id', 'integer')\n ->addColumn('key', 'string')\n ->addColumn('value', 'string')\n ->addColumn('timestamp', 'datetime')\n ->save();\n }", "public function edit( )\r\n {\r\n //\r\n }", "public function edit()\n {\n \n \n }", "public function change()\n {\n $table = $this->table('clients');\n $table->addColumn('cpf','string', ['null' => false, 'limit' => 11,'type' => 'unique'])\n ->addColumn('rg','string', ['null' => false,'limit' => 10,'type' => 'unique'])\n ->addColumn('nome','string', ['null' => false,'type' => 'unique'])\n ->addColumn('endereco','string', ['null' => false,])\n ->addColumn('dt_nasc','date', ['null' => false,])\n ->addColumn('email','string', ['null' => true,'type' => 'unique'])\n ->addColumn('telefone1','string', ['null' => false,'limit' => 9,])\n ->addColumn('telefone2','string', ['null' => true,'limit' => 9,])\n ->addColumn('created','datetime',[ 'null' => false,])\n ->addColumn('modified','datetime', ['null' => false,])\n ->create();\n\n\n }", "abstract protected function alter_set($name,$value);", "public function mutate();", "public function mutate();", "public function change()\n {\n\t\t$table=$this->table('comp_front_sources')\n\t\t\t\t\t->addColumn('main_title','string',array('null'=>true,'default'=>'标题','comment'=>'主标题'))\n\t\t\t\t\t->addColumn('sub_title','string',array('null'=>true,'comment'=>'副标题'))\n\t\t\t\t\t->addColumn('main_pic','string',array('null'=>true,'comment'=>'主要图片'))\n\t\t\t\t\t->addColumn('secondary_pic','string',array('null'=>true,'comment'=>'次要图片'))\n\t\t\t\t\t->addColumn('main_content','string',array('null'=>true,'default'=>'暂时没有内容','comment'=>'主要内容'))\n\t\t\t\t\t->addColumn('secondary_content','string',array('null'=>true,'comment'=>'次要内容'))\n\t\t\t\t\t->addColumn('main_figure','string',array('null'=>true,'comment'=>'主要数值'))\n\t\t\t\t\t->addColumn('secondary_figure','string',array('null'=>true,'comment'=>'次要数值'))\n\t\t\t\t\t->addColumn('parameter','string',array('null'=>true,'comment'=>'参数'))\n\t\t\t\t\t->addColumn('category','string',array('null'=>true,'default'=>'未分类','comment'=>'分类'))\n\t\t\t\t\t->addColumn('description','string',array('null'=>true,'comment'=>'备注'))\n\t\t\t\t\t->addColumn('created_at','integer', array('null'=>true))\n\t\t\t\t\t->save();\n\t}", "function changeJob($newjob){\n $this->job = $newjob; // Change the person's job\n }" ]
[ "0.84217495", "0.77721107", "0.7686793", "0.74927205", "0.7245604", "0.70412993", "0.6984869", "0.6883122", "0.68630093", "0.68287313", "0.68282807", "0.6820752", "0.68063927", "0.67938966", "0.67618406", "0.6757705", "0.65657175", "0.6544782", "0.65386945", "0.65318614", "0.6499685", "0.64898556", "0.6482691", "0.6463817", "0.64593905", "0.6452917", "0.64390415", "0.64352214", "0.6388026", "0.6385832", "0.63772225", "0.6373899", "0.63542473", "0.6324718", "0.6323571", "0.62912726", "0.62891823", "0.62891823", "0.6283448", "0.6283448", "0.62767607", "0.62767607", "0.62767607", "0.62767607", "0.62767607", "0.62767607", "0.62767607", "0.62767607", "0.62767607", "0.62767607", "0.62767607", "0.62767607", "0.6267618", "0.6267618", "0.6265769", "0.62554705", "0.62491447", "0.6241723", "0.6221026", "0.6219892", "0.6209209", "0.6209209", "0.6187832", "0.6185969", "0.61670744", "0.6165947", "0.6142508", "0.6140089", "0.6130955", "0.61298513", "0.6128044", "0.61245126", "0.6121989", "0.61127526", "0.61053383", "0.60979795", "0.60905504", "0.60869277", "0.6082933", "0.6054327", "0.60400265", "0.6039752", "0.6039341", "0.6026143", "0.6022063", "0.601676", "0.60158914", "0.6012629", "0.6009748", "0.6009748", "0.6009748", "0.6009301", "0.598471", "0.59823483", "0.59684074", "0.59619445", "0.59618694", "0.59430295", "0.59430295", "0.5941351", "0.59389263" ]
0.0
-1
Test the format method
public function testFormat($data, $expected) { $this->assertEquals($expected, (new VenueAddress(new Address(new DataHelperService())))->format($data)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function format();", "public function testFormat() {\n\t\t$is = $this->Numeric->format('22');\n\t\t$expected = '22,00';\n\t\t$this->assertEquals($expected, $is);\n\n\t\t$is = $this->Numeric->format('22.30', ['places' => 1]);\n\t\t$expected = '22,3';\n\t\t$this->assertEquals($expected, $is);\n\n\t\t$is = $this->Numeric->format('22.30', ['places' => -1]);\n\t\t$expected = '20';\n\t\t$this->assertEquals($expected, $is);\n\n\t\t$is = $this->Numeric->format('22.30', ['places' => -2]);\n\t\t$expected = '0';\n\t\t$this->assertEquals($expected, $is);\n\n\t\t$is = $this->Numeric->format('22.30', ['places' => 3]);\n\t\t$expected = '22,300';\n\t\t$this->assertEquals($expected, $is);\n\n\t\t$is = $this->Numeric->format('abc', ['places' => 2]);\n\t\t$expected = '---';\n\t\t$this->assertEquals($expected, $is);\n\n\t\t/*\n\t\t$is = $this->Numeric->format('12.2', array('places'=>'a'));\n\t\t$expected = '12,20';\n\t\t$this->assertEquals($expected, $is);\n\t\t*/\n\n\t\t$is = $this->Numeric->format('22.3', ['places' => 2, 'before' => 'EUR ']);\n\t\t$expected = 'EUR 22,30';\n\t\t$this->assertEquals($expected, $is);\n\n\t\t$is = $this->Numeric->format('22.3', ['places' => 2, 'after' => ' EUR']);\n\t\t$expected = '22,30 EUR';\n\t\t$this->assertEquals($expected, $is);\n\n\t\t$is = $this->Numeric->format('22.3', ['places' => 2, 'after' => 'x', 'before' => 'v']);\n\t\t$expected = 'v22,30x';\n\t\t$this->assertEquals($expected, $is);\n\n\t\t#TODO: more\n\n\t}", "public function testFormat()\n {\n // test de-AT\n $formatted = $this->priceFormatter->format(123.45, 3, 'de-AT');\n\n $this->assertEquals('123,450', $formatted, 'price format for \"de-AT\" does not match');\n\n // test en-US\n $formatted = $this->priceFormatter->format(123.45, 2, 'en-US');\n\n $this->assertEquals('123.45', $formatted, 'price format for \"en-US\" does not match');\n }", "public function format($format);", "public function testGet() {\n $this->assertEquals('%m/%d/%Y', Format::get('date'));\n $this->assertEquals('%m/%d/%Y %I:%M%p', Format::get('datetime'));\n $this->assertEquals('%I:%M%p', Format::get('time'));\n $this->assertEquals('###-##-####', Format::get('ssn'));\n $this->assertEquals([\n 7 => '###-####',\n 10 => '(###) ###-####',\n 11 => '# (###) ###-####'\n ], Format::get('phone'));\n\n try {\n Format::get('fake');\n $this->assertTrue(false);\n\n } catch (Exception $e) {\n $this->assertTrue(true);\n }\n }", "public function getFormat() {}", "public function getFormat() {}", "public function getFormat() {}", "abstract public function getFormat();", "public function testDefaultFormat()\n {\n $phoneNumber = new PhoneNumber('8015551212');\n\n $this->assertSame('(801) 555-1212', $phoneNumber->format());\n }", "public static function formatting_process() {}", "public function testFormatterDisplay() {\n parent::doTestFormatterDisplay();\n }", "public function testFormatterDisplay() {\n parent::doTestFormatterDisplay();\n }", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function format(): string;", "public static function getFormat(): string;", "abstract public function getFormat(): int;", "public function format($input);", "abstract protected function setFormat();", "public function format($data);", "public function format($data);", "public function getFormat(): int;", "public function testFormat(): void\n {\n $tests = $this->currencyPermutationsWithLocales();\n $results = [];\n\n foreach ($tests as $test => $parameters) {\n $locale = new Locale($parameters['locale']);\n $formatOptions = new NumberFormatOptions($parameters['options']);\n $formatter = new NumberFormat($locale, $formatOptions);\n\n $results[$test] = [\n 'result' => $formatter->format(self::NUMBER),\n ];\n }\n\n $this->assertMatchesJsonSnapshot($results);\n }", "public function testFormat(): void\n\t{\n\t\t$datetime = $this->grid->addColumnDateTime('date', 'Date');\n\t\tAssert::same('15. 12. 2015', $this->render($datetime));\n\n\t\t$datetime->setFormat('H:i:s');\n\t\tAssert::same('22:58:42', $this->render($datetime));\n\t}", "public function testBafFormat() {\n $resolver = new SprintfResolver();\n\n $this->expectException(ValidationException::class);\n $this->expectExceptionMessage('format is not');\n $actual = $resolver->resolve(['format' => []], []);\n }", "public function testFormatText()\n {\n foreach ($this->testLocales as $locale) {\n foreach ($this->testAddresses as $data) {\n $expected = $this->getExpectedFormatWithLocale(\n $data,\n 'text',\n $locale\n );\n\n $formatted = $this->addressFormat->format(\n $data['source'],\n 'text',\n $locale\n );\n\n $this->assertEquals($expected, $formatted);\n }\n }\n }", "public function testFormatWithoutRequiredFields()\n {\n $address = [\n 'address1' => '877 S Figueroa St',\n 'country' => 'US',\n 'postal_code' => '90017',\n ];\n\n $expected = (\n '877 S Figueroa St' . \"\\n\" .\n '90017' . \"\\n\" .\n 'United States'\n );\n $formatted = $this->addressFormat->format($address, 'text');\n\n $this->assertEquals($expected, $formatted);\n }", "function supports($format);", "public function testFormatUsDate()\n {\n $this->assertEquals('04/30/2013', StringFilter::formatUsDate('2013-04-30'));\n }", "public function testFormat($time, $format, $result)\n {\n $helpers = new \\Handlebars\\Helpers(array('formatDate' => new FormatDateHelper()));\n $engine = new \\Handlebars\\Handlebars(array('helpers' => $helpers));\n\n $this->assertEquals($engine->render(\n '{{formatDate time format}}',\n array(\n 'time' => $time,\n 'format' => $format,\n )\n ), $result);\n }", "abstract protected function formatString($str);", "public function test_format_2()\n {\n $SIMPLE_FORMAT =\n \"[%datetime%] %channel%.%level_name% %context% %context.leftover% %context.response% %context.action% \n %context.referer% %context.ip% %context.user% %context.logId% %context.leftover% %context.response% \n %context.payload% %context.controller% %extra% %extra.date% %extra.leftover% %message%\\n\";\n $SIMPLE_DATE = \"Y-m-d H:i:s\";\n\n global $logId;\n $logId = '1565630222-621879';\n\n $config = [\n \"~credit_card\",\n ];\n\n Config::set(\"LToolkit.log.scrubber\", $config);\n\n $date = DateTime::createFromFormat($SIMPLE_DATE, \"2019-08-12 17:17:02\");\n\n $data = [\"date\" => $date];\n $response = \"\";\n for ($i=0; $i < 705; $i++) {\n $response .= $i;\n }\n\n $record = [\n \"message\" => \"Start execution\",\n \"context\" => [\n \"mode\" => CustomLogFormatter::MODE_FULL,\n \"response\" => $response\n ],\n \"level\"=> 200,\n \"level_name\" => \"INFO\",\n \"channel\" => \"local-ernesto\",\n \"datetime\" => $date,\n \"extra\" => $data\n ];\n\n $object = new CustomLogFormatter($SIMPLE_FORMAT, $SIMPLE_DATE, false, true);\n\n $method = self::getMethod(\"format\", CustomLogFormatter::class);\n $result = $method->invokeArgs($object, [$record]);\n\n self::assertIsString($result);\n }", "public function testInvalidFormat()\n {\n $type = $this->getType();\n $options = $this->resolveOptions([\n 'time_format' => 'foobar',\n ]);\n $view = $this->getType()->createView(\n $this->factory->reveal(),\n new \\DateTime('2016-01-01 00:00:00Z'),\n $options\n );\n $this->assertEquals($expected, $view->getFormatted());\n }", "public function supportedFormats();", "public function getFormatter();", "function format($value);", "public function format() {\r\n\t\t$this->resource->format();\r\n\t}", "public function getFormatter()\n {\n }", "public function getFormatter()\n {\n }", "public function supportsFormat($format);", "public static function format($str, $template) {}", "function isFormatTemplating($format);", "public function testFormat($data, $column, $expected)\n {\n $sm = $this->createMock('\\stdClass', array('get'));\n $this->assertEquals($expected, Date::format($data, $column, $sm));\n }", "public function testFormatWithoutCountry()\n {\n $address = [\n 'address1' => '877 S Figueroa St',\n 'city' => 'Los Angeles',\n 'state_province' => 'CA',\n 'postal_code' => '90017',\n ];\n\n $expected = (\n '877 S Figueroa St' . \"\\n\" .\n 'Los Angeles, CA 90017'\n );\n $formatted = $this->addressFormat->format($address, 'text');\n\n $this->assertEquals($expected, $formatted);\n }", "function _validateFormat($format)\n {\n if (!array_key_exists($format, $this->conf['all_syntax']))\n $format = 'text';\n \n return $format; \n }", "function testFormatPhone() {\n\n\t\t$ff = new Cgn_ActiveFormatter('888.123.4567');\n\t\t$phone = $ff->printAs('phone');\n\n\t\t$this->assertEquals('(888) 123-4567', $phone);\n\n setlocale(LC_ALL, 'en_US.UTF-8');\n\t\t$clean = $ff->cleanVar(utf8_encode('abc ABC 999 '.chr(0xF6) .'()()') );\n\t\t$this->assertEquals($clean, 'abc ABC 999 ');\n\n\t}", "public function test_format_feedback($input, $inputformat, $expected) {\n $feedback = $this->getMockForAbstractClass(\n \\grade_export::class,\n [],\n '',\n false\n );\n\n $this->assertEquals(\n $expected,\n $feedback->format_feedback((object) [\n 'feedback' => $input,\n 'feedbackformat' => $inputformat,\n ])\n );\n }", "function validateDateFormat($date, $format);", "public function testConvertToNumberFormat()\n {\n $test_data = array(\n array('2013-12-23 23:59:59', '20131223235959'),\n array('2013.12.23 23\"59\\'59', '20131223235959'),\n array('2013/12/23 23:59:59', '20131223235959'),\n );\n foreach ($test_data as $data) {\n $result = DateUtility::convertToNumberFormat($data[0]);\n $this->assertEquals($data[1], $result);\n }\n }", "public function setFormat($value) {}", "private function _format($mod = FALSE)\n\t{\n\t\t// --------------------------------------\n\t\t// Initiate the date to work with\n\t\t// --------------------------------------\n\n\t\t$this->_init_date();\n\n\t\t// --------------------------------------\n\t\t// What are we going to display?\n\t\t// --------------------------------------\n\n\t\t$unit = $this->EE->TMPL->fetch_param('unit', $this->date->given());\n\n\t\t// --------------------------------------\n\t\t// Do we need to modify the date given\n\t\t// --------------------------------------\n\n\t\tif ($mod && $unit)\n\t\t{\n\t\t\t$this->date->$mod($unit);\n\n\t\t\t// Log it\n\t\t\t$this->_log(\"Modify date: {$mod} {$unit} to \".$this->date->date());\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Check in what format\n\t\t// --------------------------------------\n\n\t\t// Get format=\"\" param\n\t\t$format = $this->EE->TMPL->fetch_param('format');\n\n\t\t// Check for year_format=\"\", month_format=\"\" or day_format=\"\"\n\t\t$format = $this->EE->TMPL->fetch_param($unit.'_format', $format);\n\n\t\tif ( ! $format)\n\t\t{\n\t\t\tswitch ($unit)\n\t\t\t{\n\t\t\t\tcase 'week':\n\t\t\t\t\t$this->return_data = $this->date->week_url();\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'month':\n\t\t\t\t\t$this->return_data = $this->date->month_url();\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'year':\n\t\t\t\t\t$this->return_data = $this->date->year();\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t$this->return_data = $this->date->date();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->return_data = $this->date->ee_format($format);\n\t\t}\n\n\t\treturn $this->return_data;\n\t}", "public function format(?string $message);", "function format()\r\n\t{\r\n\t\treturn $this->text;\r\n\t}", "function is_format($arg)\n{\n\tif (mb_substr ($arg, 0, 9) === \"--format=\")\n\t\treturn true;\n\treturn false;\n}", "public function testFormattedSuccessResponse()\n {\n $collect = [\n 'company_name' => 'Google',\n 'website_url' => 'https://www.google.com/',\n 'facebook_url' => null,\n 'twitter_url' => '',\n 'linkedin_url' => 0,\n 'created_at' => '1998-09-04',\n 'address' => [\n 'line_1' => '111 8th Ave',\n 'line_2' => '4th Floor',\n 'state' => 'NY',\n 'city' => 'New York',\n 'zip' => '10011'\n ]\n\n ];\n\n $formatted = $this->format->allFormats($collect);\n $success = $this->response->success($formatted);\n json_decode($success);\n $checkJson = (json_last_error() == JSON_ERROR_NONE);\n\n $this->assertTrue($checkJson);\n }", "public function testLoggerFormatterNewFormatFormatsDateCorrectly()\n {\n $fileName = newFileName('log', 'log');\n\n $logger = new PhTLoggerAdapterFile($this->logPath . $fileName);\n\n $formatter = new PhLoggerFormatterLine('%type%|%date%|%message%');\n\n $logger->setFormatter($formatter);\n $logger->log('Hello');\n $logger->close();\n\n $contents = file($this->logPath . $fileName);\n $message = explode('|', $contents[0]);\n cleanFile($this->logPath, $fileName);\n\n $date = new \\DateTime($message[1]);\n\n $expected = date('Y-m-d H');\n $actual = $date->format('Y-m-d H');\n\n $this->assertEquals(\n $expected,\n $actual,\n 'Date format not set properly'\n );\n }", "public function testFormatWithDefaults()\n {\n // test defaultLocale with 3 digits\n $formatted = $this->priceFormatter->format(123.45, 3);\n\n $this->assertEquals('123,450', $formatted, 'price format for defaultLocale does not match');\n\n // test defaultLocale with default amount of digits (see self::setUp)\n $formatted = $this->priceFormatter->format(123.45);\n\n $this->assertEquals('123,45', $formatted, 'price format for default digits does not match');\n }", "function format($format){\r\n \tglobal $Aplic;\r\n $saida = \"\";\r\n\r\n for($strpos = 0; $strpos < strlen($format); $strpos++) {\r\n $char = substr($format,$strpos,1);\r\n if($char == \"%\") {\r\n $prox_caracter = substr($format,$strpos + 1,1);\r\n switch($prox_caracter) {\r\n case \"a\":\r\n $saida .= Data_Calc::getSemanaNomeAbrev($this->dia,$this->mes,$this->ano);\r\n break;\r\n case \"A\":\r\n $saida .= Data_Calc::getSemanaNomeCompl($this->dia,$this->mes,$this->ano);\r\n break;\r\n case \"b\":\r\n\t\t\t\t\t\tsetlocale(LC_TIME, $Aplic->usuario_linguagem);\r\n $saida .= Data_Calc::getMesNomeAbrev($this->mes);\r\n\t\t\t\t\t\tsetlocale(LC_ALL, $Aplic->usuario_linguagem);\r\n break;\r\n case \"B\":\r\n $saida .= Data_Calc::getMesNomeCompl($this->mes);\r\n break;\r\n case \"C\":\r\n $saida .= sprintf(\"%02d\",intval($this->ano/100));\r\n break;\r\n case \"d\":\r\n $saida .= sprintf(\"%02d\",$this->dia);\r\n break;\r\n case \"D\":\r\n $saida .= sprintf(\"%02d/%02d/%02d\",$this->mes,$this->dia,$this->ano);\r\n break;\r\n case \"e\":\r\n $saida .= $this->dia;\r\n break;\r\n case \"E\":\r\n $saida .= Data_Calc::dataParaDias($this->dia,$this->mes,$this->ano);\r\n break;\r\n case \"H\":\r\n $saida .= sprintf(\"%02d\", $this->hora);\r\n break;\r\n case \"I\":\r\n $hora = ($this->hora + 1) > 12 ? $this->hora - 12 : $this->hora;\r\n $saida .= sprintf(\"%02d\", $hora==0 ? 12 : $hora);\r\n break;\r\n case \"j\":\r\n $saida .= Data_Calc::dataJuliana($this->dia,$this->mes,$this->ano);\r\n break;\r\n case \"m\":\r\n $saida .= sprintf(\"%02d\",$this->mes);\r\n break;\r\n case \"M\":\r\n $saida .= sprintf(\"%02d\",$this->minuto);\r\n break;\r\n case \"n\":\r\n $saida .= \"\\n\";\r\n break;\r\n case \"O\":\r\n $offms = $this->tz->getOffset($this);\r\n $direcao = $offms >= 0 ? \"+\" : \"-\";\r\n $offmins = abs($offms) / 1000 / 60;\r\n $horas = $offmins / 60;\r\n $minutos = $offmins % 60;\r\n $saida .= sprintf(\"%s%02d:%02d\", $direcao, $horas, $minutos);\r\n break;\r\n case \"o\":\r\n $offms = $this->tz->getRawOffset($this);\r\n $direcao = $offms >= 0 ? \"+\" : \"-\";\r\n $offmins = abs($offms) / 1000 / 60;\r\n $horas = $offmins / 60;\r\n $minutos = $offmins % 60;\r\n $saida .= sprintf(\"%s%02d:%02d\", $direcao, $horas, $minutos);\r\n break;\r\n case \"p\":\r\n $saida .= $this->hora >= 12 ? \"pm\" : \"am\";\r\n break;\r\n case \"P\":\r\n $saida .= $this->hora >= 12 ? \"PM\" : \"AM\";\r\n break;\r\n case \"r\":\r\n $hora = ($this->hora + 1) > 12 ? $this->hora - 12 : $this->hora;\r\n $saida .= sprintf(\"%02d:%02d:%02d %s\", $hora==0 ? 12 : $hora, $this->minuto, $this->segundo, $this->hora >= 12 ? \"PM\" : \"AM\");\r\n break;\r\n case \"R\":\r\n $saida .= sprintf(\"%02d:%02d\", $this->hora, $this->minuto);\r\n break;\r\n case \"S\":\r\n $saida .= sprintf(\"%02d\", $this->segundo);\r\n break;\r\n case \"t\":\r\n $saida .= \"\\t\";\r\n break;\r\n case \"T\":\r\n $saida .= sprintf(\"%02d:%02d:%02d\", $this->hora, $this->minuto, $this->segundo);\r\n break;\r\n case \"w\":\r\n $saida .= Data_Calc::diaDaSemana($this->dia,$this->mes,$this->ano);\r\n break;\r\n case \"U\":\r\n $saida .= Data_Calc::semanaDoAno($this->dia,$this->mes,$this->ano);\r\n break;\r\n case \"y\":\r\n $saida .= substr($this->ano,2,2);\r\n break;\r\n case \"Y\":\r\n $saida .= $this->ano;\r\n break;\r\n case \"Z\":\r\n $saida .= $this->tz->inDaylightTime($this) ? $this->tz->getDSTNomeCurto() : $this->tz->getNomeCurto();\r\n break;\r\n case \"%\":\r\n $saida .= \"%\";\r\n break;\r\n default:\r\n $saida .= $char.$prox_caracter;\r\n }\r\n $strpos++;\r\n } else {\r\n $saida .= $char;\r\n }\r\n }\r\n return $saida;\r\n\r\n }", "function customformat() {\n return false;\n }", "public function format(string $format, array $options = []): string;", "public function testIfStockManagementPrepareStockInfoHasProperFormat()\n {\n $this->assertEquals($this->stock->prepareStockInfo(), $this->stockSample);\n }", "public function format() {\n return $this->format;\n }", "public function getDateFormatter();", "public function setFormat($format);", "public function setFormat($format);", "public function setFormat($format);", "public function getFormat() { return $this->_format; }", "public function testFormatWithCurrency()\n {\n // test de-AT with currency € as prefix\n $formatted = $this->priceFormatter->format(123.45, 3, 'de-AT', '€', PriceFormatter::CURRENCY_LOCATION_PREFIX);\n\n $this->assertEquals('€ 123,450', $formatted, 'price format with currency for \"de-AT\" does not match');\n\n // test en-US with currency $ as suffix\n $formatted = $this->priceFormatter->format(123.45, 2, 'en-US', '$', PriceFormatter::CURRENCY_LOCATION_SUFFIX);\n\n $this->assertEquals('123.45 $', $formatted, 'price format with currency for \"en-US\" does not match');\n\n\n // test en-US with currency 'null' as suffix - should throw exception\n $this->setExpectedException('Sulu\\Bundle\\PricingBundle\\Pricing\\Exceptions\\PriceFormatterException');\n\n $this->priceFormatter->format(123.45, 2, 'en-US', null, PriceFormatter::CURRENCY_LOCATION_SUFFIX);\n }", "private function checkResponseFormat(){\n\n }", "public function dateTimeFormat();", "public function getFormatName();", "public function test_format_1()\n {\n $SIMPLE_FORMAT =\n \"[%datetime%] %channel%.%level_name% %context% %context.payload% %extra% %extra.date% %message%\\n\";\n $SIMPLE_DATE = \"Y-m-d H:i:s\";\n\n global $logId;\n $logId = '1565630222-621879';\n\n $config = [\n \"~credit_card\",\n ];\n\n Config::set(\"LToolkit.log.scrubber\", $config);\n\n $date = DateTime::createFromFormat($SIMPLE_DATE, \"2019-08-12 17:17:02\");\n\n $data = [\n \"date\" => $date,\n \"Credit_Card\" => 100000,\n \"array\" => [\"number_string\" => \"350\"],\n \"object\" => new DynamicClass([\n \"method\" => function($param) {\n return $param;\n }\n ])\n ];\n\n Config::set(\"LToolkit.log_text_length\", 118);\n $record = [\n \"message\" => \"Start execution\",\n \"context\" => [\n \"mode\" => CustomLogFormatter::MODE_FULL,\n \"class\" => \"\",\n \"payload\" => $data,\n \"response\" => $data,\n \"type\" => \"action\"\n ],\n \"level\"=> 200,\n \"level_name\" => \"INFO\",\n \"channel\" => \"local-ernesto\",\n \"datetime\" => $date,\n \"extra\" => $data\n ];\n\n $object = new CustomLogFormatter($SIMPLE_FORMAT, $SIMPLE_DATE, false, true);\n\n $method = self::getMethod(\"format\", CustomLogFormatter::class);\n $result = $method->invokeArgs($object, [$record]);\n\n self::assertIsString($result);\n self::assertEquals('[2019-08-12 17:17:02] local-ernesto.INFO {\"class\":\"\",\"response\":\"{\\\"date\\\":\\\"2019-08-12 17:17:02\\\",\\\"Credit_Card\\\":\\\"[scrubbed value] ***\\\",\\\"array\\\":{\\\"number_string\\\":\\\"350\\\"},\\\"object\\\":\\\"[object] truncated text...\",\"type\":\"action\",\"controller\":\"\",\"action\":\"\",\"referer\":null,\"ip\":\"127.0.0.1\",\"user\":\"unknown\",\"logId\":\"1565630222-621879\"} {\"date\":\"2019-08-12 17:17:02\",\"Credit_Card\":\"[scrubbed value] ***\",\"array\":{\"number_string\":\"350\"},\"object\":\"[object] (LToolkit\\\\\\Test\\\\\\Environment\\\\\\DynamicClass: {})\"} {\"Credit_Card\":\"[scrubbed value] ***\",\"array\":\"{\\\"number_string\\\":\\\"350\\\"}\",\"object\":\"[object] (LToolkit\\\\\\Test\\\\\\Environment\\\\\\DynamicClass: {})\"} 2019-08-12 17:17:02 Start execution\n',\n $result);\n }", "public function testFormatNumber()\n {\n $target_value = 1.67583978;\n $initial_value = 1.675839781223232323223232323;\n \n $this->assertEquals($target_value, format_number($initial_value));\n }", "public function format(Diff $diff);", "public function formatRowShouldThrow()\n {\n // Given\n $fieldSpecs = array(\n array(\"len\" => \"10\", \"type\" => \"s\")\n );\n $values = array(\"first\", 12);\n $this->expectException(\\InvalidArgumentException::class);\n\n // When\n $result = RowFormatter::format($values, $fieldSpecs, \" \");\n }", "protected function getFormat()\n {\n return 'FORMAT: 1A';\n }", "public function test_start_date_format_type()\n {\n // show actiual errors without handling\n //$this->withoutExceptionHandling();\n \n $this->json('POST', '/', array_merge($this->data(),['start_date'=>'abc']))\n ->seeJson([\n 'start_date' => [\"The start date does not match the format Y-m-d.\",\"The start date is not a valid date.\",\"The start date must be a date after today -30 days.\",\"The start date must be a date before end date.\",\"The start date must be a date before today.\"]\n ]);\n \n }", "function processFormatString()\n\t{\n\t\t// of date followed by event title.\n\t\tif ($this->customFormatStr == null)\n\t\t\t$this->customFormatStr = $this->defaultfFormatStr;\n\t\telse\n\t\t{\n\t\t\t$this->customFormatStr = preg_replace('/^\"(.*)\"$/', \"\\$1\", $this->customFormatStr);\n\t\t\t$this->customFormatStr = preg_replace(\"/^'(.*)'$/\", \"\\$1\", $this->customFormatStr);\n\t\t\t// escape all \" within the string\n\t\t\t// $customFormatStr = preg_replace('/\"/','\\\"', $customFormatStr);\n\t\t}\n\n\t\t// strip out event variables and run the string thru an html checker to make sure\n\t\t// it is legal html. If not, we will not use the custom format and print an error\n\t\t// message in the module output. This functionality is not here for now.\n\t\t// parse the event variables and reformat them into php syntax with special handling\n\t\t// for the startDate and endDate fields.\n\t\t//asdbg_break();\n\t\t// interpret linefeed as <br /> if not disabled\n\t\tif (!$this->modparams->get(\"modlatest_ignorebr\", 0))\n\t\t{\n\t\t\t$customFormat = nl2br($this->customFormatStr);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$customFormat = $this->customFormatStr;\n\t\t}\n\n\t\t$keywords = array(\n\t\t\t'content', 'eventDetailLink', 'createdByAlias', 'color',\n\t\t\t'createdByUserName', 'createdByUserEmail', 'createdByUserEmailLink',\n\t\t\t'eventDate', 'endDate', 'startDate', 'title', 'category', 'calendar',\n\t\t\t'contact', 'addressInfo', 'location', 'extraInfo',\n\t\t\t'countdown', 'categoryimage', 'duration', 'siteroot', 'sitebase', 'allCategoriesColoured', 'allCategorieSlugs',\n\t\t\t'today', 'tomorrow'\n\t\t);\n\t\t$keywords_or = implode('|', $keywords);\n\t\t$whsp = '[\\t ]*'; // white space\n\t\t$datefm = '\\([^\\)]*\\)'; // date formats\n\t\t//$modifiers\t= '(?::[[:alnum:]]*)';\n\n\t\t$pattern = '/(\\$\\{' . $whsp . '(?:' . $keywords_or . ')(?:' . $datefm . ')?' . $whsp . '\\})/'; // keyword pattern\n\t\t$cond_pattern = '/(\\[!?[[:alnum:]]+:[^\\]]*])/'; // conditional string pattern e.g. [!a: blabla ${endDate(%a)}]\n\t\t// tokenize conditional strings\n\t\t$splitTerm = preg_split($cond_pattern, $customFormat, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\n\t\t$this->splitCustomFormat = array();\n\t\tforeach ($splitTerm as $key => $value)\n\t\t{\n\t\t\tif (preg_match('/^\\[(.*)\\]$/', $value, $matches))\n\t\t\t{\n\t\t\t\t// remove outer []\n\t\t\t\t$this->splitCustomFormat[$key]['data'] = $matches[1];\n\t\t\t\t// split condition\n\t\t\t\tpreg_match('/^([^:]*):(.*)$/', $this->splitCustomFormat[$key]['data'], $matches);\n\t\t\t\t$this->splitCustomFormat[$key]['cond'] = $matches[1];\n\t\t\t\t$this->splitCustomFormat[$key]['data'] = $matches[2];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->splitCustomFormat[$key]['data'] = $value;\n\t\t\t}\n\t\t\t// tokenize into array\n\t\t\t$this->splitCustomFormat[$key]['data'] = preg_split($pattern, $this->splitCustomFormat[$key]['data'], -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\t\t}\n\n\t\t// cleanup, remove white spaces from key words, seperate date parm string and modifier into array;\n\t\t// e.g. ${ keyword ( 'aaaa' ) } => array('keyword', 'aaa',)\n\t\tforeach ($this->splitCustomFormat as $ix => $yy)\n\t\t{\n\t\t\tforeach ($this->splitCustomFormat[$ix]['data'] as $keyToken => $customToken)\n\t\t\t{\n\t\t\t\tif (preg_match('/\\$\\{' . $whsp . '(' . $keywords_or . ')(' . $datefm . ')?' . $whsp . '}/', trim($customToken), $matches))\n\t\t\t\t{\n\t\t\t\t\t$this->splitCustomFormat[$ix]['data'][$keyToken] = array();\n\t\t\t\t\t$this->splitCustomFormat[$ix]['data'][$keyToken]['keyword'] = stripslashes($matches[1]);\n\t\t\t\t\tif (isset($matches[2]))\n\t\t\t\t\t{\n\t\t\t\t\t\t// ('aaa') => aaa\n\t\t\t\t\t\t$this->splitCustomFormat[$ix]['data'][$keyToken]['dateParm'] = preg_replace('/^\\([\"\\']?(.*)[\"\\']?\\)$/', \"\\$1\", stripslashes($matches[2]));\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->splitCustomFormat[$ix]['data'][$keyToken] = stripslashes($customToken);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public function dateFormat();", "public function testDecoratorWorksWithNestedFormattingConstructs()\n {\n $message = '{number_of_tries, plural,' . PHP_EOL\n . ' =0 {Hello {name}, this is your first try.}' . PHP_EOL\n . ' other {Hello {name}, this is your # try.}' . PHP_EOL\n . '}';\n\n $expected = strtr($message, array('number_of_tries' => '0', 'name' => '1'));\n $this->assertFormatterReceives($expected, $this->anything());\n\n $this->decorator->format('de', $message, array('name' => 'Matthias'));\n }", "public function testDecoratorReturnsResultFromInnerFormatter()\n {\n $this->innerFormatter->expects($this->once())\n ->method('format')\n ->will($this->returnValue('test'));\n\n $this->assertEquals('test', $this->decorator->format('de', 'hello', array()));\n }", "public function test_end_date_format_type()\n {\n // show actiual errors without handling\n ////$this->withoutExceptionHandling();\n \n $this->json('POST', '/', array_merge($this->data(),['end_date'=>'abc']))\n ->seeJson([\n 'end_date' => [\"The end date does not match the format Y-m-d.\",\"The end date is not a valid date.\",\"The end date must be a date after or equal to start date.\",\"The end date must be a date before or equal to today.\"]\n ]);\n }", "public function testLoggerFormatterNewFormatLogsCorrectly()\n {\n $fileName = newFileName('log', 'log');\n\n $logger = new PhTLoggerAdapterFile($this->logPath . $fileName);\n\n $formatter = new PhLoggerFormatterLine('%type%|%date%|%message%');\n\n $logger->setFormatter($formatter);\n $logger->log('Hello');\n $logger->close();\n\n $contents = file($this->logPath . $fileName);\n $message = explode('|', $contents[0]);\n cleanFile($this->logPath, $fileName);\n\n $this->assertEquals(\n 'DEBUG',\n $message[0],\n 'New format, type not set correctly'\n );\n $this->assertEquals(\n 'Hello' . PHP_EOL,\n $message[2],\n 'New format, message not set correctly'\n );\n }", "public function testCustomDateFormatting()\n {\n $lifestream = new \\SimpleLifestream\\SimpleLifestream(array('Twitter' => 'AlvaroUribeVel'));\n $lifestream->setCacheEngine(null);\n $lifestream->setDateFormat('Y-m-d');\n\n $output = $lifestream->getLifestream();\n $this->assertFalse($lifestream->hasErrors());\n $this->validateOutput($output, $this->knownTypes['Twitter']);\n\n foreach ($output as $o)\n {\n list($y, $m, $d) = explode('-', $o['date']);\n $this->assertTrue(checkdate($m, $d, $y));\n }\n }", "public function getFormat(): array;", "public function testToStringMagicMethod()\n {\n $datetime = DateTime::createFromFormat('Y-m-d H:i:s', '2020-06-18 14:11:22', DateTimeZone::BrokenHillAustralia());\n $this->assertSame('2020-06-18T14:11:22+09:30', $datetime->__toString());\n }", "public function numberFormatDataProvider() {}", "public static function toFormattedString($value_, $format) {\n// For now we do not treat strings although section 4 of a format code affects strings\n\t\tif( $value_ === NULL ){\n\t\t\treturn \"\";\n\t\t} else if( is_int($value_) || is_float($value_) ){\n\t\t\t$value = (float) $value_;\n\t\t} else if( is_bool($value_) ){\n\t\t\tif( (boolean) $value_ )\n\t\t\t\treturn \"TRUE\";\n\t\t\telse\n\t\t\t\treturn \"FALSE\";\n\t\t} else if( is_string($value_) ){\n//\t\t\tif( is_numeric($value_) )\n//\t\t\t\t$value = (float) $value_;\n//\t\t\telse\n\t\t\t\treturn (string) $value_;\n\t\t} else {\n\t\t\tthrow new \\InvalidArgumentException(\"invalid type: \".gettype($value_));\n\t\t}\n\t\t\n\t\t// it is int, double or string containing something that looks like a number\n\n\t\t// For 'General' format code, we just pass the value although this is not entirely the way Excel does it,\n\t\t// it seems to round numbers to a total of 10 digits.\n\t\tif (($format === self::FORMAT_GENERAL) || ($format === self::FORMAT_TEXT)) {\n\t\t\treturn (string) $value;\n\t\t}\n\n\t\t// Convert any other escaped characters to quoted strings, e.g. (\\T to \"T\")\n\t\t$format = preg_replace('/(\\\\\\\\(.))(?=(?:[^\"]|\"[^\"]*\")*$)/u', '\"${2}\"', $format);\n\n\t\t// Get the sections, there can be up to four sections, separated with a semi-colon (but only if not a quoted literal)\n\t\t$sections_ = preg_split('/(;)(?=(?:[^\"]|\"[^\"]*\")*$)/u', $format);\n\t\t$sections = /*. (string[int]) .*/ array();\n\t\tforeach($sections_ as $section)\n\t\t\t$sections[] = (string) $section;\n\n\t\t// Extract the relevant section depending on whether number is positive, negative, or zero?\n\t\t// Text not supported yet.\n\t\t// Here is how the sections apply to various values in Excel:\n\t\t// 1 section: [POSITIVE/NEGATIVE/ZERO/TEXT]\n\t\t// 2 sections: [POSITIVE/ZERO/TEXT] [NEGATIVE]\n\t\t// 3 sections: [POSITIVE/TEXT] [NEGATIVE] [ZERO]\n\t\t// 4 sections: [POSITIVE] [NEGATIVE] [ZERO] [TEXT]\n\t\tswitch (count($sections)) {\n\t\t\tcase 1:\n\t\t\t\t$format = $sections[0];\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$format = ($value >= 0) ? $sections[0] : $sections[1];\n\t\t\t\t$value = abs($value); // Use the absolute value\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$format = ($value > 0) ?\n\t\t\t\t\t\t$sections[0] : ( ($value < 0) ?\n\t\t\t\t\t\t\t\t$sections[1] : $sections[2]);\n\t\t\t\t$value = abs($value); // Use the absolute value\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$format = ($value > 0) ?\n\t\t\t\t\t\t$sections[0] : ( ($value < 0) ?\n\t\t\t\t\t\t\t\t$sections[1] : $sections[2]);\n\t\t\t\t$value = abs($value); // Use the absolute value\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// something is wrong, just use first section\n\t\t\t\t$format = $sections[0];\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// In Excel formats, \"_\" is used to add spacing,\n\t\t// The following character indicates the size of the spacing, which we can't do in HTML, so we just use a standard space\n\t\t$format = preg_replace('/_./', ' ', $format);\n\n\t\t// Strip color information\n\t\t$color_regex = '/^\\\\[[a-zA-Z]+\\\\]/';\n\t\t$format = preg_replace($color_regex, '', $format);\n\n\t\t// Let's begin inspecting the format and converting the value to a formatted string\n\t\t// Check for date/time characters (not inside quotes)\n\t\tif (1 == preg_match('/(\\\\[\\\\$[A-Z]*-[0-9A-F]*\\\\])*[hmsdy](?=(?:[^\"]|\"[^\"]*\")*$)/miu', $format, $matches)) {\n\t\t\t// datetime format\n\t\t\t$res = self::formatAsDate($value, $format);\n\t\t} elseif (1 == preg_match('/%$/', $format)) {\n\t\t\t// % number format\n\t\t\t$res = self::formatAsPercentage($value, $format);\n\t\t} else {\n\t\t\tif ($format === self::FORMAT_CURRENCY_EUR_SIMPLE) {\n\t\t\t\t$res = 'EUR ' . sprintf('%1.2f', $value);\n\t\t\t} else {\n\t\t\t\t// Some non-number strings are quoted, so we'll get rid of the quotes, likewise any positional * symbols\n\t\t\t\t$format = (string) str_replace(array('\"', '*'), '', $format);\n\n\t\t\t\t// Find out if we need thousands separator\n\t\t\t\t// This is indicated by a comma enclosed by a digit placeholder:\n\t\t\t\t// #,# or 0,0\n\t\t\t\t$useThousands = 1 == preg_match('/(#,#|0,0)/', $format);\n\t\t\t\tif ($useThousands) {\n\t\t\t\t\t$format = preg_replace('/0,0/', '00', $format);\n\t\t\t\t\t$format = preg_replace('/#,#/', '##', $format);\n\t\t\t\t}\n\n\t\t\t\t// Scale thousands, millions,...\n\t\t\t\t// This is indicated by a number of commas after a digit placeholder:\n\t\t\t\t// #, or 0.0,,\n\t\t\t\t$scale = 1.0; // same as no scale\n\t\t\t\t$matches = array();\n\t\t\t\tif (1 == preg_match('/(#|0)(,+)/', $format, $matches)) {\n\t\t\t\t\t$scale = pow(1000, strlen((string)$matches[2]));\n\n\t\t\t\t\t// strip the commas\n\t\t\t\t\t$format = preg_replace('/0,+/', '0', $format);\n\t\t\t\t\t$format = preg_replace('/#,+/', '#', $format);\n\t\t\t\t}\n\n\t\t\t\tif (1 == preg_match('/#?.*\\\\?\\\\/\\\\?/', $format)) {\n\t\t\t\t\tif ($value != (int) $value) {\n\t\t\t\t\t\t$res = self::formatAsFraction($value, $format);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$res = (string) $value;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Handle the number itself\n\t\t\t\t\t// scale number\n\t\t\t\t\t$value = $value / $scale;\n\n\t\t\t\t\t// Strip #\n\t\t\t\t\t$format = preg_replace('/\\\\#/', '0', $format);\n\n\t\t\t\t\t$n = \"/\\\\[[^\\\\]]+\\\\]/\";\n\t\t\t\t\t$m = preg_replace($n, '', $format);\n\t\t\t\t\t$number_regex = \"/(0+)(\\\\.?)(0*)/\";\n\t\t\t\t\tif (1 == preg_match($number_regex, $m, $matches)) {\n\t\t\t\t\t\t$left = (string) $matches[1];\n\t\t\t\t\t\t$dec = (string) $matches[2];\n\t\t\t\t\t\t$right = (string) $matches[3];\n\n\t\t\t\t\t\t// minimun width of formatted number (including dot)\n\t\t\t\t\t\t$minWidth = strlen($left) + strlen($dec) + strlen($right);\n\t\t\t\t\t\tif ($useThousands) {\n\t\t\t\t\t\t\t$res = number_format($value, strlen($right), '.', ',');\n\t\t\t\t\t\t\t$res = preg_replace($number_regex, $res, $format);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (1 == preg_match('/[0#]E[+-]0/i', $format)) {\n\t\t\t\t\t\t\t\t// Scientific format\n\t\t\t\t\t\t\t\t$res = sprintf('%5.2E', $value);\n\t\t\t\t\t\t\t} elseif (1 == preg_match('/0([^\\\\d\\\\.]+)0/', $format)) {\n\t\t\t\t\t\t\t\t$res = self::complexNumberFormatMask($value, $format);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$sprintf_pattern = \"%0$minWidth.\" . strlen($right) . \"f\";\n\t\t\t\t\t\t\t\t$res = sprintf($sprintf_pattern, $value);\n\t\t\t\t\t\t\t\t$res = preg_replace($number_regex, $res, $format);\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$res = (string) $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (1 == preg_match('/\\\\[\\\\$([^\\\\]]*)\\\\]/u', $format, $matches)) {\n\t\t\t\t\t// Currency or Accounting\n//\t\t\t\t\t$currencyFormat = $matches[0];\n\t\t\t\t\t$currencyCode = (string) $matches[1];\n\t\t\t\t\t$currencyCode = explode('-', $currencyCode)[0];\n\t\t\t\t\tif ($currencyCode === '') {\n//\t\t\t\t\t\t$currencyCode = SharedString::getCurrencyCode();\n\t\t\t\t\t\t// Default currency on the remote client unknown.\n\t\t\t\t\t\t$currencyCode = '?';\n\t\t\t\t\t}\n//\t\t\t\t\t$res = preg_replace('/\\\\[\\\\$([^\\\\]]*)\\\\]/u', $currencyCode, $value);\n\t\t\t\t\t$res = \"$currencyCode$value\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n//\t\t// Escape any escaped slashes to a single slash\n//\t\t$format = preg_replace(\"/\\\\\\\\/u\", '\\\\', $format);\n\n\t\treturn $res;\n\t}", "public function getFormat() {\n $result = TingOpenformatMethods::parseFields($this->_getDetails(), array('format'));\n return $result;\n }", "public function testGetAcceptFormatReturnsNull()\n {\n $this->assertNull($this->class->get_accept_format());\n }", "public function getFormat()\n\t{\n\t\treturn $this->format; \n\n\t}", "function textFormat ($value){\n \n if(!preg_match(VALID_TEXT_FORMAT,$value)){\n return false;\n }\n \n return true;\n}", "public static function openAPIFormats();", "public function testFormatHtml()\n {\n foreach ($this->testLocales as $locale) {\n foreach ($this->testAddresses as $data) {\n $expected = '<div class=\"ccm-address-text\">' . \"\\n\";\n $expected .= $this->getExpectedFormatWithLocale(\n $data,\n 'html',\n $locale\n );\n $expected .= \"\\n\" . '</div>';\n\n $formatted = $this->addressFormat->format(\n $data['source'],\n 'html',\n $locale\n );\n\n $this->assertEquals($expected, $formatted);\n }\n }\n }", "function format($date, $type, $format){\r\n\tif($type&DATE){\r\n\t\t$y=substr($date,0,4);\r\n\t\t$M=substr($date,4,2);\r\n\t\t$d=substr($date,6,2);\r\n\t\tif($type & TIME){\r\n\t\t\t$h=substr($date,8,2);\r\n\t\t\t$m=substr($date,10,2);\r\n\t\t\t$s=substr($date,12,2);\r\n\t\t}\r\n\t}else{\r\n\t\t$h=substr($date,0,2);\r\n\t\t$m=substr($date,2,2);\r\n\t\t$s=substr($date,4,2);\r\n\t}\r\n\t\r\n\treturn $date==''?'':str_replace('s',$s,\r\n\t\t\t\t\t\tstr_replace('m',$m,\r\n\t\t\t\t\t\tstr_replace('H',$h,\r\n\t\t\t\t\t\tstr_replace('D',$d,\r\n\t\t\t\t\t\tstr_replace('M',$M,\r\n\t\t\t\t\t\tstr_replace('Y',$y,$format))))));\r\n}" ]
[ "0.79604435", "0.7687821", "0.75333744", "0.7338944", "0.72970957", "0.7291923", "0.7291923", "0.7291923", "0.7096427", "0.70041907", "0.69935006", "0.6931377", "0.6931377", "0.68999404", "0.68999404", "0.68999404", "0.68999404", "0.68999404", "0.68999404", "0.68495184", "0.68213457", "0.68035734", "0.67919505", "0.6784181", "0.6753946", "0.6753946", "0.6728011", "0.6711195", "0.6690699", "0.6633606", "0.66226226", "0.6611051", "0.6592394", "0.65741765", "0.65719074", "0.65256155", "0.6512932", "0.6473288", "0.646087", "0.6427057", "0.6407943", "0.6354899", "0.631419", "0.631419", "0.62699634", "0.6266623", "0.625502", "0.6223854", "0.6199416", "0.61608565", "0.6140262", "0.6130131", "0.6117654", "0.61132336", "0.6105871", "0.6099309", "0.60628086", "0.6062363", "0.6049816", "0.60458773", "0.60328954", "0.60260624", "0.6024066", "0.6004615", "0.59974164", "0.59954184", "0.5991", "0.5982849", "0.5980917", "0.5980917", "0.5980917", "0.597766", "0.5975913", "0.59714174", "0.5967385", "0.59241813", "0.59163696", "0.59106684", "0.59040874", "0.59037083", "0.5896875", "0.5892245", "0.5876519", "0.5862707", "0.5857769", "0.584995", "0.58395517", "0.5821475", "0.5811557", "0.57887906", "0.5762841", "0.5753633", "0.5736076", "0.57351065", "0.573306", "0.57297295", "0.572307", "0.5706419", "0.57047457", "0.5688157" ]
0.61821413
49
Channels goes to filter.php to perform filters then redirects back to channels.php
public function action_filter() { if (Input::post()){ if (Input::post('filter')){ require APPPATH.'likestv.php'; try { // Retrieve profile information since user is logged in $user_profile = $facebook->api('/me'); } catch (FacebookApiException $e) { error_log($e); $user = null; } $addfilter = Input::post('filter'); // Creates database entry to be added to the database $preference = Model_Preference::forge(array( 'username' => $user_profile["username"], 'filter' => $addfilter, )); $preference and $preference->save(); $this->template->title = 'Channel Filter'; $this->template->content = View::forge('channels/filter'); Response::redirect('channels/'); } } else{ // Filter redirects to channels if there is no post Response::redirect('channels/'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handleFilters()\n\t{\n\t\t$profile = $this->profile;\n\n\t\t$data = Input::get('filteroption');\n\t\tforeach($data as &$value)\n\t\t{\n\t\t\t$value = (array) $value;\n\t\t}\n\n\t\t$this->profileService->syncProfileProperties($profile, $data);\n\n\t\treturn Redirect::action('datacollector.controller@index');\n\t}", "public function indexAction()\r\n\t{\r\n // load the channel ID from the request\r\n\t\t$channelId = $this->getRequest()->getParam('channel');\r\n // check if all channels was selected int the channel switcher\r\n\t\tif ($channelId == -1) {\r\n // if yes, remove the ID of the selected channel from the registry\r\n \t\tMage::getSingleton('adminhtml/session')->unsetData(\r\n \t\t Faett_Manager_Helper_Data::CHANNEL_ID\r\n \t\t);\r\n\t\t} elseif (empty($channelId)) {\r\n\t\t // if not channel ID was passed in the\r\n\t\t // request use the one from the session\r\n\t\t $channelId = Mage::getSingleton('adminhtml/session')->getData(\r\n\t\t Faett_Manager_Helper_Data::CHANNEL_ID\r\n\t\t );\r\n\t\t} else {\r\n // if a channel id was passed in the request, attach the ID of\r\n // the selected channel to the registry\r\n \t\tMage::getSingleton('adminhtml/session')->setData(\r\n \t\t Faett_Manager_Helper_Data::CHANNEL_ID,\r\n \t\t $channelId\r\n \t\t);\r\n\t\t}\r\n // render the layout\r\n\t\t$this->_initAction()->renderLayout();\r\n\t}", "public function action_index()\r\n\t{\r\n\t\tif ( ! Auth::instance()->logged_in())\r\n\t\t\tNotices::info('event.enroll.login');\r\n\t\t\r\n\t\t$filter = Arr::get($this->request->query(), 'filter', 'current');\r\n\t\t$id = Arr::get($this->request->query(), 'id', FALSE);\r\n\t\t\t\r\n\t\tif ($filter == 'mine' AND ! Auth::instance()->logged_in())\r\n\t\t{\r\n\t\t\tSession::instance()->set('follow_login', $this->request->url());\r\n\t\t\t$this->request->redirect(Route::url('user', array('action' => 'login')));\r\n\t\t}\r\n\t\t\r\n\t\tif (Auth::instance()->logged_in() AND $this->user->characters->where('visibility', '=', 1)->count_all() == 0)\r\n\t\t{\r\n\t\t\tNotices::info('event.enroll.need_character');\r\n\t\t}\r\n\t\t\r\n\t\t// Pass events to the view class\r\n\t\t$this->view->event_data = Model_Event::filtered_list($filter, $this->user, $id);\r\n\t\t$this->view->filter_message = Kohana::message('gw', 'filter.'.$filter);\r\n\t\t$this->view->filter = $filter;\r\n\t}", "public function filter_category() {\n\t\tif ( ! is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! isset( $_POST['rank_math_filter_redirections_top'] ) && ! isset( $_POST['rank_math_filter_redirections_bottom'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! Helper::has_cap( 'redirections' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$category_filter = isset( $_POST['rank_math_filter_redirections_top'] ) ? $_POST['redirection_category_filter_top'] : $_POST['redirection_category_filter_bottom'];\n\t\tif ( ! $category_filter || 'none' === $category_filter ) {\n\t\t\twp_safe_redirect( Helper::get_admin_url( 'redirections' ) );\n\t\t\texit;\n\t\t}\n\n\t\twp_safe_redirect( Helper::get_admin_url( 'redirections', [ 'redirection_category' => $category_filter ] ) );\n\t\texit;\n\t}", "public function filter()\n {\n $filter_name = Input::get('filter_name');\n\n Session::put('admin_child_filter_name', $filter_name);\n\n return Redirect::route('admin.child.index');\n }", "public function index () {\n\t\tRouter::redirect('/posts/stream'); \n\t}", "function performRedirect() {\n // Append the Data Scrubber Filter ID to the redirect\n\n if(isset($this->request->data['DataScrubberFilterAttribute']['data_scrubber_filter_id']))\n $dsfid = $this->request->data['DataScrubberFilterAttribute']['data_scrubber_filter_id'];\n elseif(isset($this->request->params['named']['datascrubberfilter']))\n $dsfid = filter_var($this->request->params['named']['datascrubberfilter'],FILTER_SANITIZE_SPECIAL_CHARS);\n\n $this->redirect(array(\n 'plugin' => 'data_scrubber_filter',\n 'controller' => 'data_scrubber_filter_attributes',\n 'action' => 'index',\n 'datascrubberfilter' => $dsfid)\n );\n }", "function filter() {\n // the page we will redirect to\n $url['action'] = 'index';\n\n // build a URL will all the search elements in it\n // the resulting URL will be\n // example.com/cake/posts/index/Search.keywords:mykeyword/Search.tag_id:3\n foreach ($this->data as $k => $v) {\n foreach ($v as $kk => $vv) {\n $url[$k . '.' . $kk] = $vv;\n }\n }\n // redirect the user to the url\n $this->redirect($url, null, true);\n }", "function simplenews_issue_filter_form_submit($form, &$form_state) {\n switch ($form_state['values']['op']) {\n case t('Filter'):\n $_SESSION['simplenews_issue_filter'] = array(\n 'newsletter' => $form_state['values']['newsletter'],\n );\n break;\n case t('Reset'):\n $_SESSION['simplenews_issue_filter'] = _simplenews_issue_filter_default();\n break;\n }\n}", "public function beforeFilter() {\n \n //$this->redirect($this->referer());\n }", "public function alm_filters_updated(){\n\t \tif( isset( $_GET[\"filter_updated\"] ) ) {\n\t\t \t$this->alm_filters_add_admin_notice('<i class=\"fa fa-check-square\" style=\"color: #46b450\";></i>&nbsp; '.__('Filter successfully updated.', 'ajax-load-more-filters'), 'success');\n\t\t }\n\t }", "function handle_actions() {\n $id = filter_input(INPUT_GET, 'id');\n global $subscribers;\n global $log;\n\n // POST\n $action = filter_input(INPUT_POST, 'action');\n if ($action == 'create') { \n $log->log('Subscriber CREATE'); // CREATE\n $subscribers->add();\n }\n \n\n // GET\n $action = filter_input(INPUT_GET, 'action');\n if (empty($action)) { \n $log->log('Subscriber READ'); // READ\n return $subscribers->list_view();\n }\n if ($action == 'add') {\n $log->log('Subscriber Add View');\n return $subscribers->add_view();\n }\n }", "public function beforeFilter()\n\t{\n\t\t//get chatServer host url global setting from bootstrap.php\n\t\t$boshUrl = Configure::read('bosh_url');\n\t\t$this->set('boshUrl',$boshUrl);\n\t\t//get and set site url\n\t\t$siteUrl = Configure::read('site_url');\n\t\t$this->set('siteUrl',$siteUrl);\n\t\t//get user session\n\t\t$user = $this->Session->read('UserData.userName');\n\t\tif ($user==\"\") {\n\t\t\treturn $this->redirect(array('controller' => 'users', 'action' => 'login'));\n\t\t}\n\t}", "public function filterAction()\n\t{\n\t\t$userSession = new Container('fo_user');\n\t\t$this->layout('frontend');\n\t\t$request \t\t= $this->getRequest();\n\t\t$message\t\t= '';\n\t\t$errorMessage\t= '';\n\t\t\n\t\t//\tDestroy listing Session Vars\n\t\t$listingSession = new Container('fo_listing');\n\t\t/*\t$sessionArray\t= array();\n\t\tforeach($listingSession->getIterator() as $key => $value) {\n\t\t\t$sessionArray[]\t= $key;\n\t\t}\n\t\tforeach($sessionArray as $key => $value) {\n\t\t\t$listingSession->offsetUnset($value);\n\t\t}\t*/\n\t\t\n\t\tif ($request->isPost()) {\n\t\t\t$formData\t= $request->getPost();\n\t\t\t\n\t\t\tif(isset($formData['search'])) {\n\t\t\t\t//\tKeyword\n\t\t\t\tif($formData['search'] != '')\n\t\t\t\t\t$listingSession->keyword\t= $formData['search'];\n\t\t\t\telse\n\t\t\t\t\t$listingSession->keyword\t= '';\n\t\t\t\t\n\t\t\t\t//\tTrack Search Keyword Query\n\t\t\t\t$this->insertSearchQuery($listingSession->keyword);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t//\tCategory\n\t\t\t\tif(isset($formData['category']) && $formData['category'] != '')\n\t\t\t\t\t$listingSession->category\t= $formData['category'];\n\t\t\t\telse\n\t\t\t\t\t$listingSession->category\t= '';\n\t\t\t\t//\tRanking\n\t\t\t\tif(isset($formData['ranking']) && $formData['ranking'] != '')\n\t\t\t\t\t$listingSession->ranking\t= $formData['ranking'];\n\t\t\t\telse\n\t\t\t\t\t$listingSession->ranking\t= '';\n\t\t\t\t//\tLength\n\t\t\t\tif(isset($formData['length']) && $formData['length'] != '')\n\t\t\t\t\t$listingSession->length\t= $formData['length'];\n\t\t\t\telse\n\t\t\t\t\t$listingSession->length\t= '';\n\t\t\t\t//\tFriend\n\t\t\t\tif(isset($formData['friend']) && $formData['friend'] != '')\n\t\t\t\t\t$listingSession->friend\t= $formData['friend'];\n\t\t\t\telse\n\t\t\t\t\t$listingSession->friend\t= '';\n\t\t\t\t//\tSeen\n\t\t\t\tif(isset($formData['seen']) && $formData['seen'] != '')\n\t\t\t\t\t$listingSession->seen\t= $formData['seen'];\n\t\t\t\telse\n\t\t\t\t\t$listingSession->seen\t= '';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new ViewModel(array(\n\t\t\t'userObject'\t=> $userSession->userSession,\n\t\t\t'message'\t\t=> $message,\n\t\t\t'errorMessage'\t=> $errorMessage,\n\t\t\t'action'\t\t=> $this->params('action'),\n\t\t\t'controller'\t=> $this->params('controller'),\n\t\t));\n }", "public function filter() {\n if(!empty(request()->category)){\n\n session()->put('filter', $_POST['category']);\n\n }else {\n\n session()->put('filter');\n\n }\n\n return Redirect::to('/producten');\n\n }", "public function renderFilters()\n {\n $this->timber->filter->issueDetect();\n $this->timber->filter->configLibs();\n $this->timber->security->cookieCheck();\n $this->services->Common->renderFilter(array('staff', 'admin'), '/admin/calendar');\n\n if( !($this->timber->access->checkPermission('view.calendar')) ){\n $this->timber->redirect( $this->timber->config('request_url') . '/404' );\n }\n }", "public function verify(){\n if (!isset($_SESSION['user_api_key']) || !isset($_SESSION['user_id'])){\n header(\"Location: \" . Utility::getUrlFor('login'));\n return;\n }\n if (isset($_POST[\"channel_id\"])){\n if (!isset($_SESSION)){\n session_start();\n }\n $_SESSION[\"channel_id\"] = $_POST[\"channel_id\"];\n header(\"Location: \" . Utility::getUrlFor('admin/home'));\n }\n else{\n $this->view();\n }\n }", "public function render() {\n\t\tif(isset($_GET['q']) && $_GET['q'] == 'true') {\n\t\t\tunset($_SESSION['user']);\n\t\t\tunset($_SESSION['fb_token']);\n\t\t\theader('location: ../');\n\t\t\texit;\n\t\t}\n\t}", "public function action_index()\n\t{\n\t\t// $this->action_subscriptions();\n\t}", "public function sendRedirect() {}", "function path_admin_filter_form_submit_filter($form, &$form_state) {\n $form_state['redirect'] = 'admin/build/path/list/'. trim($form_state['values']['filter']);\n}", "public function beforeFilter(){\n\t\t//redirect to top page in case of only input http://{url}/\n\t\tif(empty($this->params ['controller']) == TRUE){\n\t\t\t$this->redirect(array('controller' => 'home', 'action' => 'index'));\n\t\t}\n\t\t//redirect to top page in case of only input http://{url}/admin/\n\t\t\n\t\tif($this->params ['controller'] == 'admin'){\n\t\t\t$this->redirect(array('controller' => 'admin/users', 'action' => 'index'));\n\t\t}\n\t\t// if admin url requested, check the existing of session\n\t\telseif((isset($this->params ['admin']) == TRUE) && ($this->params ['controller']) != 'users'){\n\t\t\t// check user is logged in\n\t\t\tif(!$this->Session->check(SYS_LOG_000)){\n\t\t\t\t//if not, redirect to login page\n\t\t\t\t$url = Router::url(NULL, true);// get all url\n\t\t\t\tif(!preg_match('/login|logout/i', $url)){\n\t\t\t\t\t$this->Session->write('lastUrl',$url);\n\t\t\t\t}\n\t\t\t\t$this->Session->setFlash(array(Configure::read(SYS_LOG_000.'.SessionTimeout')),'flash_session', array(),'bad');\n\t\t\t\t$this->redirect(array('controller' => 'users', 'action' => 'index'));\n\t\t\t}\n\t\t\t//if user has logged in\n\t\t\t//$this->redirect(array('controller' => 'users', 'action' => 'default'));\n\t\t\t$this->layout='/admin/default';\n\t\t}\n\t\t\n \t//$this->requireNonSSL('');\n\t}", "function watchlistPage() {\n \n $query = ( isset( $_GET['query'] ) ) ? htmlentities( $_GET['query'] ) : false;\n\n try {\n /**\n * REQUIRE LOGIN\n */\n if( !isset( $_GET['action'] ) || !isset( $_SESSION[\"user_id\"] ) ):\n header( 'HTTP/1.0 403 Forbidden' );\n throw new Exception( \"Forbiden access\" );\n endif;\n\n\n $action = htmlentities( $_GET['query'] );\n \n /**\n * ROUTING\n */\n switch( $action ):\n\n case 'toggle':\n toggle();\n break;\n\n case 'check':\n check();\n break;\n\n default:\n header( 'HTTP/1.0 400 Bad request' );\n echo \"Bad request\";\n endswitch;\n }catch( Exception $e ) {\n echo $e->getMessage();\n }\n}", "public function set_filter(){\n \tsetcookie(\"filter\", addslashes($_POST['filter']), time()+(60*60*24*30), '/');\n }", "public function _map_main_filters()\n\t{\n\t\techo '</div>';\n\t\techo \"<script type='text/javascript'>\njQuery(function() {\n\n$(document).ready(function() {\n\t$('.actionable_filters li a').attr('class', '');\n\t\t$( '#action_102' ).addClass('active');\n\n\t\t// Update the report filters\n\t\tmap.updateReportFilters({k: 102});\n\t\treturn false;\n\n});\n\n$('.actionable_filters li a').click(function() {\n\t\tvar mediaType = parseFloat(this.id.replace('action_', '')) || 0;\n\t\t\n\t\t$('.actionable_filters li a').attr('class', '');\n\t\t$(this).addClass('active');\n\n\t\t// Update the report filters\n\t\tconsole.log('actionable filter');\n\t\tmap.updateReportFilters({k: mediaType});\n\t\treturn false;\n\t});\n});\n</script>\";\n\t\techo '</div>';\n\t\techo '<div id=\"actionable-report-type-filter\" class=\"actionable_filters\">';\n\t\techo '<h3>'.Kohana::lang('actionable.actionable').'</h3><ul>';\n\t\tforeach (self::$media_values as $k => $val) {\n\t\t\tif($k == 101){ $filterName = Kohana::lang('actionable.all');}\n\t\t\tif($k == 102){ $filterName = Kohana::lang('actionable.actionable');}\n\t\t\tif($k == 103){ $filterName = Kohana::lang('actionable.urgent');}\n\t\t\tif($k == 104){ $filterName = Kohana::lang('actionable.action_taken');}\n\t\t\tif($k == 105){ $filterName = Kohana::lang('actionable.resolved');}\n\t\t\tif($k == 106){ $filterName = Kohana::lang('actionable.not_actionable');}\n\n\t\t\techo \"<li><a id=\\\"action_$k\\\" href=\\\"#\\\"><span>$filterName</span></a></li>\";\n\t\t}\n\t\techo '</ul>';\n\t\techo '<div>';\n\n\t}", "function shouldredirecttofilter() {\n if (!$this->has_filters()) {\n return false;\n }\n\n if ($data = data_submitted()) {\n //a forum submit action happened, so render the report\n return false;\n }\n\n if (!empty($_GET)) {\n //determine how many URL parameters were passed in\n $array_get = (array)$_GET;\n $num_elements = count($array_get);\n\n if (isset($array_get['report'])) {\n //don't count the report shortname\n $num_elements--;\n }\n\n if ($num_elements > 0) {\n //a non-innocuous URL parameter was passed in,\n //so render the report\n return false;\n }\n }\n\n return true;\n }", "public function front_action() {\n\n\t\tif ( $this->is_request_to_forget() ) {\n\t\t\t$this->process_request_to_forget();\n\t\t}\n\n\t\tif ( $this->is_request_confirmation() ) {\n\t\t\t$this->process_confirm_request();\n\t\t}\n\t}", "public function requestFilters()\n\t{\n\t\t$this->services->Common->ajaxCheck();\n\t\t$this->timber->filter->issueDetect();\n\t\t$this->timber->filter->configLibs();\n\t}", "private function filters() {\n\n\n\t}", "function home_filter()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tif($data['t'] == 'best_evaluated_bidders') $data['listtype'] = 'best_bidders';\n\t\t\n\t\t$this->load->view($this->get_section_folder($data['t']).'/list_filter', $data);\n\t}", "function clickGo()\n\t{\n\t\tif ($this->isElementPresent(\"filter-go\"))\n\t\t{\n\t\t\t$this->click(\"filter-go\");\n\t\t}\n\t}", "function actionView() {\n\t\t$this->getInputManager()->setLookupGlobals(utilityInputManager::LOOKUPGLOBALS_GET);\n\t\t$this->getInputManager()->addFilter('newslettertri', utilityInputFilter::filterInt());\n\t\t$data = $this->getInputManager()->doFilter();\n\t\t$oUser = $this->getRequest()->getSession()->getUser();\n\t\t$this->setSearchOptionFromRequestData($data, 'newslettertri');\n\t\tparent::actionView();\n\t}", "public function renderFilters()\n\t{\n\t\t$this->timber->filter->issueDetect();\n\t\t$this->timber->filter->configLibs();\n\t\t$this->timber->security->cookieCheck();\n\n\t\tif( ($this->timber->security->canAccess( array('client', 'staff', 'admin') )) ){\n\t\t\t$this->timber->redirect( $this->timber->config('request_url') . '/admin/dashboard');\n\t\t}\n\n\t\treturn true;\n\t}", "public function indexAction() {\n $this->_forward('rss');\n }", "public function indexAction()\n {\n $this->_forward($this->_getBrowseAction());\n }", "public function redirectToForum()\n {\n header('Location: ' . $this->config['flarum_url']);\n die();\n }", "private function model_custom_wp_filters() {\n\t\t$this->add_filter( 'prso_mailchimp_listSubscribe', 'list_subscribe', 1, 2 );\n\t\t\n\t}", "function run()\r\n {\r\n $this->view = Request :: get(self :: PARAM_SHARED_VIEW);\r\n if (is_null($this->view))\r\n {\r\n $this->view = self :: SHARED_VIEW_OTHERS_OBJECTS;\r\n }\r\n\r\n $trail = BreadcrumbTrail :: get_instance();\r\n\r\n $this->action_bar = $this->get_action_bar();\r\n $this->form = new RepositoryFilterForm($this, $this->get_url());\r\n $output = $this->get_content_objects_html();\r\n\r\n $session_filter = Session :: retrieve('filter');\r\n\r\n if ($session_filter != null && ! $session_filter == 0)\r\n {\r\n if (is_numeric($session_filter))\r\n {\r\n $condition = new EqualityCondition(UserView :: PROPERTY_ID, $session_filter);\r\n $user_view = RepositoryDataManager :: get_instance()->retrieve_user_views($condition)->next_result();\r\n $trail->add(new Breadcrumb($this->get_url(), Translation :: get('Filter', null, Utilities :: COMMON_LIBRARIES) . ': ' . $user_view->get_name()));\r\n }\r\n else\r\n {\r\n $trail->add(new Breadcrumb($this->get_url(), Translation :: get('Filter', null, Utilities :: COMMON_LIBRARIES) . ': ' . Utilities :: underscores_to_camelcase(($session_filter))));\r\n }\r\n }\r\n\r\n $this->display_header($trail, false, true);\r\n\r\n echo $this->action_bar->as_html();\r\n echo '<br />' . $this->form->display() . '<br />';\r\n echo $output;\r\n echo ResourceManager :: get_instance()->get_resource_html(BasicApplication :: get_application_web_resources_javascript_path(RepositoryManager :: APPLICATION_NAME) . 'repository.js');\r\n\r\n $this->display_footer();\r\n }", "function simplenews_subscription_filter_form() {\n // Current filter selections in $session var; stored at form submission\n // Example: array('list' => 'all', 'email' => 'hotmail')\n $session = isset($_SESSION['simplenews_subscriptions_filter']) ? $_SESSION['simplenews_subscriptions_filter'] : '';\n $session = is_array($session) ? $session : _simplenews_subscription_filter_default();\n $filters = simplenews_subscription_filters();\n\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Show only subscription which'),\n '#collapsible' => FALSE,\n );\n\n // Filter values are default\n $form['filters']['list'] = array(\n '#type' => 'select',\n '#title' => $filters['list']['title'],\n '#options' => $filters['list']['options'],\n '#default_value' => $session['list'],\n );\n $form['filters']['email'] = array(\n '#type' => 'textfield',\n '#title' => $filters['email']['title'],\n '#default_value' => $session['email'],\n );\n $form['filters']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Filter'),\n '#prefix' => '<span class=\"spacer\" />',\n );\n // Add Reset button if filter is in use\n if ($session != _simplenews_subscription_filter_default()) {\n $form['filters']['reset'] = array(\n '#type' => 'submit',\n '#value' => t('Reset'),\n );\n }\n\n return $form;\n}", "public function indexAction()\n {\n $paginator = $this->get('knp_paginator');\n $request = $this->getRequest();\n $session = $request->getSession();\n $qb = $this->getDoctrine()->getManager()\n ->getRepository('BlogBundle:Link')->getQueryBuilderForFilter();\n $query = $qb->getQuery();\n $filterForm = $this->createForm(new LinkFilterType(), new LinkFilterModel($request));\n $formHandler = new LinkFilterHandler($filterForm, $request, $qb);\n\n if ($request->getMethod() == 'POST' && $request->get('filter_action') == 'reset') {\n $session->remove('LinkControllerFilter');\n }\n\n if ($request->getMethod() == 'POST' && $request->get('filter_action') == 'filter') {\n if ($formHandler->process()) {\n $query = $formHandler->getQuery();\n $session->set('LinkControllerFilter', $request);\n }\n }\n\n if ($request->getMethod() == 'GET') {\n if ($session->has('LinkControllerFilter')) {\n $filterForm = $this->createForm(new LinkFilterType(), new LinkFilterModel($session->get('LinkControllerFilter')));\n $formHandler = new LinkFilterHandler($filterForm, $session->get('LinkControllerFilter'), $qb);\n if ($formHandler->process()) {\n $query = $formHandler->getQuery();\n }\n }\n }\n $filterForm = $formHandler->getFilter();\n\n $pagination = $paginator->paginate(\n $query, $request->get('page', 1), 12\n );\n\n return array(\n 'pagination' => $pagination,\n 'filterForm' => $filterForm->createView(),\n );\n }", "public function goToIndex()\n\t{\n\t\theader('Location:'.$this->getDomainName().'sChat/index.php');\n\t}", "function request_action() {\r\n //skip this function for AJAX\r\n if ( defined( 'DOING_AJAX' ) )\r\n return '';\r\n\r\n //hide dashbord/backend - redirect Client and Staff to my-hub page\r\n if ( ( current_user_can( 'wpc_client' ) || current_user_can( 'wpc_client_staff' ) ) && !current_user_can( 'manage_network_options' ) ) {\r\n $wpc_settings = get_option( 'wpc_settings' );\r\n //hide dashbord/backend\r\n if ( isset( $wpc_settings['hide_dashboard'] ) && 'yes' == $wpc_settings['hide_dashboard'] ) {\r\n wp_redirect( wpc_client_get_slug( 'hub_page_id' ) );\r\n exit();\r\n }\r\n }\r\n\r\n //check admin capability and add if admin haven't\r\n if ( current_user_can( 'manage_options' ) && !current_user_can( 'manage_network_options' ) && !current_user_can( 'edit_clientpages' ) ) {\r\n global $wp_roles;\r\n\r\n $capability_map = array(\r\n 'read_clientpages' => 'View Portal Page.',\r\n 'publish_clientpages' => 'Add Portal Page.',\r\n 'edit_clientpages' => 'Edit Portal Pages.',\r\n 'edit_published_clientpages' => 'Edit Portal Pages.',\r\n 'delete_published_clientpages' => 'Delete Portal Pages.',\r\n 'edit_others_clientpages' => 'Edit others Client Pages.',\r\n 'delete_others_clientpages' => 'Delete others Portal Pages.',\r\n );\r\n\r\n //set capability for Portal Pages to Admin\r\n foreach ( array_keys( $capability_map ) as $capability ) {\r\n $wp_roles->add_cap( 'administrator', $capability );\r\n }\r\n }\r\n\r\n //Uninstall plugin - delete all plugin data\r\n if ( !defined( 'DOING_AJAX' ) && isset( $_GET['action'] ) && 'wpclient_uninstall' == $_GET['action'] ) {\r\n define( 'WP_UNINSTALL_PLUGIN', '1' );\r\n\r\n //deactivate the plugin\r\n $plugins = get_option( 'active_plugins' );\r\n if ( is_array( $plugins ) && 0 < count( $plugins ) ) {\r\n $new_plugins = array();\r\n foreach( $plugins as $plugin )\r\n if ( 'wp-client-client-portals-file-upload-invoices-billing/wp-client-lite.php' != $plugin )\r\n $new_plugins[] = $plugin;\r\n }\r\n update_option( 'active_plugins', $new_plugins );\r\n\r\n delete_option( 'wpc_run_activated_functions' );\r\n //uninstall\r\n include 'wp-client-uninstall.php';\r\n\r\n wp_redirect( get_admin_url() . 'plugins.php' );\r\n exit;\r\n }\r\n\r\n //private actions of the plugin\r\n if ( isset( $_REQUEST['wpc_action'] ) && ( current_user_can( 'manage_options' ) || current_user_can( 'wpc_manager' ) || current_user_can( 'manage_network_options' ) ) ) {\r\n switch( $_REQUEST['wpc_action'] ) {\r\n //action for create new Client Circle\r\n case 'create_group':\r\n $args = array(\r\n 'group_id' => '0',\r\n 'group_name' => ( isset( $_REQUEST['group_name'] ) ) ? $_REQUEST['group_name'] : '',\r\n 'auto_select' => ( isset( $_REQUEST['auto_select'] ) ) ? '1' : '0',\r\n 'auto_add_clients' => ( isset( $_REQUEST['auto_add_clients'] ) ) ? '1' : '0',\r\n 'assign_all' => ( isset( $_REQUEST['assign_all'] ) ) ? '1' : '0',\r\n );\r\n $this->create_group( $args );\r\n break;\r\n\r\n //action for edit Client Circle\r\n case 'edit_group':\r\n $args = array(\r\n 'group_id' => ( isset( $_REQUEST['group_id'] ) && 0 < $_REQUEST['group_id'] ) ? $_REQUEST['group_id'] : '0',\r\n 'group_name' => ( isset( $_REQUEST['group_name'] ) ) ? $_REQUEST['group_name'] : '',\r\n 'auto_select' => ( isset( $_REQUEST['auto_select'] ) ) ? '1' : '0',\r\n 'auto_add_clients' => ( isset( $_REQUEST['auto_add_clients'] ) ) ? '1' : '0',\r\n 'assign_all' => '0',\r\n );\r\n $this->create_group( $args );\r\n break;\r\n\r\n //action for delete Client Circle\r\n case 'delete_group':\r\n $this->delete_group( $_REQUEST['group_id'] );\r\n break;\r\n\r\n //action for assign clients to Client Circle\r\n case 'save_group_clients':\r\n $this->assign_clients_group();\r\n break;\r\n }\r\n }\r\n\r\n }", "public function execute ($filterChain)\n {\n if ($this->isFirstCall() && !sfConfig::get('app_disable_sslfilter'))\n {\n // get the cool stuff\n $context = $this->getContext();\n $request = $context->getRequest();\n\n // only redirect if not posting and we actually have an http(s) request\n if ($request->getMethod() != sfRequest::POST && substr($request->getUri(), 0, 4) == 'http')\n {\n $controller = $context->getController();\n\n // get the current action instance\n $actionEntry = $controller->getActionStack()->getLastEntry();\n $actionInstance = $actionEntry->getActionInstance();\n\n // request is SSL secured\n if ($request->isSecure())\n {\n // but SSL is not allowed\n if (!$actionInstance->sslAllowed() && $this->redirectToHttp())\n {\n $controller->redirect($actionInstance->getNonSslUrl());\n exit();\n }\n }\n // request is not SSL secured, but SSL is required\n elseif ($actionInstance->sslRequired() && $this->redirectToHttps())\n {\n $controller->redirect($actionInstance->getSslUrl());\n exit();\n }\n }\n }\n\n $filterChain->execute();\n }", "public function ZapShowChannels($actionId);", "public function callbackAction()\n {\n // set needed request method parameter\n if ($this->_request->isPost()) {\n $_SERVER['REQUEST_METHOD'] = 'post';\n } else {\n $_SERVER['REQUEST_METHOD'] = 'get';\n }\n\n // disable rendering\n $this->_helper->viewRenderer->setNoRender();\n\n // disable layout for Ajax requests\n $this->_helper->layout()->disableLayout();\n\n // get the subscription storage\n $subscriptionStorage = new PubSubHubbub_Subscription(\n $this->_subscriptionModelInstance,\n $this->_privateConfig->get('subscriptions')\n );\n\n //get the Callback instance and hond over the storage\n $callback = new PubSubHubbub_Subscriber_Callback;\n $callback->setStorage($subscriptionStorage);\n\n // handle request and immediatly send response, to avoid blocking the hub\n $callback->handle($this->_request->getParams(), true);\n\n // ######## Feed Update Handling ########\n // if hub sends you a couple of feed updates\n if (true === $callback->hasFeedUpdate()) {\n //get filepath for the feed update files\n $filePath = $this->_owApp->erfurt->getTmpDir() .\n \"pubsub_\" .\n $this->_request->getParam('xhub_subscription') .\n \"_\" .\n time() .\n \".xml\";\n\n // if filepath is not writable\n if ( false === ( $fh = fopen($filePath, 'w') ) ) {\n // can't open the file\n $m = \"No write permissions for \". $filePath;\n throw new CubeViz_Exception($m);\n }\n\n // write the hole feed update to the file\n fwrite($fh, $callback->getFeedUpdate() . \"\\n\");\n // set file mode\n chmod($filePath, 0755);\n // clsoe file\n fclose($fh);\n\n // collect all subscripton properties\n $subscriptionResourceData = $subscriptionStorage->getSubscription(\n $this->_request->getParam('xhub_subscription')\n );\n\n // create erfurt event\n $event = new Erfurt_Event('onFeedUpdate');\n\n // attach some information to the event\n $event->autoInsertFeedUpdates = 'true' == $this->_privateConfig\n ->get('subscriptions')\n ->get('autoInsertFeedUpdates') ? true : false;\n $event->feedUpdateFilePath = $filePath;\n $event->feedUpdates = $callback->getFeedUpdate();\n\n // extract model iri from subscription entry in subscriptions model\n $modelIriProperty = $this->_privateConfig->get('subscriptions')->get('modelIri');\n $modelIri = $subscriptionResourceData['resourceProperties'][$modelIriProperty][0]['uri'];\n $event->modelInstance = new Erfurt_Rdf_Model($modelIri);\n\n // add source resource to the event\n $event->sourceResource = $subscriptionStorage->getSourceResource(\n $this->_request->getParam('xhub_subscription')\n );\n\n // add subscripton properties to the event\n $event->subscriptionResourceProperties = $subscriptionResourceData['resourceProperties'];\n\n // trigger the event\n $event->trigger();\n }\n }", "public function index()\n\t{\t\n\t\tif(!isActiveVoyage())\n\t\t\tredirect('home/no_active_voyage');\n\t\t\n\t\tredirect('surveys');\n\t}", "function track(){\n\n\t\tif($params = $this->getURLParams()) {\n\n\t\t\t//different link versions, for maintaining backwards compatability\n\t\t\tif(isset($params['Version']) && $params['Version'] == \"v2\"){\n\n\t\t\t\tif($decrypted = $this->decryptHash()){\n\n\t\t\t\t\tif($recipient = DataObject::get_one(\"Newsletter_SentRecipient\",\"\\\"Email\\\" = '\".$decrypted['e'].\"' AND \\\"ParentID\\\" = \".$decrypted['nl'])){\n\t\t\t\t\t\t$recipient->recordClick();\n\t\t\t\t\t}\n\t\t\t\t\tif(isset($decrypted['l']) && is_numeric($decrypted['l']) && $link = DataObject::get_by_id('Newsletter_TrackedLink', (int)$decrypted['l'])){\n\t\t\t\t\t\t$link->recordClick();\n\t\t\t\t\t\treturn $this->redirect($link->Original, 301);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}elseif(isset($params['Hash']) && ($hash = Convert::raw2sql($params['Hash']))) {\n\t\t\t\t$link = DataObject::get_one('Newsletter_TrackedLink', \"\\\"Hash\\\" = '$hash'\");\n\t\t\t\tif($link) {\n\t\t\t\t\t// check for them visiting this link before\n\t\t\t\t\t$link->recordClick();\n\t\t\t\t\treturn $this->redirect($link->Original, 301);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn $this->httpError(404);\n\t}", "public function doRedirectAccept() {\n\t\t\theader(\"Location: ../../accept.php?\".http_build_query($_REQUEST));\n\t\t\texit;\n\t\t}", "public function resetFilter()\n {\n if (Session::has('admin_child_filter_name')) Session::forget('admin_child_filter_name');\n\n return Redirect::route('admin.child.index');\n }", "public function handle_redirection()\n {\n }", "public function index_action() {\n \\TPL::output('/pl/be/sns/wx/main');\n exit;\n }", "public function requireFilterSubmit()\n\t{\n\t}", "function run(){\n global $Templates, $USER, $Controller, $ID, $CONFIG;\n /**\n * User input types\n */\n $_REQUEST->setType('action', 'string');\n $_REQUEST->setType('popup', 'string');\n $_REQUEST->setType('filter', 'string');\n\n if(!$this->may($USER, READ)) errorPage(401);\n else {\n if(!in_array($CMPRExtension = $CONFIG->files->compression_format, array('tar', 'gz', 'tgz', 'tbz', 'zip', 'ar', 'deb'))){\n $CONFIG->files->compression_format = $CMPRExtension = 'zip';\n }\n $render = true;\n switch($_REQUEST['action']) { // All users\n case 'download':\n global $PREVENT_CSIZE_HEADER;\n $PREVENT_CSIZE_HEADER = true;\n while(ob_get_level()) echo ob_get_clean();\n require_once \"File/Archive.php\";\n File_Archive::extract(\n $this->path,\n File_Archive::toArchive(\n $this->filename.'.'.$CMPRExtension,\n File_Archive::toOutput()\n )\n );\n die();\n default:\n $this->setContent(\"main\", $this->genHTML());\n break;\n }\n if($render) {\n $t = 'admin';\n if($_REQUEST['popup'])\n $t = 'popup';\n\n $Templates->$t->render();\n }\n }\n }", "protected function filterRestore()\n\t{\n\t\tif ($this->arParams[\"SAVE_IN_SESSION\"] == \"Y\" && !strlen($_REQUEST[\"filter\"]))\n\t\t{\n\t\t\tif (intval($_SESSION[\"spo_filter_id\"]))\n\t\t\t\t$_REQUEST[\"filter_id\"] = $_SESSION[\"spo_filter_id\"];\n\t\t\tif (strlen($_SESSION[\"spo_filter_date_from\"]))\n\t\t\t\t$_REQUEST[\"filter_date_from\"] = $_SESSION[\"spo_filter_date_from\"];\n\t\t\tif (strlen($_SESSION[\"spo_filter_date_to\"]))\n\t\t\t\t$_REQUEST[\"filter_date_to\"] = $_SESSION[\"spo_filter_date_to\"];\n\t\t\tif (strlen($_SESSION[\"spo_filter_status\"]))\n\t\t\t\t$_REQUEST[\"filter_status\"] = $_SESSION[\"spo_filter_status\"];\n\t\t\tif (strlen($_SESSION[\"spo_filter_payed\"]))\n\t\t\t\t$_REQUEST[\"filter_payed\"] = $_SESSION[\"spo_filter_payed\"];\n\t\t\tif (strlen($_SESSION[\"spo_filter_canceled\"]))\n\t\t\t\t$_REQUEST[\"filter_canceled\"] = $_SESSION[\"spo_filter_canceled\"];\n\t\t\tif ($_SESSION[\"spo_filter_history\"] == \"Y\")\n\t\t\t\t$_REQUEST[\"filter_history\"] = \"Y\";\n\t\t}\n\t}", "public function action_index()\n\t{\n\t\t// Forward to message index, it's not like we know much more :P\n\t\t$this->action_messageindex();\n\t}", "function dblog_filter_form_submit($form, &$form_state) {\n $op = $form_state['values']['op'];\n $filters = dblog_filters();\n switch ($op) {\n case t('Filter'):\n foreach ($filters as $name => $filter) {\n if (isset($form_state['values'][$name])) {\n $_SESSION['dblog_overview_filter'][$name] = $form_state['values'][$name];\n }\n }\n break;\n case t('Reset'):\n $_SESSION['dblog_overview_filter'] = array();\n break;\n }\n return 'admin/reports/dblog';\n}", "protected function deckApplyFilters()\n {\n // show card pool after applying filters\n $this->result()\n ->changeRequest('card_pool', 'yes')\n ->setCurrent('Decks_edit');\n }", "public function beforeFilter() { \n\t\t//$this->disable_cache();\n\t\t$this->show_tabs(2);\n\t\t// check module access\n\t\t\n\t}", "protected function processRedirect() {}", "public function actionUpdateChannels()\n {\n $data = self::jsonDecoder();\n // if (Scrapper::isScrapper($data->id, $data->access_hash) !== false){\n return InfoSource::updateTelegramChannels($data->channels);\n // }\n //return InfoSource::findOne(['title' => $data[0]->username]);\n }", "function simplenews_issue_filter_form() {\n // Current filter selections in $session var; stored at form submission\n // Example: array('newsletter' => 'all')\n $session = isset($_SESSION['simplenews_issue_filter']) ? $_SESSION['simplenews_issue_filter'] : _simplenews_issue_filter_default();\n $filters = simplenews_issue_filters();\n\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Show only newsletters which'),\n );\n\n // Filter values are default\n $form['filters']['newsletter'] = array(\n '#type' => 'select',\n '#title' => $filters['newsletter']['title'],\n '#options' => $filters['newsletter']['options'],\n '#default_value' => $session['newsletter'],\n );\n $form['filters']['buttons']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Filter'),\n '#prefix' => '<span class=\"spacer\" />',\n );\n // Add Reset button if filter is in use\n if ($session != _simplenews_issue_filter_default()) {\n $form['filters']['buttons']['reset'] = array(\n '#type' => 'submit',\n '#value' => t('Reset'),\n );\n }\n\n return $form;\n}", "function Filter($filter,$data)\n{\n \tglobal\t$FILTERS;\n\n\t\t//\n\t\t// get the program name from the filter name\n\t\t//\n\tif (!isset($FILTERS[$filter]) || $FILTERS[$filter] == \"\")\n\t{\n \t\tError(\"bad_filter\",\"The form has an internal error - unknown filter\");\n\t\texit;\n\t}\n\t$prog = $FILTERS[$filter];\n\t\t//\n\t\t// change to the directory that contains the filter program\n\t\t//\n\t$dirname = dirname($prog);\n\tif (!chdir($dirname))\n\t{\n \t\tError(\"chdir_filter\",\"The form has an internal error - cannot chdir to run filter\");\n\t\texit;\n\t}\n\t\t//\n\t\t// the output of the filter goes to a temporary file\n\t\t//\n\t$temp_file = tempnam(\"/tmp\",\"FMF\");\n\t$cmd = \"$prog > $temp_file 2>&1\";\n\t\t//\n\t\t// start the filter\n\t\t//\n\t$pipe = popen($cmd,\"w\");\n\tif (!$pipe)\n\t{\n\t $err = join('',file($temp_file));\n\t unlink($temp_file);\n \t\tError(\"filter_not_found\",\"The form has an internal error - cannot execute filter\",\n\t\t\t\t\t\ttrue,$err);\n\t\texit;\n\t}\n\t\t//\n\t\t// write the data to the filter\n\t\t//\n\tfwrite($pipe,$data);\n\tif (pclose($pipe) != 0)\n\t{\n\t $err = join('',file($temp_file));\n\t unlink($temp_file);\n \t\tError(\"filter_failed\",\"The form has an internal error - filter failed\",\n\t\t\t\t\t\ttrue,$err);\n\t\texit;\n\t}\n\t\t//\n\t\t// read in the filter's output and return as the data to be sent\n\t\t//\n\t$data = join('',file($temp_file));\n\tunlink($temp_file);\n\treturn ($data);\n}", "function displayFilterMenu($filterCrieria) {\n $sessionOptions = pullUniqueValues(\"mtn_application\", \"ap_session\");\n $statusOptions = pullUniqueValues(\"mtn_application\", \"ap_status\");\n $lastNameOptions = pullUniqueValues(\"mtn_application\", \"ap_lastname\");\n\n echo \"\\n\\n<p style='margin-bottom: 1cm;'>&nbsp;</p>\\n\";\n echo \"<form method='post' name='filterSelection'>\\n\\n\";\n\n displaySelectionMenu(\"Filter by Session:\", \"filterSession\", $sessionOptions, $filterCrieria['ap_session']);\n displaySelectionMenu(\"Filter by Status:\", \"filterStatus\", $statusOptions, $filterCrieria['ap_status']);\n displaySelectionMenu(\"Filter by Last Name:\", \"filterLastName\", $lastNameOptions, $filterCrieria['ap_lastname']);\n\n echo \"<input type='submit' name='filter_button' value='Filter'>\\n\";\n echo \"</form>\\n\\n\";\n}", "public function beforeFilter() { \n\t\t//$this->disable_cache();\n\t\t$this->show_tabs(105);\n\t\t// check module access\n\t\t\n\t}", "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t\r\n\t\t$perpage = $this->perpage;\r\n\t\tlist($total, $notices) = Gou_Service_Notice::getList($page, $perpage);\r\n\t\t$this->assign('notices', $notices);\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'] . '/?'));\r\n\t\t$this->assign('channels', $this->channels);\r\n\t}", "public function filter()\n\t{\n\t\treturn $this->redirect() ? : null;\n\t}", "public function distribution() {\n if (isset($_POST[\"filter\"])) {\n $this->admin_filter();\n }\n if (isset($_POST[\"add\"])) {\n $this->add_media();\n }\n if (isset($_POST[\"delete\"])) {\n $this->delete_media();\n }\n if (isset($_POST[\"modify\"])) {\n $this->modify_media();\n }\n }", "public function index()\n {\n if($this->session->groep === 'Dispatcher' AND $this->session->status === 'Actief')\n {\n redirect('Members');\n }\n else\n {\n\t\t\tredirect('Restricted');\n }\n }", "public function before_filter(){\n\t\t$config = Config::read(\"config.ini\");\n\t\t$active_app = Kumbia::$active_app;\n\t\tif(!$config->$active_app->interactive){\n\t\t\t$this->redirect(\"\");\n\t\t\treturn false;\n\t\t}\n\t}", "function actions_filters()\n\t\t{\n\t\t\tif(is_admin()){\n\t\t\t\tadd_action('admin_menu', array(&$this,'admin_menu_link'));\n\t\t\t\tadd_action('admin_head', array(&$this, 'admin_head'));\n\t\t\t}\n\t\t\telse\n\t\t\t\tadd_action('wp_head', array(&$this,'wp_head'));\n\t\t}", "public function execute($filterChain) {\n if ($this->isFirstCall()) {\n $this->getContext()->getResponse()->setHttpHeader(\"P3P\", 'CP=\"DSP LAW\"', true);\n }\n // execute next filter\n $filterChain->execute();\n }", "public function addAction() {\r\n\t\t$this->assign('channels', $this->channels);\r\n\t}", "public function _report_filters_ui()\n\t{\n\t\t$filter = View::factory('actionable_filter');\n\t\t$filter->render(TRUE);\n\t}", "public function handleStoreFilters($filters)\r\n {\r\n $session = $this->session->getSection('map');\r\n $session->filters = $filters;\r\n \r\n $this->terminate();\r\n }", "protected function filter()\n {\n $request = $this->getRequest();\n $session = $request->getSession();\n $filterForm = $this->createForm(new ChoferFilterType());\n $em = $this->getDoctrine()->getManager();\n $queryBuilder = $em->getRepository('ChoferesBundle:Chofer')\n ->createQueryBuilder('e')\n ->andWhere('e.estaActivo = TRUE');\n\n // Reset filter\n $session->remove('ChoferControllerFilter');\n\n\n // Filter action\n if ($request->get('filter_action') == 'filter') {\n // Bind values from the request\n $filterForm->bind($request);\n\n if ($filterForm->isValid()) {\n // Build the query from the given form object\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n // Save filter to session\n $filterData = $filterForm->getData();\n $session->set('ChoferControllerFilter', $filterData);\n }\n } else {\n // Get filter from session\n if ($session->has('ChoferControllerFilter')) {\n $filterData = $session->get('ChoferControllerFilter');\n $filterForm = $this->createForm(new ChoferFilterType(), $filterData);\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n }\n }\n\n return array($filterForm, $queryBuilder);\n }", "protected function filterStore()\n\t{\n\t\tif ($this->arParams[\"SAVE_IN_SESSION\"] == \"Y\" && strlen($_REQUEST[\"filter\"]))\n\t\t{\n\t\t\t$_SESSION[\"spo_filter_id\"] = $_REQUEST[\"filter_id\"];\n\t\t\t$_SESSION[\"spo_filter_date_from\"] = $_REQUEST[\"filter_date_from\"];\n\t\t\t$_SESSION[\"spo_filter_date_to\"] = $_REQUEST[\"filter_date_to\"];\n\t\t\t$_SESSION[\"spo_filter_status\"] = $_REQUEST[\"filter_status\"];\n\t\t\t$_SESSION[\"spo_filter_payed\"] = $_REQUEST[\"filter_payed\"];\n\t\t\t$_SESSION[\"spo_filter_history\"] = $_REQUEST[\"filter_history\"];\n\t\t}\n\t}", "public function showStoredArticles()\n {\n //check if the user is logged and user permission\n if (UserManager::isUserLogged()) {\n if (UserManager::getPermission($_SESSION['email']) == ADMIN) {\n $navbar = 'admin';\n } else if (UserManager::getPermission($_SESSION['email']) == OPERATORE) {\n $navbar = 'operator';\n } else if (UserManager::getPermission($_SESSION['email']) == BASE) {\n $navbar = 'base';\n } else if (UserManager::getPermission($_SESSION['email']) == FORNITORE) {\n $navbar = 'supplier';\n } else {\n header('Location: ' . URL . 'home');\n exit;\n }\n\n $filters = array();\n $filters['text'] = '%';\n $filters['category'] = '%';\n\n //text filter\n if (isset($_POST['text_filter']) && !empty($_POST['text_filter'])) {\n $_SESSION['text_filter'] = Validator::testInput($_POST['text_filter']);\n } else {\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $_SESSION['text_filter'] = '';\n }\n }\n (isset($_SESSION['text_filter'])) ? $filters['text'] = '%' . $_SESSION['text_filter'] . '%' : null;\n\n //category filter\n if (isset($_POST['category_filter']) && !empty($_POST['category_filter'])) {\n $_SESSION['category_filter'] = Validator::testInput($_POST['category_filter']);\n } else {\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $_SESSION['category_filter'] = '';\n }\n }\n (isset($_SESSION['category_filter'])) ? $filters['category'] = $_SESSION['category_filter'] : null;\n\n //expire date filter\n (isset($_POST['expire_date_filter']) && !empty($_POST['expire_date_filter'])) ? $filters['expire_date'] = date_format(date_create(Validator::testInput($_POST['expire_date_filter'])), 'Y-m-d') : null;\n\n //available date filter\n (isset($_POST['available_date_filter']) && !empty($_POST['available_date_filter'])) ? $filters['available_date'] = date_format(date_create(Validator::testInput($_POST['available_date_filter'])), 'Y-m-d') : null;\n\n //check offset and limit variables\n if (isset($_GET['page'])) {\n $page = intval(Validator::testInput($_GET['page']));\n\n if ($page < DEFAULT_PAGE) {\n $page = DEFAULT_PAGE;\n }\n } else {\n $page = DEFAULT_PAGE;\n }\n $limit = DEFAULT_ARTICLE_LIMIT;\n\n //calculate number of pages\n $number_pages = ceil(ArticleManager::getStoredArticlesNumber($filters) / $limit);\n if ($number_pages < $page) {\n $page = DEFAULT_PAGE;\n }\n\n $categories = CategoryManager::getCategoriesList();\n $stored_articles = ArticleManager::getStoredArticlesList(($page - 1) * $limit, $limit, $filters);\n\n require_once __DIR__ . '/../views/global/head.php';\n require_once __DIR__ . '/../views/global/navbar_' . $navbar . '.php';\n require_once __DIR__ . '/../views/catalog/catalog.php';\n\n //show success message\n if (MessageManager::getSuccessMsg()) {\n echo \"<script>$.notify('\" . MessageManager::getSuccessMsg() . \"', 'success');</script>\";\n MessageManager::unsetSuccessMsg();\n }\n\n //show error message\n if (MessageManager::getErrorMsg()) {\n echo \"<script>$.notify('\" . MessageManager::getErrorMsg() . \"', 'error');</script>\";\n MessageManager::unsetErrorMsg();\n }\n exit;\n\n }\n header('Location: ' . URL . 'home');\n }", "function beforeFilter() {\n\t\tparent::beforeFilter();\n\t\t$this->Auth->allowedActions = array('view','index','ajax_view');\n\t\t$libraryCheckArr = array(\"view\",\"index\");\n\t\tif(in_array($this->action,$libraryCheckArr)) {\n\t\t $validPatron = $this->ValidatePatron->validatepatron();\n\t\t\tif($validPatron == '0') {\n\t\t\t\t//$this->Session->destroy();\n\t\t\t\t//$this -> Session -> setFlash(\"Sorry! Your session has expired. Please log back in again if you would like to continue using the site.\");\n\t\t\t\t$this->redirect(array('controller' => 'homes', 'action' => 'aboutus'));\n\t\t\t}\n\t\t\telse if($validPatron == '2') {\n\t\t\t\t//$this->Session->destroy();\n\t\t\t\t$this -> Session -> setFlash(\"Sorry! Your Library or Patron information is missing. Please log back in again if you would like to continue using the site.\");\n\t\t\t\t$this->redirect(array('controller' => 'homes', 'action' => 'aboutus'));\n\t\t\t}\n\t\t}\n\t}", "public function processRequest() {\n $action = \"\";\n //retrieve action from client.\n if (filter_has_var(INPUT_GET, 'action')) {\n $action = filter_input(INPUT_GET, 'action');\n }\n\n switch ($action) {\n case 'login':\n $this->login(); \n break;\n case 'register':\n $this->register(); //list all articles\n break;\n case 'search':\n $this->search(); //show a form for an article\n break;\n case 'searchList':\n $this->searchList();\n break;\n case 'remove':\n $this->removeArticle();\n break;\n case 'modify':\n $this->modifyArticle();\n break;\n case 'listCategoryForm':\n $this->listCategoryForm();\n break;\n case 'listCategory':\n $this->listCategory();\n break;\n default :\n break;\n }\n }", "public function category_filter( $which ) {\n\t\tif ( $this->is_trashed_page() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$dropdown_args = [\n\t\t\t'taxonomy' => 'rank_math_redirection_category',\n\t\t\t'show_option_all' => false,\n\t\t\t'show_option_none' => __( 'Select Category', 'rank-math-pro' ),\n\t\t\t'option_none_value' => 'none',\n\t\t\t'echo' => false,\n\t\t\t'hierarchical' => true,\n\t\t\t'name' => 'redirection_category_filter_' . $which,\n\t\t\t'id' => 'redirection-category-filter-' . $which,\n\t\t\t'selected' => Param::get( 'redirection_category', '' ),\n\t\t\t'class' => 'redirection-category-filter',\n\t\t\t'hide_empty' => false,\n\t\t];\n\n\t\t$submit_args = [\n\t\t\t__( 'Filter', 'rank-math-pro' ), // text.\n\t\t\t'secondary category-filter-submit', // type.\n\t\t\t'rank_math_filter_redirections_' . $which, // name.\n\t\t\tfalse, // wrap.\n\t\t];\n\n\t\t$clear_label = __( 'Clear Filter', 'rank-math-pro' );\n\t\t$clear_url = Helper::get_admin_url( 'redirections' );\n\t\t$clear_classes = 'clear-redirection-category-filter';\n\t\t$clear_classes .= $dropdown_args['selected'] ? '' : ' hidden';\n\t\t$clear_button = '<a href=\"' . $clear_url . '\" class=\"' . esc_attr( $clear_classes ) . '\" title=\"' . esc_attr( $clear_label ) . '\"><span class=\"dashicons dashicons-dismiss\"></span> ' . $clear_label . '</a>';\n\n\t\t$categories = rtrim( wp_dropdown_categories( $dropdown_args ) );\n\t\t$submit_button = call_user_func_array( 'get_submit_button', $submit_args );\n\n\t\techo sprintf( '%1$s%2$s%3$s', $categories, $submit_button, $clear_button );\n\t}", "public function blockIndexAction()\n {\n $this->_forward();\n return false;\n }", "public function handleRequest() {\n\t\t\n\t\tif (is_null($this->itemObj)) {\n\t\t\t$this->itemObj = MovieServices::getVcdByID($this->getParam('vcd_id'));\n\t\t}\n\t\t\n\t\t$action = $this->getParam('action');\n\t\t\n\t\tswitch ($action) {\n\t\t\tcase 'upload':\n\t\t\t\t$this->uploadImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'fetch':\n\t\t\t\t$this->fetchImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\n\t\t\tdefault:\n\t\t\t\tredirect();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function handleMediaFileUpload()\n {\n\n $url = $this->_handleMediaFileUpload();\n $this->redirect(UNL_MediaHub_Manager::getURL().'?view=uploadcomplete&format=barebones&url='.urlencode($url));\n\n }", "function filtering_menus()\n\t{\n\t\tif ( ! $this->cp->allowed_group('can_access_content'))\n\t\t{\n\t\t\tshow_error($this->lang->line('unauthorized_access'));\n\t\t}\n\n\t\t// In order to build our filtering options we need to gather \n\t\t// all the channels, categories and custom statuses\n\n\t\t$channel_array\t= array();\n\t\t$status_array = array();\n\t\t\n\t\t$this->api->instantiate('channel_categories');\n\n\t\t$allowed_channels = $this->functions->fetch_assigned_channels(TRUE);\n\n\t\tif (count($allowed_channels) > 0)\n\t\t{\n\t\t\t// Fetch channel titles\n\t\t\t$this->db->select('channel_title, channel_id, cat_group, status_group, field_group');\n\t\t\t$this->db->where_in('channel_id', $allowed_channels);\n\t\t\t$this->db->where('site_id', $this->config->item('site_id'));\n\t\t\t\n\t\t\t$this->db->order_by('channel_title');\n\t\t\t$query = $this->db->get('channels');\n\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$channel_array[$row['channel_id']] = array(str_replace('\"','',$row['channel_title']), $row['cat_group'], $row['status_group'], $row['field_group']);\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t/** ----------------------------- \n\t\t/** Category Tree\n\t\t/** -----------------------------*/\n\t\t\n\t\t$order = ($this->nest_categories == 'y') ? 'group_id, parent_id, cat_name' : 'cat_name';\n\n\t\t$this->db->select('categories.group_id, categories.parent_id, categories.cat_id, categories.cat_name');\n\t\t$this->db->from('categories');\n\t\t$this->db->where('site_id', $this->config->item('site_id'));\n\t\t$this->db->order_by($order);\n\t\t\n\t\t$query = $this->db->get();\n\n\t\t// Load the text helper\n\t\t$this->load->helper('text');\n\t\t\t\t\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$categories[] = array($row['group_id'], $row['cat_id'], entities_to_ascii($row['cat_name']), $row['parent_id']);\n\t\t\t}\n\n\t\t\tif ($this->nest_categories == 'y')\n\t\t\t{\n\t\t\t\tforeach($categories as $key => $val)\n\t\t\t\t{\n\t\t\t\t\tif (0 == $val['3']) \n\t\t\t\t\t{\n\t\t\t\t\t\t$this->api_channel_categories->cat_array[] = array($val['0'], $val['1'], $val['2']);\n\t\t\t\t\t\t$this->api_channel_categories->category_edit_subtree($val['1'], $categories, $depth=1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->api_channel_categories->cat_array = $categories;\n\t\t\t}\n\t\t} \n\t\t \n\t\t/** ----------------------------- \n\t\t/** Entry Statuses\n\t\t/** -----------------------------*/\n\t\t\n\t\t$this->db->select('group_id, status');\n\t\t$this->db->where('site_id', $this->config->item('site_id'));\t\t\n\t\t$this->db->order_by('status_order');\n\t\t$query = $this->db->get('statuses');\n\t\t\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$status_array[] = array($row['group_id'], $row['status']);\n\t\t\t}\n\t\t}\n\n\t\t$default_cats[] = array('', $this->lang->line('filter_by_category'));\n\t\t$default_cats[] = array('all', $this->lang->line('all'));\n\t\t$default_cats[] = array('none', $this->lang->line('none'));\t\t\n\t\t\n\t\t$dstatuses[] = array('', $this->lang->line('filter_by_status'));\n\t\t$dstatuses[] = array('open', $this->lang->line('open'));\n\t\t$dstatuses[] = array('closed', $this->lang->line('closed'));\n\n\t\t$channel_info['0']['categories'] = $default_cats;\t\t\n\t\t$channel_info['0']['statuses'] = $dstatuses;\n\n\t\tforeach ($channel_array as $key => $val)\n\t\t{\n\t\t\t$any = 0;\n\t\t\t$cats = $default_cats;\n\t\n\t\t\tif (count($this->api_channel_categories->cat_array) > 0)\n\t\t\t{\n\t\t\t\t$last_group = 0;\n\t\t\n\t\t\t\tforeach ($this->api_channel_categories->cat_array as $k => $v)\n\t\t\t\t{\n\t\t\t\t\tif (in_array($v['0'], explode('|', $val['1'])))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($last_group == 0 OR $last_group != $v['0'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$cats[] = array('', '-------');\n\t\t\t\t\t\t\t$last_group = $v['0'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$cats[] = array($v['1'], $v['2']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$channel_info[$key]['categories'] = $cats;\n\t\t\t\n\t\t\t$statuses = array();\n\t\t\t$statuses[] = array('', $this->lang->line('filter_by_status'));\n\n\t\t\tif (count($status_array) > 0)\n\t\t\t{\n\t\t\t\tforeach ($status_array as $k => $v)\n\t\t\t\t{\n\t\t\t\t\tif ($v['0'] == $val['2'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$status_name = ($v['1'] == 'closed' OR $v['1'] == 'open') ? $this->lang->line($v['1']) : $v['1'];\n\t\t\t\t\t\t$statuses[] = array($v['1'], $status_name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$statuses[] = array('open', $this->lang->line('open'));\n\t\t\t\t$statuses[] = array('closed', $this->lang->line('closed'));\n\t\t\t}\n\n\t\t\t$channel_info[$key]['statuses'] = $statuses;\n\t\t}\n\n\t\t$this->javascript->set_global('edit.channelInfo', $channel_info);\n\t}", "function setup()\n\t{\n\t\t// Make sure there are directories\n\t\t$dirs = $this->directories(FALSE, TRUE);\n\t\tif (empty($dirs))\n\t\t{\n\t\t\treturn ee()->output->send_ajax_response(array(\n\t\t\t\t'error' => lang('no_upload_dirs')\n\t\t\t));\n\t\t}\n\n\t\tif (REQ != 'CP')\n\t\t{\n\t\t\tee()->load->helper('form');\n\t\t\t$action_id = '';\n\n\t\t\tee()->db->select('action_id');\n\t\t\tee()->db->where('class', 'Channel');\n\t\t\tee()->db->where('method', 'filemanager_endpoint');\n\t\t\t$query = ee()->db->get('actions');\n\n\t\t\tif ($query->num_rows() > 0)\n\t\t\t{\n\t\t\t\t$row = $query->row();\n\t\t\t\t$action_id = $row->action_id;\n\t\t\t}\n\n\t\t\t$vars['filemanager_backend_url'] = str_replace('&amp;', '&', ee()->functions->fetch_site_index(0, 0).QUERY_MARKER).'ACT='.$action_id;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$vars['filemanager_backend_url'] = ee()->cp->get_safe_refresh();\n\t\t}\n\n\t\tunset($_GET['action']);\t// current url == get_safe_refresh()\n\n\t\t$vars['filemanager_directories'] = $this->directories(FALSE);\n\n\t\t// Generate the filters\n\t\t// $vars['selected_filters'] = form_dropdown('selected', array('all' => lang('all'), 'selected' => lang('selected'), 'unselected' => lang('unselected')), 'all');\n\t\t// $vars['category_filters'] = form_dropdown('category', array());\n\t\t$vars['view_filters'] = form_dropdown(\n\t\t\t'view_type',\n\t\t\tarray(\n\t\t\t\t'list' => lang('list'),\n\t\t\t\t'thumb' => lang('thumbnails')\n\t\t\t),\n\t\t\t'list', 'id=\"view_type\"'\n\t\t);\n\n\t\t$data = $this->datatables(key($vars['filemanager_directories']));\n\t\t$vars = array_merge($vars, $data);\n\n\t\t$filebrowser_html = ee()->load->ee_view('_shared/file/browser', $vars, TRUE);\n\n\t\tee()->output->send_ajax_response(array(\n\t\t\t'manager'\t\t=> str_replace(array(\"\\n\", \"\\t\"), '', $filebrowser_html),\t// reduces transfer size\n\t\t\t'directories'\t=> $vars['filemanager_directories']\n\t\t));\n\t}", "function Process()\n\t{\n\t\t$GLOBALS['Message'] = '';\n\n\t\t$action = (isset($_GET['Action'])) ? strtolower(urldecode($_GET['Action'])) : null;\n\t\t$user = &GetUser();\n\n\t\t$check_access = $action;\n\t\t$secondary_actions = array('activate', 'deactivate', 'activatearchive', 'deactivatearchive');\n\t\tif (in_array($check_access, $secondary_actions)) {\n\t\t\t$check_access = 'approve';\n\t\t}\n\n\t\t// with 'change' actions, each separate action is checked further on, so we'll just check they can manage anything in this area.\n\t\tif (in_array($action, array('change', 'checkspam', 'viewcompatibility', 'processpaging', 'sendpreview', 'preview'))) {\n\t\t\t$check_access = 'manage';\n\t\t}\n\n\t\t$access = $user->HasAccess('newsletters', $check_access);\n\n\n\t\t$popup = (in_array($action, $this->PopupWindows)) ? true : false;\n\t\tif (!in_array($action, $this->SuppressHeaderFooter)) {\n\t\t\t$this->PrintHeader($popup);\n\t\t}\n\n\t\tif (!$access) {\n\t\t\tif (!$popup) {\n\t\t\t\t$this->DenyAccess();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\n\t\t/**\n\t\t * Check user permissions to determine if the user can access this newsletter\n\t\t */\n\t\t\t$tempAPI = null;\n\t\t\t$tempCheckActions = array('change', 'checkspam', 'viewcompatibility', 'processpaging', 'sendpreview', 'view', 'preview', 'edit', 'send', 'delete', 'copy', 'update');\n\t\t\t$tempID = null;\n\n\t\t\tif (isset($_GET['id'])) {\n\t\t\t\t$tempID = $_GET['id'];\n\t\t\t} elseif(isset($_POST['newsletters'])) {\n\t\t\t\t$tempID = $_POST['newsletters'];\n\t\t\t}\n\n\t\t\tif (!is_null($tempID)) {\n\t\t\t\t$_GET['id'] = $tempID;\n\t\t\t\t$_POST['newsletters'] = $tempID;\n\n\t\t\t\tif (!$user->Admin() && in_array($action, $tempCheckActions)) {\n\t\t\t\t\tif (!is_array($tempID)) {\n\t\t\t\t\t\t$tempID = array($tempID);\n\t\t\t\t\t}\n\n\t\t\t\t\t$tempAPI = $this->GetApi();\n\n\t\t\t\t\tforeach ($tempID as $tempEachID) {\n\t\t\t\t\t\t$tempEachID = intval($tempEachID);\n\t\t\t\t\t\tif ($tempEachID == 0) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!$tempAPI->Load($tempEachID)) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($tempAPI->ownerid != $user->userid) {\n\t\t\t\t\t\t\t$this->DenyAccess();\n\t\t\t\t\t\t\treturn;\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\tunset($tempID);\n\t\t\tunset($tempCheckActions);\n\t\t\tunset($tempAPI);\n\t\t/**\n\t\t * -----\n\t\t */\n\n\t\tif ($action == 'processpaging') {\n\t\t\t$this->SetPerPage($_GET['PerPageDisplay']);\n\t\t\t$action = '';\n\t\t}\n\n\t\tswitch ($action) {\n\t\t\tcase 'viewcompatibility':\n\t\t\t\t$newsletter_info = IEM::sessionGet('Newsletters');\n\n\t\t\t\t$html = (isset($_POST['myDevEditControl_html'])) ? $_POST['myDevEditControl_html'] : false;\n\t\t\t\t$text = (isset($_POST['TextContent'])) ? $_POST['TextContent'] : false;\n\t\t\t\t$showBroken = isset($_REQUEST['ShowBroken']) && $_REQUEST['ShowBroken'] == 1;\n\t\t\t\t$details = array();\n\t\t\t\t$details['htmlcontent'] = $html;\n\t\t\t\t$details['textcontent'] = $text;\n\t\t\t\t$details['format'] = $newsletter_info['Format'];\n\n\t\t\t\t$this->PreviewWindow($details, $showBroken);\n\t\t\t\texit;\n\t\t\tbreak;\n\n\t\t\tcase 'checkspamdisplay':\n\t\t\t\t$force = IEM::ifsetor($_GET['Force'], false);\n\t\t\t\t$this->CheckContentForSpamDisplay($force);\n\t\t\tbreak;\n\n\t\t\tcase 'checkspam':\n\t\t\t\t$text = (isset($_POST['TextContent'])) ? $_POST['TextContent'] : false;\n\t\t\t\t$html = (isset($_POST['myDevEditControl_html'])) ? $_POST['myDevEditControl_html'] : false;\n\t\t\t\t$this->CheckContentForSpam($text, $html);\n\t\t\tbreak;\n\n\t\t\tcase 'activate':\n\t\t\tcase 'deactivate':\n\t\t\tcase 'activatearchive':\n\t\t\tcase 'deactivatearchive':\n\t\t\t\t$id = (int)$_GET['id'];\n\t\t\t\t$newsletterapi = $this->GetApi();\n\t\t\t\t$newsletterapi->Load($id);\n\n\t\t\t\t$message = '';\n\n\t\t\t\tif ($user->HasAccess('newsletters', 'approve')) {\n\t\t\t\t\tswitch ($action) {\n\t\t\t\t\t\tcase 'activatearchive':\n\t\t\t\t\t\t\t$newsletterapi->Set('archive', 1);\n\t\t\t\t\t\t\tif (!$newsletterapi->Active()) {\n\t\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('NewsletterCannotBeInactiveAndArchive');\n\t\t\t\t\t\t\t\t$message .= $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$message .= $this->PrintSuccess('NewsletterArchive_ActivatedSuccessfully');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'deactivatearchive':\n\t\t\t\t\t\t\t$newsletterapi->Set('archive', 0);\n\t\t\t\t\t\t\t$message .= $this->PrintWarning('NewsletterArchive_DeactivatedWarning');\n\t\t\t\t\t\t\t$message .= $this->PrintSuccess('NewsletterArchive_DeactivatedSuccessfully');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'activate':\n\t\t\t\t\t\t\t$allow_attachments = $this->CheckForAttachments($id, 'newsletters');\n\t\t\t\t\t\t\tif ($allow_attachments) {\n\t\t\t\t\t\t\t\t$newsletterapi->Set('active', $user->Get('userid'));\n\t\t\t\t\t\t\t\t$message .= $this->PrintSuccess('NewsletterActivatedSuccessfully');\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('NewsletterActivateFailed_HasAttachments');\n\t\t\t\t\t\t\t\t$message .= $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$newsletterapi->Set('active', 0);\n\t\t\t\t\t\t\tif ($newsletterapi->Archive()) {\n\t\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('NewsletterCannotBeInactiveAndArchive');\n\t\t\t\t\t\t\t\t$message .= $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$message .= $this->PrintSuccess('NewsletterDeactivatedSuccessfully');\n\t\t\t\t\t\t}\n\t\t\t\t\t$newsletterapi->Save();\n\n\t\t\t\t\t$GLOBALS['Message'] = $message;\n\t\t\t\t}\n\t\t\t\t$this->ManageNewsletters();\n\t\t\tbreak;\n\n\t\t\tcase 'sendpreviewdisplay':\n\t\t\t\t$this->SendPreviewDisplay();\n\t\t\tbreak;\n\n\t\t\tcase 'sendpreview':\n\t\t\t\t$this->SendPreview();\n\t\t\tbreak;\n\n\t\t\tcase 'delete':\n\t\t\t\t$id = (isset($_GET['id'])) ? (int)$_GET['id'] : 0;\n\t\t\t\t$newsletters = array($id);\n\t\t\t\t$this->DeleteNewsletters($newsletters);\n\t\t\tbreak;\n\n\t\t\tcase 'view':\n\t\t\t\t$id = (isset($_GET['id'])) ? (int)$_GET['id'] : 0;\n\t\t\t\t$type = strtolower(get_class($this));\n\t\t\t\t$newsletter = $this->GetApi();\n\t\t\t\tif (!$newsletter->Load($id)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Log this to \"User Activity Log\"\n\t\t\t\t$logURL = SENDSTUDIO_APPLICATION_URL . '/admin/index.php?Page=' . __CLASS__ . '&Action=Edit&id=' . $_GET['id'];\n\t\t\t\tIEM::logUserActivity($logURL, 'images/newsletters_view.gif', $newsletter->name);\n\n\t\t\t\t$details = array();\n\t\t\t\t$details['htmlcontent'] = $newsletter->GetBody('HTML');\n\t\t\t\t$details['textcontent'] = $newsletter->GetBody('Text');\n\t\t\t\t$details['format'] = $newsletter->format;\n\n\t\t\t\t$this->PreviewWindow($details);\n\t\t\t\texit;\n\t\t\tbreak;\n\n\t\t\tcase 'preview':\n\t\t\t\t$id = $this->_getGETRequest('id', 0);\n\t\t\t\t$type = strtolower(get_class($this));\n\t\t\t\t$newsletter = $this->GetApi();\n\t\t\t\tif (!$newsletter->Load($id)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$details = array();\n\t\t\t\t$details['htmlcontent'] = $newsletter->GetBody('HTML');\n\t\t\t\t$details['textcontent'] = $newsletter->GetBody('Text');\n\t\t\t\t$details['format'] = $newsletter->format;\n\n\t\t\t\t$this->PreviewWindow($details, false, $id);\n\t\t\t\texit;\n\t\t\tbreak;\n\n\t\t\tcase 'copy':\n\t\t\t\t$id = (isset($_GET['id'])) ? (int)$_GET['id'] : 0;\n\t\t\t\t$api = $this->GetApi();\n\t\t\t\tlist($newsletter_result, $files_copied) = $api->Copy($id);\n\t\t\t\tif (!$newsletter_result) {\n\t\t\t\t\t$GLOBALS['Error'] = GetLang('NewsletterCopyFail');\n\t\t\t\t\t$GLOBALS['Message'] = $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t} else {\n\t\t\t\t\t$changed = false;\n\t\t\t\t\t// check the permissions.\n\t\t\t\t\t// if we can't make archive a newsletter, disable this aspect of it.\n\t\t\t\t\tif (!$user->HasAccess('Newsletters', 'Approve')) {\n\t\t\t\t\t\t$changed = true;\n\t\t\t\t\t\t$api->Set('archive', 0);\n\t\t\t\t\t}\n\n\t\t\t\t\t// if we can't approve newsletters, then make sure we disable it.\n\t\t\t\t\tif (!$user->HasAccess('Newsletters', 'Approve')) {\n\t\t\t\t\t\t$changed = true;\n\t\t\t\t\t\t$api->Set('active', 0);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($changed) {\n\t\t\t\t\t\t$api->Save();\n\t\t\t\t\t}\n\t\t\t\t\t$GLOBALS['Message'] = $this->PrintSuccess('NewsletterCopySuccess');\n\t\t\t\t\tif (!$files_copied) {\n\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('NewsletterFilesCopyFail');\n\t\t\t\t\t\t$GLOBALS['Message'] .= $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->ManageNewsletters();\n\t\t\tbreak;\n\n\t\t\tcase 'edit':\n\t\t\t\t$newsletter = $this->GetApi();\n\n\t\t\t\t$id = (isset($_GET['id'])) ? (int)$_GET['id'] : 0;\n\t\t\t\t$newsletter->Load($id);\n\n\t\t\t\t$subaction = (isset($_GET['SubAction'])) ? strtolower(urldecode($_GET['SubAction'])) : '';\n\t\t\t\tswitch ($subaction) {\n\t\t\t\t\tcase 'step2':\n\t\t\t\t\t\t$editnewsletter = array('id' => $id);\n\n\t\t\t\t\t\t$checkfields = array('Name', 'Format');\n\t\t\t\t\t\t$valid = true; $errors = array();\n\t\t\t\t\t\tforeach ($checkfields as $p => $field) {\n\t\t\t\t\t\t\tif (!isset($_POST[$field])) {\n\t\t\t\t\t\t\t\t$valid = false;\n\t\t\t\t\t\t\t\t$errors[] = GetLang('Newsletter'.$field.'IsNotValid');\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($_POST[$field] == '') {\n\t\t\t\t\t\t\t\t$valid = false;\n\t\t\t\t\t\t\t\t$errors[] = GetLang('Newsletter'.$field.'IsNotValid');\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$value = $_POST[$field];\n\t\t\t\t\t\t\t\t$editnewsletter[$field] = $value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$valid) {\n\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('UnableToUpdateNewsletter') . '<br/>- ' . implode('<br/>- ',$errors);\n\t\t\t\t\t\t\t$GLOBALS['Message'] = $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t$this->EditNewsletter($id);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tIEM::sessionSet('Newsletters', $editnewsletter);\n\t\t\t\t\t\t$this->DisplayEditNewsletter($id);\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'save':\n\t\t\t\t\tcase 'complete':\n\t\t\t\t\t\t$user = IEM::getCurrentUser();\n\t\t\t\t\t\t$session_newsletter = IEM::sessionGet('Newsletters');\n\n\t\t\t\t\t\t$text_unsubscribelink_found = true;\n\t\t\t\t\t\t$html_unsubscribelink_found = true;\n\n\t\t\t\t\t\tif (isset($_POST['TextContent'])) {\n\t\t\t\t\t\t\t$textcontent = $_POST['TextContent'];\n\t\t\t\t\t\t\t$newsletter->SetBody('Text', $textcontent);\n\t\t\t\t\t\t\t$text_unsubscribelink_found = $this->CheckForUnsubscribeLink($textcontent, 'text');\n\t\t\t\t\t\t\t$session_newsletter['contents']['text'] = $textcontent;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isset($_POST['myDevEditControl_html'])) {\n\t\t\t\t\t\t\t$htmlcontent = $_POST['myDevEditControl_html'];\n\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * This is an effort not to overwrite the eixsting HTML contents\n\t\t\t\t\t\t\t * if there isn't any contents in it (DevEdit will have '<html><body></body></html>' as a minimum\n\t\t\t\t\t\t\t * that will be passed to here)\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (trim($htmlcontent) == '') {\n\t\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('UnableToUpdateNewsletter');\n\t\t\t\t\t\t\t\t$GLOBALS['Message'] = $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t\t$this->DisplayEditNewsletter($id);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$newsletter->SetBody('HTML', $htmlcontent);\n\t\t\t\t\t\t\t$html_unsubscribelink_found = $this->CheckForUnsubscribeLink($htmlcontent, 'html');\n\t\t\t\t\t\t\t$session_newsletter['contents']['html'] = $htmlcontent;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isset($_POST['subject'])) {\n\t\t\t\t\t\t\t$newsletter->Set('subject', $_POST['subject']);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tforeach (array('Name', 'Format') as $p => $area) {\n\t\t\t\t\t\t\t$newsletter->Set(strtolower($area), $session_newsletter[$area]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$newsletter->Set('active', 0);\n\t\t\t\t\t\tif ($user->HasAccess('newsletters', 'approve')) {\n\t\t\t\t\t\t\tif (isset($_POST['active'])) {\n\t\t\t\t\t\t\t\t$newsletter->Set('active', $user->Get('userid'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$newsletter->Set('archive', 0);\n\n\t\t\t\t\t\tif (isset($_POST['archive'])) {\n\t\t\t\t\t\t\t$newsletter->Set('archive', 1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$dest = strtolower(get_class($this));\n\t\t\t\t\t\t$movefiles_result = $this->MoveFiles($dest, $id);\n\t\t\t\t\t\tif ($movefiles_result) {\n\t\t\t\t\t\t\tif (isset($textcontent)) {\n\t\t\t\t\t\t\t\t$textcontent = $this->ConvertContent($textcontent, $dest, $id);\n\t\t\t\t\t\t\t\t$newsletter->SetBody('Text', $textcontent);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (isset($htmlcontent)) {\n\t\t\t\t\t\t\t\t$htmlcontent = $this->ConvertContent($htmlcontent, $dest, $id);\n\t\t\t\t\t\t\t\t$newsletter->SetBody('HTML', $htmlcontent);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$result = $newsletter->Save();\n\n\t\t\t\t\t\tif (!$result) {\n\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('UnableToUpdateNewsletter');\n\t\t\t\t\t\t\t$GLOBALS['Message'] = $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t$this->ManageNewsletters();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$newsletter_info = $session_newsletter;\n\t\t\t\t\t\t$newsletter_info['embedimages'] = true;\n\t\t\t\t\t\t$newsletter_info['multipart'] = true;\n\n\t\t\t\t\t\tlist($newsletter_size, $newsletter_img_warnings) = $this->GetSize($newsletter_info);\n\n\t\t\t\t\t\tif (SENDSTUDIO_ALLOW_EMBEDIMAGES) { $size_message = GetLang('Newsletter_Size_Approximate'); }\n\t\t\t\t\t\telse { $size_message = GetLang('Newsletter_Size_Approximate_Noimages'); }\n\t\t\t\t\t\t$GLOBALS['Message'] = $this->PrintSuccess('NewsletterUpdated', sprintf($size_message, $this->EasySize($newsletter_size)));\n\n\t\t\t\t\t\tif (SENDSTUDIO_EMAILSIZE_WARNING > 0) {\n\t\t\t\t\t\t\t$warning_size = SENDSTUDIO_EMAILSIZE_WARNING * 1024;\n\t\t\t\t\t\t\tif ($newsletter_size > $warning_size) {\n\t\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->PrintWarning('Newsletter_Size_Over_EmailSize_Warning', $this->EasySize($warning_size));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Delete any attachments we're meant to first\n\t\t\t\t\t\tif (SENDSTUDIO_ALLOW_ATTACHMENTS) {\n\t\t\t\t\t\t\tlist($del_attachments_status, $del_attachments_status_msg) = $this->CleanupAttachments($dest, $id);\n\n\t\t\t\t\t\t\tif ($del_attachments_status) {\n\t\t\t\t\t\t\t\tif ($del_attachments_status_msg) {\n\t\t\t\t\t\t\t\t\t$GLOBALS['Success'] = $del_attachments_status_msg;\n\t\t\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->ParseTemplate('SuccessMsg', true, false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$GLOBALS['Error'] = $del_attachments_status_msg;\n\t\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Only save the new attachments after deleting the old ones\n\t\t\t\t\t\t\tlist($attachments_status, $attachments_status_msg) = $this->SaveAttachments($dest, $id);\n\n\t\t\t\t\t\t\tif ($attachments_status) {\n\t\t\t\t\t\t\t\tif ($attachments_status_msg != '') {\n\t\t\t\t\t\t\t\t\t$GLOBALS['Success'] = $attachments_status_msg;\n\t\t\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->ParseTemplate('SuccessMsg', true, false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$GLOBALS['Error'] = $attachments_status_msg;\n\t\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!$newsletter->Active() && isset($_POST['archive'])) {\n\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('NewsletterCannotBeInactiveAndArchive');\n\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($newsletter_img_warnings) {\n\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->PrintWarning('UnableToLoadImage_Newsletter_List', $newsletter_img_warnings);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!$html_unsubscribelink_found) {\n\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->PrintWarning('NoUnsubscribeLinkInHTMLContent');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!$text_unsubscribelink_found) {\n\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->PrintWarning('NoUnsubscribeLinkInTextContent');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$GLOBALS['Message'] = str_replace('<br><br>', '<br>', $GLOBALS['Message']);\n\n\t\t\t\t\t\t($subaction == 'save') ? $this->DisplayEditNewsletter($id) : $this->ManageNewsletters();\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\tcase 'step1':\n\t\t\t\t\t\t$this->EditNewsletter($id);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase 'create':\n\t\t\t\t$subaction = (isset($_GET['SubAction'])) ? strtolower(urldecode($_GET['SubAction'])) : '';\n\n\t\t\t\tswitch ($subaction) {\n\t\t\t\t\tcase 'step2':\n\t\t\t\t\t\t$newnewsletter = array();\n\t\t\t\t\t\t$checkfields = array('Name', 'Format');\n\t\t\t\t\t\t$valid = true; $errors = array();\n\t\t\t\t\t\tforeach ($checkfields as $p => $field) {\n\t\t\t\t\t\t\tif (!isset($_POST[$field]) || empty($_POST[$field])) {\n\t\t\t\t\t\t\t\t$valid = false;\n\t\t\t\t\t\t\t\t$errors[] = GetLang('Newsletter'.$field.'IsNotValid');\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$value = $_POST[$field];\n\t\t\t\t\t\t\t\t$newnewsletter[$field] = $value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$valid) {\n\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('UnableToCreateNewsletter') . '<br/>- ' . implode('<br/>- ',$errors);\n\t\t\t\t\t\t\t$GLOBALS['Message'] = $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t$this->CreateNewsletter();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (isset($_POST['TemplateID'])) {\n\t\t\t\t\t\t\t$newnewsletter['TemplateID'] = $_POST['TemplateID'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tIEM::sessionSet('Newsletters', $newnewsletter);\n\t\t\t\t\t\t$this->DisplayEditNewsletter();\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'save':\n\t\t\t\t\tcase 'complete':\n\t\t\t\t\t\t$user = IEM::getCurrentUser();\n\t\t\t\t\t\t$session_newsletter = IEM::sessionGet('Newsletters');\n\n\t\t\t\t\t\t$newnewsletter = $this->GetApi();\n\n\t\t\t\t\t\t$text_unsubscribelink_found = true;\n\t\t\t\t\t\t$html_unsubscribelink_found = true;\n\n\t\t\t\t\t\tif (isset($_POST['TextContent'])) {\n\t\t\t\t\t\t\t$textcontent = $_POST['TextContent'];\n\t\t\t\t\t\t\t$newnewsletter->SetBody('Text', $textcontent);\n\t\t\t\t\t\t\t$text_unsubscribelink_found = $this->CheckForUnsubscribeLink($textcontent, 'text');\n\t\t\t\t\t\t\t$session_newsletter['contents']['text'] = $textcontent;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isset($_POST['myDevEditControl_html'])) {\n\t\t\t\t\t\t\t$htmlcontent = $_POST['myDevEditControl_html'];\n\t\t\t\t\t\t\t$newnewsletter->SetBody('HTML', $htmlcontent);\n\t\t\t\t\t\t\t$html_unsubscribelink_found = $this->CheckForUnsubscribeLink($htmlcontent, 'html');\n\t\t\t\t\t\t\t$session_newsletter['contents']['html'] = $htmlcontent;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isset($_POST['subject'])) {\n\t\t\t\t\t\t\t$newnewsletter->Set('subject', $_POST['subject']);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tforeach (array('Name', 'Format') as $p => $area) {\n\t\t\t\t\t\t\t$newnewsletter->Set(strtolower($area), $session_newsletter[$area]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$newnewsletter->Set('active', 0);\n\t\t\t\t\t\tif ($user->HasAccess('newsletters', 'approve')) {\n\t\t\t\t\t\t\tif (isset($_POST['active'])) {\n\t\t\t\t\t\t\t\t$newnewsletter->Set('active', $user->Get('userid'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$newnewsletter->Set('archive', 0);\n\t\t\t\t\t\tif (isset($_POST['archive'])) {\n\t\t\t\t\t\t\t$newnewsletter->Set('archive', 1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$newnewsletter->ownerid = $user->userid;\n\t\t\t\t\t\t$result = $newnewsletter->Create();\n\n\t\t\t\t\t\tif (!$result) {\n\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('UnableToCreateNewsletter');\n\t\t\t\t\t\t\t$GLOBALS['Message'] = $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t$this->ManageNewsletters();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$newsletter_info = $session_newsletter;\n\t\t\t\t\t\t$newsletter_info['embedimages'] = true;\n\t\t\t\t\t\t$newsletter_info['multipart'] = true;\n\n\t\t\t\t\t\tlist($newsletter_size, $newsletter_img_warnings) = $this->GetSize($newsletter_info);\n\n\t\t\t\t\t\tif (SENDSTUDIO_ALLOW_EMBEDIMAGES) { $size_message = GetLang('Newsletter_Size_Approximate'); }\n\t\t\t\t\t\telse { $size_message = GetLang('Newsletter_Size_Approximate_Noimages'); }\n\t\t\t\t\t\t$GLOBALS['Message'] = $this->PrintSuccess('NewsletterUpdated', sprintf($size_message, $this->EasySize($newsletter_size)));\n\n\t\t\t\t\t\tif (SENDSTUDIO_EMAILSIZE_WARNING > 0) {\n\t\t\t\t\t\t\t$warning_size = SENDSTUDIO_EMAILSIZE_WARNING * 1024;\n\t\t\t\t\t\t\tif ($newsletter_size > $warning_size) {\n\t\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->PrintWarning('Newsletter_Size_Over_EmailSize_Warning', $this->EasySize($warning_size));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$dest = strtolower(get_class($this));\n\n\t\t\t\t\t\t$movefiles_result = $this->MoveFiles($dest, $result);\n\n\t\t\t\t\t\tif ($movefiles_result) {\n\t\t\t\t\t\t\tif (isset($textcontent)) {\n\t\t\t\t\t\t\t\t$textcontent = $this->ConvertContent($textcontent, $dest, $result);\n\t\t\t\t\t\t\t\t$newnewsletter->SetBody('Text', $textcontent);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (isset($htmlcontent)) {\n\t\t\t\t\t\t\t\t$htmlcontent = $this->ConvertContent($htmlcontent, $dest, $result);\n\t\t\t\t\t\t\t\t$newnewsletter->SetBody('HTML', $htmlcontent);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$newnewsletter->Save();\n\t\t\t\t\t\tif (SENDSTUDIO_ALLOW_ATTACHMENTS) {\n\t\t\t\t\t\t\tlist($attachments_status, $attachments_status_msg) = $this->SaveAttachments($dest, $result);\n\t\t\t\t\t\t\tif ($attachments_status) {\n\t\t\t\t\t\t\t\tif ($attachments_status_msg != '') {\n\t\t\t\t\t\t\t\t\t$GLOBALS['Success'] = $attachments_status_msg;\n\t\t\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->ParseTemplate('SuccessMsg', true, false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$GLOBALS['Error'] = $attachments_status_msg;\n\t\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$newnewsletter->Active() && isset($_POST['archive'])) {\n\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('NewsletterCannotBeInactiveAndArchive');\n\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($newsletter_img_warnings) {\n\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->PrintWarning('UnableToLoadImage_Newsletter_List', $newsletter_img_warnings);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!$html_unsubscribelink_found) {\n\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->PrintWarning('NoUnsubscribeLinkInHTMLContent');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!$text_unsubscribelink_found) {\n\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->PrintWarning('NoUnsubscribeLinkInTextContent');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$GLOBALS['Message'] = str_replace('<br><br>', '<br>', $GLOBALS['Message']);\n\n\t\t\t\t\t\tif ($subaction == 'save') {\n\t\t\t\t\t\t\t$this->DisplayEditNewsletter($result);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->ManageNewsletters();\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$this->CreateNewsletter();\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase 'addnewsletter':\n\t\t\t\t$newsletter = $this->GetApi();\n\t\t\t\t$user = IEM::getCurrentUser();\n\n\t\t\t\t$valid = true; $errors = array();\n\t\t\t\tif (!$valid) {\n\t\t\t\t\t$GLOBALS['Error'] = GetLang('UnableToCreateNewsletter') . '<br/>- ' . implode('<br/>- ',$errors);\n\t\t\t\t\t$GLOBALS['Message'] = $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t$this->CreateNewsletter();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$newsletter->ownerid = $user->userid;\n\n\t\t\t\t$create = $newsletter->Create();\n\t\t\t\tif (!$create) {\n\t\t\t\t\t$GLOBALS['Error'] = GetLang('UnableToCreateNewsletter');\n\t\t\t\t\t$GLOBALS['Message'] = $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t$this->CreateNewsletter();\n\t\t\t\t} else {\n\t\t\t\t\t$GLOBALS['Message'] = $this->PrintSuccess('NewsletterCreated');\n\t\t\t\t\t$this->EditNewsletter($create);\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase 'change':\n\t\t\t\t$subaction = strtolower($_POST['ChangeType']);\n\t\t\t\t$newsletterlist = $_POST['newsletters'];\n\n\t\t\t\tswitch ($subaction) {\n\t\t\t\t\tcase 'delete':\n\t\t\t\t\t\t$access = $user->HasAccess('Newsletters', 'Delete');\n\t\t\t\t\t\tif ($access) {\n\t\t\t\t\t\t\t$this->DeleteNewsletters($newsletterlist);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->DenyAccess();\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'approve':\n\t\t\t\t\tcase 'disapprove':\n\t\t\t\t\t\t$access = $user->HasAccess('Newsletters', 'Approve');\n\t\t\t\t\t\tif ($access) {\n\t\t\t\t\t\t\t$this->ActionNewsletters($newsletterlist, $subaction);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->DenyAccess();\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'archive':\n\t\t\t\t\tcase 'unarchive':\n\t\t\t\t\t\t$access = $user->HasAccess('Newsletters', 'Archive');\n\t\t\t\t\t\tif ($access) {\n\t\t\t\t\t\t\t$this->ActionNewsletters($newsletterlist, $subaction);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->DenyAccess();\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$this->ManageNewsletters();\n\t\t\tbreak;\n\t\t}\n\n\t\tif (!in_array($action, $this->SuppressHeaderFooter)) {\n\t\t\t$this->PrintFooter($popup);\n\t\t}\n\t}", "public function index()\n\t{\n\t\t// Create pagination links\n\t\t$total_rows = $this->video_channel_m->count_all();\n\t\t$pagination = create_pagination('admin/video/channels/index', $total_rows);\n\t\t\t\n\t\t// Using this data, get the relevant results\n\t\t$result = $this->video_channel_m->limit($pagination['limit'])->get_all();\n\n\t\t$channels = array();\n\t\tforeach ($result as $channel)\n\t\t{\n\t\t\t$channels[$channel->parent_id][] = $channel;\n\t\t}\n\t\t\t\n\t\t$this->template\n\t\t\t->title($this->module_details['name'], lang('video_channel:list_title'))\n\t\t\t->set('channels', $channels)\n\t\t\t->set('pagination', $pagination)\n\t\t\t->build('admin/channels/index', $this->data);\n\t}", "function current_filter()\n {\n }", "function proxyAction() {\r\n\t\t/* @var $request Zend_Controller_Request_Http */\r\n\t\t$request = $this->getRequest();\r\n\t\t\r\n\t\t// this action is so special.... no layout or viewRenderer\r\n\t\t$this->_helper->viewRenderer->setNoRender();\r\n\t\t$this->_helper->layout->disableLayout();\r\n\t\t\r\n\t\t$videoUrl = $request->getParam('v', false); // video file url\r\n\t\t//$refererUrl = $request->getParam('r', false); // referer page needed\r\n\t\t\r\n\t\tif ( $videoUrl === false /*|| $refererUrl === false */) {\r\n\t\t\t// invalid request\r\n\t\t\tthrow new Exception(X_Env::_('p_spainradio_err_invalidrequest'));\r\n\t\t}\r\n\t\t\r\n\t\t$videoUrl = X_Env::decode($videoUrl);\r\n\t\t//$refererUrl = X_Env::decode($refererUrl);\r\n\t\t\r\n\t\tif ( !defined(\"X_VlcShares_Plugins_Spainradio::C_$videoUrl\") ) {\r\n\t\t\tthrow new Exception(X_Env::_('p_spainradio_err_invalidchannel'));\r\n\t\t}\r\n\t\t\r\n\t\t$videoUrl = constant(\"X_VlcShares_Plugins_Spainradio::C_$videoUrl\");\r\n\t\t\r\n\t\t\r\n\t\t//$userAgent = $this->plugin->config('hide.useragent', true) ? 'User-Agent: vlc-shares/'.X_VlcShares::VERSION.' spainradio/'.X_VlcShares_Plugins_Spainradio::VERSION : 'User-Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20101019 Firefox/4.0.1';\r\n\t\t//$userAgent = 'User-Agent: vlc-shares/'.X_VlcShares::VERSION.' spainradio/'.X_VlcShares_Plugins_Spainradio::VERSION; \r\n\t\t\r\n\t\t$opts = array('http' =>\r\n\t\t\tarray(\r\n\t\t\t\t'header' => array(\r\n\t\t\t\t\t//\"Referer: $refererUrl\",\r\n\t\t\t\t\t//\"User-Agent: $userAgent\",\r\n\t\t\t\t\t//'viaurl: www.rtve.es'\r\n\t\t\t\t)\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t$context = stream_context_create($opts);\r\n\t\t/* redirect support in wiimc exists only from 1.1.0\r\n\t\tif ( X_VlcShares_Plugins::helpers()->devices()->isWiimc() && !X_VlcShares_Plugins::helpers()->devices()->isWiimcBeforeVersion('1.0.9') && $this->plugin->config('direct.enabled', true) ) {\r\n\t\t\t$match = array();\r\n\t\t\t$xml = file_get_contents($videoUrl, false, $context);\r\n\t\t\tif ( preg_match('/<REF HREF=\\\"([^\\\"]*)\\\"\\/>/', $xml, $match ) ) {\r\n\t\t\t\t$this->_helper->redirector->gotoUrlAndExit($match[1]);\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Exception(X_Env::_('p_spainradio_err_invalidchannel'));\r\n\t\t\t}\r\n\t\t} else {*/\r\n\t\t\t// if user abort request (vlc/wii stop playing, this process ends)\r\n\t\t\tignore_user_abort(false);\r\n\t\t\t\r\n\t\t\t// close and clean the output buffer, everything will be read and send to device\r\n\t\t\tob_end_clean();\r\n\t\t\t\r\n\t\t\t// readfile open a file and send it directly to output buffer\r\n\t\t\treadfile($videoUrl, false, $context);\r\n\t\t//}\r\n\t\t\r\n\t}", "function change1() {\n $_SESSION['url'] = \"http://www.skysignage.com/s/front/channel_preview.php?ID_channel=1129&tvmode=horizontal\";\n exit;\n }", "protected function preFilter($filterChain)\n {\n if (Yii::app()->user->isGuest) {\n \theader('Location: /index.php?r=site/login');\n \treturn false;\n }\n if (Yii::app()->user->flag != 3) {\n \theader('Location: /index.php');\n \treturn false;\n }\n return true; // false if the action should not be executed\n }", "function process_feed_urls_actions() {\n\t\t\tglobal $movies;\n\t\t\t\n\t\t\tif ( ( isset( $_POST['movies-feed-urls-action'] ) ) && ( $_POST['movies-feed-urls-action'] == 'feed-urls-update' ) ) {\n\t\t\t\t\t\n\t\t\t\tif ( wp_verify_nonce( $_POST['movies-feed-urls-update-wpnonce'], 'movies-feed-urls-update' ) ) {\n\t\t\t\t\t\n\t\t\t\t\tif ( (isset( $_POST['movies-feeds-purge'] ) ) && ( $_POST['movies-feeds-purge'] == 'yes' ) ) {\n\t\t\t\t\t\t$movies_feeds_purge = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$movies_feeds_purge = false;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$movies->movies_xml_processor->process_all_feeds( true, $movies_feeds_purge );\n\t\t\t\t\t\t\n\t\t\t\t\t?><div id=\"movies-feed-urls-processed\" class=\"updated below-h2\"><p><?php _e('XML Feeds Processed', 'movies'); ?></p></div><?php\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function process()\n {\n Phpfox::getLib('setting')->setParam('musicsharing.url_image', Phpfox::getParam('core.url_pic') . 'musicsharing' . PHPFOX_DS);\n phpFox::isUser(true);\n $aParentModule = $this->getParam('aParentModule');\n if ($aParentModule)\n {\n phpFox::getLib('session')->set('pages_msf', $aParentModule);\n if (!phpFox::getService('pages')->hasPerm($aParentModule['item_id'], 'musicsharing.can_manage_album'))\n {\n $this->url()->send(\"subscribe\");\n }\n }\n else\n {\n phpFox::getLib('session')->remove('pages_msf');\n }\n $this->template()->setBreadCrumb(phpFox::getPhrase('musicsharing.music_sharing'), null);\n $prefix = phpFox::getParam(array('db', 'prefix'));\n $settings = phpFox::getService('musicsharing.music')->getUserSettings(phpFox::getUserId());\n \n $this->template()->assign(array('settings' => $settings)); {\n if (isset($_POST['task']) && $_POST['task'] == \"dodelete\")\n {\n foreach ($_POST['delete_album'] as $aid)\n {\n phpFox::getService('musicsharing.music')->deleteAlbum($aid);\n }\n }\n }\n if ($this->request()->get(\"orderalbum\"))\n {\n $id_album = $this->request()->get(\"orderalbum\");\n $album_current = phpFox::getService('musicsharing.music')->getAlbums_Id($id_album, phpFox::getUserId());\n $order_album_current = $album_current[\"order_id\"];\n $album_before = phpFox::getService('musicsharing.music')->getAlbumsBefore_Id($id_album, phpFox::getUserId());\n $order_album_before = $album_before[\"order_id\"];\n if ($order_album_before)\n {\n $id_album_before = $album_before[\"album_id\"];\n phpFox::getService('musicsharing.music')->updateAlbum($id_album, $order_album_before);\n phpFox::getService('musicsharing.music')->updateAlbum($id_album_before, $order_album_current);\n }\n if ($this->request()->get('page') > 0)\n $this->url()->send('musicsharing.myalbums.page_' . $this->request()->get('page'), null, null, null);\n else\n $this->url()->send('musicsharing.myalbums', null, null, null);\n }\n else if ($this->request()->get(\"orderalbumdown\"))\n {\n $id_album = $this->request()->get(\"orderalbumdown\");\n $album_current = phpFox::getService('musicsharing.music')->getAlbums_Id($id_album, phpFox::getUserId());\n $order_album_current = $album_current[\"order_id\"];\n $album_after = phpFox::getService('musicsharing.music')->getAlbumsAfter_Id($id_album, phpFox::getUserId());\n $order_album_after = $album_after[\"order_id\"];\n if ($order_album_after)\n {\n $id_album_after = $album_after[\"album_id\"];\n phpFox::getService('musicsharing.music')->updateAlbum($id_album, $order_album_after);\n phpFox::getService('musicsharing.music')->updateAlbum($id_album_after, $order_album_current);\n }\n if ($this->request()->get('page') > 0)\n $this->url()->send('musicsharing.myalbums.page_' . $this->request()->get('page'), null, null, null);\n else\n $this->url()->send('musicsharing.myalbums', null, null, null);\n }\n $user_id = phpFox::getUserId();\n $where = \" \" . $prefix . \"m2bmusic_album.user_id = $user_id\";\n $list_total = phpFox::getService('musicsharing.music')->get_total_album($where);\n \n $aGlobalSettings = phpFox::getService('musicsharing.music')->getUserSettings(phpFox::getUserId(), false);\n $iPageSize = isset($aGlobalSettings['number_album_per_page']) ? $aGlobalSettings['number_album_per_page'] : 5;\n $iPage = $this->request()->get(\"page\");\n if (!$iPage)\n $iPage = 1;\n $max_page = floor($list_total / $iPageSize) + 1;\n if ($iPage > $max_page)\n $iPage = $max_page;\n $sort_by = $prefix . 'm2bmusic_album.order_id';\n $list_info = phpFox::getService('musicsharing.music')->getAlbums(($iPage - 1) * $iPageSize, $iPageSize, null, null, $where);\n phpFox::getLib('pager')->set(array('page' => $iPage, 'size' => $iPageSize, 'count' => $list_total));\n\n $this->template()->assign(array('iPage' => $iPage, 'aRows' => $list_info, 'iCnt' => $list_total))\n ->setHeader('cache', array(\n 'pager.css' => 'style_css'));\n $this->template()->assign(array(\n 'sDeleteBlock' => 'dashboard',\n 'list_info' => $list_info,\n 'core_path' => phpFox::getParam('core.path'),\n 'user_id' => phpFox::getUserId(),\n 'total_album' => $list_total,\n 'cur_page' => $this->request()->get('page') <= 0 ? 1 : $this->request()->get('page')\n ));\n $this->template()->setHeader(array(\n 'm2bmusic_tabcontent.js' => 'module_musicsharing',\n 'm2bmusic_class.js' => 'module_musicsharing',\n 'music.css' => 'module_musicsharing',\n 'musicsharing_style.css' => 'module_musicsharing',\n 'mobile.css' => 'module_musicsharing'\n ));\n\n //modified section (v 300b1)\n //build filter menu\n phpFox::getService('musicsharing.music')->getSectionMenu($aParentModule);\n $catitle = $this->template()->getBreadCrumb();\n\n if (!$aParentModule)\n {\n $satitle = isset($catitle[1][0]) ? $catitle[1][0] : $catitle[0][0];\n $this->template()->clearBreadCrumb();\n $this->template()\n ->setBreadCrumb(phpFox::getPhrase('musicsharing.music_sharing'), $this->url()->makeUrl('musicsharing'))\n ->setBreadCrumb($satitle, null)\n ->setBreadCrumb($satitle, null, true);\n }\n else\n {\n $this->template()->clearBreadCrumb();\n $this->template()\n ->setBreadCrumb(phpFox::getPhrase('musicsharing.music_sharing'), $this->url()->makeUrl('musicsharing'), false);\n }\n ///modified section (v 300b1)\n }", "public function onFilter()\n {\n // $this->currentPageNumber = 1;\n return $this->onRefresh();\n }", "public function beforeFilter(){\n\t\t$this->check_admin_session();\t\t\n\t}", "function jr_first_run() {\r\n\tif ( isset( $_GET['firstrun'] ) ) do_action( 'appthemes_first_run' );\r\n}", "public function beforeFilter(){ \n\t\t//$this->disable_cache();\n\t\t$this->show_tabs(100);\n\t}", "function onAction()\n {\n// global $application;\n// $request = &$application->getInstance('Request');\n $pag_rows = modApiFunc('request', 'getValueByKey', 'rows');\n $pag_name = modApiFunc('request', 'getValueByKey', 'pgname');\n if (strpos($pag_name, 'Catalog_ProdsList_')===0)\n {\n\t if ($pag_rows > 99) $pag_rows = 99;\n $cid = intval(substr($pag_name, 18));\n modApiFunc('CProductListFilter','changeCurrentCategoryId',$cid);\n }\n elseif (strpos($pag_name, 'Manufacturer_ProdsList_')===0)\n {\n $mnf_id = intval(substr($pag_name, 23));\n modApiFunc('CProductListFilter', 'changeCurrentManufactureId', $mnf_id, true);\n }\n $this->pPaginator->setPaginatorPage($pag_name, 1);\n $this->pPaginator->setPaginatorRows($pag_name, $pag_rows);\n// $this->pPaginator->savePaginators();\n }", "function dashboard($widget_id = NULL) {\n\t\t$clean = new Sanitize();\n\t\t$my = $this->core['my'];\n\t\t$user = $my;\n\t\t$id = $my['id'];\n\t\t$streamname = NULL;\n\t\tif(isset($this->params['streamname']))\n\t\t\t$streamname = $this->params['streamname'];\t\n\t\t\t\t\t\n\t\tif(empty($my['id'])){\n\t\t\tif(isset($streamname)){\n\t\t\t\t$this->redirect(array('controller'=> 'streams', 'action'=>'pub', 'streamname' => $streamname));\t\t\t\n\t\t\t}else{\n\t\t\t\t$this->Session->setFlash(__('Incorrect collection link, please check the URL you entered', true));\n\t\t\t\t$this->redirect(array('controller'=> 'hello', 'action'=>'about'));\t\t\t\n\t\t\t}\n\t\t}else if($my['hasConfirmed'] == 0)\n\t\t\t$this->Session->setFlash(__('Please check your inbox to confirm your email address.', 'default', array(), 'error'));\n\n\n\t\t\t\n\t\t$streamsResults = $this->Stream->getByStreamname($streamname, $this->core['my']['id']);\n\t\t\t\n\t\tif(empty($streamsResults)){\n\t\t\t$this->Session->setFlash(__('The Collection was not found. Please check that you entered the correct link.', true));\n\t\t\t$this->redirect(array('controller'=> 'users', 'action'=>'dashboard', 'username'=>$my['username']));\t\t\n\t\t}else{\n\t\t\t$stream_id = $streamsResults[0]['Stream']['id'];\n\t\t\t$this->pageTitle = $streamsResults[0]['Stream']['stream'];\n\t\t}\n\t\t//debug($streamsResults);\n\t\t$streamsList = $this->Stream->getStreamsList_server($streamsResults, $my);\n\t\t//debug($streamsList);\n\t\t\n\t\t$this->Stream->getStreamname($streamsResults[0]['Stream']['stream']);\n\t\t\n\t\t$streamListTypesToAvoid = array(\"Requested\");\n\t\tif ($id != $my['id'])\n\t\t{\n\t\t\t$streamListTypesToAvoid[] = \"Hidden\";\n\t\t\t$streamListTypesToAvoid[] = \"Closed\";\n\t\t\t$streamListTypesToAvoid[] = \"Archive\";\n\t\t}\n\t\t\n\t\t$getStreamIdsAndActiveStreamIdResults = $this->Stream->__getStreamIdsAndActiveStreamId($stream_id, $streamsList, array(\"Default\", \"Invited\", \"Requested\", \"Hidden\", \"Closed\", \"Open\", \"Archive\"), $streamListTypesToAvoid);\n\n\t\t$selectStreamId = $getStreamIdsAndActiveStreamIdResults['selectStreamId'];\n\t\t$streamsIds = $getStreamIdsAndActiveStreamIdResults['streamsIds']; //compiles the list of stream ids that were retrieved\n\t\t//debug($selectStreamId);\n\t\t\n\t\t$widgetsResults = $this->Stream->User->UsersWidget->__getWidgetsForUser($my['id'], $my['id']);\n\t\t$widgetsList = $widgetsResults;\n\t\t\n\t\t$selectWidgetId = $widget_id;\n\t\t//debug($widgetsList);\n\n\t\t$contextUser = \"thinkPanda.Context.clear();thinkPanda.Context.setUser('#userBox_\".$user['id'].\"', '.contextItem', \".$user['id'].\");\";\n\t\t//.\"thinkPanda.Widget.load();\"\n\t\t$shortcuts = array(\n\t\t\tarray(\n\t\t\t\t'id' => \"notificationProfiles\",\n\t\t\t\t'onclick'\t=> \"thinkPanda.Widget.set('#widget_button_profiles', '.widget_button', '#workspace_default', 'profiles');\". $contextUser,\n\t\t\t\t'title' => $user['fullname'].'\\'s Profile',\n\t\t\t\t'image' => '/profiles/img/icon.png'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id' => \"notificationThinkers\",\n\t\t\t\t'onclick'\t=> \"thinkPanda.Widget.set('#widget_button_thinkers', '.widget_button', '#workspace_default', 'thinkers');\". $contextUser,\n\t\t\t\t'title' => $user['fullname'].'\\'s Thinkers Network',\n\t\t\t\t'image' => '/thinkers/img/icon.png'\n\t\t\t),\t\t\t\n\t\t\tarray(\n\t\t\t\t'id' => \"notificationThoughts\",\n\t\t\t\t'onclick'\t=> \"thinkPanda.Widget.set('#widget_button_thoughts', '.widget_button', '#workspace_default', 'thoughts');\". $contextUser,\n\t\t\t\t'title' => $user['fullname'].'\\'s Thoughts',\n\t\t\t\t'image' => '/thoughts/img/icon.png'\n\t\t\t),\n\t\t);\n\n\t\t// SET VARIABLES\n\t\t\n\t\t//$this->pageTitle = $this->User->user['User']['fullname'];\n\t\t//$entityOn = $this->core['entityOn'];\n\t\t$this->set(compact('streamsList', 'selectStreamId', 'widgetsList', 'selectWidgetId', 'entityOn', 'shortcuts'));\n\t}", "function wpc_client_shortcode_redirect_on_login_hub( $content ) {\r\n global $wpc_client;\r\n\r\n if ( is_user_logged_in() ) {\r\n //on HUB\r\n do_action( 'wp_client_redirect', wpc_client_get_slug( 'hub_page_id' ) );\r\n exit;\r\n\r\n }\r\n //on login form\r\n do_action( 'wp_client_redirect', $wpc_client->get_login_url() );\r\n exit;\r\n }" ]
[ "0.62741536", "0.5994517", "0.58285356", "0.5781243", "0.5771682", "0.56391186", "0.56228375", "0.5580656", "0.5515197", "0.5488576", "0.54471505", "0.542103", "0.53812265", "0.5380985", "0.53808117", "0.53610915", "0.5358624", "0.5314194", "0.530908", "0.53077877", "0.5296766", "0.52715755", "0.5264439", "0.5264213", "0.5262208", "0.52392435", "0.5235843", "0.52315605", "0.5207536", "0.51892596", "0.5186636", "0.5181309", "0.5175555", "0.51505464", "0.5144814", "0.5137665", "0.5122988", "0.511056", "0.51026565", "0.5079656", "0.50759214", "0.50741076", "0.5072497", "0.5052089", "0.50444984", "0.5039614", "0.5033054", "0.50306654", "0.50124776", "0.5006407", "0.49982578", "0.49871433", "0.49772412", "0.49761033", "0.4975842", "0.4973635", "0.4967293", "0.49551734", "0.4952101", "0.49322674", "0.49219388", "0.49189737", "0.4918158", "0.4916031", "0.4913371", "0.49131018", "0.49087602", "0.48916885", "0.48885295", "0.48813406", "0.4873165", "0.48711357", "0.48709258", "0.48709163", "0.48692515", "0.48682773", "0.48665053", "0.48576823", "0.4857008", "0.4854027", "0.48472062", "0.48438424", "0.4841401", "0.4837957", "0.48359427", "0.4835229", "0.4820833", "0.48195887", "0.48146185", "0.481019", "0.4809212", "0.48080084", "0.48048282", "0.47975916", "0.47974682", "0.47967574", "0.4796673", "0.4788484", "0.4787855", "0.47864792" ]
0.7178208
0
Set company by organization number.
public function setCompany(string $organizationNumber): Company { $this->company = $this->companies()->firstWhere('organizationNumber', $organizationNumber); return $this->company; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCompany($company_nid);", "protected function setOrganization() {}", "public function setCompany(string $company): void\n {\n $this->_company = $company;\n }", "public function setCompany($company)\n {\n $this->company = $company;\n }", "public function setOrganization($val)\n {\n $this->_propDict[\"organization\"] = $val;\n return $this;\n }", "public function setCompany($company = null)\n {\n // validation for constraint: float\n if (!is_null($company) && !(is_float($company) || is_numeric($company))) {\n throw new \\InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($company, true), gettype($company)), __LINE__);\n }\n if (is_null($company) || (is_array($company) && empty($company))) {\n unset($this->company);\n } else {\n $this->company = $company;\n }\n return $this;\n }", "public function setYomiCompany($value)\n {\n $this->setProperty(\"YomiCompany\", $value, true);\n }", "function Organization( $org )\r\n\t\t{\r\n\t\tif( trim( $org != \"\" ) )\r\n\t\t\t$this->organization= $org;\r\n\t\t}", "public function setCompanyIdAttribute($input)\n {\n $this->attributes['company_id'] = $input ? $input : null;\n }", "public function setCustomerCompany($companyName = '') {\n $company = array(\n 'x_company'=>$this->truncateChars($companyName, 50),\n );\n $this->NVP = array_merge($this->NVP, $company); \n }", "public function setOrganizations(?int $value): void {\n $this->getBackingStore()->set('organizations', $value);\n }", "function organization ($org) {\n if(!empty($org)) $this->xheaders['Organization'] = $org;\n }", "public function company(string $company): self\n {\n $this->company = $company;\n\n return $this;\n }", "function setOrg( $org )\n {\n $org = trim( $org );\n $this->properties['ORG'] = $org;\n }", "public function __construct($company) {\n $this->company = $company;\n }", "protected function _setCompanyCode($storeId=null) {\n\t\t$config = Mage::getSingleton('avatax/config');\n\t\t$this->_request->setCompanyCode($config->getCompanyCode($storeId));\n\t}", "public function __construct($company)\n {\n $this->company = $company;\n }", "public function setOrganization($var)\n {\n GPBUtil::checkString($var, True);\n $this->organization = $var;\n\n return $this;\n }", "public function assignCompany($company)\n {\n return $this->companies()->sync([$company]);\n }", "public function setCompany($value)\n {\n $this->setParameter('billingCompany', $value);\n $this->setParameter('shippingCompany', $value);\n\n return $this;\n }", "public function setAppOwnerOrganizationId($val)\n {\n $this->_propDict[\"appOwnerOrganizationId\"] = $val;\n return $this;\n }", "public function set_contacts($domain, $years, $registrant, $tech, $admin, $auxbilling) {\n \n }", "public function setCompany($quote, $company)\n {\n $quote->getBillingAddress()->setCompany($company)->save();\n $quote->getShippingAddress()->setCompany($company)->save();\n $customerAddressId = $quote->getBillingAddress()->getCustomerAddressId();\n if ($customerAddressId) {\n $customerAddress = Mage::getModel('customer/address')->load($customerAddressId);\n $customerAddress->setCompany($company)->save();\n }\n }", "public function setCompany($quote, $company)\n {\n $quote->getBillingAddress()->setCompany($company)->save();\n $quote->getShippingAddress()->setCompany($company)->save();\n $customerAddressId = $quote->getBillingAddress()->getCustomerAddressId();\n if ($customerAddressId) {\n $customerAddress = Mage::getModel('customer/address')->load($customerAddressId);\n $customerAddress->setCompany($company)->save();\n }\n }", "public function setCustomerCompany($company)\n\t {\n\t \t $this->json['params'][$this->customer]['name']['company'] = $company;\n\t \t \n\t \t return $this;\n\t }", "public function testCanSetAndGetOrganizationName()\n {\n $mockOrgName = 'GRIIDC';\n\n $this->dataCenter->setOrganizationName($mockOrgName);\n\n $this->assertEquals($mockOrgName, $this->dataCenter->getOrganizationName());\n }", "public function setOrganisation($organisation)\n\t{\n\t\t$this->_organisation = $organisation;\n\t}", "public function testCanSetAndGetOrganizationUrl()\n {\n $mockOrgUrl = 'griidc.org';\n\n $this->dataCenter->setOrganizationUrl($mockOrgUrl);\n\n $this->assertEquals($mockOrgUrl, $this->dataCenter->getOrganizationUrl());\n }", "public function getAccountingOrganizationId(): int\n {\n return $this->accountingOrganizationId;\n }", "public function __construct($organization)\n {\n $this->organization = $organization;\n }", "public function setCompanyNameAttribute($value) {\n\t\t$this->company_name = $value;\n\t}", "public function getOrganizationId()\n {\n return $this->organization_id;\n }", "public function setCompanyShort($company)\n\t\t{\n\t\t\t$this->company = $company;\n\t\t}", "private function _setCompanyConfig(){\n\t\t/* Loading the company configuration file */\n\t\t$this->config->load('company'.DIRECTORY_SEPARATOR.$this->getCompanyCode().DIRECTORY_SEPARATOR.'config');\n\t}", "public function getCompanyId()\n\t{\n\t\t$column = self::COL_COMPANY_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getCompanyId()\n {\n return $this->company_id;\n }", "public function getCompanyId()\n {\n return $this->company_id;\n }", "public function getOrganizationId()\n {\n return $this->organizationId;\n }", "public function AddCompany(ICompany $ICompany, ICompanyContact $IContact);", "public function setShippingCompany($companyName = '') {\n $company = array(\n 'x_ship_to_company'=>$this->truncateChars($companyName, 50),\n );\n $this->NVP = array_merge($this->NVP, $company); \n }", "public function testSetNumeroEmploye() {\n\n $obj = new AttestationCacm();\n\n $obj->setNumeroEmploye(\"numeroEmploye\");\n $this->assertEquals(\"numeroEmploye\", $obj->getNumeroEmploye());\n }", "public function getCompanyId()\n {\n return array_get($this->config, 'company_id');\n }", "public function __construct(Company $company)\n {\n $this->company = $company;\n }", "public static function syncCompanies()\n {\n $ak_company_users = self::find()->where(['space_id' => NULL])->all();\n\n foreach($ak_company_users as $ak_company_user)\n {\n $ak_copmany = new Companies();\n $ak_copmany = Json::decode($ak_copmany->view($ak_company_user->akc_id));\n\n if(!empty($ak_copmany))\n {\n $space = Space::findOne(['name' => $ak_copmany['data']['name']]);\n\n if(!empty($space))\n {\n // AkauntingCompany::linkSpace($space->id, $ak_copmany['data']['id']);\n\n $ak_company_user->space_id = $space->id;\n if(!$ak_company_user->save())\n {\n Yii::error('Error in saving record in ' . self::tableName() . ' ' . __CLASS__ . ' ' . __FUNCTION__ . \"\\n\\n\" . Json::encode($ak_company_user->getErrors()));\n }\n }\n }\n }\n }", "public function __construct(Company $company)\n {\n $this->companies= $company;\n\n }", "public function productionCompany($value)\n {\n $this->setProperty('productionCompany', $value);\n return $this;\n }", "public function setBillingCompany($value)\n {\n return $this->setParameter('billingCompany', $value);\n }", "public function setCompanyName($value)\n {\n return $this->set('CompanyName', $value);\n }", "public function setCompanyName($value)\n {\n return $this->setProperty(\"CompanyName\", $value, true);\n }", "public function getCompanyCode(){\n\t\t/* return company code */\n\t\treturn $this->_intCompanyCode;\n\t}", "public function setCompanyCity(string $company_city) {\n\n $this->company_city = $company_city;\n\n }", "public function setOrganization($organization)\n {\n $this->organization = $organization;\n return $this;\n }", "public function setCompanyId($company_id)\n\t\t{\n\t\t\t$this->company_id = $company_id;\n\t\t}", "public function update(Request $request, $company_number)\n {\n $this->validate($request, [\n 'name' => 'required',\n ]);\n TblCompany::find($company_number)->update($request->all());\n return redirect()->route('company.index')->with('success','company updated successfully');\n }", "public function setOrganizationId($var)\n {\n GPBUtil::checkString($var, True);\n $this->organization_id = $var;\n\n return $this;\n }", "public function setCurrentOrganization($organization)\n {\n if ($organization instanceof \\Gems_User_Organization) {\n $organizationId = $organization->getId();\n } else {\n $organizationId = $organization;\n $organization = $this->userLoader->getOrganization($organizationId);\n }\n\n $oldOrganizationId = $this->getCurrentOrganizationId();\n\n if ($organizationId) {\n if ($organizationId != $oldOrganizationId) {\n $this->_setVar('user_organization_id', $organizationId);\n }\n if ($this->isCurrentUser()) {\n $this->getCurrentOrganization()->setAsCurrentOrganization();\n\n if ($organization->canHaveRespondents()) {\n $usedOrganizationId = $organizationId;\n } else {\n $usedOrganizationId = null;\n }\n\n // Now update the requestcache to change the oldOrgId to the new orgId\n // Don't do it when the oldOrgId doesn't match\n if ($requestCache = $this->session->requestCache) {\n //Create the list of request cache keys that match an organization ID (to be extended)\n foreach ($requestCache as $key => $value) {\n if (is_array($value)) {\n foreach ($value as $paramKey => $paramValue) {\n if (in_array($paramKey, $this->possibleOrgIds)) {\n\n if ($paramValue == $oldOrganizationId) {\n $requestCache[$key][$paramKey] = $usedOrganizationId;\n }\n }\n }\n }\n }\n $this->session->requestCache = $requestCache;\n }\n // $searchSession &= $_SESSION['ModelSnippetActionAbstract_getSearchData'];\n $searchSession = new \\Zend_Session_Namespace('ModelSnippetActionAbstract_getSearchData');\n foreach ($searchSession as $id => $data) {\n foreach ($this->possibleOrgIds as $key) {\n // WARNING: use {$id}[$key] otherwise the {$id[$key]} index of searchSession is returned\n if (isset($searchSession->{$id}[$key]) && ($searchSession->{$id}[$key] == $oldOrganizationId)) {\n $searchSession->{$id}[$key] = $usedOrganizationId;\n // \\MUtil_Echo::track($key, $data[$key], $searchSession->{$id}[$key]);\n }\n }\n }\n }\n }\n\n return $this;\n }", "public function testSetOrganismeCacm() {\n\n $obj = new AttestationCacm();\n\n $obj->setOrganismeCacm(\"organismeCacm\");\n $this->assertEquals(\"organismeCacm\", $obj->getOrganismeCacm());\n }", "public function setCompany(\\App\\Domain\\Model\\Company $object) : void\n {\n $this->setRef('from__company_id__to__table__companies__columns__id', $object, 'products');\n }", "public function getOrganizationId(): int {\n\t\treturn ($this->organizationId);\n\t}", "public function update(IModel $organization)\n {\n }", "function getCompanyId() {\n return $this->getAdditionalProperty('company_id');\n }", "public function register_company() {\n \n $this->data['building'] = $this->company_management_model->get_building_listing();\n $this->output('company_management/register_company');\n }", "public function byCompanyId($companyId);", "public function get_company() \n {\n return $this->company;\n }", "public function setCompanyName($companyName)\r\n {\r\n $this->companyName = strip_tags($companyName);\r\n }", "public function editorganization(organizationClass $info,$username)\n {\n $values = array();\n //Query To Update Branch Into Branch Table\n $sqlUpdate=\"UPDATE organization SET organization_email= '\".$info->getOrganizationEmail().\"',organization_name= '\".$info->getOrganizationName().\"',organization_password='\".$info->getOrganizationPassword().\"' WHERE organization_username ='\".$username.\"' \";\n \n //Query To Update Represent Password Into Org_Represent Table\n $sqlUpdateRepresent=\"UPDATE org_represent SET password= '\".$info->getOrganizationPassword().\"' WHERE username ='\".$username.\"' \";\n \n $this->execute($sqlUpdate,$values);\n \n $this->execute($sqlUpdateRepresent,$values);\n }", "public function getMarketingCompany()\n {\n return $this->marketingCompany;\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function setCompetition($val)\n {\n if (!intval($val)) {\n throw new Exception('tx_dflsync_scheduler_SyncTask->setCompetition(): Invalid Competition given!');\n }\n // else\n $this->competition = intval($val);\n }", "public function getCompany() {}", "public function setCompany_name($company_name)\n {\n $this->company_name = $company_name;\n }", "public function _set($number) {\n\t\t$this->number = $number;\n\t\t$this->id = $this->id_base . '-' . $number;\n\t}", "public function setCompany($companyIdAsString) {\n $this->companyId = $companyIdAsString;\n return $this;\n }", "public function update($conn, ApplicantsCompany $obj)\n {\n }", "public function getOrganization()\n {\n return $this->organization;\n }", "public function getOrganization()\n {\n return $this->organization;\n }", "public function getOrganization()\n {\n return $this->organization;\n }", "public function getCompany();", "public function setOrganizationId($organizationId)\n {\n $this->organizationId = $organizationId;\n }", "public function testUpdateUserWithCompanyName()\n {\n $user = factory(User::class)->create();\n Passport::actingAs($user);\n\n $user2 = factory(User::class)->create();\n\n $data = $this->getStub();\n\n $postData = array_merge($data, ['company_name' => 'CompanyNameTest']);\n\n $responseData = $this\n ->json('put', \"api/users/{$user2->id}\", $postData)\n ->assertStatus(200)\n ->json('data');\n\n $this->assertArraySubset($data, $responseData);\n $this->assertDatabaseHas('users', $data);\n $this->assertDatabaseHas('companies', ['name' => 'CompanyNameTest']);\n }", "public function setOrgId($newOrgId) {\n\t//verify the organization id is valid\n\t$newOrgId = filter_var($newOrgId, FILTER_VALIDATE_INT);\n\tif($newOrgId === false) {\n\t\tthrow(new InvalidArgumentException(\"organization id is not a valid integer\"));\n\t}\n\n\t//verify the organization id is positive\n\tif($newOrgId <= 0) {\n\t\tthrow(new RangeException(\"organization if is not positive\"));\n\t}\n\n\t//convert and store the organization id\n\t$this->orgId = intval($newOrgId);\n}", "public function storeCompany(GenericCompany $company);", "public function company(array $options);", "public function update(UpdateCompanyRequest $request, Company $company)\n {\n //dd($request->all());\n $company->update([\n 'name' => $request->name,\n 'description' => $request->description,\n 'email' => $request->email,\n 'phone' => $request->phone,\n 'website' => $request->website,\n\n 'street' => $request->street,\n 'street_number' => $request->street_number,\n 'address_info' => $request->address_info,\n 'postal_code' => $request->postal_code,\n 'location' => $request->location,\n 'state' => $request->state,\n 'country' => $request->country,\n 'lat' => $request->lat,\n 'lng' => $request->lng,\n\n 'employees' => $request->employees,\n 'has_branches' => $request->has_branches === 'on' ? true : false,\n 'has_insurance' => $request->has_insurance === 'on' ? true : false,\n 'has_newsletter' => $request->has_newsletter === 'on' ? true : false,\n 'founded' => $request->founded,\n 'defunct' => $request->defunct,\n\n 'facebook' => $request->facebook,\n 'twitter' => $request->twitter,\n 'instagram' => $request->instagram,\n 'linkedin' => $request->linkedin,\n 'snapchat' => $request->snapchat,\n 'blog' => $request->blog,\n 'skype' => $request->skype,\n 'pinterest' => $request->pinterest,\n 'youtube' => $request->youtube,\n\n 'status' => $request->status,\n 'type' => $request->has('type') ? implode(',', $request->type) : '',\n ]);\n\n if ($request->categories) {\n $company->categories()->sync($request->categories);\n }\n if ($request->countries) {\n $company->countries()->sync($request->countries);\n }\n\n session()->flash('success', 'Agency updated successfully');\n\n return redirect(route('companies.index'));\n }", "public function updateOrganization($organizationDTO)\n {\n $organizationId = $organizationDTO->getId();\n $organization = $this->organizationRepository->find($organizationId);\n\n if ($organization) {\n $organization->setSubdomain($organizationDTO->getSubdomain());\n $organization->setTimeZone($organizationDTO->getTimezone());\n $organization->setCampusId($organizationDTO->getCampusId());\n\n $status = ($organizationDTO->getStatus() == 'Active') ? 'A' : 'I';\n $organization->setStatus($status);\n\n $ldapValue = null;\n $isLDAPorSAMLenabled = $organizationDTO->getIsLdapSamlEnabled();\n if (!is_null($isLDAPorSAMLenabled)) {\n $ldapValue = 1;\n } else {\n $ldapValue = 0;\n }\n $organization->setIsLdapSamlEnabled($ldapValue);\n\n $isCalendarSyncEnabled = !empty($organizationDTO->getCalendarSync()) ? 1 : 0;\n $isPcsRemove = $organizationDTO->getPcsRemove();\n\n // Remove external events by SwitchOrgCalendarJob if sync is disabled by admin\n\n if (!$isCalendarSyncEnabled && $isCalendarSyncEnabled != $organization->getCalendarSync()) {\n $organization->setPcs(NULL);\n $job = new SwitchOrgCalendarJob();\n $jobNumber = uniqid();\n $job->args = array(\n 'jobNumber' => $jobNumber,\n 'organizationId' => $organizationId,\n 'type' => 'admin',\n 'pcsRemove' => $isPcsRemove\n );\n $this->jobService->addJobToQueue($organizationId, SwitchOrgCalendarJob::JOB_KEY, $job, null, SynapseConstant::RESQUE_JOB_CALENDAR_ERROR);\n }\n $organization->setCalendarSync($isCalendarSyncEnabled);\n $campusErrors = $this->validator->validate($organization);\n if (count($campusErrors) > 0) {\n $errorsString = $campusErrors[0]->getMessage();\n throw new SynapseValidationException($errorsString);\n }\n } else {\n throw new SynapseValidationException('The organization could not be found.');\n }\n\n //Get the organization lang object, and set its new name and nickname values.\n $organizationLang = $this->organizationlangRepository->findOneBy(['organization' => $organization]);\n $organizationLang->setOrganizationName($organizationDTO->getName());\n $organizationLang->setNickName($organizationDTO->getNickName());\n\n\n //Validate the organization lang object,\n $errors = $this->validator->validate($organizationLang);\n if (count($errors) > 0) {\n $errorsString = $errors[0]->getMessage();\n throw new SynapseValidationException($errorsString);\n }\n\n //If the isSendLink attribute is available, set invitation link emails to coordinators.\n if ($organizationDTO->getIsSendLink()) {\n $persons = $this->personService->getCoordinator($organizationId, '');\n\n if ($persons['coordinators'] && count($persons['coordinators']) > 0) {\n foreach ($persons['coordinators'] as $person) {\n $this->emailPasswordService->sendEmailWithCoordinatorInvitationLink($organizationId, $person['id']);\n }\n }\n }\n\n $this->organizationlangRepository->flush();\n return $this->getOrganization($organizationId);\n }", "public function byCompany($company)\n {\n $company = trim(preg_replace('|\\s+|', ' ', preg_replace('|&nbsp;|', ' ', $company)));\n // remove all non alphanumeric and non space characters\n $company = preg_replace('/[^a-zA-Z0-9\\s]+/', '', $company);\n\n $params = array(\n 'excludet2' => 1,\n 'excludeDetails' => 1,\n 'matchRequest' => \"<Company><Name>$company</Name><Ticker /><Address1 /><Address2 /><City /><State /><Zip /><URL /><Phone /><ContactFirstName /><ContactLastName /></Company>\",\n 'has_stories' => 1,\n );\n \n return $this->getClient()->post($params);\n }", "public function setCompanyId($company_id)\n\t{\n\t\t$column = self::COL_COMPANY_ID;\n\t\t$this->$column = $company_id;\n\n\t\treturn $this;\n\t}", "public function setCompanyCountry(string $company_country) {\n\n $this->company_country = $company_country;\n\n }", "public function __construct($company = ''){\n \n if($this->company === null) {\n parent::__construct( $company);\n } \n }", "function showCompany() {\n\t\t\t\t\t$company = Partner::find_by_name(params(0));\n\n\t\t\t\t\t$editForm = new h2o('views/editCompany.html');\n\t\t\t\t\techo $editForm->render(compact('company'));\n\t\t\t\t}", "protected function companyCode(){\n return config('company.code');\n }", "public function validateCompany()\n\t{\n\t\tif ($this->employed) {\n\t\t\t$validator = CValidator::createValidator('required', $this, 'company', array(\n\t\t\t\t'message' => 'This field depends on \"' .\n\t\t\t\t\t\t\t $this->getAttributeLabel('employed') .\n\t\t\t\t\t\t\t '\" and must not be empty.'\n\t\t\t));\n\t\t\t$validator->validate($this);\n\t\t\t$validator = CValidator::createValidator('length', $this, 'company', array('max'=>'25'));\n\t\t\t$validator->validate($this);\n\t\t} else {\n\t\t\t$this->company = null;\n\t\t}\n\t}", "public function actionUpdate()\n\t{\n\t\t$model=new Companyorganisation();\n\t\t$this->render('update',array(\n\t\t\t\t'model'=>$model,'dataNode'=>$this->GetOrg(),\n\t\t));\n\t}", "public function set_organizer_key($organizer_key) {\n\t\t$_SESSION['citrix_organizer_key'] = $organizer_key;\n\t\t$this->organizer_key = $organizer_key;\n\t}", "function updatePricingCompanyId($params) {\n $sql = __query_update_pricing_company_id($params);\n execute_sql($sql);\n}", "public function edit(Company $company)\n {\n //\n }", "public function edit(Company $company)\n {\n //\n }", "public function edit(Company $company)\n {\n //\n }", "public function edit(Company $company)\n {\n //\n }", "public function edit(Company $company)\n {\n //\n }" ]
[ "0.7244687", "0.671106", "0.66093653", "0.63743985", "0.6263388", "0.60430837", "0.5995699", "0.59500074", "0.5864759", "0.58495754", "0.5823558", "0.5783316", "0.5763185", "0.5664328", "0.5591494", "0.5584936", "0.5581775", "0.5543056", "0.55362064", "0.55198526", "0.5469348", "0.5457579", "0.5450323", "0.5450323", "0.54176927", "0.5404624", "0.5401425", "0.53940386", "0.537324", "0.53727645", "0.53509367", "0.5339188", "0.53078604", "0.529039", "0.5284003", "0.527767", "0.527767", "0.526246", "0.5238365", "0.5201455", "0.51925635", "0.5179238", "0.51748234", "0.5163844", "0.5143149", "0.5143136", "0.5142282", "0.51261634", "0.51219434", "0.51001734", "0.50926805", "0.5089392", "0.5087898", "0.50746834", "0.5074349", "0.50643903", "0.5043973", "0.5042539", "0.50377345", "0.5023034", "0.50228965", "0.50058746", "0.5000712", "0.49927247", "0.49847066", "0.49745446", "0.4940115", "0.49392736", "0.49392006", "0.4922877", "0.49168035", "0.49114183", "0.48999155", "0.48886955", "0.4874554", "0.4874554", "0.4874554", "0.48517138", "0.4847896", "0.48458946", "0.48368624", "0.48338228", "0.48324242", "0.48299733", "0.48193187", "0.48033294", "0.48022908", "0.47995254", "0.47974396", "0.47940972", "0.47843197", "0.4780678", "0.47786567", "0.47764033", "0.47762802", "0.47751892", "0.47751892", "0.47751892", "0.47751892", "0.47751892" ]
0.6551115
3
Get details about current user.
public function user(): User { return User::load('https://fiken.no/api/v1/whoAmI'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserInfo()\n {\n return $this->_process('user/info')->user;\n }", "public function getDetails()\n {\n if($user = $this->loadUser())\n \treturn $user;\n }", "public function getUserInfo()\n {\n $CI = &get_instance();\n if (!$this->loggedIn()) {\n return null;\n } else {\n $id = $CI->session->userdata('user_id');\n return $CI->user_model->get($id);\n }\n }", "public function user()\n\t{\n\n\t\t$user = $this->current_user ? $this->current_user : $this->ion_auth->get_user();\n\n\t\techo json_encode($user);die;\n\t}", "public function getAuthUserDetail()\n {\n return $this->user;\n }", "public function getUser()\n {\n $this->getParam('user');\n }", "private function getUserInfo()\n {\n // TODO This could be cached\n return $this->userInfoApi->getUserInfo();\n }", "private function getUser()\n {\n return $this->user->getUser();\n }", "function getUserInfo()\n {\n return $this->userinfo;\n }", "public function fetchUser() {\n return $this->QueryAPI(\"current_user\");\n }", "public function profile(){\n // using the auth() helper we are returning the authenticated user info\n return auth('api')->user();\n }", "public function getUserInfo()\n {\n return $this->userInfo;\n }", "public function getUserInfo()\n {\n return $this->userInfo;\n }", "public function getUserInfo()\n {\n return $this->userInfo;\n }", "public function getInfoProfile(){\n return $this->get_user_by_id($this->getAccountID());\n }", "public function getUserInformation()\n {\n return $this->userInformation;\n }", "public function getUserInfo() {}", "public function user()\n {\n return $this->context-> getUser();\n }", "public function UserDetails()\n {\n if (!Auth::user()) {\n return response()->json(\"Not Authenticated\");\n } else {\n $user = Auth::user();\n return response()->json([$user], 200);\n }\n }", "public function user_info() {\n if ($this->rails_cookie_value() == NULL) {\n return null;\n }\n if (!self::$user_info && !self::$user_info_called) {\n $json_data = $this->api_request(\"user/\" . $this->rails_cookie_value());\n self::$user_info = $json_data->{'user'};\n self::$user_info_called = true;\n }\n return self::$user_info;\n }", "function getUserInfo(){\n\n\t\t/* Fetch user info from Flickr */\n\t\t$user = $this->askFlickr('people.getinfo','user_id='.$this->user);\n\n\t\t/* Return User info */\n\t\treturn $user;\n\t}", "public function getUser(): string {\n return $this->context->user;\n }", "public function getCurrentUser();", "public function getUser() {\r\n return $this->user;\r\n }", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser()\r\n {\r\n return $this->user;\r\n }", "public function userDetails()\n {\n $user = Auth::user();\n return response()->json(['success' => $user]);\n }", "static function getCurrentUser()\r\n {\r\n return self::getSingleUser('id', $_SESSION[\"user_id\"]);\r\n }", "public function getUser(){\n\t\treturn $this->user;\n\t}", "public function getMe()\n {\n return $this->_execute('/user/', self::METHOD_GET);\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser ()\r\n\t{\r\n\t\treturn $this->user;\r\n\t}", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "function getUser() \n {\n\t\t\treturn $this->user;\n\t\t}", "public function getUser() {\n return $this->user;\n }", "public function getUser() {\n return $this->user;\n }", "public function getUser() {\n return $this->user;\n }", "public function getUser() {\n return $this->user;\n }", "public function getUserInfo()\n {\n }", "public function get_userInfo()\n {\n return $this->call_method(\"get/userInfo\",\n array()\n );\n }", "public function getUser()\n {\n return $this->user;\n }", "public static function user() {\n return Auth::currentUser();\n }", "protected function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUserDetails()\n {\n try\n {\n $user = \\App\\User::find(getLoggedInUser('id'));\n\n return createResponse(200, \"User Details.\", ['user' => $user]);\n\n }catch(\\Exception $e)\n {\n \\Log::error(\"Get user details API failed: \".$e->getMessage());\n return createResponse(config('httpResponse.SERVER_ERROR'),\n \"Cound not fetch detail!\",\n ['error' => 'Cound not fetch detail!']);\n }\n }", "public function getUser() {\n\t\treturn $this->api->getUserById($this->getUserId());\n\t}", "public static function getUser(): string\n {\n return get_current_user();\n }", "public function getLoggedInUserDetails()\n {\n try\n {\n return $user = $this->jwtToken()->payload('context');\n\n }catch(\\Exception $e)\n {\n \\Log::error(\"Get user details API failed: \".$e->getMessage());\n return createResponse(config('httpResponse.SERVER_ERROR'),\n \"Cound not fetch detail!\",\n ['error' => 'Cound not fetch detail!']);\n }\n }", "public function getUserInfo()\r\n {\r\n return self::makeCall('getUserInfo', array(), null, false, $this->sessionID);\r\n }", "protected function _user() {\n return $this->_adapter_user->user();\n }", "public function getUser() {\n\t\treturn $this->user;\n\t}", "public function getUser() {\n\t\treturn $this->user;\n\t}", "function getUser() {\n return user_load($this->uid);\n }", "public static function getUser()\n {\n return self::getInstance()->_getUser();\n }", "public function getUser() {\n\t\t$urlUser = \"{$this->apiHost}/me.json\";\n\t\treturn $this->runCurl ( $urlUser );\n\t}", "public function getCurrentUserProfileInfo()\n {\n $user = Auth::user();\n $userDetails = DB::table('userProfileData')->where('user_id', $user->id)->first();\n return response()->json(['currentUserDetails' => $userDetails], $this-> successStatus);\n }", "function LoggedIn() {\n\t\treturn $this->Get('UserDetails');\n\t}", "public function getInfo()\n {\n $user = User::with(['optician'])->find(auth()->id());\n\n return api_resource('mobile\\User')->make($user);\n }", "public final function getUser()\n {\n return $this->user;\n }", "public function readCurrentUser()\n {\n\t\t$data = $this->call(array(), \"GET\", \"users/current.json\");\n\t\tif(isset($data->{'error'})){\n\t\t\tdie($data->{'error'});\n\t\t}\n\t\t$data = $data->{'user'};\n\t\treturn new User($data, $this);\n }", "public function currentUser()\n {\n return $this->res($this->service->currentUser());\n }", "public static function getCurrentUser();", "public static function getUser();", "public function getUser()\n {\n return $this->_user;\n }" ]
[ "0.81497645", "0.8061888", "0.8002567", "0.77987933", "0.77955014", "0.7745731", "0.7744236", "0.7697352", "0.76636624", "0.76505744", "0.7622343", "0.7580785", "0.7580785", "0.7580785", "0.75805277", "0.75791794", "0.75661445", "0.7559261", "0.7557498", "0.7505841", "0.7501162", "0.7492245", "0.7460804", "0.745118", "0.74482524", "0.74482524", "0.74482524", "0.74482524", "0.74482524", "0.74482524", "0.74482524", "0.7439688", "0.7432561", "0.7422187", "0.7421155", "0.7414624", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.74059236", "0.7405828", "0.7400265", "0.7400265", "0.7400265", "0.73986256", "0.73971534", "0.73971534", "0.73971534", "0.73971534", "0.73916143", "0.7390777", "0.73904353", "0.73896307", "0.73892754", "0.7384682", "0.7384682", "0.7384682", "0.7384682", "0.73823506", "0.73822635", "0.7377761", "0.73723286", "0.7363799", "0.7360233", "0.73602295", "0.73602295", "0.7355614", "0.7354481", "0.73518836", "0.7349985", "0.734509", "0.7344867", "0.73421884", "0.7321461", "0.7318718", "0.7309825", "0.73095286", "0.7291062" ]
0.0
-1
Get all companies the current user can access.
public function companies(): Collection { return Company::all(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function allCompanies()\n {\n return Company::all();\n }", "public function getCompanyWithUsers();", "function Companies(){\n\t\t\t\treturn $this->companies;\n\t\t\t}", "public function index()\n {\n return Company::all();\n }", "public function index()\n {\n return Company::all();\n }", "public function getCompaniesByUser($userId, $onlyActive = false);", "public function getAllCompanyAccounts()\n { \n // select all fields and columns form the 'companies' table and return is as an array of objects\n $companies = Company::all();\n\n // if the length of array of company objects is greater than 0 (contains elements)\n if (count($companies) > 0) {\n // loop through each company, get the token from the 'company_activation_codes' table and update the object\n foreach ($companies as $key => $value) {\n $token = CompanyActivationCode::where('company_id', $value['id'])->first()->activation_code;\n $value['token'] = $token;\n $companies[$key] = $value;\n }\n }\n \n // send a response to the requester of the data\n $response_message = array('success' => true, 'message' => 'Data fetched', 'data' => $companies);\n return response()->json($response_message);\n }", "public function allCompanies()\n {\n\n $companies = $this->core_companies;\n\n $items = [];\n foreach ($companies as $company) {\n\n $companyItem = new CompanyCardItem();\n $companyItem->id = $company->id;\n $companyItem->name = $company->name;\n //$companyItem->amount = $catalog->amount;\n $companyItem->title = $company->title;\n if (\\Dash\\count($company->photo))\n $companyItem->image = '/uploaz/eyuf/UserCompany/photo/' . $company->id . '/' . $company->photo[0];\n $companyItem->url = ZUrl::to([\n 'customer/markets/show',\n 'id' => $company->id\n ]);\n $companyItem->distence = \"12km\";\n //$companyItem->image = $catalog->price;\n //$companyItem->price = $catalog->price_old;\n //$companyItem->currency = \"$\";\n //$companyItem->cart_amount = 0;\n\n $items[] = $companyItem;\n }\n return $items;\n }", "public function index()\n {\n $company = $this->repository->all();\n return $company;\n }", "public function getCompany() {\n return Companies::findById($this->company_id);\n }", "public function index(Request $request)\n {\n if (\\Auth::user()->isAdmin()) {\n if ($request->has(\"all\") && !!$request->input(\"all\")) {\n return response(Company::all());\n } else {\n return response(Company::paginate(10));\n }\n } else {\n return response(\\Auth::user()->companies()->paginate(10));\n }\n }", "public function getAvailableCompanies()\n {\n return $this->createQuery('c')\n ->select('c.*')\n ->addSelect(\n \"(SELECT ROUND(AVG(r.rating), 2)\n FROM Companies_Model_Review r\n WHERE r.status = '\" . Companies_Model_Review::STATUS_PUBLISHED . \"'\n AND r.company_id = c.id) as rating\"\n )\n ->addSelect(\"(SELECT COUNT(rc.id)\n FROM Companies_Model_Review rc\n WHERE rc.status = '\" . Companies_Model_Review::STATUS_PUBLISHED . \"'\n AND rc.company_id = c.id) as review_count\")\n ->whereIn('c.status', Companies_Model_Company::getActiveStatuses())\n ->orderBy('rating DESC')\n ->execute();\n }", "public function list() {\n \n $companies = Companies::all();\n $companies->load('hasUserCompany'); \n // return response()->json($companies);\n\n return response()->json(['companies' => $companies]);\n }", "public function index()\n {\n $companies = Auth::user()->companies;\n $hasCompany = Auth::user()->companies()->exists();\n return view('account.company.index', [\n 'companies' => $companies,\n 'hasCompany' => $hasCompany,\n ]);\n }", "public function getCompany();", "public function index()\n {\n $companies = Company::with('user')->get();\n return response()->json(['companies' => $companies], 200);\n }", "public function companylist() {\r\n $companies = $this->model->getCompanies();\r\n return $this->view('company/companylist', $companies);\r\n }", "public function index()\n {\n $companies = $this->userRepository->getCompanies(Auth::id());\n\n return view('admin.company.index', ['companies' => $companies]);\n }", "public function findCompanies(){\n $data = SCompany::select('id_company', 'name')\n ->get();\n return response()->json($data);\n }", "public function index()\n {\n // return $request->all();\n return Company::all();\n }", "public function getFreeCompanies() { return $this->FreeCompanies; }", "public function getAllCompanies(){\n\t\t$path=\"../db/data.json\";\n\t\t$file=$this->getData($path);\n\t\n\t\t$arrayFile = json_decode($file, true);\n\t\n\t\treturn $arrayFile['companies'];\n\t}", "public function index()\n {\n $query = Company::query();\n\n $parameters = $parameters = request()->query->all();\n\n $this->sortBy(Company::class, $query, $parameters);\n\n $this->filterBy(Company::class, $query, $parameters);\n \n return CompanyResource::collection($query->paginate(10));\n }", "public function index()\n {\n //\n $company = Company::where('representative_id',Auth::user()->id)->get();\n return CompanyResource::collection($company);\n }", "public function index()\n {\n\t if(Auth::user()->role_id == Role::SUPER_ADMIN) {\n\t\t $companies = Company::all();\n\t }\n \telse {\n \t\t$companies = Company::where(\"user_id\", Auth::user()->id)->get();\n\t }\n\n return view(\"companies.index\", array(\"companies\" => $companies));\n }", "public static function all() {\n\n $db = Zend_Registry::get('dbAdapter');\n $result = $db->query('select id from companys')->fetchAll();\n $companys = new SplObjectStorage();\n foreach ($result as $c) {\n try {\n $company = new Yourdelivery_Model_Company($c['id']);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n $companys->attach($company);\n }\n return $companys;\n }", "public function getCompany() {}", "public function companies() {\n return $this->belongsToMany(Company::class, 'company_user', 'user_id', 'company_id');\n }", "public function getCompanyWithUniqueLogins();", "public function indexAction()\n {\n $realtyCompanies = $this->getRealtyCompanyRepository()\n ->findAllRealtyCompany()->getQuery()->getResult();\n\n return [\n 'realtyCompanies' => $realtyCompanies,\n ];\n }", "function get_companies_list() {\n return get_view_data('org_list');\n}", "public function sitemapCompanies(){\n $links = array();\n $models = ORM::factory('CatalogCompany')->where('enable','=','1')->find_all();\n foreach($models as $model)\n $links[] = $model->getUri();\n return $links;\n }", "public static function fetch_all_in_a_list()\n\t{\n\t return Company::orderBy( 'name' )->lists( 'name' , 'id' );\n\n\t}", "public function companies()\n {\n return $this->morphedByMany('App\\Company', 'taggable');\n }", "function select_all_company() {\n\t\t$qury=\"SELECT * FROM company\";\n\t\t$requet=mysqli_query($link,$qury);\n\t\t\n\t\twhile($res=mysqli_fetch_assoc($requet)) {\n\t\t\t$data[]=$res;\n\t\t}\n\t\treturn $data;\n\t}", "public function getOriginCompanies () {\n $corp = $this->perteneceCorporacion();\n\n if ($corp) {\n return new ArrayObjectList([$corp, $this]);\n }\n\n return new ArrayObjectList([$this]);\n }", "public function index()\n {\n if (! Gate::allows('company_access')) {\n return abort(401);\n }\n\n\n if (request('show_deleted') == 1) {\n if (! Gate::allows('company_delete')) {\n return abort(401);\n }\n $companies = Company::onlyTrashed()->get();\n } else {\n $companies = Company::all();\n }\n\n return view('admin.companies.index', compact('companies'));\n }", "public function index(){\n return Responser::ok('Projects available',Auth::user()->companies->reduce(function($carry,$company){\n $company->projects->each(function($project) use(&$carry){\n $project->load('company');\n $carry[] = $project;\n });\n\n return $carry;\n },[]));\n }", "public function indexCompany()\n {\n return TimelineResource::collection(\n $this->user->company->timeline()\n ->with(['pictures', 'videos', 'geo', 'links'])\n ->paginate(request()->get('per_page') ?? 15)->appends(request()->all())\n );\n }", "function index() {\n if($this->request->isApiCall()) {\n $this->serveData(Companies::findByIds($this->logged_user->visibleCompanyIds()), 'companies');\n } else {\n $page = (integer) $this->request->get('page');\n if($page < 1) {\n $page = 1;\n } // if\n \n list($companies, $pagination) = Companies::paginateActive($this->logged_user, $page, 30);\n \n $this->smarty->assign(array(\n 'companies' => $companies,\n 'pagination' => $pagination,\n ));\n } // if\n }", "public function getAll()\n {\n if (Auth::user()->id_role == 1) \n {\n $company_id = GetSession::getCompanyId();\n }elseif(Auth::user()->id_role == 2)\n {\n $company_id = Auth::user()->id_company;\n }\n \n return Product::where('id_company', $company_id)->orderBy('created_at','desc')->get();\n }", "public function companyOfUser(){\n\n $company = Auth::user()->companies;\n $location = Location::where('id', Auth::user()->company_location)->get();\n \n foreach($company as $c){\n $c['locations'] = $location;\n }\n\n return $company;\n }", "public function getCompanyAllowableColors()\n {\n $companyColors = Color::pluck('color_catalog_id');\n $companyColors = $companyColors->filter(function($id) {\n return !empty($id);\n });\n // TODO: skip allowable options list while UI for super admin is not ready\n // $allowableColors = Auth::user()->company->company->allowable_colors->whereNotIn('id', $companyColors);\n $allowableStyles = ColorCatalog::active()->whereNotIn('id', $companyColors)->get();\n\n return response()->json($allowableStyles);\n }", "public function getAll($companyId)\n {\n return\n DB::table('company_bank_accs')\n ->select(\n 'company_id as companyId',\n 'bank_id as bankId',\n 'acc_number as accNumber',\n 'acc_name as accName'\n )\n ->where([\n ['company_id', $companyId]\n ])\n ->get();\n }", "public function index()\n {\n $companies = Company::all();\n\n return response()->json($companies);\n }", "public function index()\n {\n $order = $this->get->get('order', 'ASC');\n $by = $this->get->get('by', 'name');\n $companies = $this->company->orderBy($by, $order)->paginate($this->totalPage);\n return view('admin.company.index', compact('companies'));\n }", "public function companies($id)\n {\n $user = User::find($id);\n return view('User.Users.companies_list', ['user' => $user]);\n }", "public static function getEnterpriseCompanies(){\n $result = db::get(\"SELECT uid_empresa FROM \". TABLE_EMPRESA .\" WHERE is_enterprise = 1 ORDER BY nombre\", \"*\", 0, \"empresa\");\n return new ArrayObjectList($result);\n }", "public function getUserCompany()\n {\n $user_company = \\App\\User::with(['company'])->where('id', Auth::user()->id)->first();\n return $user_company ? $user_company : null;\n }", "public function getCompanies($document)\n {\n $docs = $this->clienteRepository->getCompanies($document);\n\n return $this->ok($docs);\n }", "public function index()\n {\n if(Auth::check()){\n $company = Company::where('user_id',Auth::user()->id)->get();\n \n return view('companies.index')->withcompany($company);\n }else{\n return view('auth.login');\n }\n \n }", "public function index()\n {\n $companies = Company::all();\n\n return view('dashboard.companies.index')->withCompanies($companies);\n }", "function GetCompanies()\n{\n\t$CompArr=array();\n\t$Query = \"SELECT * FROM \".PFX.\"_tracker_client ORDER BY NAME ASC\";\n\t$Sql = new Query($Query);\n\twhile ($Row=$Sql->Row()) {\n\t\t$CompArr[$Sql->Position]['Name']=htmlspecialchars(stripslashes($Row->NAME));\n\t\t$CompArr[$Sql->Position]['Value']=$Row->ID;\n\t}\n\treturn $CompArr;\n}", "public function index()\n {\n $companies = Company::all();\n return $this->sendResponse($companies->toArray(), 'Companies retrieved successfully.');\n }", "public function index ()\n {\n $company = Company::orderBy('created_at', 'desc')->paginate(5);\n return CompanyResource::collection($company);\n }", "public function index()\n {\n if (! Gate::allows('Admin_Manage')) {\n return abort(401);\n }\n\n $company = Company::all();\n\n return view('system.company.index', compact('company'));\n }", "public function getlatestCompanies()\n {\n $AdminDashboardModel = $this->model('AdminDashboardModel');\n $this->latestCompanies = $AdminDashboardModel->getLatestCompanies();\n }", "public function list(Request $request) {\n $section = $this->section;\n $input_all = collect($request->all());\n $filters = $this->parseFilters($input_all);\n\n $companies = $this->model::search( $filters );\n if ( !$companies ) {\n return CDataGrid::getResponse( [], 0, 0 );\n }\n\n $data = [];\n foreach ( $companies['result'] as $i => $company) {\n $checked = $company->status ? ' checked=\"\"' : \"\";\n $data[] = [\n $company->name,\n $company->phone,\n $company->status ? '<div class=\"badge badge-success\">Active</div>' : '<div class=\"badge badge-danger\">Inactive</div>',\n $this->components->groupButton(\n [\n [\n 'title' => 'View',\n 'url' => route($section->slug.'.show', $company->id),\n 'icon' => 'fa fa-eye',\n 'permission' => 'view-company',\n 'attributes' => [\n 'class' => 'btn-success'\n ]\n ],[\n 'title' => 'Edit',\n 'url' => route($section->slug.'.edit', $company->id),\n 'icon' => 'fa fa-pencil',\n 'permission' => 'edit-company',\n 'attributes' => [\n 'class' => 'btn-info'\n ]\n ],[\n 'title' => 'Trash',\n 'url' => route($section->slug.'.destroy', $company->id),\n 'icon' => 'fa fa-trash',\n 'permission' => 'delete-company',\n 'attributes' => [\n 'class' => ' grid-action-archive btn-danger',\n 'data-id' => $company->id,\n 'data-name' => $company->name\n ]\n ],\n ]\n )\n ];\n }\n\n return CDataGrid::getResponse( $data, $companies['total'] );\n }", "public function index(Request $request)\n {\n\n $companies = company::where('ownerid', '=', Auth::id() )->paginate(2);\n\n\n return view('admin.companies.My_Companies')\n ->with('companies', $companies);\n }", "function visibleCompanyIds() {\n if($this->visible_company_ids === false) {\n $this->visible_company_ids = Users::findVisibleCompanyIds($this);\n } // if\n return $this->visible_company_ids;\n }", "public function index()\n {\n return Company::paginate(10);\n }", "public function testGetAllCompanies()\n {\n $response = $this->get('/api/v1/company');\n\n $response->assertStatus(200);\n }", "public function all()\n {\n return $this->get('/user/memberships/orgs');\n }", "public function index()\n {\n $companys = Company::all();\n\n return view('company.company', compact('companys'));\n }", "public function getClientCompanies(Iusuario $user, $requesting = null) {\n return $this->obtenerEmpresasCliente(null, $user);\n }", "public function companies()\n {\n return $this->belongsToMany(Company::class);\n }", "public function companies()\n {\n return $this->hasMany('App\\Company');\n }", "public function getCompaniesForSelect()\n {\n return Company::whereNull('deleted_at')->pluck('name', 'id');\n }", "public function index(Guard $auth)\n\t{\n if(Auth::check())\n {\n $companies = User::find($auth->user()->getAuthIdentifier())->getCompanies()->paginate(25);\n $url=url('company/');\n\n if(count($companies)==0)\n {\n $mes = \"Зараз у Вас немає компаній.\";\n return view('Company.myCompanies', ['companies' => $companies, 'mes'=>$mes, 'url' => $url,]);\n }\n else\n {\n $mes=null;\n return view('Company.myCompanies', ['companies' => $companies, 'mes'=>$mes, 'url' => $url,]);\n }\n }\n else\n {\n return Redirect::to('auth/login');\n }\n\t}", "public function company()\n {\n return $this->business();\n }", "public function getCompaniesReport() : CompaniesReport\n\t{\n\t\t$response = $this->execute('Empresa');\n\t\t\n\t\t$companiesByArea = [];\n\t\tforeach($response['e'] as $areaPool){\n\t\t\t$i = $areaPool['a'];\n\t\t\tforeach($areaPool['e'] as $company){\n\t\t\t\t$companiesByArea[$i][]=new Company(\n\t\t\t\t\t$company['a'],\n\t\t\t\t\t$company['c'],\n\t\t\t\t\t$company['n']\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn new CompaniesReport($response['hr'],$companiesByArea);\n\t}", "public function actionIndex()\n {\n $searchModel = new UserCompanySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getAdmins() {\n $a = new SplObjectStorage();\n $admins = $this->getTable()->getAdmins();\n foreach ($admins as $admin) {\n try {\n $customer = new Yourdelivery_Model_Customer_Company($admin['id'], $this->getId());\n $a->attach($customer);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n }\n return $a;\n }", "public function getAllCompanyRecruitment()\n {\n return \\App\\Recruitment::getAllCompanyRecruitments(\\Auth::id());\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function index()\n {\n return CompanyResource::collection(Company::orderBy('id','desc')->paginate(10));\n }", "public function ajaxCompanies($country_id)\n {\n // Get log in user credentials to select only the company user is working for\n $user = User::where('name', '=', Auth::user()->name)\n ->where('surname', '=', Auth::user()->surname)->first();\n\n $role = Role::where('description', 'like', '%' . 'uper' . '%')->first();\n\n if ($role->id == $user->role_id)\n $companies = Company::where('country_id', '=', $country_id)->get();\n else\n $companies = Company::where('id', '=', $user->company_id)\n ->where('country_id', '=', $country_id)->get();\n return $companies;\n }", "function GetCompetitors()\n\t{\n\t\t$result = $this->sendRequest(\"GetCompetitors\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function index()\n {\n $title = trans('company.companies');\n return view('user.company.index', compact('title'));\n }", "public function getAllActive()\n {\n\n $qb = $this->createQueryBuilder('u')->select('u')\n ->andWhere('u.isDeleted =:is_deleted')\n ->andWhere('u.status =:status')\n ->setParameters(array(\n 'is_deleted' => false,\n 'status' => $this->sm->active()\n ));\n $qb->orderBy('u.company', 'DESC');\n return $qb->getQuery()->getResult();\n }", "public function index()\n {\n $companies = WlaCompany::get();\n return view('admin.companies.index', [\n 'companies' => $companies\n ]);\n }", "public function getOwnerCompanies () {\n\t\t\tif (count($this) === 0) return new ArrayObjectList;\n\n\t\t\t$db \t\t= db::singleton();\n\t\t\t$table \t\t= TABLE_DOCUMENTOS_ELEMENTOS . \" INNER JOIN \". TABLE_DOCUMENTO_ATRIBUTO . \" USING (uid_documento_atributo)\";\n\t\t\t$set \t\t= $this->toComaList();\n\t\t\t$SQL \t\t= \"SELECT uid_empresa_propietaria FROM {$table} WHERE uid_documento_elemento IN ({$set}) GROUP BY uid_empresa_propietaria\";\n\t\t\t$collection\t= $db->query($SQL, '*', 0, \"empresa\");\n\n\n\t\t\treturn new ArrayObjectList($collection);\n\t\t}", "public function get_customers_for_dropdown($company){\r\n\t\theader(\"Access-Control-Allow-Origin: \". base_url());\r\n\t\terror_log(\"get_customers_for_dropdown($company)\");\r\n\r\n\t\t$cid = intval($company);\r\n\t\tif($cid>0){\r\n\t\t\t$cs = $this->customer_model->get_companys_customers($cid);\r\n\t\t}\r\n\t\telse if($cid == 0){\r\n\t\t\t$cs = $this->customer_model->get_customers();\r\n\t\t}\r\n\t\telse{\r\n\t\t\techo \"0\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$data = array();\r\n\t\tforeach($cs as $c){\r\n\t\t\t$id = $c[\"id\"];\r\n\t\t\t$name = $c[\"namn\"];\r\n\t\t\t$data[] = array($id => $name);\r\n\t\t}\r\n\t\terror_log(print_r($data, true));\r\n\t\techo json_encode($data);\r\n\t}", "public function consultaCargos() {\n\t\t\treturn $this->entidad->getRepository('\\Entidades\\Expertos\\UsuariosCargo')->findAll();\n\t\t}", "public function actionIndex()\n {\n $searchModel = new CompanySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new CompanySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function showListCompanyPage()\n {\n $company = new Company();\n if ($this->checkSession()) {\n $data[] = array();\n $data['navbar'] = view('includes.navbar');\n\n $data['listCompany'] = $company->showListCompany(Session::get('univID'), \"\", \"asc\", \"\", \"\");\n $data['listCompanyIndustry'] = $company->showIndustry(Session::get('univID'));\n // $data['totalCompany'] = $company->GetTotalCompany();\n return view('pages.companylist')->with('data', $data);\n }\n return redirect(\"/login\");\n }", "public function index(Request $request)\n {\n if($request->user()->tokenCan('user:coment'))\n {\n return comentario::all();\n }\n else\n {\n return abort(401,\"Tienes 0 permiso de estar aqui\");\n }\n }", "public function getCompaniesCrmSearchUrl()\n {\n $type = 'company' ;\n return $this->getEntitiesCrmSearchUrl( $type ) ;\n }", "public function index()\n {\n $companies = Company::all();\n return response()->json(\n [\n 'status' => 'success',\n 'companies' => $companies->toArray()\n ], 200);\n }", "public static function index()\n {\n return Comida::all();\n }", "public function index()\n {\n return Campus::onlyTrashed()->get();\n }", "public function index()\n {\n return view('companies.index',[\n 'companies' => Companies::all()\n ]);\n }", "public function index()\n {\n $companies = Company::orderBy('created_at', 'desc')->paginate(10);\n return view('Admin.pages.company.index')->with('companies', $companies);\n }", "public function index()\n {\n return Complaint::where('iPersonID', (integer)session()->get('customer_id'))->get();\n }", "public function company()\n {\n return $this->author()->company();\n }", "public function index()\n {\n $companies = $this->repository->orderBy('name')->paginate('8');\n\n return view('company.index', compact('companies'));\n }", "public function company(Request $request)\n {\n $company_customer = Company::find($request->id);\n return response()->json($company_customer);\n }", "public function peopleCbo() {\n $people = Person::all();\n return $people;\n }", "public function index()\n {\n $search = request()->query('search');\n if ($search) {\n $company = Company::where('name', 'LIKE', \"%{$search}%\")->simplePaginate(10);\n } else {\n $company = Company::simplePaginate(10);\n }\n\n if (Company::onlyTrashed()->get()->count() > 0) {\n $trashed_button = true;\n }\n\n return view('companies.index')\n ->with('companies', $company)\n ->with('title', 'Agencies')\n ->with('trashed_button', $trashed_button ?? false);\n }" ]
[ "0.79454535", "0.7457357", "0.717595", "0.7052864", "0.7052864", "0.7036546", "0.69246703", "0.6855041", "0.68033946", "0.6782179", "0.6768089", "0.67501235", "0.6738401", "0.6709291", "0.6623166", "0.6617485", "0.65839446", "0.65497184", "0.6545647", "0.6520803", "0.6514317", "0.6504593", "0.6501466", "0.6480583", "0.64518946", "0.64120984", "0.6387172", "0.63407", "0.6339197", "0.63384485", "0.63300717", "0.6324082", "0.63166714", "0.63155514", "0.62605023", "0.62599605", "0.6247673", "0.6244364", "0.6228424", "0.6224945", "0.62123054", "0.6202303", "0.61503476", "0.61477727", "0.6122069", "0.61194944", "0.611063", "0.6094824", "0.6088925", "0.60615367", "0.60553044", "0.60546756", "0.6021448", "0.60077727", "0.60058844", "0.6003363", "0.5991096", "0.59899634", "0.59818846", "0.59708333", "0.59667933", "0.59593713", "0.5955445", "0.5952281", "0.594545", "0.59441775", "0.59382534", "0.5937008", "0.59326816", "0.59206486", "0.5896411", "0.5895008", "0.5893732", "0.58909285", "0.58709145", "0.5850957", "0.5837975", "0.5836892", "0.58128107", "0.5801075", "0.57969385", "0.57917917", "0.5773258", "0.5771831", "0.57709056", "0.57709056", "0.57700205", "0.5765256", "0.5765194", "0.57648176", "0.57616675", "0.57561946", "0.5752514", "0.57513046", "0.5744952", "0.5737347", "0.57329017", "0.5728912", "0.57254636", "0.57254285" ]
0.7277331
2
/////////////////////// get notifcation in backend
public static function Get_four_Notify() { $notfit= NotificationBackent::where('seen',0)->orderBy('created_at','desc')->take(7)->get(); return $notfit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNotification(){\n\n\n}", "public function getCustomerNoteNotify();", "public function get_notification_get(){\n $notification = $this->model->getAllwhere('notification');\n\n $resp = array(\n 'rccode' => 1,\n 'message' => 'SUCCESS',\n 'notification' => (!empty($notification) ) ? $notification: [],\n );\n $this->response($resp);\n }", "function getNotify() {\r\r\n\t\treturn $this->notify;\r\r\n\t}", "public function getProcNotif(){\n return $this->_data['proc_notif'];\n }", "public function get_portfolio_notification();", "public function user_notification(){\n $apiData = array();\n $this->loadModel('Post');\n $this->loadModel('Event');\n $this->loadModel('Notification');\n $id = $this->Auth->user('id');\n $notification = $this->Notification->getNotification($id);\n if(!empty($notification)) {\n $data = array();\n $keyValue = Hash::combine($notification ,'{n}.Notification.object_id','{n}.Notification.object_id','{n}.Notification.object_type');\n foreach ($keyValue as $key => $value) {\n switch($key){\n case OBJECT_TYPE_EVENT: \n $data[OBJECT_TYPE_EVENT] = $this->Event->getEventNotification(array_values($value));\n break;\n case OBJECT_TYPE_POST:\n $data[OBJECT_TYPE_POST] = $this->Post->getPostNotification(array_values($value));\n break;\n case OBJECT_TYPE_LEAVE:\n $data[OBJECT_TYPE_LEAVE] = $this->Leave->getLeaveNotification(array_values($value));\n break;\n case OBJECT_TYPE_BIRTHADAY:\n $data[OBJECT_TYPE_BIRTHADAY] = $this->Birthday->getBirthdayNotification(array_values($value));\n break;\n default:\n echo \"No information available for that day.\";\n break;\n }\n } \n }\n if(!empty($data)) {\n $apiData = $this->getFormatedData($notification, $data);\n }\n return $apiData;\n }", "public function getNotify()\n {\n return $this->notify;\n }", "public function register_notifications();", "public function notification();", "public function notification();", "public function getNotification()\n {\n return $this->notification;\n }", "public function getNotificationEmail() {}", "public function getNotification()\n\t{\n\t\treturn $this->notification;\n\t}", "public function notifications() { return $this->notifications; }", "public function routeNotificationForNexmo():string;", "public function getNotifs() {\n\n // Notifications stored\n if( Storage::exists('notifications.ser') ) {\n $notifs = unserialize( Storage::get('notifications.ser') );\n\n // If the query is too old, remove the notifs\n if( Carbon::now()->timestamp - $notifs['query_date'] > 60 )\n $notifs = null;\n }\n\n // Get the information for the API\n if( !isset($notifs) ) {\n $notifs = [\n 'query_date' => Carbon::now()->timestamp,\n 'notifications' => getJSON( env('APP_URL_SERVER') . '/api/notifications' )\n ];\n\n // Store the new query\n Storage::put('notifications.ser', serialize($notifs));\n }\n\n return $notifs;\n }", "public function getNotifyAction() {\r\n $this->view->notification = $notification = $this->_getParam('notification', 0);\r\n $suggObj = Engine_Api::_()->getItem('suggestion', $notification->object_id);\r\n if (!empty($suggObj)) {\r\n\t\t\t$this->view->suggObj = $suggObj;\r\n\r\n if( strstr($suggObj->entity, \"sitereview\") ) {\r\n $getListingTypeId = Engine_Api::_()->getItem('sitereview_listing', $suggObj->entity_id)->listingtype_id;\r\n $getModId = Engine_Api::_()->suggestion()->getReviewModInfo($getListingTypeId);\r\n $modInfoArray = Engine_Api::_()->getApi('modInfo', 'suggestion')->getPluginDetailed(\"sitereview_\" . $getModId);\r\n $this->view->modInfoArray = $modInfoArray = $modInfoArray[\"sitereview_\" . $getModId];\r\n }else {\r\n $modInfoArray = Engine_Api::_()->getApi('modInfo', 'suggestion')->getPluginDetailed($suggObj->entity);\r\n $this->view->modInfoArray = $modInfoArray = $modInfoArray[$suggObj->entity];\r\n }\r\n \r\n if ($this->isModuleEnabled($modInfoArray['pluginName'])) {\r\n if ( $suggObj->entity == 'photo' ) {\r\n $modItemId = $suggObj->sender_id;\r\n } else {\r\n $modItemId = $suggObj->entity_id;\r\n }\r\n $modObj = Engine_Api::_()->getItem($modInfoArray['itemType'], $modItemId);\r\n\r\n\t// Check Sender exist on site or not.\r\n\t$isSenderExist= Engine_Api::_()->getItem('user', $suggObj->sender_id)->getIdentity();\r\n\tif( empty($isSenderExist) ) {\r\n\t Engine_Api::_()->getDbtable('suggestions', 'suggestion')->removeSuggestion($suggObj->entity, $suggObj->entity_id, $modInfoArray['notificationType']);\r\n\t $this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n\t $this->view->modObj = null;\r\n\t}\r\n\r\n\t// If Loggden user have \"Friend Suggestion\" Which already his friend then that friend suggestion should be delete.\r\n\tif( empty($modObj) || (( $suggObj->entity != 'photo' ) && ($modInfoArray['itemType'] == 'user') && !empty($modItemId)) ) {\r\n\t\t$is_user = Engine_Api::_()->getItem('user', $suggObj->entity_id)->getIdentity();\r\n\t\t$isFriend = Engine_Api::_()->getApi('coreFun', 'suggestion')->isMember($modItemId);\r\n\t\tif( empty($is_user) || !empty($isFriend) || empty($modObj) ) {\r\n\t\t Engine_Api::_()->getDbtable('suggestions', 'suggestion')->removeSuggestion($suggObj->entity, $suggObj->entity_id, $modInfoArray['notificationType']);\r\n\t\t $this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n\t\t $this->view->modObj = null;\r\n\t\t}\r\n\t}\r\n\r\n // It would be \"NULL\", If that entry already deleteed from the table.\r\n if (empty($modObj)) {\r\n Engine_Api::_()->getDbtable('suggestions', 'suggestion')->removeSuggestion($suggObj->entity, $suggObj->entity_id, $modInfoArray['notificationType']);\r\n $this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n $this->view->modObj = null;\r\n } else {\r\n\t\t\t\t\t$this->view->modObj = $modObj;\r\n $this->view->senderObj = $senderObj = Engine_Api::_()->getItem('user', $suggObj->sender_id);\r\n $this->view->sender_name = $this->view->htmlLink($senderObj->getHref(), $senderObj->displayname);\r\n }\r\n }else {\r\n\t$this->view->modNotEnable = true;\r\n }\r\n }else {\r\n\t\t\t// If suggestion are not available in \"Suggestion\" table but available in \"Notifications table\" then we are deleting from \"Notifications Table\".\r\n\t\t\tEngine_Api::_()->getDbtable('notifications', 'activity')->delete(array('notification_id = ?' => $notification->notification_id));\r\n\t\t\t$this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n\t\t}\r\n }", "public function getLadderNotify()\n {\n return $this->get(self::_LADDER_NOTIFY);\n }", "function GetNotifications () {\n\t\treturn $this->notifications;\n\t}", "function &getNotifyModel() {\n return $this->Claim;\n }", "public function getReadVoicemail()\n {\n return $this->_getAndParse($this->_serverPath['voicemail'], true);\n\t}", "function notifictionList(){\n $this->check_admin_user_session();\n $userId = $_SESSION[ADMIN_USER_SESS_KEY]['userId'];\n $where = array('notificationFor'=>$userId,'webNotify'=>'0');\n $count = $this->common_model->get_total_count(NOTIFICATIONS, array('notificationFor'=>$userId,'isRead'=>'0'));\n $notifiList = $this->common_model->getsingle(NOTIFICATIONS, $where);\n if(!empty($notifiList)){\n $userdata = $this->common_model->getsingle(USERS, array('id'=>$notifiList->notificationBy));\n }\n if(!empty($userdata)){\n $userName= $userdata->fullName;\n }\n if($notifiList){\n $updateData = array('webNotify'=>'1');\n $whereUpdate = array('id'=>$notifiList->id);\n $this->common_model->updateFields(NOTIFICATIONS,$updateData,$whereUpdate);\n $uid = encoding($notifiList->referenceId);\n\n if($notifiList->notificationType=='delete_article'){\n $url= base_url().'admin/article/deleteAticle/'.$uid;\n }elseif($notifiList->notificationType=='delete_training_video'){\n $url= base_url().'admin/video/deleteTrVideoByAdmin/'.$uid;\n }\n else{\n $url= base_url().'admin/video/deleteVideoByAdmin/'.$uid;\n }\n\n $msg = json_decode($notifiList->notificationMessage);\n $msgSend = str_replace(\"[UNAME]\",$userName,$msg->body);\n $title = $msg->title; //set title for show \n echo json_encode(array('status'=>1,'html'=>$msgSend,'title'=>$title,'url'=>$url,'count'=>$count));die;\n }\n echo json_encode(array('status'=>0,'count'=>$count));die;\n }", "function wd_notification() {\n return WeDevs_Notification::init();\n}", "public function getNotificationNids(): array;", "public function index()\n {\n return response()->json(request()->user()->notifications);\n }", "public function getPendingPost();", "public function getNotifications()\n {\n return $this->_notifications;\n }", "public function getNotified()\n {\n return $this->notified;\n }", "public function getUserNotifications($user);", "function recurringdowntime_get_pending_changes()\n{\n $obj = get_option('recurringdowntime_pending_changes', array());\n if (!is_array($obj)) {\n $obj = json_decode(base64_decode($obj), true);\n }\n return $obj;\n}", "public function listNotifications()\r\n { \t \r\n \r\n \t$data = $this->call(array(), \"GET\", \"notifications.json\");\r\n \t$data = $data->{'notifications'};\r\n \t$notificationArray = new ArrayObject();\r\n \tfor($i = 0; $i<count($data);$i++){\r\n \t\t$notificationArray->append(new Notification($data[$i], $this));\r\n \t}\r\n \treturn $notificationArray;\r\n }", "function GetAdminNotification()\n\t{\n\t\t$notifications = array(\n\t\t\t'adminnotify_email' => $this->adminnotify_email,\n\t\t\t'adminnotify_send_flag' => $this->adminnotify_send_flag,\n\t\t\t'adminnotify_send_threshold' => $this->adminnotify_send_threshold,\n\t\t\t'adminnotify_send_emailtext' => $this->adminnotify_send_emailtext,\n\t\t\t'adminnotify_import_flag' => $this->adminnotify_import_flag,\n\t\t\t'adminnotify_import_threshold' => $this->adminnotify_import_threshold,\n\t\t\t'adminnotify_import_emailtext' => $this->adminnotify_import_emailtext\n\t\t);\n\n\t\treturn $notifications;\n\t}", "public function broadcastOn()\n {\n return ['ticket'];\n }", "public function receivesBroadcastNotificationsOn()\n {\n return 'bahar.'.$this->id;\n }", "public function getNotificationById($id);", "public static function checkNotificationsOn()\n {\n $user = $_SESSION[\"staff_id\"];\n $con = $GLOBALS[\"con\"];\n $sql = \"select notificationsOn from user where staff_id = $user\";\n $result = mysqli_query($con, $sql);\n $row = mysqli_fetch_assoc($result);\n return $row[\"notificationsOn\"];\n }", "public static function get()\n {\n return Present_student_notif::with(\"time\")->where(\"status\", config('globalVariable.starting'))->get();\n }", "public function getapidetailsAction() {\n\t\t$this->loadLayout();\n\t\t$this->getLayout()->getBlock('logicbrokernotification')->setConfigValue(array(\n\t\t\t\t\t\t'scope' => 'default',\n\t\t\t\t\t\t'scope_id' => '0',\n\t\t\t\t\t\t'path' => 'logicbroker_integration/integration/notificationstatus',\n\t\t\t\t\t\t'value' => '0',\n\t\t\t\t));\n\t\tMage::app()->getCacheInstance()->cleanType('config');\t\t\n\t\tMage::getSingleton('adminhtml/session')->setNotification(false);\n\t\t$this->_redirectReferer();\n\t}", "public function receivesBroadcastNotificationsOn()\n {\n return 'Auth.User.' . $this->id;\n }", "function ajax_get_client_internal_notes() {\r\n\r\n if ( !isset( $_POST['id'] ) || !$_REQUEST['id'] ) {\r\n echo json_encode( array( 'id' => '', 'warning' => true ) );\r\n exit;\r\n }\r\n\r\n $id = explode( '_', $_POST['id'] );\r\n\r\n //check id and hash\r\n if ( isset( $id[0] ) && $id[0] && isset( $id[1] ) && md5( 'wpcclientinternalnote_' . $id[0] ) == $id[1] ) {\r\n $client = get_userdata( $id[0] );\r\n\r\n $internal_notes = get_user_meta( $id[0], 'wpc__internal_notes', true );\r\n if ( $internal_notes ) {\r\n echo json_encode( array( 'client_name' => $client->user_login, 'internal_notes' => $internal_notes ) );\r\n } else {\r\n echo json_encode( array( 'client_name' => $client->user_login, 'internal_notes' => '' ) );\r\n }\r\n exit;\r\n }\r\n\r\n echo json_encode( array( 'internal_notes' => '' ) );\r\n exit;\r\n }", "public function getNote();", "public function broadcastOn()\n {\n return ['ticket_'.$this->ticket->id];\n }", "function updateNotification(){\n $id= $_GET['id'];\n $userid = $_SESSION[ADMIN_USER_SESS_KEY]['userId'];\n $where = array('referenceId'=>$id,'notificationFor'=>$userid);\n $data = array('isRead'=>1); \n $update = $this->common_model->updateFields(NOTIFICATIONS, $data, $where);\n if($update){\n echo json_encode(array('status'=>1));die(); \n }\n }", "function load_notification( ) {\n\t\tif ( check_ajax_referer( 'ht-dms', 'nonce' ) ) {\n\t\t\t$nID = pods_v_sanitized( 'nID', $_REQUEST );\n\t\t\tif ( $nID ) {\n\n\t\t\t\twp_die( ht_dms_ui()->views()->notification( null, $nID ) );\n\n\t\t\t}\n\n\t\t}\n\n\t}", "public function getNotificationAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $qb = $em->createQueryBuilder();\n $result = $qb->select('n.id, n.type, n.levelCode, n.levelDescription,'\n . 'n.priority, n.priorityCode, n.title, n.description,'\n . 'n.isActive, n.statusRead, n.createdAt, n.createdAtDate, n.createdAtTime')\n ->from('ESERVMAINProfileBundle:EservVUserNotification', 'n')\n ->where('n.fosUserId = :uid')\n ->setParameter('uid', $this->get('security.context')->getToken()->getUser()->getId())\n ->orderBy('n.createdAt','DESC')\n ->addOrderBy('n.priorityOrder', 'DESC') \n ->getQuery()\n ;\n \n $FormattedQuery = $this->container->get('core_function_services')->GetOutputFormat($result, 'array');\n\n return $this->render('ESERVMAINProfileBundle:UserNotification:view.html.twig', array(\n 'notifications' => $FormattedQuery, \n )); \n\n }", "public function listNotificationInterests( );", "function get_notification()\n {\n $this ->db-> select('*');\n $this ->db-> from('tbl_enquiry');\n $this->db->where('enquiry_delete_status','0');\n $query = $this->db->get();\n return $query->result();\n }", "public static function notifications(): array\n {\n return [];\n }", "public function mainApiNotifications(User $user)\n {\n \treturn $user->unreadNotifications;\n }", "public function notification()\r\n {\r\n return $this->belongsTo(PushNotificationProxy::modelClass());\r\n }", "public function getNotificationView(){\n\n \treturn view('backend.admin.notifications.admin-notification');\n }", "function GetNotifications($uid=false,$last_notification=false){\n\n\t$query_=$last_notification?\" and `id`> {$last_notification}\":\"\";\n\n\t$notifications = NotificationsModel::model()->findAll(\"`to` =\".helpers::uid($uid).$query_.\" order by `time` desc limit 10\");\n\n\tif($notifications!=NULL){\n\n\t//get user controller\n\t$user_c=Helpers::get_controller(USERS);\n\n\tforeach ($notifications as $k=>$notification){\n\n\t$notifications[$k]->user = $user_c->GetUserById($notification->from);\n\n\t}\n\n\n\t}\n\n\n\treturn $notifications==null?array():$notifications;\n\n\t}", "function pmpro_notifications()\n{\n\tif(current_user_can(\"manage_options\"))\n\t{\n\t\t$pmpro_notification = get_transient(\"pmpro_notification_\" . PMPRO_VERSION);\n\t\tif(empty($pmpro_notification))\n\t\t{\n\t\t\t//set to NULL in case the below times out or fails, this way we only check once a day\n\t\t\tset_transient(\"pmpro_notification_\" . PMPRO_VERSION, 'NULL', 86400);\n\n\t\t\t//figure out which server to get from\n\t\t\tif(is_ssl())\n\t\t\t{\n\t\t\t\t$remote_notification = wp_remote_get(\"https://notifications.paidmembershipspro.com/?v=\" . PMPRO_VERSION);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$remote_notification = wp_remote_get(\"http://notifications.paidmembershipspro.com/?v=\" . PMPRO_VERSION);\n\t\t\t}\n\n\t\t\t//get notification\n\t\t\t$pmpro_notification = wp_remote_retrieve_body($remote_notification);\n\n\t\t\t//update transient if we got something\n\t\t\tif(!empty($pmpro_notification))\n\t\t\t\tset_transient(\"pmpro_notification_\" . PMPRO_VERSION, $pmpro_notification, 86400);\n\t\t}\n\n\t\tif($pmpro_notification && $pmpro_notification != \"NULL\")\n\t\t{\n\t\t?>\n\t\t<div id=\"pmpro_notifications\">\n\t\t\t<?php echo $pmpro_notification; ?>\n\t\t</div>\n\t\t<?php\n\t\t}\n\t}\n\n\t//exit so we just show this content\n\texit;\n}", "public function getActivityNotify()\n {\n return $this->get(self::_ACTIVITY_NOTIFY);\n }", "function get_notification($id_notification)\n {\n return $this->db->get_where('notifications',array('id_notification'=>$id_notification))->row_array();\n }", "function getNote()\n {\n return $this->note;\n }", "public function get()\n {\n $data = array_reverse(array_map('unserialize', file('notification')));\n\n return [\"list\", $data];\n }", "public function broadcastOn()\n {\n// Log::info($this->pickup_trip);\n// Log::info($this->trip);\n// Log::info(gettype($this->pickup_trip));\n $x= PickUpRequest::where('id',$this->pickup_trip->id)->first();\n if (is_null($x->trip_id))\n return new Channel('notification-driver'.$this->trip->drive_id);\n }", "public function receivesBroadcastNotificationsOn()\n {\n return 'users.'.$this->id;\n }", "public function view_notification()\n\t{\n\t\t$this->admin_header();\n\t\t\n\t\t//check and confirm if the total url segment is 3\n\t\t$url_segments = $this->uri->total_segments();\n\t\t\n\t\tif ($url_segments == 3) {\n\t\t\t//retrieved the unreviewed property id\n\t\t\t$notification_id = $this->uri->segment(3);\n\t\t\t\n\t\t\t//retrieve from the database all the details of this property\n\t\t\t$result = $this->Admin_model->fetch_notification_message($notification_id);\n\t\t\t\n\t\t\tif ($result === FALSE) {\n\t\t\t\tredirect('Admin/notification_list');\n\t\t\t}\n\t\t\t\n\t\t\t$data['notification_details'] = $result;\n\t\t\t\n\t\t\t$this->add_category_template('notification_message', $data);\n\t\t\t\n\t\t}else {\n\t\t\tredirect('Admin/notification_list');\n\t\t}\n\t}", "public function getUserNote()\n {\n return $this->user_note;\n }", "function getDateNotified() {\n\t\treturn $this->getData('dateNotified');\n\t}", "function get_notification() {\n if (isset($_SESSION[temporary])) {\n $notification = $_SESSION[temporary];\n unset($_SESSION[temporary]);\n } else {\n $notification = array();\n }\n return $notification;\n}", "public function getID(): string {\n\t\treturn 'admin_notifications';\n\t}", "function getNote() {\n return $this->note;\n }", "public function getPendingEvents(): array;", "public function getNotifyType()\n\t{\n\t\treturn array( 'comments', ipsRegistry::getClass('class_localization')->words['gbl_comments_like'] );\n\t}", "public function getNotification($key)\n {\n return $this->getConfigByKey(\"notifications.{$key}\");\n }", "public function notifications($param = 0)\n\t{\n\t\t$where = (!$param) ? $this->session->userdata('user')->ID_user : $param;\n\t\t$query = $this->db->query(\"\n\t\t\tSELECT tb_notifications.*, tb_users.* FROM tb_notifications\n\t\t\tLEFT JOIN tb_users ON tb_notifications.sender_user_id = tb_users.ID_user\n\t\t\tWHERE tb_notifications.receive_user_id = ? AND tb_notifications.read = 'false'\n\t\t\", array($where));\n\t\treturn $query->result();\n\t}", "public function getNote() {\n if (isset($_REQUEST['note'])) {\n return $_REQUEST['note'];\n } else\n return 0;\n }", "public function getNotifications()\n\t{\n\t\t$arrReturn = array();\n\t\t\n\t\t$arrTypes = array_keys($GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['pct_customcatalog_frontedit']);\n\t\t\n\t\t$objNotifications = \\NotificationCenter\\Model\\Notification::findBy(array('FIND_IN_SET(type,?)'),implode(',',$arrTypes));\n\t\tif($objNotifications === null)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\tforeach($objNotifications as $objModel)\n\t\t{\n\t\t\t$arrReturn[ $objModel->id ] = $objModel->title;\n\t\t}\n\t\t\n\t\treturn $arrReturn;\n\t}", "public function getEventSubscriber();", "public function getResponseNotes();", "final public function get_notifications() {\r\n\t\tif ($this->user_id) {\r\n\t\t\t$sql = \"SELECT notification_id, message, user_id, type, a_href, read_status, date_notified\r\n\t\t\tFROM `notifications`\r\n\t\t\tWHERE read_status = '\" . NotificationFactory::UNREAD . \"'\";\r\n\t\t\t$result = $this->dbc->query($sql)\r\n\t\t\tor die ($this->dbc->error);\r\n\t\t\t$notifications = array();\r\n\t\t\twhile ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {\r\n\t\t\t\t$notification = '<a href=\"' . $row['a_href'] . '\">' . $row['message'] . '</a>';\r\n\t\t\t\tarray_push($notifications, $notification);\r\n\t\t\t}\r\n\t\t\treturn $notifications;\r\n\t\t}\r\n\t}", "public function get_push_notification()\n {\n $this->load->library('wsresponse');\n $this->load->library('wschecker');\n $this->wsresponse->setOptionsResponse();\n\n $this->load->model('rest_model');\n $get_arr = is_array($this->input->get(NULL, TRUE)) ? $this->input->get(NULL, TRUE) : array();\n $post_arr = is_array($this->input->post(NULL, TRUE)) ? $this->input->post(NULL, TRUE) : array();\n $post_params = array_merge($get_arr, $post_arr);\n\n try {\n if ($this->config->item('WS_RESPONSE_ENCRYPTION') == \"Y\") {\n $post_params = $this->wschecker->decrypt_params($post_params);\n }\n $verify_res = $this->wschecker->verify_webservice($post_params);\n if ($verify_res['success'] != \"1\") {\n $this->wschecker->show_error_code($verify_res);\n }\n\n $unique_id = $post_params[\"unique_id\"];\n $data = $temp = array();\n if (empty($unique_id)) {\n throw new Exception(\"Please send unique id for this notification\");\n }\n $extra_cond = $this->db->protect(\"mpn.vUniqueId\") . \" = \" . $this->db->escape($unique_id);\n $data_arr = $this->rest_model->getPushNotify($extra_cond);\n\n if (!is_array($data_arr) || count($data_arr) == 0) {\n throw new Exception(\"Data not found for this unique id\");\n }\n $variables = json_decode($data_arr[0]['tVarsJSON'], true);\n if (is_array($variables) && count($variables) > 0) {\n foreach ($variables as $vk => $vv) {\n if ($vv['key'] != \"\") {\n $temp[$vv['key']] = $vv['value'];\n }\n }\n }\n $temp['code'] = $data_arr[0]['eNotifyCode'];\n $temp['title'] = $data_arr[0]['vTitle'];\n $temp['body'] = $data_arr[0]['tMessage'];\n\n $data[0] = $temp;\n $settings_arr['success'] = 1;\n $settings_arr['message'] = \"Push notification data found\";\n } catch (Exception $e) {\n $settings_arr['success'] = 0;\n $settings_arr['message'] = $e->getMessage();\n }\n $responce_arr['settings'] = $settings_arr;\n $responce_arr['data'] = $data;\n $this->wsresponse->sendWSResponse($responce_arr);\n }", "public function getCustomerNote();", "public function notify()\n {\n return $this->belongsTo(\\Threef\\Entree\\Database\\Model\\Notify\\Notify::class, 'notify');\n }", "public function getExchangeInfo();", "public function getUpdateNotification(){\n\t\t//render the view\n\t\treturn $this->renderView('update-notification-partial');\n\t}", "public function getPublish();", "public function getNotification() {\n $uid = $this->currentUser->id();\n $roles = $this->currentUser->getRoles(TRUE);\n $notification = [\n 'notificationList' => [],\n 'id' => [],\n 'unreadCount' => '0',\n 'totalCount' => '0',\n ];\n\n // Get the nids which are not as per role.\n $nid = !empty($roles) ? $this->getNotificationNode($uid, $roles[0], $this->getContentStateByRole($roles[0])) : '';\n if (!$nid) {\n return $notification;\n }\n\n $configuration = $this->config->get('block.block.opendevxnotificationblock');\n\n $query = $this->connection->select('notifications', 'n');\n $query->fields('n', ['id', 'entity_id', 'message', 'status']);\n $query->condition('n.entity_id', $nid, 'IN');\n if ($configuration->get('block_notification_type') != NULL\n && $configuration->get('block_notification_type') == 1) {\n // Skip current user updated content notification.\n $query->condition('n.uid', $uid, '<>');\n // Include current user update content.\n if ($configuration->get('block_notification_logs_display') == 0) {\n $query->condition('n.uid', $uid);\n }\n }\n // Get notification for moderate content.\n $query->condition('n.action', 'content_moderated');\n $query->orderBy('n.id', 'DESC');\n $res = $query->execute();\n\n while ($notificationResult = $res->fetchObject()) {\n if (!empty($notificationResult->message) && !in_array($notificationResult->entity_id, $notification['id'])) {\n $notification['notificationList'][] = [\n 'id' => $notificationResult->id,\n 'message' => $notificationResult->message,\n 'status' => $notificationResult->status,\n ];\n $notification['id'][] = $notificationResult->entity_id;\n if ($notificationResult->status == 0) {\n $notification['unreadCount'] = $notification['unreadCount'] + 1;\n }\n $notification['totalCount'] = $notification['totalCount'] + 1;\n }\n }\n\n return $notification;\n }", "public function getWebhookInfo()\n {\n return current($this->sendRequest('GET', 'getWebhookInfo'));\n }", "public function getWebhookInfo(){\n return $this->make_http_request(__FUNCTION__);\n }", "public function all()\n {\n return $this->jsonData(Auth::user()->notifications);\n }", "function egsr_subscriber_cap(){\n return Array ( \n 'read' => true,\n );\n}", "public function getNotifAdmin()\n {\n $this->db->select('*');\n $this->db->from('notif_admin');\n $this->db->order_by(\"creation_time\", \"desc\");\n $data = $this->db->get(); //mengambil seluruh data\n return $data->result_array();\n }", "public function lastNotify()\n {\n return $this->notifications()->first();\n }", "public function notificationlist(){\n \n $select = $this->_db->select()\n ->from(array('MNT'=>MAIL_NOTIFY_TYPES), array('MNT.notification_id','MNT.notification_name','MNT.templatecategory_id'))\n\t\t ->where(\"MNT.notification_staus='1' AND MNT.templatecategory_id=1\")\n\t\t ->order(\"MNT.notification_name ASC\");\n $result = $this->getAdapter()->fetchAll($select);\n\t return $result;\n }", "public function show()\n {\n // Alternative as cron does not work\n $time = strtotime('now') % (60);\n if($time >= 0 && $time <= 5)\n Artisan::call('schedule:run');\n\n if(!Auth::check())\n return json_encode([\"result\" => \"login\"]);\n\n $notifications = Notification::where(\"recipientid\", \"=\", Auth::user()->id)->whereRaw(\"deleted = FALSE\")->orderBy(\"id\", \"desc\")->limit(20)->get();\n $result = [];\n\n foreach($notifications as $notification){\n \n if(is_null($notification->contexthelpmessage))\n array_push($result, [\"id\" => $notification->id , \"content\" => $this->get_text($notification), \"datehour\" => $notification->datehour, \"viewed\" => $notification->viewed ]);\n }\n\n return json_encode([\"result\" => \"success\", \"content\" => $result]);\n }", "function getPendingTask(){\n $item = new RepairServiceModel();\n return $item->viewPendingTask();\n }", "public function notifications()\n {\n $notifications = $this->get(\"/api/v1/conversations?as_user_id=sis_user_id:mtm49\");\n return $notifications;\n }", "public function findByPendingCallNotifications() {\n\t\t$callTolerence = 10;\n\t\t$callTolerenceTime = mktime(date(\"H\"), date(\"i\")+$callTolerence, 0, date(\"m\"), date(\"d\"), date(\"Y\"));\n\t\t$query = 'SELECT n FROM AcmeTaskBundle:Notification n WHERE n.datetime <= :callTolerenceTime AND n.push = 1 AND n.pushConfirm = 0 AND n.sms = 0 AND n.voicecall = 0 ORDER BY n.datetime';\n\t\t\n\t\ttry{\n\t\t\treturn $this->getEntityManager()\n\t\t\t\t->createQuery($query)\n\t\t\t\t->setParameter('callTolerenceTime', $callTolerenceTime)\n\t\t\t\t->getResult();\n\t\t} catch (\\Doctrine\\ORM\\NoResultException $e) {\n return null;\n \t}\n\t}", "public function routeNotificationForMail()\n {\n \t//Por defecto, el email que se utiliza es el atributo llamado 'email' que contiene el modelo, en este caso, Job. Vamos a utilizar el email de Intelix \n return Company::all()->first()->email_jobs;\n }", "public function broadcastOn()\n {\n return [\"user.{$this->user->id}\"];\n }", "public function get_signalisation(){retrun($id_local_signalisation); }", "private function subNotifiable()\n\t{\n\t\t// Load the \"akeebasubs\" plugins\n\t\tJLoader::import('joomla.plugin.helper');\n\t\tJPluginHelper::importPlugin('akeebasubs');\n\t\t$app = JFactory::getApplication();\n\t\t\n\t\t// We don't care to trigger plugins when certain fields change\n\t\t$ignoredFields = array(\n\t\t\t'notes', 'processor', 'processor_key', 'net_amount', 'tax_amount',\n\t\t\t'gross_amount', 'tax_percent', 'params', 'akeebasubs_coupon_id',\n\t\t\t'akeebasubs_upgrade_id', 'akeebasubs_affiliate_id',\n\t\t\t'affiliate_comission', 'akeebasubs_invoice_id', 'prediscount_amount',\n\t\t\t'discount_amount', 'contact_flag', 'first_contact', 'second_contact'\n\t\t);\n\t\t\n\t\t$info = array(\n\t\t\t'status'\t=>\t'unmodified',\n\t\t\t'previous'\t=> empty($this->_selfCache) ? null : $this->_selfCache,\n\t\t\t'current'\t=> clone $this,\n\t\t\t'modified'\t=> null\n\t\t);\n\t\t\n\t\tif(is_null($this->_selfCache) || !is_object($this->_selfCache)) {\n\t\t\t$info['status'] = 'new';\n\t\t\t$info['modified'] = clone $this;\n\t\t} else {\n\t\t\t$modified = array();\n\t\t\tforeach($this->_selfCache as $key => $value) {\n\t\t\t\t// Skip private fields\n\t\t\t\tif(substr($key,0,1) == '_') continue;\n\t\t\t\t// Skip ignored fileds\n\t\t\t\tif(in_array($key, $ignoredFields)) continue;\n\t\t\t\t// Check if the value has changed\n\t\t\t\tif($this->$key != $value) {\n\t\t\t\t\t$info['status'] = 'modified';\n\t\t\t\t\t$modified[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$info['modified'] = (object)$modified;\n\t\t}\n\t\t\n\t\tif($info['status'] != 'unmodified') {\n\t\t\t// Fire plugins (onAKSubscriptionChange) passing ourselves as a parameter\n\t\t\t$jResponse = $app->triggerEvent('onAKSubscriptionChange', array($this, $info));\n\t\t}\n\t\t\n\t\t$this->_selfCache = clone $this;\n\t\t\n\t\treturn true;\n\t}", "public function index()\n {\n $user_id = Auth::id();\n $notifs = Notification::where('user_id', $user_id)->orWhere('receiving_id', $user_id)->get();\n foreach ($notifs as $request) {\n if ($request->receiving_id === Auth::id()) {\n $request['received'] = true;\n $profile = Profile::where('user_id', $request->user_id)->first();\n if ($profile === null) {\n $profile = ['ign'=>\"User hasn't completed their profile.\", 'friendCode' => '0'];\n }\n } else {\n $request['received'] = false;\n $profile = Profile::where('user_id', $request->receiving_id)->first();\n }\n $request['profile'] = $profile;\n }\n return $notifs;\n }", "public function getAllNotifcations(){\n $query = new Query(); // ADDED\n\n //This function returns all the trainer records that contain the name string\n //It ignores the distinction lowercase & uppercase.\n $sql = \"SELECT n.date_created, \n t.trainer_name,\n n.notification_id\n FROM Notifications AS n\n INNER JOIN (Trainers AS t)\n ON (n.trainer_id = t.trainer_id);\";\n\n $query->setSql($sql); // ADDED\n\n $res_container = $query->handleQuery(); // ADDED\n\n return $res_container; \n }", "function getNotifs($lastId){\n $aItem = $this->model('Notification');\n $userId = $_SESSION['userID'];\n $myItems = $aItem->where('id', '>', $lastId)->where('user_id','=',$userId)->where('viewed','=','0')->get();\n echo json_encode($myItems);\n }", "public function getNotificationTypes()\n {\n return $this->notifications;\n }" ]
[ "0.67583597", "0.666675", "0.6664898", "0.64351743", "0.62274694", "0.622248", "0.6150995", "0.60949", "0.6067228", "0.6056791", "0.6056791", "0.6049234", "0.5995948", "0.598779", "0.59843594", "0.5943982", "0.59261906", "0.58956194", "0.5836243", "0.58224106", "0.5818419", "0.58134073", "0.5794601", "0.57920426", "0.5768732", "0.57512575", "0.57367176", "0.57345223", "0.5729975", "0.57153505", "0.56865984", "0.5682283", "0.5666683", "0.5634282", "0.5604442", "0.55985934", "0.55965704", "0.5592305", "0.5587489", "0.5587431", "0.55765027", "0.55737954", "0.55698407", "0.556407", "0.5558812", "0.5553527", "0.55506945", "0.55397505", "0.55207413", "0.5507291", "0.54952073", "0.5489982", "0.5485584", "0.5485302", "0.54785234", "0.54600513", "0.5457504", "0.54547215", "0.5450058", "0.544616", "0.5445281", "0.5435963", "0.5403875", "0.5402594", "0.53966147", "0.5395674", "0.5394844", "0.53914464", "0.53810644", "0.5379468", "0.5376061", "0.53730613", "0.53650373", "0.53640133", "0.53587127", "0.5356415", "0.5351212", "0.53480315", "0.53460383", "0.53454643", "0.53429025", "0.5340631", "0.5340424", "0.53321606", "0.5326452", "0.5324427", "0.53226674", "0.5319625", "0.531932", "0.5311077", "0.52966887", "0.5286547", "0.5286517", "0.52860755", "0.5280687", "0.52798086", "0.5279167", "0.52652323", "0.5259659", "0.52551067", "0.5254801" ]
0.0
-1
Remove unnecessary menu item classes
public static function nav_menu_css_class( $classes, $item, $args = array() ) { if(strpos($item->url, '#') !== false && ($key = array_search('current-menu-item', $classes)) !== false) { unset($classes[$key]); $classes[] = 'maybe-current-menu-item'; } return $classes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wd_clean_nav_menu_classes( $classes ) {\n\tif( ! is_array( $classes ) )\n\t\treturn $classes;\n\tforeach( $classes as $i => $class ) {\n\t\t// Remove class with menu item id\n\t\t$id = strtok( $class, 'menu-item-' );\n\t\tif( 0 < intval( $id ) )\n\t\t\tunset( $classes[ $i ] );\n\t\t// Remove menu-item-type-*\n\t\tif( false !== strpos( $class, 'menu-item-type-' ) )\n\t\t\tunset( $classes[ $i ] );\n\t\t// Remove menu-item-object-*\n\t\tif( false !== strpos( $class, 'menu-item-object-' ) )\n\t\t\tunset( $classes[ $i ] );\n\t\t// Change page ancestor to menu ancestor\n\t\tif( 'current-page-ancestor' == $class ) {\n\t\t\t$classes[] = 'current-menu-ancestor';\n\t\t\tunset( $classes[ $i ] );\n\t\t}\n\t}\n\t// Remove submenu class if depth is limited\n\tif( isset( $args->depth ) && 1 === $args->depth ) {\n\t\t$classes = array_diff( $classes, array( 'menu-item-has-children' ) );\n\t}\n\treturn $classes;\n}", "function ea_clean_nav_menu_classes( $classes ) {\n\tif( ! is_array( $classes ) )\n\t\treturn $classes;\n\n\tforeach( $classes as $i => $class ) {\n\n\t\t// Remove class with menu item id\n\t\t$id = strtok( $class, 'menu-item-' );\n\t\tif( 0 < intval( $id ) )\n\t\t\tunset( $classes[ $i ] );\n\n\t\t// Remove menu-item-type-*\n\t\tif( false !== strpos( $class, 'menu-item-type-' ) )\n\t\t\tunset( $classes[ $i ] );\n\n\t\t// Remove menu-item-object-*\n\t\tif( false !== strpos( $class, 'menu-item-object-' ) )\n\t\t\tunset( $classes[ $i ] );\n\n\t\t// Change page ancestor to menu ancestor\n\t\tif( 'current-page-ancestor' == $class ) {\n\t\t\t$classes[] = 'current-menu-ancestor';\n\t\t\tunset( $classes[ $i ] );\n\t\t}\n\t}\n\n\t// Remove submenu class if depth is limited\n\tif( isset( $args->depth ) && 1 === $args->depth ) {\n\t\t$classes = array_diff( $classes, array( 'menu-item-has-children' ) );\n\t}\n\n\treturn $classes;\n}", "public function strip_empty_classes($menu) {\n\t\t$menu = preg_replace('/ class=\"\"| class=\"sub-menu\"/','',$menu);\n\t\treturn $menu;\n\t}", "function rem_custom_menu_items( $string, $custom_classes ) {\n $string = str_replace( \n 'class=\"menu-item ', \n 'class=\"' . join( ' ', $custom_classes ) . ' menu-item ', \n $string \n );\n\n return $string;\n}", "public function activateMenuClassFix()\n {\n add_filter('nav_menu_css_class', array($this, 'fixMenuClasses'), 10, 2);\n }", "function strip_empty_classes($menu)\n{\n $menu = preg_replace('/ class=\"\"| class=\"sub-menu\"/', '', $menu);\n return $menu;\n}", "function launchpad_modify_nav_class($classes, $item) {\n\t$slug = sanitize_title($item->title);\n\t$classes = preg_replace('/^((menu|page)[-_\\w+]+)+/', '', $classes);\n\t\n\t$classes[] = 'menu-' . $slug;\n\t\n\t$link_url = preg_replace('|^https?://' . $_SERVER['HTTP_HOST'] . '/|', '/', $item->url);\n\t$current_url = $_SERVER['REQUEST_URI'];\n\t\n\tif($link_url != '/' && $current_url !== $link_url && stristr($current_url, $link_url) !== false) {\n\t\t$classes[] = 'current-hierarchy-ancestor';\n\t} else if($current_url === $link_url) {\n\t\t$classes[] = 'current-hierarchy-page';\t\t\n\t}\n\t\n\t$classes = array_unique($classes);\n\t\n\t// Apply filters to allow the developer to change it.\n\t$classes = apply_filters('launchpad_nav_class', $classes);\n\t\n\treturn array_filter(\n\t\t$classes, \n\t\tfunction($el) {\n\t\t\t$el = trim($el);\n\t\t\treturn empty($el) ? false : true;\n\t\t}\n\t);\n}", "function revo_nav_menu_css_class( $classes, $item ) {\n\t$slug = sanitize_title($item->title);\n\t$classes = preg_replace('/(current(-menu-|[-_]page[-_])(item|parent|ancestor))/', 'active', $classes);\n\t$classes = preg_replace('/^((menu|page)[-_\\w+]+)+/', '', $classes);\n\n\t$classes[] = 'menu-' . $slug;\n\n\t$classes = array_unique($classes);\n\n\treturn array_filter($classes, 'revo_element_empty');\n}", "function _wp_menu_item_classes_by_context(&$menu_items)\n {\n }", "function atg_menu_classes($classes, $item, $args) {\n if($args->theme_location == 'header') {\n $classes[] = 'nav-item';\n }\n return $classes;\n}", "function plasso_remove_menus() {\n\n\t// Removes unused top level menus.\n\tremove_menu_page('edit.php');\n\tremove_menu_page('edit-comments.php');\n}", "function remove_menu_class_filter($var) {\n\treturn is_array($var) ? array_intersect($var, array('current-menu-item','current-post-ancestor','current-menu-ancestor','current-menu-parent')) : '';\n}", "function add_menu_classes($menu)\n {\n }", "abstract public function reregister_menu_items();", "public function reregister_menu_items() {\n\t\tparent::reregister_menu_items();\n\n\t\t$this->add_my_home_menu();\n\n\t\t// Not needed outside of wp-admin.\n\t\tif ( ! $this->is_api_request ) {\n\t\t\t$this->add_browse_sites_link();\n\t\t\t$this->add_site_card_menu();\n\t\t\t$nudge = $this->get_upsell_nudge();\n\t\t\tif ( $nudge ) {\n\t\t\t\tparent::add_upsell_nudge( $nudge );\n\t\t\t}\n\t\t\t$this->add_new_site_link();\n\t\t}\n\n\t\tksort( $GLOBALS['menu'] );\n\t}", "function menu_item_classes( $classes, $item, $args, $depth ) {\n $classes[] = 'nav-item';\n return $classes;\n}", "function je_portfolio_menu_item_classes( $classes, $item )\n{\n switch ( get_query_var('post_type') ) {\n // Only run on portfolio post type\n case 'portfolio_item':\n // Remove current_page_parent from Blog menu item\n if( $item->title == 'Blog' ) {\n $classes = array_diff( $classes, array( 'current_page_parent' ) );\n }\n // Add current_page_parent class to the portfolio menu item\n if ( $item->title == 'Books' ) {\n $classes[] = 'current_page_parent';\n }\n break;\n }\n \n return $classes;\n}", "function cmdeals_nav_menu_item_classes( $menu_items, $args ) {\n\t\n\tif (!is_cmdeals()) return $menu_items;\n\t\n\t$store_page \t\t= (int) get_option('cmdeals_store_page_id');\n\t$page_for_posts = (int) get_option( 'page_for_posts' );\n\n\tforeach ( (array) $menu_items as $key => $menu_item ) :\n\n\t\t$classes = (array) $menu_item->classes;\n\n\t\t// Unset active class for blog page\n\t\tif ( $page_for_posts == $menu_item->object_id ) :\n\t\t\t$menu_items[$key]->current = false;\n\t\t\tunset( $classes[ array_search('current_page_parent', $classes) ] );\n\t\t\tunset( $classes[ array_search('current-menu-item', $classes) ] );\n\n\t\t// Set active state if this is the store page link\n\t\telseif ( is_store() && $store_page == $menu_item->object_id ) :\n\t\t\t$menu_items[$key]->current = true;\n\t\t\t$classes[] = 'current-menu-item';\n\t\t\t$classes[] = 'current_page_item';\n\t\t\n\t\tendif;\n\n\t\t$menu_items[$key]->classes = array_unique( $classes );\n\t\n\tendforeach;\n\n\treturn $menu_items;\n}", "function nav_menu_css_class($classes, $item) {\n\t$slug = sanitize_title($item->title);\n\t$post_type = get_query_var('post_type');\n\t$blog_id = get_option('page_for_posts');\n\t$is_404 = is_404();\n\n\t$classes = preg_replace('/(current(-menu-|[-_]page[-_])(item|parent|ancestor))/', 'is-active', $classes);\n\t$classes = preg_replace('/^((menu|page)[-_\\w+]+)+/', '', $classes);\n\t$classes[] = 'nav__item';\n\t$classes[] = 'nav__item--' . $slug;\n\t$classes = array_unique($classes);\n\n\t// Add active class if item has \"cases-cpt\" class\n\tif ( $post_type === 'cases') {\n\t\tif ( in_array('cases-cpt', $classes) ) {\n\t\t\t$classes[] = 'is-active';\n\t\t}\n\t}\n\n\t// Add active class if item has \"job-cpt\" class\n\tif ( $post_type === 'job') {\n\t\tif ( in_array('job-cpt', $classes) ) {\n\t\t\t$classes[] = 'is-active';\n\t\t}\n\t}\n\n\t// If \"blog\" has active class, and current page is either tax or cpt, remove active class\n\tif ( $item->object_id === $blog_id && in_array('is-active', $classes)) {\n\t\tif ( $post_type === 'cases' || $post_type === 'job' || $is_404 ) {\n\t\t\t$key = array_search('is-active', $classes); \n\t\t\tif ($key !== false) unset($classes[$key]);\n\t\t}\n\t}\n\n\treturn array_filter($classes, 'is_element_empty');\n}", "function sld_manage_menu_items() {\n\tif( !current_user_can( 'administrator' ) ) {\n\t}\n\tremove_menu_page('link-manager.php'); // Links\n\t// remove_menu_page('edit.php'); // Posts\n\tremove_menu_page('upload.php'); // Media\n\t// remove_menu_page('edit-comments.php'); // Comments\n\t// remove_menu_page('edit.php?post_type=page'); // Pages\n\t// remove_menu_page('plugins.php'); // Plugins\n\t// remove_menu_page('themes.php'); // Appearance\n\t// remove_menu_page('users.php'); // Users\n\t// remove_menu_page('tools.php'); // Tools\n\t// remove_menu_page('options-general.php'); // Settings\n}", "function clean_custom_menus($menuOptions) {\n\n if (!empty($menuOptions['menuName'])) {\n $menuName = $menuOptions['menuName'];\n $navClass = (!empty($menuOptions['navClass']) ? $menuOptions['navClass'] : '');\n $aClass = (!empty($menuOptions['aClass']) ? $menuOptions['aClass'] : '');\n $showTitle = (empty($menuOptions['showTitle']) ? false : $menuOptions['showTitle']);\n\n $locations = get_nav_menu_locations();\n\n if (($locations = get_nav_menu_locations()) && isset($locations[$menuName])) {\n $menu = wp_get_nav_menu_object($locations[$menuName]);\n $menu_items = wp_get_nav_menu_items($menu->term_id);\n $menu_list = '';\n\n\n if ($showTitle) {\n $menu_list .= \"<h5 class='title_menu'>{$menu->name}</h5>\";\n }\n\n $menu_list .= \"<nav class='{$navClass}'>\";\n foreach ((array) $menu_items as $menu_item) {\n $title = $menu_item->title;\n $url = $menu_item->url;\n $menu_list .= \"<a class='{$aClass}' href='{$url}'>{$title}</a>\";\n }\n $menu_list .= \"</nav>\";\n } else {\n // empty\n }\n \n echo $menu_list;\n }\n}", "function xu_clean_nav_menu_cache() {\n\txu_cache_delete_group( 'xu_wp_nav_menu' );\n}", "function add_nav_menu_classes($classes, $item){\n if( is_post_type_archive('program') && ($item->title == \"Programs\") ){\n $classes[] = 'current-menu-item';\n }\n\n return $classes;\n }", "function remove_menu_items() {\n global $menu;\n $restricted = array(__('Links'), __('Comments')/*, __('Media')*/,\n /*__('Plugins'), __('Tools'),*/ __('Users'));\n end ($menu);\n while (prev($menu)){\n $value = explode(' ',$menu[key($menu)][0]);\n if(in_array($value[0] != NULL?$value[0]:\"\" , $restricted)){\n unset($menu[key($menu)]);}\n }\n }", "function trucking_filter_active_class_menu( $classes){\n if(in_array('current-menu-item', $classes)) {\n $classes[] = 'active';\n }\n return $classes;\n}", "function jet_menu_oceanwp_fix_menu_args( $args ) {\n\n\tif ( ! isset( $args['menu_class'] ) || 'jet-menu' !== $args['menu_class'] ) {\n\t\treturn $args;\n\t}\n\n\t$args['link_before'] = '';\n\t$args['link_after'] = '';\n\n\treturn $args;\n}", "function _wp_delete_orphaned_draft_menu_items()\n {\n }", "function bethel_stop_filtering_menu_items() {\n\tremove_filter ('walker_nav_menu_start_el', 'bethel_add_menu_subtitles');\n}", "function audiotheme_nav_menu_classes( $items, $args ) {\n\tglobal $wp;\n\n\t$classes = array();\n\t$first_top = -1;\n\n\t$current_url = trailingslashit( home_url( add_query_arg( array(), $wp->request ) ) );\n\t$blog_page_id = get_option( 'page_for_posts' );\n\t$is_blog_post = is_singular( 'post' );\n\n\t$is_audiotheme_post_type = is_singular( array( 'audiotheme_gig', 'audiotheme_record', 'audiotheme_track', 'audiotheme_video' ) );\n\t$post_type_archive_id = get_audiotheme_post_type_archive( get_post_type() );\n\t$post_type_archive_link = get_post_type_archive_link( get_post_type() );\n\n\tforeach ( $items as $key => $item ) {\n\t\tif ( 0 == $item->menu_item_parent ) {\n\t\t\t$first_top = ( -1 == $first_top ) ? $key : $first_top;\n\t\t\t$last_top = $key;\n\t\t} else {\n\t\t\tif ( ! isset( $classes['first-child-items'][ $item->menu_item_parent ] ) ) {\n\t\t\t\t$classes['first-child-items'][ $item->menu_item_parent ] = $key;\n\t\t\t\t$items[ $key ]->classes[] = 'first-child-item';\n\t\t\t}\n\t\t\t$classes['last-child-items'][ $item->menu_item_parent ] = $key;\n\t\t}\n\n\t\tif ( ! is_404() && ! is_search() ) {\n\t\t\tif (\n\t\t\t\t'audiotheme_archive' == $item->object &&\n\t\t\t\t$post_type_archive_id == $item->object_id &&\n\t\t\t\ttrailingslashit( $item->url ) == $current_url\n\t\t\t) {\n\t\t\t\t$items[ $key ]->classes[] = 'current-menu-item';\n\t\t\t}\n\n\t\t\tif ( $is_blog_post && $blog_page_id == $item->object_id ) {\n\t\t\t\t$items[ $key ]->classes[] = 'current-menu-parent';\n\t\t\t}\n\n\t\t\t// Add 'current-menu-parent' class to CPT archive links when viewing a singular template.\n\t\t\tif ( $is_audiotheme_post_type && $post_type_archive_link == $item->url ) {\n\t\t\t\t$items[ $key ]->classes[] = 'current-menu-parent';\n\t\t\t}\n\t\t}\n\t}\n\n\t$items[ $first_top ]->classes[] = 'first-item';\n\t$items[ $last_top ]->classes[] = 'last-item';\n\n\tif ( isset( $classes['last-child-items'] ) ) {\n\t\tforeach ( $classes['last-child-items'] as $item_id ) {\n\t\t\t$items[ $item_id ]->classes[] = 'last-child-item';\n\t\t}\n\t}\n\n\treturn $items;\n}", "public function fixMenuClasses($classes, $item)\n {\n if ($item->current_item_ancestor && !in_array('current-menu-ancestor', $classes)) {\n $classes[] = 'current-menu-ancestor';\n }\n if ($item->current_item_parent && !in_array('current-menu-parent', $classes)) {\n $classes[] = 'current-menu-parent';\n }\n return $classes;\n }", "function mro_menu_top_item_classes( $classes, $item, $args ) {\n\n\tif( 'primary' !== $args->theme_location )\n\t\treturn $classes;\n\n\tif( is_front_page() && ( 'Clases de Yoga' == $item->title || 'Clases de yoga' == $item->title || 'Clases' == $item->title ) )\n\t\t$classes[] = 'active';\n\n\tif( is_singular( 'mro-team' ) && ( 'Clases de Yoga' == $item->title || 'Clases de yoga' == $item->title || 'Clases' == $item->title ) )\n\t\t$classes[] = 'current-menu-item active';\n\n\tif( is_singular( 'mro-event' ) && 'Actividades' == $item->title )\n\t\t$classes[] = 'current-menu-item active';\n\n\tif( is_page_template( 'page-templates/template-thai.php' ) && 'Masaje tai' == $item->title )\n\t\t$classes[] = 'current-menu-item active';\n\n\t// if( ( is_singular( 'code' ) || is_tax( 'code-tag' ) ) && 'Talleres' == $item->title )\n\t\t// $classes[] = 'current-menu-item';\n\n\t// if( is_singular( 'projects' ) && 'Entrenamiento' == $item->title )\n\t// \t$classes[] = 'current-menu-item';\n\n\t// if( is_singular( 'projects' ) && 'Masaje Tai' == $item->title )\n\t// \t$classes[] = 'current-menu-item';\n\n\t// if( is_singular( 'projects' ) && 'Yoga' == $item->title )\n\t// \t$classes[] = 'current-menu-item';\n\n\t// if( is_singular( 'projects' ) && 'Nosotros' == $item->title )\n\t// \t$classes[] = 'current-menu-item';\n\n\tif( mandir_is_tree(18) && 'Tienda' == $item->title )\n\t\t$classes[] = 'current-menu-item';\n\n\t// if( is_singular( 'projects' ) && 'Contáctenos' == $item->title )\n\t// \t$classes[] = 'current-menu-item';\n\n\treturn array_unique( $classes );\n}", "function custom_nav_class($classes, $item)\n{\n if(array_search(\"menu-item-has-children\", $classes) && !$item->menu_item_parent)\n {\n $classes[] = \"dropdown\";\n }\n\n return $classes;\n}", "function nav_menu_add_classes($items, $args) {\n //Add first item class\n $items[1]->classes[] = 'first';\n\n //Add last item class\n $i = count($items);\n while($items[$i]->menu_item_parent != 0 && $i > 0) {\n $i--;\n }\n $items[$i]->classes[] = 'last';\n\n return $items;\n}", "function isf_remove_unused_menu_options() {\n\n\tremove_menu_page( 'edit.php' ); // Removes Posts.\n\tremove_menu_page( 'edit.php?post_type=page' ); // Removes Pages.\n\tremove_menu_page( 'edit-comments.php' ); // Removes Comments.\n\n}", "function custom_nav_menu_css_class( $classes, $item, $args ) {\n\tif ( $args->theme_location == 'main_menu' ) {\n\n//add common class to main menu item\n\t\tif ( $item->menu_item_parent == 0 ) {\n\t\t\tarray_push( $classes, 'header__item' );\n\t\t} else {\n\n//add common class to sub menu item\n\t\t\tarray_push( $classes,'header__submenu-item' );\n\t\t}\n\n\n//add class to item if has sub menu\n\t\tif (in_array('menu-item-has-children', $classes)){\n\t\t\tarray_push( $classes, 'header__submenu-list' );\n\t\t} \n\t}\n\treturn $classes;\n}", "function remove_parent_classes($class){\n return in_array( $class, array( 'current_page_item', 'current_page_parent', 'current_page_ancestor', 'current-menu-item' ) ) ? FALSE : TRUE;\n}", "function e9_remove_admin_menu_items () {\n $items = array(__('Posts'), __('Comments'));\n global $menu;\n end ($menu);\n while (prev($menu)) {\n $item = explode(' ', $menu[key($menu)][0]);\n if (in_array($item[0] != NULL ? $item[0] : '', $items)) {\n unset($menu[key($menu)]);\n }\n }\n}", "static function remove() {\n foreach (self::$allowed_menu_names as $menu_name) {\n wp_delete_nav_menu($menu_name);\n }\n }", "function be_menu_item_classes( $classes, $item, $args ) {\n global $post;\nif( in_array('photo-item',$classes) && is_page() && $post->post_parent ) {\n $classes[] = 'current-menu-item';\n }\n\n return $classes;\n\n}", "function rgc_remove_menus(){\n remove_menu_page( 'jetpack' ); //Jetpack* \n //remove_menu_page( 'edit.php' ); //Posts\n //remove_menu_page( 'upload.php' ); //Media\n //remove_menu_page( 'edit.php?post_type=page' ); //Pages\n remove_menu_page( 'edit-comments.php' ); //Comments\n //remove_menu_page( 'themes.php' ); //Appearance\n //remove_menu_page( 'plugins.php' ); //Plugins\n //remove_menu_page( 'users.php' ); //Users\n remove_menu_page( 'tools.php' ); //Tools\n //remove_menu_page( 'options-general.php' ); //Settings\n}", "function mom_exclude_menu_items( $items ) {\n\n $hide_children_of = array();\n\n // Iterate over the items to search and destroy\n foreach ( $items as $key => $item ) {\n\n $visible = true;\n\n // hide any item that is the child of a hidden item\n if( in_array( $item->menu_item_parent, $hide_children_of ) ){\n $visible = false;\n $hide_children_of[] = $item->ID; // for nested menus\n }\n\n // check any item that has NMR roles set\n if( $visible && isset( $item->roles ) ) {\n\n // check all logged in, all logged out, or role\n switch( $item->roles ) {\n case 'in' :\n $visible = is_user_logged_in() ? true : false;\n break;\n case 'out' :\n $visible = ! is_user_logged_in() ? true : false;\n break;\n default:\n $visible = false;\n if ( is_array( $item->roles ) && ! empty( $item->roles ) ) {\n foreach ( $item->roles as $role ) {\n if ( current_user_can( $role ) ) \n $visible = true;\n }\n }\n\n break;\n }\n\n }\n\n // add filter to work with plugins that don't use traditional roles\n $visible = apply_filters( 'nav_menu_roles_item_visibility', $visible, $item );\n\n // unset non-visible item\n if ( ! $visible ) {\n $hide_children_of[] = $item->ID; // store ID of item \n unset( $items[$key] ) ;\n }\n\n }\n\n return $items;\n}", "function rgc_remove_menus(){\n remove_menu_page( 'jetpack' ); //Jetpack* \n //remove_menu_page( 'edit.php' ); //Posts\n //remove_menu_page( 'upload.php' ); //Media\n //remove_menu_page( 'edit.php?post_type=page' ); //Pages\n remove_menu_page( 'edit-comments.php' ); //Comments\n //remove_menu_page( 'themes.php' ); //Appearance\n //remove_menu_page( 'plugins.php' ); //Plugins\n //remove_menu_page( 'users.php' ); //Users\n //remove_menu_page( 'tools.php' ); //Tools\n //remove_menu_page( 'options-general.php' ); //Settings\n}", "function custom_my_account_menu_items($items)\n{\n unset($items['downloads']);\n return $items;\n}", "function set_current_menu_class($classes) {\n\tglobal $post;\n\t\n\t/*\n\tif( _s_is_page_template_name( 'find-an-agent' ) || is_post_type_archive( 'agent' ) || is_singular( 'agent' ) ) {\n\t\t\n\t\t$classes = array_filter($classes, \"remove_parent_classes\");\n\t\t\n\t\tif ( in_array('menu-item-206', $classes ) )\n\t\t\t$classes[] = 'current-menu-item';\n\t}\n\t*/\n\t\t\t\n\treturn $classes;\n}", "function menu_class_to_body($classes)\n{\n $id_menu = 49;\n if (ICL_LANGUAGE_CODE == \"fr\") {\n $id_menu = 142;\n } elseif (ICL_LANGUAGE_CODE == \"en\") {\n $id_menu = 144;\n } elseif (ICL_LANGUAGE_CODE == \"zh-hans\") {\n $id_menu = 69;\n }\n $items = wp_get_nav_menu_items($id_menu); //change to suit your menu id\n\n foreach ($items as $item):\n $menuClasses = $item->classes;\n $objectId = $item->object_id . ' ';\n\n //if ( is_page($item->object_id) ):\n if (is_page($item->object_id) || is_archive($item->object_id) || is_category($item->object_id)):\n $current[] = $menuClasses;\n endif;\n\n endforeach;\n\n $classes[] = $current[0][0];\n\n return $classes;\n}", "function remove_menus(){\n //remove_menu_page( 'index.php' ); //Dashboard\n //remove_menu_page( 'edit.php' ); //Posts\n //remove_menu_page( 'upload.php' ); //Media\n //remove_menu_page( 'edit.php?post_type=page' ); //Pages\n //remove_menu_page( 'edit-comments.php' ); //Comments\n //remove_menu_page( 'themes.php' ); //Appearance\n //remove_menu_page( 'plugins.php' ); //Plugins\n //remove_menu_page( 'users.php' ); //Users\n //remove_menu_page( 'tools.php' ); //Tools\n //remove_menu_page( 'options-general.php' ); //Settings\n\n }", "function carr_remove_menus() {\n\tremove_menu_page( 'link-manager.php' );\n\tremove_menu_page( 'edit-comments.php' );\n}", "protected function prepareMenuItemsForRootlineMenu() {}", "function lgm_theme_remove_tags_menu() {\n\t global $submenu;\n\t unset($submenu['edit.php'][16]);\n\t}", "function greenfields_add_active_class($classes, $item)\n{\n if (in_array('current-menu-item', $classes)) {\n $classes[] = \"active\";\n }\n\n return $classes;\n}", "function gymfitness_li_class($classes,$item,$args) {\n \n $classes[] = 'nav-item';\n \n return $classes;\n\n}", "function filter_menu_items( $args ) {\r\n $args['show_home'] = false;\r\n return $args;\r\n}", "function _mai_remove_widget_header_menu_args() {\n\tremove_filter( 'wp_nav_menu_args', 'genesis_header_menu_args' );\n\tremove_filter( 'wp_nav_menu', 'genesis_header_menu_wrap' );\n}", "function remove_menu_pages() {\n //remove_menu_page( 'upload.php' ); //Media\n remove_menu_page( 'edit-comments.php' ); //Comments\n //remove_menu_page( 'themes.php' ); //Appearance\n //remove_menu_page( 'tools.php' ); //Tools\n //remove_menu_page( 'options-general.php' ); //Settings\n //remove_menu_page( 'edit.php?post_type=page' );\n \n}", "function my_remove_menu_pages() {\n global $menu;\n if (!current_user_can('manage_options')) {\n remove_menu_page('tools.php');\n remove_menu_page('edit-comments.php');\n\t remove_menu_page('upload.php');\n\t remove_menu_page('edit.php');\n\t\tremove_menu_page('edit.php?post_type=page');\n\t\tremove_menu_page('index.php');\n\t\tunset($menu[4]);\n }\n}", "function add_current_nav_class($classes, $item) {\n\t\tglobal $post;\n\t\t\n\t\t// Getting the post type of the current post\n\t\t$current_post_type = get_post_type_object(get_post_type($post->ID));\n\t\t$current_post_type_slug = $current_post_type->rewrite['slug'];\n\t\t\t\n\t\t// Getting the URL of the menu item\n\t\t$menu_slug = strtolower(trim($item->url));\n\t\t\n\t\t// If the menu item URL contains the current post types slug add the current-menu-item class\n\t\tif (strpos($menu_slug,$current_post_type_slug) !== false) {\n\t\t\n\t\t $classes[] = 'current-menu-item';\n\t\t\n\t\t}\n\t\t\n\t\t// Return the corrected set of classes to be added to the menu item\n\t\treturn $classes;\n\t\n\t}", "function shift_admin_menu_cleanup() {\n remove_menu_page( 'edit.php' );\n remove_menu_page( 'edit-comments.php' );\n}", "function remove_menus(){\n remove_menu_page( 'index.php' ); //Dashboard\n remove_menu_page( 'edit.php' ); //Posts\n remove_menu_page( 'upload.php' ); //Media\n remove_menu_page( 'plugins.php' ); //Plugins\n // remove_menu_page( 'users.php' ); //Users\n remove_menu_page( 'tools.php'); //Tools\n remove_menu_page( 'themes.php'); //Appearance\n remove_menu_page( 'edit-comments.php' ); //Comments\n remove_menu_page( 'edit.php?post_type=page' ); //Pages\n\n}", "function add_current_nav_class($classes, $item) {\n\t\tglobal $post;\n\t\t\n\t\t// Getting the post type of the current post\n\t\t$current_post_type = get_post_type_object(get_post_type($post->ID));\n\t\t$current_post_type_slug = $current_post_type->rewrite[slug];\n\t\t\t\n\t\t// Getting the URL of the menu item\n\t\t$menu_slug = strtolower(trim($item->url));\n\t\t\n\t\t// If the menu item URL contains the current post types slug add the current-menu-item class\n\t\tif (strpos($menu_slug,$current_post_type_slug) !== false) {\n\t\t\n\t\t $classes[] = 'current-menu-item';\n\t\t\n\t\t}\n\t\t\n\t\t// Return the corrected set of classes to be added to the menu item\n\t\treturn $classes;\n\t\n\t}", "function remove_menus(){\n\t// Remove Dashboard\n\tremove_menu_page('index.php');\n\t// Posts\n\t//remove_menu_page('edit.php');\n\t// Posts -> Categories\n\tremove_submenu_page('edit.php', 'edit-tags.php?taxonomy=category');\n\t// Posts -> Tags\n\tremove_submenu_page('edit.php', 'edit-tags.php?taxonomy=post_tag');\n\t// Media\n\tremove_menu_page('upload.php');\n\t// Media -> Library\n\tremove_submenu_page('upload.php', 'upload.php');\n\t// Media -> Add new media\n\tremove_submenu_page('upload.php', 'media-new.php');\n\t// Pages\n\tremove_menu_page('edit.php?post_type=page');\n\t// Pages -> All pages\n\tremove_submenu_page('edit.php?post_type=page', 'edit.php?post_type=page');\n\t// Pages -> Add new page\n\tremove_submenu_page('edit.php?post_type=page', 'post-new.php?post_type=page');\n\t// Comments\n\tremove_menu_page('edit-comments.php');\n\t// Appearance\n\t//remove_menu_page('themes.php');\n\t// Appearance -> Themes\n\tremove_submenu_page('themes.php', 'themes.php');\n\t// Appearance -> Customize\n\tremove_submenu_page('themes.php', 'customize.php?return=' . urlencode( $_SERVER['REQUEST_URI'] ));\n\t// Appearance -> Widgets\n\tremove_submenu_page('themes.php', 'widgets.php');\n\t// Appearance -> Menus\n\t//remove_submenu_page('themes.php', 'nav-menus.php');\n\t// Appearance -> Editor\n\tremove_submenu_page('themes.php', 'theme-editor.php');\n\t// Plugins\n\tremove_menu_page('plugins.php');\n\t// Plugins -> Installed plugins\n\tremove_submenu_page('plugins.php', 'plugins.php');\n\t// Plugins -> Add new plugins\n\tremove_submenu_page('plugins.php', 'plugin-install.php');\n\t// Plugins -> Plugin editor\n\tremove_submenu_page('plugins.php', 'plugin-editor.php');\n\t// Users\n\tremove_menu_page('users.php');\n\t// Users -> Users\n\tremove_submenu_page('users.php', 'users.php');\n\t// Users -> New user\n\tremove_submenu_page('users.php', 'user-new.php');\n\t// Users -> Your profile\n\tremove_submenu_page('users.php', 'profile.php');\n\t// Tools\n\tremove_menu_page('tools.php');\n\t// Tools -> Available Tools\n\tremove_submenu_page('tools.php', 'tools.php');\n\t// Tools -> Import\n\tremove_submenu_page('tools.php', 'import.php');\n\t// Tools -> Export\n\tremove_submenu_page('tools.php', 'export.php');\n\t// Settings\n\tremove_menu_page('options-general.php');\n\n\t// Settings -> Writing\n\tremove_submenu_page('options-general.php', 'options-writing.php');\n\n\t// Settings -> Reading\n\tremove_submenu_page('options-general.php', 'options-reading.php');\n\n\t// Settings -> Discussion\n\tremove_submenu_page('options-general.php', 'options-discussion.php');\n\n\t// Settings -> Media\n\tremove_submenu_page('options-general.php', 'options-media.php');\n\n\t// Settings -> Permalinks\n\tremove_submenu_page('options-general.php', 'options-permalink.php');\n\n\t// Кастом-филд\n\tremove_menu_page('edit.php?post_type=acf-field-group');\n}", "function remove_menus_bloggood_ru(){\n// remove_menu_page( 'index.php' ); //Консоль\n// remove_menu_page( 'edit.php' ); //Записи\n// remove_menu_page( 'upload.php' ); //Медиафайлы\n// remove_menu_page( 'edit.php?post_ENGINE=page' ); //Страницы\n// remove_menu_page( 'edit-comments.php' ); //Комментарии\n// remove_menu_page( 'themes.php' ); //Внешний вид\n// remove_menu_page( 'plugins.php' ); //Плагины\n// remove_menu_page( 'users.php' ); //Пользователи\n// remove_menu_page( 'tools.php' ); //Инструменты\n// remove_menu_page( 'options-general.php' ); //Настройки\n\n}", "function remove_menus(){\n \n remove_menu_page( 'edit.php' ); //Posts\n remove_menu_page( 'edit-comments.php' ); //Comments\n remove_menu_page( 'themes.php' ); //Appearance\n\t//remove_menu_page( 'plugins.php' ); //Plugins\n //remove_menu_page( 'users.php' ); //Users\n \n}", "function extamus_remove_menu_pages() {\n if ( ! current_user_can( 'administrator' ) ) {\n remove_menu_page( 'index.php' ); //Dashboard\n remove_menu_page( 'edit.php' ); //Posts\n remove_menu_page( 'upload.php' ); //Media\n remove_menu_page( 'edit.php?post_type=page' ); //Pages\n remove_menu_page( 'edit-comments.php' ); //Comments\n remove_menu_page( 'themes.php' ); //Appearance\n remove_menu_page( 'plugins.php' ); //Plugins\n remove_menu_page( 'users.php' ); //Users\n remove_menu_page( 'tools.php' ); //Tools\n remove_menu_page( 'options-general.php' ); //Settings\n remove_menu_page( 'acf.php' ); //Advanced Custom Fields\n}}", "function special_nav_class($classes, $item){\n if( in_array('current-menu-item', $classes) ){\n $classes[] = 'active ';\n }\n return $classes;\n}", "function add_menuclass($ulclass) {\r\nreturn preg_replace('/<ul>/', '<ul class=\"menu\">', $ulclass, 1);\r\n}", "public function remove_post_types_menu() {\n\t\tglobal $menu;\n\n\t\t// Global menu should be a array.\n\t\t$menu = is_array( $menu ) ? $menu : [];\n\n\t\t// Remove current post type if any.\n\t\t$post_types = array_diff( $this->get_post_types(), [$this->get_post_type()] );\n\n\t\t// Remove all post types except the current one.\n\t\tforeach ( $post_types as $post_type ) {\n\t\t\t$key = 'edit.php?post_type=';\n\n\t\t\tif ( $post_type === 'post' ) {\n\t\t\t\t$key = 'edit.php';\n\t\t\t} else {\n\t\t\t\t$key .= $post_type;\n\t\t\t}\n\n\t\t\tforeach ( $menu as $index => $value ) {\n\t\t\t\tif ( ! array_search( $key, $value ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tunset( $menu[$index] );\n\t\t\t}\n\t\t}\n\t}", "function remove_menu_items() {\n remove_menu_page( 'edit.php' );\n}", "function om_nav_menu_has_children_class ($items) {\n\t\n\tforeach($items as $item) {\n\t\tif (om_nav_menu_has_sub($item->ID, $items)) {\n\t\t\t$item->classes[] = 'menu-item-has-children';\n\t\t}\n\t}\n\treturn $items; \n}", "function tac_remove_menus() {\n\tglobal $menu;\n\t$restricted = array( __( 'Links' ),__( 'Comments' ) );\n\tend( $menu );\n\twhile ( prev( $menu ) ) {\n\t\t$value = explode( ' ', $menu[ key( $menu ) ] [0] );\n\t\tif ( in_array( $value[0] !== null?$value[0] : '' , $restricted ) ) {\n\t\t\tunset( $menu[ key( $menu ) ] );\n\t\t}\n\t}\n}", "function nav_private_item_class( $classes, $item, $args ) {\n\tif ( ! empty( $item->object_id ) && 'private' === get_post_status( $item->object_id ) ) {\n\t\t$classes[] = 'Nav_Item-Private';\n\t}\n\treturn $classes;\n}", "function my_admin_bar_remove_menu() {\n\tglobal $wp_admin_bar;\n\tif (!current_user_can('manage_options')) {\n\t\t$wp_admin_bar->remove_menu('new-post');\n\t\t$wp_admin_bar->remove_menu('new-media');\n\t\t$wp_admin_bar->remove_menu('new-page');\n\t\t$wp_admin_bar->remove_menu('comments');\n\t\t$wp_admin_bar->remove_menu('wporg');\n \t$wp_admin_bar->remove_menu('documentation');\n \t$wp_admin_bar->remove_menu('support-forums');\n \t$wp_admin_bar->remove_menu('feedback');\n \t$wp_admin_bar->remove_menu('wp-logo');\n \t$wp_admin_bar->remove_menu('view-site');\n\t}\n}", "function flexfour_remove_sticky_class($classes) {\n$classes = array_diff($classes, array(\"sticky\"));\nreturn $classes;\n}", "function base_admin_bar_remove_menu_links_bloom() {\n\tglobal $wp_admin_bar;\n\n\t$wp_admin_bar->remove_menu( 'about' );\n\t$wp_admin_bar->remove_menu( 'wporg' );\n\t$wp_admin_bar->remove_menu( 'documentation' );\n\t$wp_admin_bar->remove_menu( 'support-forums' );\n\t$wp_admin_bar->remove_menu( 'feedback' );\n}", "function rwbs_add_active_class_to_nav_menu($classes) {\n if (in_array('current-menu-item', $classes, true) || in_array('current_page_item', $classes, true)) {\n $classes = array_diff($classes, array('current-menu-item', 'current_page_item', 'active'));\n $classes[] = 'active';\n }\n return $classes;\n}", "function remove_menus(){ \n\t// remove_menu_page('edit.php');\n\t// remove_menu_page('edit-comments.php');\n}", "function torque_remove_menus(){\n\n //remove_menu_page( 'index.php' ); //Dashboard\n //remove_menu_page( 'edit.php' ); //Posts\n //remove_menu_page( 'upload.php' ); //Media\n //remove_menu_page( 'edit.php?post_type=page' ); //Pages\n //remove_menu_page( 'edit-comments.php' ); //Comments\n //remove_menu_page( 'themes.php' ); //Appearance\n //remove_menu_page( 'plugins.php' ); //Plugins\n //remove_menu_page( 'users.php' ); //Users\n //remove_menu_page( 'tools.php' ); //Tools\n //remove_menu_page( 'options-general.php' ); //Settings\n\n }", "function add_current_nav_class($classes, $item) {\n\tglobal $post;\n\t// Getting the post type of the current post\n\t$current_post_type = get_post_type_object(get_post_type($post->ID));\n\t$current_post_type_slug = $current_post_type->rewrite['slug'];\n\t// Getting the URL of the menu item\n\t$menu_slug = strtolower(trim($item->url));\n\t// If the menu item URL contains the current post types slug add the current-menu-item class\n\tif (strpos($menu_slug,$current_post_type_slug) !== false) {\n\t\t$classes[] = 'current-menu-item';\n\t}\n\t// Return the corrected set of classes to be added to the menu item\n\treturn $classes;\n}", "function wooninja_remove_items() {\n $remove = array( \n 'wc-reports', \n 'wc-addons',\n //'wc-settings',\n //'wc-status',\n 'edit.php?post_type=shop_coupon',\n //'edit.php?post_type=shop_order'\n );\n foreach ( $remove as $submenu_slug ) {\n remove_submenu_page( 'woocommerce', $submenu_slug );\n }\n}", "function fix_no_menu_warning( $args ) {\n\t\tif ( get_class( $args['walker'] ) == 'WFIM_Walker_Nav_Menu_With_Icon' )\n\t\t\t$args['walker'] = null;\n\n\t\treturn $args;\n\t}", "function nav_menu_css_class( $classes, $item ) {\n\n\t$_classes = [ 'menu__item' ];\n\n\tforeach ( [ 'item', 'parent', 'ancestor' ] as $type ) {\n\n\t\tif ( in_array( \"current-menu-{$type}\", $classes ) || in_array( \"current_page_{$type}\", $classes ) ) {\n\n\t\t\t$_classes[] = 'item' === $type ? 'menu__item--current' : \"menu__item--{$type}\";\n\t\t}\n\t}\n\n\t// If the menu item is a post type archive and we're viewing a single\n\t// post of that post type, the menu item should be an ancestor.\n\tif ( 'post_type_archive' === $item->type && is_singular( $item->object ) && ! in_array( 'menu__item--ancestor', $_classes ) ) {\n\t\t$_classes[] = 'menu__item--ancestor';\n\t}\n\n\t// Add a class if the menu item has children.\n\tif ( in_array( 'menu-item-has-children', $classes ) ) {\n\t\t$_classes[] = 'has-children';\n\t}\n\n\t// Add custom user-added classes if we have any.\n\t$custom = get_post_meta( $item->ID, '_menu_item_classes', true );\n\n\tif ( $custom ) {\n\t\t$_classes = array_merge( $_classes, (array) $custom );\n\t}\n\n\treturn $_classes;\n}", "function kanso_custom_menu_page_removing() {\n //remove_menu_page( 'themes.php' ); // Appearance -- (!) There are other ways to do this\n //remove_menu_page( itsec ); // iThemes Security -- Very specific, consider revising\n}", "function avenger_unregister_menus() {\n unregister_nav_menu( 'expanded' );\n unregister_nav_menu( 'primary' );\n unregister_nav_menu( 'mobile' );\n unregister_nav_menu( 'footer' );\n unregister_nav_menu( 'social' );\n}", "function set_active_nav_class ($classes, $item) {\n if (in_array('current-menu-item', $classes) ){\n $classes[] = 'activemenu ';\n }\n return $classes;\n}", "function admin_bar_class($attributes)\n{\n $attributes['class'] = trim('admin-bar '.$attributes['class']);\n return $attributes;\n}", "function dashboard_tweaks() {\n\tglobal $wp_admin_bar;\n\t$wp_admin_bar->remove_menu('comments');\n\t$wp_admin_bar->remove_menu('about');\n\t$wp_admin_bar->remove_menu('wporg');\n\t$wp_admin_bar->remove_menu('documentation');\n\t$wp_admin_bar->remove_menu('support-forums');\n\t$wp_admin_bar->remove_menu('feedback');\n\t$wp_admin_bar->remove_menu('view-site');\n\t$wp_admin_bar->remove_menu('new-content');\n\t$wp_admin_bar->remove_menu('customize');\n\t$wp_admin_bar->remove_menu('search'); \n}", "function clean_admin_bar() {\n global $wp_admin_bar;\n /* Remove their stuff */\n $wp_admin_bar->remove_menu('wp-logo');\n $wp_admin_bar->remove_menu( 'about' ); // Remove the about WordPress link\n $wp_admin_bar->remove_menu( 'wporg' ); // Remove the WordPress.org link\n $wp_admin_bar->remove_menu( 'documentation' ); // Remove the WordPress documentation link\n $wp_admin_bar->remove_menu( 'support-forums' ); // Remove the support forums link\n $wp_admin_bar->remove_menu( 'feedback' ); // Remove the feedback link\n $wp_admin_bar->remove_menu( 'updates' ); // Remove the updates link\n $wp_admin_bar->remove_menu( 'comments' ); // Remove the comments link\n}", "function remove_admin_menu_items() {\n // always remove these items\n $remove_menu_items = array(\n __('Dashboard'),\n __('Posts'),\n __('Links'),\n __('Comments'),\n );\n\n // remove admin panels for non-admins\n $remove_if_not_administrator = array(\n __('Appearance'),\n __('Plugins'),\n __('Users'),\n __('Tools'),\n __('Settings'),\n );\n\n // Get current user's data\n $current_user = wp_get_current_user();\n $user_id = $current_user->ID;\n $user = new WP_User($user_id);\n $is_admin = 0;\n\n if (!empty($user->roles) && is_array($user->roles)) {\n $is_admin = in_array('administrator', $user->roles);\n }\n\n global $menu;\n end ($menu);\n\n while (prev($menu)) {\n $item_array = explode(' ', $menu[key($menu)][0]);\n $item = $item_array[0] != NULL ? $item_array[0] : \"\";\n\n if (in_array($item, $remove_menu_items)) {\n unset($menu[key($menu)]);\n }\n\n if (!$is_admin && in_array($item, $remove_if_not_administrator)) {\n unset($menu[key($menu)]);\n }\n }\n}", "function ah_admin_bar_remove_items( WP_Admin_Bar $wp_admin_bar ) {\n\t\t// bail if current user doesnt have cap\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// remove items from menu bar\n\t\t$remove_array = [\n\t\t\t'customize',\n\t\t\t'comments',\n\t\t\t'wp-logo',\n\t\t\t'wpseo-menu',\n\t\t\t'backwpup',\n\t\t\t'new-post',\n\t\t\t'new-media',\n\t\t\t'new-page',\n\t\t\t'new-user',\n\t\t];\n\n\t\tforeach ( $remove_array as $item ) {\n\t\t\t$wp_admin_bar->remove_node( $item );\n\t\t}\n\t}", "function fixr_menu($location = \"main_menu\", $css_class_prefix = 'main-menu', $css_class_modifiers = null, $user_classes = null){ \n \n // Check to see if any css modifiers were supplied\n if($css_class_modifiers){\n\n if(is_array($css_class_modifiers)){\n $modifiers = implode(\" \", $css_class_modifiers);\n } elseif (is_string($css_class_modifiers)) {\n $modifiers = $css_class_modifiers;\n }\n\n } else {\n $modifiers = '';\n }\n\n $args = array(\n 'theme_location' => $location,\n 'container' => false,\n 'items_wrap' => '<ul class=\"' . $css_class_prefix . ' ' . $modifiers . '\">%3$s</ul>',\n 'walker' => new fixr_mega_menu($css_class_prefix, true)\n );\n \n if (has_nav_menu($location)){\n return wp_nav_menu($args);\n }else{\n echo \"<p>You need to first define a menu in WP-admin<p>\";\n }\n}", "function my_remove_menu_pages(){\n\t// remove_menu_page('edit.php?post_type=acf');\n\t// remove_menu_page( 'index.php' ); //Dashboard\n\t//remove_menu_page( 'edit.php' ); \t//Posts\n\t// remove_menu_page( 'upload.php' ); //Media\n\t// remove_menu_page( 'edit.php?post_type=page' ); \t//Pages\n\t//remove_menu_page( 'edit-comments.php' ); \t//Comments\n\t// remove_menu_page( 'themes.php' ); //Appearance\n\t// remove_menu_page( 'plugins.php' ); //Plugins\n\t#remove_menu_page( 'users.php' ); \t//Users\n\t//remove_menu_page( 'tools.php' ); \t//Tools\n\t// remove_menu_page( 'options-general.php' ); //Settings\n}", "function montheme_li_class($classes)\n{\n $classes = [];\n $classes[] = 'nav-item';\n\n return $classes;\n}", "public function getMenuWithoutDropdownWrapper($item)\n {\n }", "public static function remove_menu_pages() {\n\t\t$post_type = Registrations::get_post_type();\n\n\t\tremove_submenu_page( \"edit.php?post_type={$post_type}\", \"manage_frontend_uploader_{$post_type}s\" );\n\t\tremove_submenu_page( 'upload.php', 'manage_frontend_uploader' );\n\t}", "public function remove_admin_bar_items() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu(\"comments\");\n }", "function filter_admin_menues() {\n\t\t\n\t\t// If administrator then do nothing\n\t\tif (current_user_can('activate_plugins')) return;\n\t\t\n\t\t// Remove main menus\n\t\t$main_menus_to_stay = array(\n\t\t\t\n\t\t\t// Dashboard\n\t\t\t'index.php',\n\t\t\t\n\t\t\t// Edit\n\t\t\t'edit.php',\n\t\t\t\n\t\t\t// Media\n\t\t\t'upload.php'\n\t\t);\n\n\t\t// Remove sub menus\n\t\t$sub_menus_to_stay = array(\n\t\t\t\n\t\t\t// Dashboard\n\t\t\t'index.php' => ['index.php'],\n\t\t\t\n\t\t\t// Edit\n\t\t\t'edit.php' => ['edit.php', 'post-new.php'],\n\t\t\t\n\t\t\t// Media\n\t\t\t'upload.php' => ['upload.php', 'media-new.php'],\n\t\t\t\n\t\t\t\n\t\t);\n\n\n\t\tif (isset($GLOBALS['menu']) && is_array($GLOBALS['menu'])) {\n\t\t\tforeach ($GLOBALS['menu'] as $k => $main_menu_array) {\t\t\t\t\n\t\t\t\t// Remove main menu\n\t\t\t\tif (!in_array($main_menu_array[2], $main_menus_to_stay)) {\n\t\t\t\t\tremove_menu_page($main_menu_array[2]);\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t// Remove submenu\n\t\t\t\t\tforeach ($GLOBALS['submenu'][$main_menu_array[2]] as $k => $sub_menu_array) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!in_array($sub_menu_array[2], $sub_menus_to_stay[$main_menu_array[2]])) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tremove_submenu_page($main_menu_array[2], $sub_menu_array[2]);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function remove_menus(){\n\tif ( ! current_user_can('update_core') ) {\n\t remove_menu_page( 'index.php' ); //Dashboard\n\t remove_menu_page( 'edit-comments.php' ); //Comments\n\t remove_menu_page( 'themes.php' ); //Appearance\n\t remove_menu_page( 'plugins.php' ); //Plugins\n\t remove_menu_page( 'users.php' ); //Users\n\t remove_menu_page( 'tools.php' ); //Tools\n\t remove_menu_page( 'profile.php' ); //Tools\n\t} \n}", "function nav_menu_submenu_css_class( $classes ) {\n\n\t$classes = [ 'menu__sub-menu' ];\n\n\treturn $classes;\n}", "function add_classes_on_li($classes, $item, $args) {\n $classes[] = 'nav-item';\n return $classes;\n}", "function h_remove_menu(array $args) {\n if (!is_admin()) { return; }\n\n $menu = new H_Sidenav($args);\n $menu->remove();\n}", "function PREFIX_remove_page_class_from_post_class($classes) {\n\t$classes = array_diff( $classes, array(\"page\") );\n\n\treturn $classes;\n}" ]
[ "0.7474491", "0.7447487", "0.70376986", "0.6999272", "0.69872403", "0.6969902", "0.6855018", "0.6828223", "0.67462105", "0.6737136", "0.66620994", "0.66472805", "0.66102123", "0.6585461", "0.6539161", "0.652962", "0.6479195", "0.64295536", "0.6428678", "0.6428245", "0.6424933", "0.6397877", "0.63880545", "0.63736725", "0.6370705", "0.6369029", "0.6367082", "0.6356777", "0.63300884", "0.6321493", "0.63063", "0.62678194", "0.6227624", "0.62126803", "0.62096506", "0.6208783", "0.61596036", "0.61178017", "0.6076277", "0.6075606", "0.6073891", "0.6072374", "0.6033142", "0.6032781", "0.6018792", "0.6016483", "0.601168", "0.59978634", "0.5976234", "0.59740156", "0.5972832", "0.5966203", "0.5960831", "0.5924678", "0.59202987", "0.5903973", "0.5900188", "0.58997244", "0.5896867", "0.58893675", "0.5880455", "0.5877973", "0.58766496", "0.58716416", "0.58714336", "0.58626884", "0.5857233", "0.58564746", "0.5847711", "0.5842855", "0.583974", "0.58368313", "0.5835176", "0.5831773", "0.5826534", "0.5822348", "0.58163863", "0.581088", "0.58086306", "0.58054477", "0.58038116", "0.5801643", "0.5794896", "0.5783635", "0.57729447", "0.5772336", "0.5770999", "0.57670695", "0.5766514", "0.5762734", "0.57597154", "0.5748237", "0.571136", "0.570503", "0.57011575", "0.5693067", "0.5692022", "0.56912446", "0.5690517", "0.5689654" ]
0.5863518
65
Wrap oEmbeds in .wpvvideoframe
public function oembed_dataparse($output, $data, $url) { if($data->type == 'video') return '<div class="wpv-video-frame">'.$output.'</div>'; return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function wrapEmbeds()\n {\n add_filter( 'embed_oembed_html', function($html){\n $isYouTube = strpos($html, 'youtube.com/embed') !== false;\n $isVimeo = strpos($html, 'player.vimeo.com/video') !== false;\n\n if ($isYouTube || $isVimeo) {\n return '<div class=\"wp-embed wp-embed-video\"><div class=\"wp-embed-inner\">' . $html . '</div></div>';\n } else {\n return '<div class=\"wp-embed\"><div class=\"wp-embed-inner\">' . $html . '</div></div>';\n }\n }, 10);\n }", "function envolve_embed($html, $url, $attr, $post_id) {\n return '<div class=\"video\">' . $html . '</div>';\n}", "function envolve_embed($html, $url, $attr, $post_id) {\n return '<div class=\"video\">' . $html . '</div>';\n}", "function wrap_embed_with_div($html, $url, $attr) {\n\n return '<div class=\"video_wrapper\"><div class=\"video-container\">' . $html . '</div></div>';\n\n}", "function vcex_video_oembed( $video = '', $classes = '', $params = array() ) {\n\tif ( function_exists( 'wpex_video_oembed' ) ) {\n\t\treturn wpex_video_oembed( $video, $classes, $params );\n\t}\n\treturn wp_oembed_get( $video );\n}", "public function embed_video() {\r\n\t\tglobal $wp_embed;\r\n\t\treturn $wp_embed->run_shortcode( '[embed]'. $this->video .'[/embed]' );\r\n\t}", "function tdd_oembed_filter($html, $url, $attr, $post_ID) {\n $return = '<figure class=\"video_container\">'.$html.'</figure>';\n return $return;\n}", "function the_embed_video( $video_embed_code, $width = 500, $height = 281 ) {\n\techo get_embed_video( $video_embed_code, $width, $height );\n}", "function emvideo_dotsub_video($embed, $width, $height, $field, $item, $node, $autoplay) {\n $output = theme('emvideo_dotsub_flash', $item, $width, $height, $autoplay);\n return $output;\n}", "function video_cck_tudou_video($embed, $width, $height, $field, $item, $autoplay) {\n $output = theme('video_cck_tudou_flash', $embed, $width, $height, $autoplay);\n return $output;\n}", "public function add_responsive_wrap_to_oembeds( $html, $url, $attr, $post_id ) {\n\t\t$html = '<div class=\"responsive-video-wrap entry-video\">' . $html . '</div>';\n\t\treturn $html;\n\t}", "function neu_custom_iframe_video(){\n\t// get iframe HTML\n\t$iframe = get_field('video');\n\n\n\t// use preg_match to find iframe src\n\tpreg_match('/src=\"(.+?)\"/', $iframe, $matches);\n\t$src = $matches[1];\n\n\n\t// add extra params to iframe src\n\t$params = array(\n\t /*'controls' => 0,*/\n\t 'hd' => 1,\n\t 'autoplay' => 0,\n\t 'rel' \t=> 0,\n\t);\n\n\t$new_src = add_query_arg($params, $src);\n\n\t$iframe = str_replace($src, $new_src, $iframe);\n\n\n\t// add extra attributes to iframe html\n\t$attributes = 'frameborder=\"0\"';\n\n\t$iframe = str_replace('></iframe>', ' ' . $attributes . '></iframe>', $iframe);\n\n\treturn $iframe;\n}", "function ht_post_format_video() {\r\n\r\n\t// Get post meta values\r\n\t$st_pf_video_oembed = get_post_meta( get_the_ID(), 'st_video_oembed', true ); \r\n\t$st_pf_video = get_post_meta(get_the_ID(), 'st_video', true); \r\n\t$st_pf_video_poster = get_post_meta(get_the_ID(), 'st_video_poster', true);\r\n\t\r\n\t\r\n\tif ( is_single() ) {\r\n\t\r\n if ( $st_pf_video_oembed != '' || $st_pf_video != '' ) { ?>\r\n <figure class=\"entry-video\"> \r\n\r\n <?php if ( $st_pf_video_oembed ) {\r\n \r\n echo wp_oembed_get($st_pf_video_oembed, array('width'=>658));\r\n \r\n } else {\r\n\t\t\t\t\t\r\n\t\t\t\t// Get attachment URLs\r\n\t\t\t\t$st_pf_video_file_url = wp_get_attachment_url( $st_pf_video );\r\n\t\t\t\t$st_pf_video_file_poster_url = wp_get_attachment_url( $st_pf_video_poster );\r\n\t\t\t\t\r\n\t\t\t\tif ( $st_pf_video_file_poster_url != null ) {\r\n\t\t\t\t\techo do_shortcode( '[video src=\"'. $st_pf_video_file_url .'\" width=\"658\" height=\"100%\" poster=\"'. $st_pf_video_file_poster_url .'\"]' );\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo do_shortcode( '[video src=\"'. $st_pf_video_file_url .'\" width=\"658\" height=\"100%\"]' );\t\r\n\t\t\t\t}\r\n \r\n } ?>\r\n </figure>\r\n <?php } ?>\r\n \r\n <?php \r\n\t} else {\r\n\tif( has_post_thumbnail() && !is_author() ) { ?>\r\n\t<figure class=\"entry-thumb\"> \r\n\t<?php the_post_thumbnail( 'post' ); ?>\t\r\n\t</figure>\r\n\t<?php }\t\r\n\t}\r\n\r\n}", "function lambert_embed_html( $html ) {\n return '<div class=\"responsive-video\">' . $html . '</div>';\n}", "function jma_yt_video_wrap_html($atts, $video_id){\n global $api_code;\n $atts = jmayt_sanitize_array($atts);\n $yt_video = new JMAYtVideo(sanitize_text_field($video_id), $api_code);\n $style = $yt_video->process_display_atts($atts);\n $attributes = array(\n 'id' => $atts['id'],\n 'class' => $atts['class'] . ' jmayt-outer jmayt-single-item clearfix',\n 'style' => $style['display'] . $atts['style']\n );\n echo '<div ';\n foreach($attributes as $name => $attribute){\n echo $name . '=\"' . $attribute . '\" ';\n\n }\n echo '>';\n echo $yt_video->markup();\n echo '</div><!--jmayt-item-wrap-->';\n}", "function wp_embed_handler_video($matches, $attr, $url, $rawattr)\n {\n }", "function video_cck_dailymotion_video($embed, $width, $height, $field, $item, $autoplay) {\n $output = theme('video_cck_dailymotion_flash', $embed, $width, $height, $autoplay);\n return $output;\n}", "function yoast_add_og_video() {\n if ( get_post_format() == 'video' ) {\n $post = get_post();\n preg_match('/\\[embed(.*)](.*)\\[\\/embed]/', $post->post_content, $video);\n $videoParts = explode('/',$video[2]);\n echo '<meta property=\"og:video\" content=\"' . $video[2] . '\" />', \"\\n\";\n echo '<meta property=\"og:video:secure_url\" content=\"' . str_replace('http://','https://' , $video[2]) . '\" />', \"\\n\";\n echo '<meta property=\"og:video:height\" content=\"1080\" />', \"\\n\";\n echo '<meta property=\"og:video:width\" content=\"1920\" />', \"\\n\";\n //echo '<meta property=\"og:image\" content=\"https://img.youtube.com/vi/'.$videoParts[3].'/maxresdefault.jpg\" />', \"\\n\";\n }\n}", "function grve_print_media_video( $video_mode, $video_webm, $video_mp4, $video_ogv, $video_embed ) {\n\tglobal $wp_embed;\n\t$video_output = '';\n\n\tif( empty( $video_mode ) && !empty( $video_embed ) ) {\n\t\t$video_output .= '<div class=\"grve-media\">';\n\t\t$video_output .= $wp_embed->run_shortcode( '[embed]' . $video_embed . '[/embed]' );\n\t\t$video_output .= '</div>';\n\t} else {\n\n\t\tif ( !empty( $video_webm ) || !empty( $video_mp4 ) || !empty( $video_ogv ) ) {\n\t\t\t$video_output .= '<div class=\"grve-media\">';\n\t\t\t$video_output .= ' <video controls>';\n\n\t\t\tif ( !empty( $video_webm ) ) {\n\t\t\t\t$video_output .= '<source src=\"' . $video_webm . '\" type=\"video/webm\">';\n\t\t\t}\n\t\t\tif ( !empty( $video_mp4 ) ) {\n\t\t\t\t$video_output .= '<source src=\"' . $video_mp4 . '\" type=\"video/mp4\">';\n\t\t\t}\n\t\t\tif ( !empty( $video_ogv ) ) {\n\t\t\t\t$video_output .= '<source src=\"' . $video_ogv . '\" type=\"video/ogg\">';\n\t\t\t}\n\t\t\t$video_output .=' </video>';\n\t\t\t$video_output .= '</div>';\n\n\t\t}\n\t}\n\n\techo $video_output;\n\n}", "function dm_brightcove_embed_shortcode($atts) {\n\textract(shortcode_atts(array(\n\t\t'width' => 400,\n\t\t'height' => 220,\n\t\t'player_id' => '1083378382001',\n\t\t'player_key' => 'AQ~~,AAAA7SJlvPE~,hKj__M4BL26l6pXW6JlVCmbP5q8je1e_',\n\t\t'video_id' => ''\n\t), $atts));\n\n\tob_start();\n?>\n\t<div class=\"brightcove_video\">\n\t\t<script src=\"http://admin.brightcove.com/js/BrightcoveExperiences.js\"></script>\n\t\t<object id=\"myExperience<?php echo $video_id; ?>\" class=\"BrightcoveExperience\">\n\t\t\t<param name=\"bgcolor\" value=\"#FFFFFF\" />\n\t\t\t<param name=\"width\" value=\"<?php echo $width; ?>\" />\n\t\t\t<param name=\"height\" value=\"<?php echo $height; ?>\" />\n\t\t\t<param name=\"playerID\" value=\"<?php echo $player_id; ?>\" />\n\t\t\t<param name=\"playerKey\" value=\"<?php echo $player_key; ?>\" />\n\t\t\t<param name=\"isVid\" value=\"true\" />\n\t\t\t<param name=\"isUI\" value=\"true\" />\n\t\t\t<param name=\"dynamicStreaming\" value=\"true\" />\n\t\t\t<param name=\"@videoPlayer\" value=\"<?php echo $video_id; ?>\" />\n\t\t</object>\n\t\t<script>\n\t\t\tbrightcove.createExperiences();\n\t\t</script>\n\t</div>\n<?php\n\t$output = ob_get_clean();\n\treturn $output;\n}", "function video_embed_filter( $html, $data ) {\n if ( ! is_object( $data ) || empty( $data->type ) )\n return $html;\n\n // Verify that it is a video\n if ( !($data->type == 'video') )\n return $html;\n\n // Calculate aspect ratio\n $ar = $data->width / $data->height;\n\n // Set the aspect ratio modifier\n $ar_mod = ( abs($ar-(4/3)) < abs($ar-(16/9)) ? 'embed-responsive-4by3' : 'embed-responsive-16by9');\n\n // Strip width and height from html\n $html = preg_replace( '/(width|height)=\"\\d*\"\\s/', \"\", $html );\n\n // Return code\n return '<div class=\"video-container '.$ar_mod.'\" data-aspectratio=\"'.number_format($ar, 5, '.').'\">'.$html.'</div>';\n\n}", "function emvideo_dotsub_preview($embed, $width, $height, $field, $item, $node, $autoplay) {\n $output = theme('emvideo_dotsub_flash', $item, $width, $height, $autoplay);\n return $output;\n}", "function quasar_embed_video($url=null){\n\tif(!$url) return;\n\t\n\t$iframe_code = '';\n\t\n\tif(strpos($url, 'youtube') > -1){\n\t\t$iframe_code = str_replace('watch?v=', 'embed/', $url).'?rel=0';\n\t}\n\t\n\tif(strpos($url, 'vimeo') > -1){\n\t\t$iframe_code = str_replace('vimeo.com', 'player.vimeo.com/video', $url);\n\t}\n\t\n\t$return = '\n\t<div class=\"quasar-iframe-container\">\n <iframe src=\"'.$iframe_code.'\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>\n\t</div>\n\t';\n\t\n\treturn $return;\n}", "private function youku_video() {\n\t\twp_embed_register_handler( 'embed_handler_youku', '#http://v.youku.com/v_show/id_(.*?).html#i', function($matches, $attr, $url, $rawattr){\n\t\t\t// error_log(print_r($matches, true));error_log(print_r($attr, true));error_log(print_r($url, true));error_log(print_r($rawattr, true));\n\n\t\t\t$src = 'http://player.youku.com/embed/' . $matches[1];\n\n\t\t\tif ( !empty($rawattr['width']) && !empty($rawattr['height']) ) {\n\t\t\t\t$width = (int) $rawattr['width'];\n\t\t\t\t$height = (int) $rawattr['height'];\n\t\t\t} else {\n\t\t\t\tlist( $width, $height ) = wp_expand_dimensions( 622, 350, $attr['width'], $attr['height'] );\n\t\t\t}\n\n\t\t\t$html = '<div class=\"embed-responsive embed-responsive-16by9\"><iframe height=' . esc_attr($height) . ' width=' . esc_attr($width) . ' src=\"' . esc_attr($src) . '\" frameborder=0 allowfullscreen></iframe></div>';\n\n\t\t\treturn apply_filters( 'embed_youku', $html, $matches, $attr, $url, $rawattr);\n\t\t});\n\t}", "function video_cck_tudou_preview($embed, $width, $height, $field, $item, $autoplay) {\n $output = theme('video_cck_tudou_flash', $embed, $width, $height, $autoplay);\n return $output;\n}", "function lc_oembed_result($ythtml, $yturl, $ytargs) {\n \n\t$ytnewargs = $ytargs;\n\t// get rid of discover=true argument\n\tarray_pop( $ytnewargs );\n \n\t$ytparameters = http_build_query( $ytnewargs );\n \n\t// Modify video parameters\n\t$ythtml = str_replace( '?feature=oembed', '?feature=oembed'.'&amp;'.$ytparameters, $ythtml );\n \n return $ythtml;\n}", "public function embed() \n\t{\n\t\tif (empty($this->_videoId))\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\treturn '<iframe width=\"100%\" height=\"'.$height.'\" src=\"//www.youtube.com/embed/'.$this->_videoId.'\" frameborder=\"0\" allowfullscreen></iframe>';\n\t}", "function wp_underscore_video_template() {\n\t$video_types = wp_get_video_extensions();\n\t?>\n<# var w_rule = '', classes = [],\n\t\tw, h, settings = wp.media.view.settings,\n\t\tisYouTube = isVimeo = false;\n\n\tif ( ! _.isEmpty( data.model.src ) ) {\n\t\tisYouTube = data.model.src.match(/youtube|youtu\\.be/);\n\t\tisVimeo = -1 !== data.model.src.indexOf('vimeo');\n\t}\n\n\tif ( settings.contentWidth && data.model.width >= settings.contentWidth ) {\n\t\tw = settings.contentWidth;\n\t} else {\n\t\tw = data.model.width;\n\t}\n\n\tif ( w !== data.model.width ) {\n\t\th = Math.ceil( ( data.model.height * w ) / data.model.width );\n\t} else {\n\t\th = data.model.height;\n\t}\n\n\tif ( w ) {\n\t\tw_rule = 'width: ' + w + 'px; ';\n\t}\n\n\tif ( isYouTube ) {\n\t\tclasses.push( 'youtube-video' );\n\t}\n\n\tif ( isVimeo ) {\n\t\tclasses.push( 'vimeo-video' );\n\t}\n\n#>\n<div style=\"{{ w_rule }}\" class=\"wp-video\">\n<video controls\n\tclass=\"wp-video-shortcode {{ classes.join( ' ' ) }}\"\n\t<# if ( w ) { #>width=\"{{ w }}\"<# } #>\n\t<# if ( h ) { #>height=\"{{ h }}\"<# } #>\n\t<?php\n\t$props = array(\n\t\t'poster' => '',\n\t\t'preload' => 'metadata',\n\t);\n\tforeach ( $props as $key => $value ) :\n\t\tif ( empty( $value ) ) {\n\t\t\t?>\n\t\t<#\n\t\tif ( ! _.isUndefined( data.model.<?php echo $key; ?> ) && data.model.<?php echo $key; ?> ) {\n\t\t\t#> <?php echo $key; ?>=\"{{ data.model.<?php echo $key; ?> }}\"<#\n\t\t} #>\n\t\t\t<?php\n\t\t} else {\n\t\t\techo $key\n\t\t\t?>\n\t\t\t=\"{{ _.isUndefined( data.model.<?php echo $key; ?> ) ? '<?php echo $value; ?>' : data.model.<?php echo $key; ?> }}\"\n\t\t\t<?php\n\t\t}\n\tendforeach;\n\t?>\n\t<#\n\t<?php\n\tforeach ( array( 'autoplay', 'loop' ) as $attr ) :\n\t\t?>\n\tif ( ! _.isUndefined( data.model.<?php echo $attr; ?> ) && data.model.<?php echo $attr; ?> ) {\n\t\t#> <?php echo $attr; ?><#\n\t}\n\t<?php endforeach ?>#>\n>\n\t<# if ( ! _.isEmpty( data.model.src ) ) {\n\t\tif ( isYouTube ) { #>\n\t\t<source src=\"{{ data.model.src }}\" type=\"video/youtube\" />\n\t\t<# } else if ( isVimeo ) { #>\n\t\t<source src=\"{{ data.model.src }}\" type=\"video/vimeo\" />\n\t\t<# } else { #>\n\t\t<source src=\"{{ data.model.src }}\" type=\"{{ settings.embedMimes[ data.model.src.split('.').pop() ] }}\" />\n\t\t<# }\n\t} #>\n\n\t<?php\n\tforeach ( $video_types as $type ) :\n\t\t?>\n\t<# if ( data.model.<?php echo $type; ?> ) { #>\n\t<source src=\"{{ data.model.<?php echo $type; ?> }}\" type=\"{{ settings.embedMimes[ '<?php echo $type; ?>' ] }}\" />\n\t<# } #>\n\t<?php endforeach; ?>\n\t{{{ data.model.content }}}\n</video>\n</div>\n\t<?php\n}", "function add_video_embed_note($html, $url) {\n\tif(preg_match('|https?://w*?\\.?youtu|', $url) || preg_match('|https?://w*?\\.?vimeo\\.com|', $url)) {\n\t\t$html = '<div class=\"video-container\">' . $html . '</div>';\n\t}\n\treturn $html;\n}", "function video_cck_dailymotion_preview($embed, $width, $height, $field, $item, $autoplay) {\n $output = theme('video_cck_dailymotion_flash', $embed, $width, $height, $autoplay);\n return $output;\n}", "function emc_video() {\r\n\r\n\t// get the URL field\r\n\t$url = get_field( 'url' );\r\n\tif ( empty( $url ) ) {\r\n\t\t_e( '<em>URL field is empty.</em>', 'emc' );\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif ( strpos( $url, 'rackcdn.com' ) ) {\r\n\r\n\t\t// get the URL for the medium featured image, to serve as video poster\r\n\t\t$thumb_id = get_post_thumbnail_id( get_the_ID() );\r\n\t\t$thumb_src = wp_get_attachment_image_src( $thumb_id, 'large' );\r\n\r\n\t\t// assemble our EMC RackSpace HTML5 video embed with Flash fallback\r\n\t\t$shortcode = sprintf( '[video mp4=\"%1$s\" poster=\"%2$s\" width=\"%3$s\" height=\"%4$s\"]',\r\n\t\t\tesc_url( $url ),\r\n\t\t\tesc_attr( $thumb_src[0] ),\r\n\t\t\t'100%',\r\n\t\t\t'auto'\r\n\t\t);\r\n\r\n\t\t$video = do_shortcode( $shortcode );\r\n\r\n\t} else {\r\n\r\n\t\t// we have something other than RackSpace for a video link\r\n\t\t$video = wp_oembed_get( esc_url( get_field( 'url' ) ) );\r\n\r\n\t}\r\n\r\n\t// Determine the duration\r\n\t$duration = ( get_field( 'duration' ) ) ? get_field( 'duration' ) : __( 'Not specified', 'emc' );\r\n\t$duration = sprintf( __( 'Duration: %s', 'emc' ), esc_html( $duration ) );\r\n\r\n\t// Get help text\r\n\t$help = get_page_by_path( 'video-problems-text', OBJECT, 'post' );\r\n\r\n\t// Assemble our final HTML\r\n\t$html = '<div class=\"emc-video\">';\r\n\t$html .= $video;\r\n\t$html .= '<div class=\"emc-toggle-section emc-video-meta\">';\r\n\t$html .= '<span class=\"emc-video-duration\">' . esc_html( $duration ) . '</span>';\r\n\t$html .= '<a class=\"emc-toggle-link\">' . esc_html__( 'Having video problems?', 'emc' ) . '</a>';\r\n\t$html .= '<div class=\"emc-toggle-content\">';\r\n\t$html .= apply_filters( 'the_content', $help->post_content );\r\n\t$html .= '</div><!-- .emc-toggle-content -->';\r\n\t$html .= '</div><!-- .emc-video-meta -->';\r\n\t$html .= '</div><!-- .emc-video -->';\r\n\r\n\techo $html;\r\n\r\n}", "function add_player_id_to_iframe( $vmhtml, $vmurl, $vmargs ) {\n if( isset( $vmargs['player_id'] ) ) {\n $vmhtml = str_replace( '<iframe', '<iframe id=\"'. $vmargs['player_id'] .'\"', $vmhtml );\n }\n return $vmhtml;\n}", "function tac_oembed_filter( $html, $url, $attr, $post_id ) {\n\t$return = '<figure class=\"flexible-container item-margin\">' . $html . '</figure>';\n\treturn $return;\n}", "public function process() {\n // Add oembed streams to video file types.\n $video = file_type_load('video');\n $video->mimetypes[] = 'video/oembed';\n $video->streams[] = 'oembed';\n file_type_save($video);\n\n // Oembed specific display settings for videos.\n $file_display = new \\stdClass();\n $file_display->api_version = 1;\n $file_display->name = 'video__default__oembed';\n $file_display->weight = -10;\n $file_display->status = TRUE;\n $file_display->settings = array(\n 'width' => '560',\n 'height' => '340',\n 'wmode' => '',\n );\n file_display_save($file_display);\n\n $file_display = new \\stdClass();\n $file_display->api_version = 1;\n $file_display->name = 'video__default__oembed_thumbnail';\n $file_display->weight = -10;\n $file_display->status = TRUE;\n $file_display->settings = array(\n 'width' => '180',\n 'height' => '',\n );\n file_display_save($file_display);\n\n $file_display = new \\stdClass();\n $file_display->api_version = 1;\n $file_display->name = 'video__preview__oembed_thumbnail';\n $file_display->weight = -10;\n $file_display->status = TRUE;\n $file_display->settings = array(\n 'width' => '100',\n 'height' => '75',\n );\n file_display_save($file_display);\n\n $file_display = new \\stdClass();\n $file_display->api_version = 1;\n $file_display->name = 'video__teaser__oembed_thumbnail';\n $file_display->weight = -10;\n $file_display->status = TRUE;\n $file_display->settings = array(\n 'width' => '100',\n 'height' => '75',\n );\n file_display_save($file_display);\n\n }", "function psa_youtube_embed( $id, $iframe_args = array(), $youtube_args = array() ) {\n\t$iframe_defaults = array(\n\t\t'class' => 'video',\n\t\t'width' => 640,\n\t\t'height' => 360,\n\t\t'responsive' => false\n\t);\n\t$iframe_args = wp_parse_args( $iframe_args, $iframe_defaults );\n\textract( $iframe_args, EXTR_SKIP );\n\n\t$youtube_defaults = array(\n\t\t'autoplay' => 1,\n\t\t'rel' => 0,\n\t\t'origin' => get_bloginfo('url')\n\t);\n\t$youtube_args = wp_parse_args( $youtube_args, $youtube_defaults );\n\t$youtube_args = http_build_query( $youtube_args );\n\n\t$dimensions = ( $responsive ) ? '' : 'width=\"' . $width . '\" height=\"' . $height . '\"';\n\n\t// iFrame embed\n\tprintf('<iframe type=\"text/html\" class=\"%s\" %s src=\"https://www.youtube.com/embed/%s?%s\" frameborder=\"0\"></iframe>', $class, $dimensions, $id, $youtube_args );\n}", "function roots_embed_wrap($cache, $url, $attr = '', $post_ID = '') {\n return '<div class=\"entry-content-asset\">' . $cache . '</div>';\n}", "public function forgeVideo()\n {\n // Check if we have a video creation array.\n if ($this->provider && isset($this->provider['render']['video'])) {\n // Start iframe tag.\n $video = '<video';\n\n foreach ($this->provider['render']['video'] as $attribute => $val) {\n if (! is_array($val)) {\n $video .= sprintf(' %s=\"%s\"', $attribute, $val);\n }\n }\n // Close start of video tag.\n $video .='>';\n\n // Add inner elements.\n $video .= $this->forgeInnerElements($this->provider['render']['video'], true);\n\n // Wrap video tag.\n $video .= '</video>';\n\n $video .= $this->forgeScript();\n\n return $video;\n }\n }", "function theme_video_cck_tudou_flash($embed, $width, $height, $autoplay) {\n if ($embed) {\n $output .= \"\n <object width=\\\"$width\\\" height=\\\"$height\\\">\n <param name=\\\"movie\\\" value=\\\"http://www.tudou.com/v/$embed\\\"></param>\n <param name=\\\"allowScriptAccess\\\" value=\\\"always\\\"></param>\n <param name=\\\"wmode\\\" value=\\\"transparent\\\"></param>\n <embed src=\\\"http://www.tudou.com/v/$embed\\\" type=\\\"application/x-shockwave-flash\\\" width=\\\"$width\\\" height=\\\"$height\\\" allowFullScreen=\\\"true\\\" wmode=\\\"transparent\\\" allowScriptAccess=\\\"always\\\"></embed>\n </object>\n \";\n }\n return $output;\n}", "function newenglish_embed_wrap($cache) {\n return '<div class=\"entry-content-asset\">' . $cache . '</div>';\n}", "function cinesport_embed_handler( $matches, $attr, $url ) {\n\t\t$embed_url = esc_url( str_replace( '.com/', '.com/embed/', $url ) );\n\n\t\t$embed = '<div class=\"content-media__video content-media__video--cinesport\"><iframe frameborder=\"0\" allowfullscreen=\"true\" webkitallowfullscreen=\"true\" mozallowfullscreen=\"true\" src=\"' . $embed_url . '#autostart=on;titles=on;nolink=on;\"></iframe></div>';\n\n\t\treturn $embed;\n\t}", "function sp_video_youtube_sc( $atts ) {\n\n\textract( shortcode_atts( array(\n\t\t'id' => '',\n\t), $atts ) );\n\n\tglobal $post;\n\n\t$output = '<div class=\"entry-video\">';\n\t$output .= '<iframe width=\"600\" height=\"338\" src=\"http://www.youtube.com/embed/'.$id.'?rel=0\" frameborder=\"0\" allowfullscreen></iframe>';\n\t$output .= '</div>';\n\t\n\treturn $output;\n}", "function bnk_video($postid) {\r\n\r\n\t$video_url = get_post_meta($postid, 'bnk_video_url', true);\r\n\r\n\tif(preg_match('/youtube/', $video_url)) {\r\n\r\n\t\tif(preg_match('/[\\\\?\\\\&]v=([^\\\\?\\\\&]+)/', $video_url, $matches)) {\r\n\t\t\t$output = '<iframe title=\"YouTube video player\" class=\"youtube-player\" type=\"text/html\" width=\"645\" height=\"514\" src=\"http://www.youtube.com/embed/'.$matches[1].'\" frameborder=\"0\" allowFullScreen></iframe>';\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$output = __('Invalid <strong>Youtube</strong> URL.', 'bhinneka');\r\n\t\t}\r\n\r\n\t}\r\n\telseif(preg_match('/vimeo/', $video_url)) {\r\n\r\n\t\tif(preg_match('~^http://(?:www\\.)?vimeo\\.com/(?:clip:)?(\\d+)~', $video_url, $matches))\t{\r\n\t\t\t$output = '<iframe src=\"http://player.vimeo.com/video/'.$matches[1].'\" width=\"645\" height=\"363\" frameborder=\"0\"></iframe>';\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$output = __('Invalid <strong>Vimeo</strong> URL.', 'bhinneka');\r\n\t\t}\r\n\r\n\t}\r\n\telse {\r\n\t\t$output = stripslashes(htmlspecialchars_decode($video_url));\r\n\t}\r\n\techo $output;\r\n}", "public function embedAction() {\n\n //GET SUBJECT (EITHER VIDEO TYPE OR SITEREVIEW_VIDEO TYPE)\n $this->view->video = $video = Engine_Api::_()->core()->getSubject();\n\n //CHECK THAT EMBEDDING IS ALLOWED OR NOT\n if (!Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereview_video.embeds', 1)) {\n $this->view->error = 1;\n return;\n } else if (isset($video->allow_embed) && !$video->allow_embed) {\n $this->view->error = 2;\n return;\n }\n\n //GET EMBED CODE\n $this->view->embedCode = $video->getEmbedCode();\n }", "function get_embed_video( $video_embed_code, $width = 500, $height = 281 ) {\n\tif ( strpos( $video_embed_code, 'vimeo' ) !== false ) {\n\t\t$src = get_embed_video_src( $video_embed_code );\n\n\t\treturn \"<iframe src=\\\"$src?color=ffffff&amp;title=0&amp;byline=0&amp;portrait=0\\\" width=\\\"$width\\\" height=\\\"$height\\\" frameborder=\\\"0\\\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>\";\n\t} else {\n\t\treturn $video_embed_code;\n\t}\n}", "function df_get_video_embed($vurl,$width,$height){\r\n $image_url = parse_url($vurl);\r\n // Test if the link is for youtube\r\n if($image_url['host'] == 'www.youtube.com' || $image_url['host'] == 'youtube.com'){\r\n $array = explode(\"&\", $image_url['query']);\r\n return '<iframe src=\"http://www.youtube.com/embed/' . substr($array[0], 2) . '?wmode=transparent\" frameborder=\"0\" width=\"'.$width.'\" height=\"'.$height.'\" allowfullscreen></iframe>'; // Returns the youtube iframe embed code\r\n // Test if the link is for the shortened youtube share link\r\n } else if($image_url['host'] == 'www.youtu.be' || $image_url['host'] == 'youtu.be'){\r\n $array = ltrim($image_url['path'],'/');\r\n return '<iframe src=\"http://www.youtube.com/embed/' . $array . '?wmode=transparent\" frameborder=\"0\" width=\"'.$width.'\" height=\"'.$height.'\" allowfullscreen></iframe>'; // Returns the youtube iframe embed code\r\n // Test if the link is for vimeo\r\n } else if($image_url['host'] == 'www.vimeo.com' || $image_url['host'] == 'vimeo.com'){\r\n $hash = substr($image_url['path'], 1);\r\n return '<iframe src=\"http://player.vimeo.com/video/' . $hash . '?title=0&byline=0&portrait=0\" width=\"'.$width.'\" height=\"'.$height.'\" frameborder=\"0\" webkitAllowFullScreen allowfullscreen></iframe>'; // Returns the vimeo iframe embed code\r\n }\r\n}", "function youtubeEmbed($html)\r\n{\r\n\t\t$iStart = stripos($html,\"[youtube\");\r\n\t\twhile((string)$iStart != null)\r\n\t\t{\r\n\t\t\t$ytid = \"\";\r\n\t\t\t$height = \"\";\r\n\t\t\t$width = \"\";\r\n\t\t\t\r\n\t\t\t//get entire YOUTUBE tag\r\n\t\t\t$iEnd = stripos($html,\"/]\",$iStart)+2;\r\n\t\t\t$ytTag = substr($html,$iStart,($iEnd-$iStart));\r\n\t\t\t\r\n\t\t\t//get ytid\r\n\t\t\t$iIdStart = stripos($ytTag,\"id=\");\r\n\t\t\tif($iIdStart != null)\r\n\t\t\t{\r\n\t\t\t\t$iIdEnd = stripos($ytTag,'\"',$iIdStart+4);\r\n\t\t\t\t$ytid = substr($ytTag,$iIdStart+4,($iIdEnd-($iIdStart+4)));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//get height\r\n\t\t\t$iIdStart = stripos($ytTag,\"height=\");\r\n\t\t\tif($iIdStart != null)\r\n\t\t\t{\r\n\t\t\t\t$iIdEnd = stripos($ytTag,'\"',$iIdStart+8);\r\n\t\t\t\t$height = substr($ytTag,$iIdStart+8,($iIdEnd-($iIdStart+8)));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//get width\r\n\t\t\t$iIdStart = stripos($ytTag,\"width=\");\r\n\t\t\tif($iIdStart != null)\r\n\t\t\t{\r\n\t\t\t\t$iIdEnd = stripos($ytTag,'\"',$iIdStart+7);\r\n\t\t\t\t$width = substr($ytTag,$iIdStart+7,($iIdEnd-($iIdStart+7)));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//replace HTML\r\n\t\t\tif($height == \"\")\r\n\t\t\t{\r\n\t\t\t\t$height = \"315\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($width == \"\")\r\n\t\t\t{\r\n\t\t\t\t$width = \"560\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$replacementHTML = \"<iframe width='\" . $width . \"' height='\" . $height . \"' src='https://www.youtube.com/embed/\" . $ytid . \"' frameborder='0' allowfullscreen></iframe>\";\r\n\t\t\t$html = substr_replace($html,$replacementHTML,$iStart,($iEnd-$iStart));\r\n\t\t\t\r\n\t\t\tif($ytid != \"\")\r\n\t\t\t{\r\n\t\t\t\t//prep next loop\r\n\t\t\t\t$iStart = stripos($html,\"[youtube\",($iStart+strlen($replacementHTML)));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$iStart = stripos($html,\"[youtube\",($iEnd-$iStart));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $html;\r\n\t}", "function custom_youtube_oembed( $code ) {\n if( stripos( $code, 'youtube.com' ) !== FALSE && stripos( $code, 'iframe' ) !== FALSE )\n $code = str_replace( '<iframe', '<iframe class=\"content-video\" type=\"text/html\" ', $code );\n\n return $code;\n}", "function wpex_get_portfolio_post_video() {\n\n\t// Get video URl\n\t$video = wpex_get_post_video_html();\n\n\t// Return if no video\n\tif ( empty( $video ) ) {\n\t\treturn;\n\t}\n\n\t// Return video\n\treturn '<div class=\"portfolio-featured-video clr\">'. $video .'</div>';\n\n}", "function KwYouTube($atts, $content = null) {\r\n\t\t$height = get_option(\"kwheight\");\r\n\t\t$width = get_option(\"kwwidth\");\r\n\t\t$colorborder1 = get_option(\"kwcolorborder1\");\r\n\t\t$colorborder2 = get_option(\"kwcolorborder2\");\r\n extract(shortcode_atts(array( \"id\" => '' ), $atts));\r\n\t\treturn '<div id=\"video\" style=\"paddind:5px;\"><object width=\"'.$width.'\" height=\"'.$height.'\"><param name=\"movie\" value=\"http://www.youtube.com/v/'.$id.'?version=2&color1=0x'.$colorborder1.'&color2=0x'.$colorborder2.'&border=1&fs=1&hl=fr_FR&rel=0&hd=1\" /><param name=\"allowFullScreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"bgcolor\" value=\"#000000\"><embed type=\"application/x-shockwave-flash\" width=\"'.$width.'\" height=\"'.$height.'\" src=\"http://www.youtube.com/v/'.$id.'?version=2&color1=0x'.$colorborder1.'&color2=0x'.$colorborder2.'&border=1&fs=1&hl=fr_FR&rel=0&hd=1\" bgcolor=\"#000000\" allowscriptaccess=\"always\" allowfullscreen=\"true\"></embed></object></div>';}", "function pavi_shortcode_video($atts = array()){\n \n return pavi_get_display_video($atts);\n}", "function create_embedcode($video_url, $width = 440, $height = 350) {\n\t$actual_file = get_youtube_video($video_url);\n\tif (!$width || !is_numeric($width)) {\n\t\t$width = 440;\n\t}\n\tif (!$height || !is_numeric($height)) {\n\t\t$height = 350;\n\t}\n\treturn '<object width=\"' . $width . '\" height=\"' . $height . '\"><param name=\"movie\" value=\"' . $actual_file . '\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"' . $actual_file . '\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"' . $width . '\" height=\"' . $height . '\"></embed></object>';\n}", "function mediapress_get_media_object($post_id) {\n if (!$post_id){ return; }\n\n $minireel_id = get_post_meta($post_id, 'c6-minireel-id', true);\n $campaign_id = get_post_meta($post_id, 'c6-campaign-id', true);\n\n $campaign = get_query_var('campaign');\n $campaign = $campaign ? $campaign : $campaign_id;\n $container = get_query_var('container');\n $container = $container ? $container : 'minireel.tv';\n $type = get_query_var('type');\n $type = $type ? $type : 'full-np';\n $launch_urls = get_query_var('launchUrls');\n $play_urls = get_query_var('playUrls');\n $count_urls = get_query_var('countUrls');\n\n $query_string = '?experience=' . $minireel_id;\n $query_string .= $campaign ? '&campaign=' . $campaign : '';\n $query_string .= '&context=minireel.tv';\n $query_string .= '&container=' . $container;\n $query_string .= $launch_urls ? '&launchUrls=' . urlencode($launch_urls) : '';\n $query_string .= $play_urls ? '&playUrls=' . urlencode($play_urls) : '';\n $query_string .= $count_urls ? '&countUrls=' . urlencode($count_urls) : '';\n\n if ($minireel_id) {\n print '<iframe src=\"//platform.reelcontent.com/api/public/players/' . $type . $query_string . '\" width=\"100%\" height=\"100%\" frameborder=\"0\"></iframe>';\n }\n}", "function modify_vimeo_embed_url( $html ) {\n\t\n\t// GET HTML\n\tpreg_match('/src\\s*=\\s*\"(.+?)\"/', $html, $src);\n\t\n\t// OPTIONS\n\t$params .= '&autoplay=1';\n\t$params .= '&background=1';\n\t$params .= '&api=1';\n\t\n\t// RETURN HTML\n\t$html = '<iframe src=\"' . $src[1] . $params . '\" frameborder=\"0\" allow=\"loop autoplay fullscreen\" allowfullscreen></iframe>';\n\t\n\treturn $html;\n}", "function embed_wrap( $cache ) {\n\treturn '<div class=\"entry-content-asset\">' . $cache . '</div>';\n}", "function ts_get_embaded_video($url) {\r\n\t\r\n\tif (strstr($url,'vimeo'))\r\n\t{\r\n\t\tif (preg_match('/(\\d+)/', $url, $matches))\r\n\t\t{\r\n\t\t\treturn '<iframe src=\"http://player.vimeo.com/video/'.$matches[0].'?title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';\r\n\t\t}\r\n\t}\r\n\telse if (strstr($url,'youtu'))\r\n\t{\r\n\t\t$pattern = \"#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\\/)[^&\\n]+(?=\\?)|(?<=v=)[^&\\n]+|(?<=youtu.be/)[^&\\n]+#\";\r\n\t\tif (preg_match($pattern, $url, $matches))\r\n\t\t{\r\n\t\t\t\r\n\t\t\treturn '<iframe src=\"http://www.youtube.com/embed/'.$matches[0].'\" frameborder=\"0\" allowfullscreen></iframe>';\r\n\t\t}\r\n\t}\r\n\treturn '';\r\n}", "function iframevideoShortcode( $atts, $content = null, $tag = '' ){\n\t$atts = array_change_key_case( (array)$atts, CASE_LOWER );\n\n\t$output = '<div class=\"iframe-video-wrapper\">' . $content . '</div>';\n\treturn $output;\n}", "function molla_post_add_thumbnail_before_content() {\n\t\tif ( 'video' == get_post_format() && get_post_meta( get_the_ID(), 'media_embed_code', true ) ) {\n\t\t\tget_template_part( 'template-parts/posts/partials/post', 'video' );\n\t\t} else {\n\t\t\tmolla_get_template_part(\n\t\t\t\t'template-parts/posts/partials/post',\n\t\t\t\t'image',\n\t\t\t\tarray(\n\t\t\t\t\t'p_src' => 'single',\n\t\t\t\t\t'image_size' => 'full',\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "function show_metabox_post_video($post) {\r\n\t\t$id_vimeo = get_post_meta($post->ID, 'id_vimeo', true);\r\n\t\t$id_youtube = get_post_meta($post->ID, 'id_youtube', true);\r\n\t\t$embed_generico = get_post_meta($post->ID, 'embed_generico', true);\r\n\t\twp_nonce_field(__FILE__, '_articulo_videos_nonce');\r\n\t\techo <<< HTML\r\n\r\n\t\t\t<label for=\"id_vimeo\">ID de Vimeo</label>\r\n\t\t\t<input type=\"text\" name=\"id_vimeo\" id=\"id_vimeo\" value=\"$id_vimeo\" class=\"widefat\">\r\n\t\t\t<p class=\"howto\" style=\"font-size:11px; margin: 0.2em 0 1.5em 0;\">https://vimeo.com/<strong>45118430</strong></p>\r\n\r\n\t\t\t<label for=\"id_youtube\">ID de Youtube</label>\r\n\t\t\t<input type=\"text\" name=\"id_youtube\" id=\"id_youtube\" value=\"$id_youtube\" class=\"widefat\">\r\n\t\t\t<p class=\"howto\" style=\"font-size:11px; margin: 0.2em 0 1.5em 0;\">https://www.youtube.com/watch?v=<strong>rT_OmTMwvZI</strong></p>\r\n\r\n\t\t\t<label for='embed_generico'>Embed (otra fuente)</label>\r\n\t\t\t<input type='text' name='embed_generico' id='embed_generico' value='$embed_generico' class='widefat'>\r\n\t\t\t<p class='howto' style='font-size:11px; margin: 0.2em 0 1.5em 0;'>< iframe src='//player...</p>\r\n\r\nHTML;\r\n\t}", "function handle_legacy_widget_preview_iframe()\n {\n }", "function wp_embed_handler_googlevideo($matches, $attr, $url, $rawattr)\n {\n }", "function theme_emvideo_dotsub_flash($item, $width, $height, $autoplay) {\n\n $output = '';\n if ($item['embed']) {\n \n $embed_url = isset($item['data']['flash']['url']) ? $item['data']['flash']['url'] : 'http://dotsub.com/static/players/portalplayer.swf?plugins=dotsub&uuid=' . $item['value'];\n \n $autoplay = $autoplay ? 'true' : 'false';\n $fullscreen = variable_get('emvideo_dotsub_full_screen', 1) ? 'true' : 'false';\n \n $output = '<object width=\"'. $width .'\" height=\"'. $height .'\">';\n $output .= '<param name=\"movie\" value=\"'. $embed_url .'&type=video&lang=eng\">';\n $output .= '<param name=\"allowFullScreen\" value=\"'. $fullscreen .'\" />';\n $output .= '<param name=\"allowscriptaccess\" value=\"always\"></param>';\n $output .= '<embed src=\"'. $embed_url .'&type=video&lang=eng\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"'. $fullscreen .'\" width=\"'. $width .'\" height=\"'. $height .'\"></embed>';\n $output .= '</object>';\n }\n return $output;\n}", "private function embedTags( $html ) {\n\t\treturn preg_replace(\n\t\t\t'/\\[.{0,}https\\:\\/\\/youtu\\.be\\/(.{11}).{0,}\\]/',\n\t\t\t'<div class=\"embed-youtube\"><iframe src=\"https://www.youtube.com/embed/$1?rel=0\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen></iframe></div>',\n\t\t\t$html\n\t\t);\n\t}", "function fabric_embed_wrap($cache, $url, $attr = '', $post_ID = '') {\n return '<div class=\"entry-content-asset\">' . $cache . '</div>';\n}", "function crumble_video($atts, $content = null) {\r\n\t\textract ( shortcode_atts(\r\n\t\t\tarray(\r\n\t\t\t\t'id' => '',\r\n\t\t\t\t'type' => '',\r\n\t\t\t\t'width' => '',\r\n\t\t\t\t'height' => '220'\r\n\t\t\t), $atts ) );\r\n\t\t\r\n\r\n\r\n\r\n\t\t\tif( $type == 'youtube' ) { \r\n\t\t\t\t$code = '<iframe width=\"' . $width . '\" height=\"' .$height . '\" src=\"http://www.youtube.com/embed/'. $id . '\" frameborder=\"0\" allowfullscreen></iframe>';\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tif( $type == 'vimeo') { \r\n\t\t\t\t$code = '<iframe src=\"http://player.vimeo.com/video/' . $id . '?title=0&amp;byline=0&amp;portrait=0&amp;color=ba0d16\" width=\"' . $width . '\" height=\"' . $height . '\"></iframe>';\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tif($type == 'dailymotion') { \r\n\t\t\t\t$code = '<iframe width=\"' . $width . '\" height=\"' . $height . '\" src=\"http://www.dailymotion.com/embed/video/'. $id . '?logo=0\"></iframe>';\r\n\t\t\t } \r\n\t\t\t \r\n\t\t$code = '<div class=\"video-frame\">' . $code . '</div>';\r\n\r\n\t\t\t\r\n\t\treturn $code;\r\n\t}", "protected function render() {\n wp_enqueue_style('autostop-video-css');\n\n $settings = $this->get_settings_for_display();\n\n\n $video_url = $this->get_hosted_video_url();\n\n if ( empty( $video_url ) ) {\n return;\n }\n\n ob_start();\n\n $this->render_hosted_video();\n\n $video_html = ob_get_clean();\n\n\n if ( empty( $video_html ) ) {\n echo esc_url( $video_url );\n\n return;\n }\n\n $this->add_render_attribute( 'video-wrapper', 'class', 'elementor-wrapper' );\n\n if ( ! $settings['lightbox'] ) {\n $this->add_render_attribute( 'video-wrapper', 'class', 'elementor-fit-aspect-ratio' );\n }\n\n $this->add_render_attribute( 'video-wrapper', 'class', 'elementor-open-' . ( $settings['lightbox'] ? 'lightbox' : 'inline' ) );\n\n\n if ( ! empty( $settings['link']['url'] ) ) {\n $this->add_render_attribute( 'button', 'href', $settings['link']['url'] );\n $this->add_render_attribute( 'button', 'class', 'elementor-button-link' );\n\n if ( $settings['new_tab'] == \"yes\" ) {\n $this->add_render_attribute( 'button', 'target', '_blank' );\n }\n }\n $this->add_render_attribute( 'button', 'class', 'elementor-button' );\n $this->add_render_attribute( 'button', 'role', 'button' );\n if ( ! empty( $settings['button_css_id'] ) ) {\n $this->add_render_attribute( 'button', 'id', $settings['button_css_id'] );\n }\n if ( ! empty( $settings['size'] ) ) {\n $this->add_render_attribute( 'button', 'class', 'elementor-size-' . $settings['size'] );\n }\n if ( $settings['hover_animation'] ) {\n $this->add_render_attribute( 'button', 'class', 'elementor-animation-' . $settings['hover_animation'] );\n }\n\n ?>\n <div <?php echo $this->get_render_attribute_string( 'video-wrapper' ); ?>>\n\n <?php if($settings['overlay_block'] == \"yes\"): ?>\n\n <div class=\"super-video-stopper\" id=\"video-stopper-<?php echo($this->get_id()); ?>\"\n <?php if(!(\\Elementor\\Plugin::$instance->preview->is_preview_mode() || \\Elementor\\Plugin::$instance->editor->is_edit_mode())){echo ('style=\"display:none;\"');} ?> >\n <div>\n <center>\n <div class=\"elementor-heading-title\">\n <?php echo($settings['title_text']); ?>\n </div>\n <div class=\"elementor-widget-container\">\n <div class=\"elementor-button-wrapper\">\n <a <?php echo $this->get_render_attribute_string( 'button' ); ?>>\n <?php $this->render_text(); ?>\n </a>\n </div>\n </div>\n </center>\n </div>\n </div>\n\n <?php endif; ?>\n\n\n <?php\n if ( ! $settings['lightbox'] ) {\n echo $video_html; // XSS ok.\n }\n\n if ( $this->has_image_overlay() ) {\n $this->add_render_attribute( 'image-overlay', 'class', 'elementor-custom-embed-image-overlay' );\n\n if ( $settings['lightbox'] ) {\n $lightbox_url = $video_url;\n\n $lightbox_options = [\n 'type' => 'video',\n 'videoType' => 'hosted',\n 'url' => $lightbox_url,\n 'modalOptions' => [\n 'id' => 'elementor-lightbox-' . $this->get_id(),\n 'entranceAnimation' => $settings['lightbox_content_animation'],\n 'entranceAnimation_tablet' => $settings['lightbox_content_animation_tablet'],\n 'entranceAnimation_mobile' => $settings['lightbox_content_animation_mobile'],\n 'videoAspectRatio' => $settings['aspect_ratio'],\n ],\n ];\n\n $lightbox_options['videoParams'] = $this->get_hosted_params();\n\n $this->add_render_attribute( 'image-overlay', [\n 'data-elementor-open-lightbox' => 'yes',\n 'data-elementor-lightbox' => wp_json_encode( $lightbox_options ),\n ] );\n\n if ( Plugin::$instance->editor->is_edit_mode() ) {\n $this->add_render_attribute( 'image-overlay', [\n 'class' => 'elementor-clickable',\n ] );\n }\n } else {\n $this->add_render_attribute( 'image-overlay', 'style', 'background-image: url(' . \\Elementor\\Group_Control_Image_Size::get_attachment_image_src( $settings['image_overlay']['id'], 'image_overlay', $settings ) . ');' );\n }\n ?>\n <div <?php echo $this->get_render_attribute_string( 'image-overlay' ); ?>>\n <?php if ( $settings['lightbox'] ) : ?>\n <?php echo \\Elementor\\Group_Control_Image_Size::get_attachment_image_html( $settings, 'image_overlay' ); ?>\n <?php endif; ?>\n\n\n\n <?php if ( 'yes' === $settings['show_play_icon'] ) : ?>\n <div class=\"elementor-custom-embed-play\" role=\"button\">\n <i class=\"eicon-play\" aria-hidden=\"true\"></i>\n <span class=\"elementor-screen-only\"><?php echo __( 'Play Video', 'yx-super-cat' ); ?></span>\n </div>\n <?php endif; ?>\n </div>\n <?php } ?>\n </div>\n <script>\n var $jq = jQuery.noConflict();\n var video = $jq(\"#video-<?php echo($this->get_id()); ?>\");\n var stopper = $jq(\"#video-stopper-<?php echo($this->get_id()); ?>\");\n var end = parseInt(\"<?php echo($settings['end']); ?>\");\n var interval_<?php echo($this->get_id()); ?> = setInterval(function(){\n if(end && video.get(0).currentTime >= end){\n if(video.get(0).webkitExitFullScreen){video.get(0).webkitExitFullScreen()}\n if(document.webkitExitFullscreen){document.webkitExitFullscreen()}\n if(document.mozCancelFullscreen){document.mozCancelFullscreen()}\n if(document.exitFullscreen){document.exitFullscreen()}\n if (document.exitPictureInPicture){document.exitPictureInPicture()}\n video.get(0).pause();\n <?php\n //window.elementorProFrontend.modules.linkActions.runAction(\"#elementor-action%3Aaction%3Dpopup%3Aopen%20settings%3DeyJpZCI6IjI2MSIsInRvZ2dsZSI6ZmFsc2V9\");\n if($settings['auto_open'] == \"yes\"){\n if(substr($settings[\"auto_link\"][\"url\"], 0, 17) == \"#elementor-action\"){\n echo('window.elementorProFrontend.modules.linkActions.runAction(\"'.$settings[\"auto_link\"][\"url\"].'\");');\n }else{\n echo('window.location = \"'.$settings[\"auto_link\"][\"url\"].'\";');\n }\n }\n if($settings['overlay_block'] == \"yes\"){\n echo('$jq(\"#video-stopper-' . $this->get_id() . '\").show();');\n }\n\n ?>\n clearInterval(interval_<?php echo($this->get_id()); ?>);\n }\n }, 300);\n </script>\n <?php\n }", "function getVideoEmebed($url, $config, $width, $height) {\r\n\t\t$uniqueUid = ' rgmi'.$this->getUniqueID().' '; \r\n\t\t$video = '<span class=\"rgmediaimages-player'.$uniqueUid.'\">\r\n <embed src=\"'.t3lib_extMgm::siteRelpath('rgmediaimages').'res/mediaplayer.swf\" width=\"'.$width.'\" height=\"'.$height.'\" allowfullscreen=\"true\" allowscriptaccess=\"always\" flashvars=\"&file='.$url.'&'.$config.'\" />\r\n </span>';\r\n\t\treturn $video;\t\r\n\t}", "function filter_video($html, $wmode = false, $width = false, $height = false) {\n\t$final_html = $html;\n\tif ($wmode) {\n\t\t$final_html = str_replace('<embed', '<param name=\"wmode\" value=\"transparent\"></param><embed wmode=\"transparent\" ', $final_html);\n\t}\n\tif (is_numeric($width)) {\n\t\t$final_html = preg_replace('~width=\"[\\d]+\"~', 'width=\"'.$width.'\"', $final_html);\n\t}\n\tif (is_numeric($height)) {\n\t\t$final_html = preg_replace('~height=\"[\\d]+\"~', 'height=\"'.$height.'\"', $final_html);\n\t}\n\t\n\treturn $final_html;\n}", "public function oembed() {\n return $this->oembed;\n }", "function plgContentplug_hwd_vs_videoplayer()\r\n\t{\r\n\t}", "function idaho_iframe_func( $atts, $content = '' ) {\n\n\t/** Returnable html string. */\n\t$video = (string) '';\n\n\t/** Convert $atts to $params. Merge with defaults. */\n\t$params = (array) shortcode_atts( array(\n\t\t'url' \t\t=> 'https://www.youtube.com/watch?v=DPBU2SOSC5c',\n\t\t'aspect' \t=> '16by9',\n\t), $atts );\n\n\n\t$video .= sprintf('<iframe src=\"%2$s\" allowfullscreen style=\"width:100%\"></iframe>',\n\t\tesc_attr( $params['aspect'] ),\n\t\tesc_url( $params['url'] )\n\t);\n\n\t/** Strip out new lines to avoid auto <p>s. */\n\treturn $video;\n}", "function thrive_bp_embed_oembed_html( $html, $url, $attr, $rawattr ) {\n $html = '<div class=\"embed-wrapper\">' . str_replace( array('422', '563'), '278', $html ) . '</div>';\n return $html;\n}", "function mmc_dash_help_widget(){\n\t?>\n\t<iframe width=\"350\" height=\"250\" src=\"https://www.youtube.com/embed/x7R2HcTAyjI\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n\t<?php\n}", "function do_video_single($atts,$content)\n \t\t\t\t\t\t\t\t\t{\n\n \t\t\t\t\t\t\t\t\t\t\textract( shortcode_atts( array(\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t'posts' => '0',\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$atts));\n\n \t\t\t\t\t\t\t\t\t\t\tob_start();\t\t\t\t\n\n \t\t\t\t\t\t\t\t\t\t\t$args = array(\n \t\t\t\t\t\t\t\t\t\t\t\t'post_type'=>'bf_videos_manager',\n \t\t\t\t\t\t\t\t\t\t\t\t'post__in' => array($posts),\n \t\t\t\t\t\t\t\t\t\t\t);\n\n \t\t\t\t\t\t\t\t\t\t\t$query = new WP_Query($args);\n \t\t\t\t\t\t\t\t\t\t\t$all_videos = $query->posts;\n \t\t\t\t\t\t\t\t\t\t\t// print_r($all_videos);\n \t\t\t\t\t\t\t\t\t\t\t//$all_videos = count(query_posts($args));\n \t\t\t\t\t\t\t\t\t\t\t//The Loop\n \t\t\t\t\t\t\t\t\t\t\tif (empty($all_videos)) {\n\n \t\t\t\t\t\t\t\t\t\t\t\techo ('<code>Désolé, il n\\'y as pas de video avec un ID de cette valeur <strong>'.$posts.'</strong></code>');\n \t\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t\t\tforeach($all_videos as $video_single)\n \t\t\t\t\t\t\t\t\t\t\t{\n $bf_video_tag = get_post_meta($video_single->ID,'bf_videos_manager_tag', true);\n $bf_video_link = get_post_meta($video_single->ID,'bf_videos_manager_video_link', true);\n\n\n $video_img = get_the_post_thumbnail($video_single->ID);\n $permalink = get_permalink($video_single->ID);\n\n \t\t\t\t\t?>\n \t\t\t\t\t\t<div class=\"textwidget text\">\n \t\t\t\t\t\t<?php\n \t\t\t\t\t\t/* DEBUG */\n \t\t\t\t\t\t// print_r($video_single);\n \t\t\t\t\t\t?>\n \t\t\t\t\t\t<?php \n\n \t\t/* echo (''.$video_img.''); */\n\n \t\t?>\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t<p class=\"video-excerpt\"><?php \n\n\n echo do_shortcode('<code>'.$bf_video_link.' '.$bf_video_main_tag.'</code>');\n \n \n \t\t?></p>\n \n\n\n \t\t\t\t\t\t<?php \n\n $bf_video_tag = get_the_term_list($video_single->ID, 'bf_videos_manager_tag', 'Tag(s) : ', ', ', '' );\n $bf_video_cat = get_the_term_list($video_single->ID, 'bf_videos_manager_cat', 'Categorie(s) : ', ', ', '' );\n\n\n \t\t\t\t\t\t/* AUTHORS */\n \t\t\t\t\t\tif ( !empty( $bf_video_tag)) {\n \t\t\t\t\t\t\t\techo (''.$bf_video_tag.'');\n \t\t\t\t\t\t\t\techo ('<br>');\n \t\t\t\t\t\t} \n\n \t\t\t\t\t\t/* FLAVORS */\n \t\t\t\t\t\tif ( !empty( $bf_video_cat)) {\n \t\t\t\t\t\t\t\techo (''.$bf_video_cat.'');\n \t\t\t\t\t\t\t\techo ('<br>');\n \t\t\t\t\t\t}\n \t\t\t\t\t ?>\n\n\n\n \t\t\t\t <?php\n \t\t\t\t /* SEP */\n print('<br/><br/>');\n \t\t\t\t ?>\n \t\t\t\t</div>\n \t\t\t\t<!-- separator -->\n \t\t\t\t<div class=\"clear-div\"></div>\n\n \t\t\t\t\t \n\n \t\t\t\t\t\t\t\t\t\t\t<?php\n \t\t\t\t\t\t\t\t\t\t\t }//EOL\t\n \t\t\t\t\t\t\t\t\t\t\t?>\n \t\t\t\t\t\t\t\t\t\t\t<?php\n \t\t\t\t\t\t\t\t\t\t\t$output_string = ob_get_contents();\n \t\t\t\t\t\t\t\t\t\t\twp_reset_query();\n \t\t\t\t\t\t\t\t\t\t\tob_end_clean();\t\t\t\n \t\t\t\t\t\t\t\t\t\t\treturn $output_string;\n\n \t\t\t\t\t\t\t\t\t\t}", "function wp_maybe_load_embeds()\n {\n }", "function video_cck_dailymotion_extract($embed = '') {\n // http://www.dailymotion.com/us/cluster/news/featured/video/x3xk8v_primary-smackdown-obama-girl-return_fun\n // http://www.dailymotion.com/barelypolitical/video/x3xk8v_primary-smackdown-obama-girl-return_fun\n // http://www.dailymotion.com/barelypolitical/video/x3xk8v\n // <div><object width=\"420\" height=\"252\"><param name=\"movie\" value=\"http://www.dailymotion.com/swf/x3xk8v\" /></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowScriptAccess\" value=\"always\"></param><embed src=\"http://www.dailymotion.com/swf/x3xk8v\" type=\"application/x-shockwave-flash\" width=\"420\" height=\"252\" allowFullScreen=\"true\" allowScriptAccess=\"always\"></embed></object><br /><b><a href=\"http://www.dailymotion.com/video/x3xk8v_primary-smackdown-obama-girl-return_fun\">Primary Smackdown: Obama Girl Returns</a></b><br /><i>Uploaded by <a href=\"http://www.dailymotion.com/BarelyPolitical\">BarelyPolitical</a></i></div>\n // <div><object width=\"420\" height=\"252\"><param name=\"movie\" value=\"http://www.dailymotion.com/swf/x3xk8v\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowScriptAccess\" value=\"always\"></param><embed src=\"http://www.dailymotion.com/swf/x3xk8v\" type=\"application/x-shockwave-flash\" width=\"420\" height=\"252\" allowFullScreen=\"true\" allowScriptAccess=\"always\"></embed></object><br /><b><a href=\"http://www.dailymotion.com/video/x3xk8v_primary-smackdown-obama-girl-return_fun\">Primary Smackdown: Obama Girl Returns</a></b><br /><i>Uploaded by <a href=\"http://www.dailymotion.com/BarelyPolitical\">BarelyPolitical</a></i></div>\n// if (preg_match('@dailymotion\\.com@i', $embed, $matches)) {\n// if (preg_match('@/([^/_]+)_@i', $embed, $matches)) {\n// return $matches[0];\n// }\n// }\n if (preg_match('@dailymotion\\.com/swf/([^\"\\&]+)@i', $embed, $matches)) {\n return $matches[1];\n }\n if (preg_match('@dailymotion\\.com@i', $embed, $matches)) {\n if (preg_match('@/([^/_]+)_@i', $embed, $matches)) {\n return $matches[1];\n }\n }\n return array();\n}", "function bb_video($arguments = array()) {\n\t\t$content = $this->parseArray(array('[/video]'), array());\n\n\t\t$params['width'] = 570;\n\t\t$params['height'] = 360;\n\t\t$params['iframe'] = true;\n\t\t$previewthumb = '';\n\n\t\t$type = null;\n\t\t$id = null;\n\t\t$matches = array();\n\n\t\t//match type and id\n\t\tif (strstr($content, 'youtube.com') OR strstr($content, 'youtu.be')) {\n\t\t\t$type = 'youtube';\n\t\t\tif (preg_match('#(?:youtube\\.com/watch\\?v=|youtu.be/)([0-9a-zA-Z\\-_]{11})#', $content, $matches) > 0) {\n\t\t\t\t$id = $matches[1];\n\t\t\t}\n\t\t\t$params['src'] = '//www.youtube.com/embed/' . $id . '?autoplay=1';\n\t\t\t$previewthumb = 'https://img.youtube.com/vi/' . $id . '/0.jpg';\n\t\t} elseif (strstr($content, 'vimeo')) {\n\t\t\t$type = 'vimeo';\n\t\t\tif (preg_match('#vimeo\\.com/(?:clip\\:)?(\\d+)#', $content, $matches) > 0) {\n\t\t\t\t$id = $matches[1];\n\t\t\t}\n\t\t\t$params['src'] = '//player.vimeo.com/video/' . $id . '?autoplay=1';\n\n\t\t\t$videodataurl = 'http://vimeo.com/api/v2/video/' . $id . '.php';\n\t\t\t$data = '';\n\t\t\t$downloader = new UrlDownloader;\n\t\t\tif ($downloader->isAvailable()) {\n\t\t\t\t$data = $downloader->file_get_contents($videodataurl);\n\t\t\t}\n\t\t\tif ($data) {\n\t\t\t\t$data = unserialize($data);\n\t\t\t\t$previewthumb = $data[0]['thumbnail_medium'];\n\t\t\t}\n\t\t} elseif (strstr($content, 'dailymotion')) {\n\t\t\t$type = 'dailymotion';\n\t\t\tif (preg_match('#dailymotion\\.com/video/([a-z0-9]+)#', $content, $matches) > 0) {\n\t\t\t\t$id = $matches[1];\n\t\t\t}\n\t\t\t$params['src'] = '//www.dailymotion.com/embed/video/' . $id . '?autoPlay=1';\n\t\t\t$previewthumb = 'http://www.dailymotion.com/thumbnail/video/' . $id;\n\t\t} elseif (strstr($content, 'godtube')) {\n\t\t\t$type = 'godtube';\n\t\t\tif (preg_match('#godtube\\.com/watch/\\?v=([a-zA-Z0-9]+)#', $content, $matches) > 0) {\n\t\t\t\t$id = $matches[1];\n\t\t\t}\n\t\t\t$params['id'] = $id;\n\t\t\t$params['iframe'] = false;\n\n\t\t\t$previewthumb = 'http://www.godtube.com/resource/mediaplayer/' . $id . '.jpg';\n\t\t}\n\n\t\tif (empty($type) OR empty($id)) {\n\t\t\treturn '[video] Niet-ondersteunde video-website (' . htmlspecialchars($content) . ')';\n\t\t}\n\t\treturn $this->video_preview($params, $previewthumb);\n\t}", "function avia_video_slideshow_filter($current_post)\n\t{\n\t \t$current_post['content'] = preg_replace( '|^\\s*(https?://[^\\s\"]+)\\s*$|im', \"[embed]$1[/embed]\", $current_post['content'] );\n\n\t\t//extrect embed and av_video codes from the content. if any were found execute them and prepend them to the post\n\t\tpreg_match(\"!\\[embed.+?\\]|\\[av_video.+?\\]!\", $current_post['content'], $match_video);\n\n\t\tif(!empty($match_video))\n\t\t{\n\t\t\tglobal $wp_embed;\n\t\t\t$video = $match_video[0];\n\t\t\t$current_post['before_content'] = do_shortcode($wp_embed->run_shortcode($video));\n\t\t\t$current_post['content'] = str_replace($match_video[0], \"\", $current_post['content']);\n\t\t\t$current_post['slider'] = \"\";\n\t\t}\n\n\t\treturn avia_default_title_filter($current_post);\n\t}", "function _wp_oembed_get_object()\n {\n }", "public function embed($urls, $name, $width, $height, $options) {\n $sources = array();\n foreach ($urls as $url) {\n $params = ['src' => $url];\n $sources[] = html_writer::empty_tag('source', $params);\n }\n\n $sources = implode(\"\\n\", $sources);\n $title = $this->get_name($name, $urls);\n // Escape title but prevent double escaping.\n $title = s(preg_replace(['/&amp;/', '/&gt;/', '/&lt;/'], ['&', '>', '<'], $title));\n\n return <<<OET\n<video class=\"mediaplugin mediaplugin_test\" title=\"$title\">\n $sources\n</video>\nOET;\n }", "function c7s_reveal_modal( $post_id, $echo = true ) {\n\tglobal $media_embed_mb;\n\t$media_embed_mb->the_meta(); \n\t$media_source = $media_embed_mb->get_the_value( 'media_source' );\n\t$media_embed_code = $media_embed_mb->get_the_value( 'media_embed_code' );\n\t\n\t// If media embed source or code is available, set to true\n\t$media_embed = ( $media_source || $media_embed_code ) ? true : false;\n\t\n\tif ( ! $media_embed ) :\n\t\treturn;\n\t\n\telse :\n\t\t// Get theme options\n\t\t$instant_default_width = c7s_get_option( 'instant_default_width', 640 );\n\t\t$instant_default_height = c7s_get_option( 'instant_default_height', 640 );\n\t\t\n\t\t$instant = '<div class=\"instant\"><div id=\"video-' . absint( $post_id ) . '\" class=\"instant-view\">';\n\t\t$instant .= apply_filters( 'get_media', absint( $post_id ), absint( $instant_default_width ), absint( $instant_default_height ), false );\n\t\t$instant .= '</div></div>';\n\t\t\t\t\n\t\tif ( $echo ) :\n\t\t echo $instant;\n\t\telse :\n\t\t return $instant;\n\t\tendif;\n\t\t\n\tendif; // end $media_embed check\n}", "function get_post_embed_html($width, $height, $post = \\null)\n {\n }", "function YouTube($atts, $content = null) {\r\n\t\t$height = get_option(\"kwheight\");\r\n\t\t$width = get_option(\"kwwidth\");\r\n extract(shortcode_atts(array( \"id\" => '' ), $atts));\r\n\t\treturn '<div id=\"video\"><iframe width=\"'.$width.'\" height=\"'.$height.'\" src=\"http://www.youtube.com/embed/'.$id.'\" frameborder=\"0\" allowfullscreen></iframe></div>';}", "function addVideoScrollableItem($ytid) {\n $ret = \"\";\n $ret = $ret . \"<div>\\n\";\n $ret = $ret . \" <a href=\\\"javascript:void(0)\\\" onClick=\\\"\\$('#bbplayer-video').tubeplayer('play', '$ytid')\\\">\\n\";\n $ret = $ret . \" <img src=\\\"http://img.youtube.com/vi/$ytid/default.jpg\\\" />\\n\";\n $ret = $ret . \" </a>\\n\";\n $ret = $ret . \"</div>\\n\";\n\n echo($ret);\n }", "function fa_video_output( $video, $before = '', $after = '', $with_assets = true, $echo = true ){\t\n\t$width \t\t= $video['width'];\n\t$height \t= fa_player_height( $video['aspect'] , $video['width'] );\n\t$exclude \t= array('width', 'aspect');\n\t\n\t$styles = array(\n\t\t'width: 100%',\n\t\t'height:' . $height . 'px',\n\t\t'max-width:' . $width . 'px' \n\t);\n\t\n\t$el_data = array();\n\tforeach( $video as $k => $v ){\n\t\tif( in_array( $k, $exclude ) ){\n\t\t\tcontinue;\n\t\t}\n\t\t// booleans get converted to 0 or 1\n\t\tif( is_bool( $v ) ){\n\t\t\t$v = (int) $v;\n\t\t}\n\t\t\n\t\t$el_data[] = 'data-' . $k . '=\"' . $v . '\"';\n\t}\n\t\n\t$el_data[] = 'data-ssl=\"' . (int) is_ssl() . '\"';\n\t\n\t$output = $before . '<div class=\"fa-video-player\" style=\"' . implode('; ', $styles) . '\" ' . implode(' ', $el_data) . '><!-- video container --></div>' . $after;\n\tif( $echo ){\n\t\techo $output;\n\t}\n\t\n\tif( $with_assets ){\n\t\tfa_load_style('video-player');\n\t\tfa_load_script('video-player2', array( 'jquery' ) );\n\t\t/**\n\t\t * Video player script action. Allows third party plugins to load\n\t\t * other assets.\n\t\t */\n\t\tdo_action( 'fa_embed_video_script_enqueue' );\t\t\n\t}\n\t\n\treturn $output;\t\n}", "function sp_add_video ($url, $width = 620, $height = 349) {\n\t\n\t$video_url = @parse_url($url);\n\n\tif ( $video_url['host'] == 'www.youtube.com' || $video_url['host'] == 'youtube.com' ) {\n\t\tparse_str( @parse_url( $url, PHP_URL_QUERY ), $my_array_of_vars );\n\t\t$video = $my_array_of_vars['v'] ;\n\t\t$output .='<iframe width=\"'.$width.'\" height=\"'.$height.'\" src=\"http://www.youtube.com/embed/'.$video.'?rel=0\" frameborder=\"0\" allowfullscreen></iframe>';\n\t}\n\telseif( $video_url['host'] == 'www.youtu.be' || $video_url['host'] == 'youtu.be' ){\n\t\t$video = substr(@parse_url($url, PHP_URL_PATH), 1);\n\t\t$output .='<iframe width=\"'.$width.'\" height=\"'.$height.'\" src=\"http://www.youtube.com/embed/'.$video.'?rel=0\" frameborder=\"0\" allowfullscreen></iframe>';\n\t}\n\telseif( $video_url['host'] == 'www.vimeo.com' || $video_url['host'] == 'vimeo.com' ){\n\t\t$video = (int) substr(@parse_url($url, PHP_URL_PATH), 1);\n\t\t$output .='<iframe src=\"http://player.vimeo.com/video/'.$video.'\" width=\"'.$width.'\" height=\"'.$height.'\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';\n\t}\n\telseif( $video_url['host'] == 'www.dailymotion.com' || $video_url['host'] == 'dailymotion.com' ){\n\t\t$video = substr(@parse_url($url, PHP_URL_PATH), 7);\n\t\t$video_id = strtok($video, '_');\n\t\t$output .='<iframe frameborder=\"0\" width=\"'.$width.'\" height=\"'.$height.'\" src=\"http://www.dailymotion.com/embed/video/'.$video_id.'\"></iframe>';\n\t}\n\t\n\treturn $output;\n}", "function wp_filter_oembed_iframe_title_attribute($result, $data, $url)\n {\n }", "function vcex_get_post_video_oembed_url( $post_id = '' ) {\n\tif ( function_exists( 'wpex_get_post_video_oembed_url' ) ) {\n\t\treturn wpex_get_post_video_oembed_url( $post_id );\n\t}\n}", "public function Iframe () {\r\n\t\t$id = $this->id;\r\n\t\t$cookie_or_not = 'www.youtube.com';\r\n\t\tif($this->iframe_param[\"cookies\"] == 0 || $this->iframe_param[\"cookies\"] == false) {\r\n\t\t\t$cookie_or_not = \"www.youtube-nocookie.com\";\r\n\t\t}\r\n\t\treturn '<iframe style=\"width:'.$this->iframe_param[\"width\"].'; height:'.$this->iframe_param[\"height\"].';\" src=\"https://'.$cookie_or_not.'/embed/'.$id.'?rel='.$this->iframe_param[\"rel\"].'&controls='.$this->iframe_param[\"controls\"].'&showinfo='.$this->iframe_param[\"showinfo\"].'&autoplay='.$this->iframe_param[\"autoplay\"].'&color='.$this->iframe_param[\"color\"].'&start='.$this->iframe_param[\"start\"].'&modestbranding='.$this->iframe_param[\"modestbranding\"].'&fs='.$this->iframe_param[\"fs\"].'&cc_load_policy'.$this->iframe_param[\"cc_load_policy\"].'\" frameborder=\"0\" allowfullscreen></iframe>';\r\n\t}", "public function embed()\n {\n if (!$this->object->getValue()) {\n return null;\n }\n\n /* @var \\Anomaly\\VideoFieldType\\Matcher\\Contract\\MatcherInterface $matcher */\n $matcher = dispatch_now(new GetMatcher($this->object->getValue()));\n\n return $matcher->embed($this->object->getValue());\n }", "function video_cck_tudou_extract($embed = '') {\n // http://www.tudou.com/programs/view/uprLNXyEGpc/\n // <object width=\"400\" height=\"300\"><param name=\"movie\" value=\"http://www.tudou.com/v/uprLNXyEGpc\"></param><param name=\"allowScriptAccess\" value=\"always\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.tudou.com/v/uprLNXyEGpc\" type=\"application/x-shockwave-flash\" width=\"400\" height=\"300\" allowFullScreen=\"true\" wmode=\"transparent\" allowScriptAccess=\"always\"></embed></object>\n return array(\n '@tudou\\.com/programs/view/([^\"\\&/]+)@i',\n '@value=\"http\\://www\\.tudou\\.com/v/([^\"\\&/]+)@i'\n );\n}", "function sd_modify_default_youtube_embed_html( $cache, $url ) {\n\n\tif ( $youtube_id = sd_get_youtube_video_id_from_url($url) ) {\n\n\t\t$cache = '<div class=\"youtube-iframe-wrapper-outer\"><div class=\"youtube-iframe-wrapper-inner\">\n\t\t<iframe src=\"https://www.youtube.com/embed/' . $youtube_id . '?feature=oembed\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen=\"\"></iframe>\n\t\t\t</div></div>';\n\t}\n\n\treturn $cache;\n}", "function flex_video_shortcode($atts, $content = NULL) {\n $a = shortcode_atts( array(\n 'aspect' => ''\n ), $atts );\n $aspect = ($a['aspect'] == 'standard') ? '' : 'widescreen';\n $content = '<div class=\"flexvideo '.$aspect.'\">'.$content.'</div>';\n return $content;\n}", "private function putFullWidthVideoLayer( $videoData ) {\n\n\t\t/*\n\t\tif($videoData[\"found\"] == false)\n return(false);\n\n $autoplayonlyfirsttime = \"\";\n $autoplay = UniteFunctionsRev::boolToStr($videoData[\"autoplay\"]);\n if($autoplay == \"true\"){\n $autoplayonlyfirsttime = UniteFunctionsRev::boolToStr($videoData[\"autoplayonlyfirsttime\"]);\n $autoplayonlyfirsttime = ' data-autoplayonlyfirsttime=\"'. $autoplayonlyfirsttime.'\"';\n }\n $nextslide = UniteFunctionsRev::boolToStr($videoData[\"nextslide\"]);\n\n $htmlParams = 'data-x=\"0\" data-y=\"0\" data-speed=\"500\" data-start=\"10\" data-easing=\"easeOutBack\"';\n\n if($videoData[\"previewimage\"] != '') $htmlParams.= ' data-videoposter=\"'.$videoData[\"previewimage\"].'\"';\n\n $videoID = $videoData[\"videoID\"];\n\n $setBase = (is_ssl()) ? \"https://\" : \"http://\";\n\n $mute = (UniteFunctionsRev::strToBool($videoData['mute'])) ? ' data-volume=\"mute\"' : '';\n\n if($videoData[\"type\"] == \"youtube\"): //youtube\n ?> <div class=\"tp-caption fade fullscreenvideo \" data-nextslideatend=\"<?php echo $nextslide?>\" data-autoplay=\"<?php echo $autoplay?>\"<?php echo $autoplayonlyfirsttime; ?> <?php echo $htmlParams?><?php echo $mute; ?>><iframe src=\"<?php echo $setBase; ?>www.youtube.com/embed/<?php echo $videoID?>?enablejsapi=1&amp;version=3&amp;html5=1&amp;hd=1&amp;controls=1&amp;showinfo=0;\" allowfullscreen=\"true\" width=\"100%\" height=\"100%\"></iframe></div><?php\n else: //vimeo\n ?> <div class=\"tp-caption fade fullscreenvideo\" data-nextslideatend=\"<?php echo $nextslide?>\" data-autoplay=\"<?php echo $autoplay?>\"<?php echo $autoplayonlyfirsttime; ?> <?php echo $htmlParams?><?php echo $mute; ?>><iframe src=\"<?php echo $setBase; ?>player.vimeo.com/video/<?php echo $videoID?>?title=0&amp;byline=0&amp;portrait=0;api=1\" width=\"100%\" height=\"100%\"></iframe></div><?php\n\t\tendif;*/\n\t}", "public function is_embed()\n {\n }", "function theme_video_cck_dailymotion_flash($embed, $width, $height, $autoplay) {\n if ($embed) {\n if ($autoplay) {\n $autoplay_value = '&autoStart=1';\n }\n $output .= \" <object type=\\\"application/x-shockwave-flash\\\" height=\\\"$height\\\" width=\\\"$width\\\" data=\\\"http://www.dailymotion.com/swf/$embed\". $autoplay_value .\"\\\" id=\\\"VideoPlayback\\\">\n <param name=\\\"movie\\\" value=\\\"http://www.dailymotion.com/swf/$embed\". $autoplay_value .\"\\\" />\n <param name=\\\"allowScriptAcess\\\" value=\\\"always\\\" />\n <param name=\\\"allowFullScreen\\\" value=\\\"true\\\" />\n <param name=\\\"quality\\\" value=\\\"best\\\" />\n <param name=\\\"bgcolor\\\" value=\\\"#FFFFFF\\\" />\n <param name=\\\"scale\\\" value=\\\"noScale\\\" />\n <param name=\\\"salign\\\" value=\\\"TL\\\" />\n <param name=\\\"FlashVars\\\" value=\\\"playerMode=embedded$autoplay_value\\\" />\n <param name=\\\"wmode\\\" value=\\\"transparent\\\" />\n </object>\\n\";\n }\n return $output;\n}", "function wp_underscore_video_template()\n {\n }", "function wp_iframe($content_func, ...$args)\n {\n }", "public function description()\n\t{\n\t\t$txt = array();\n\t\t$txt['wiki'] = 'Embeds a video into the Page';\n\t\t$txt['html'] = '<p>Embeds a video into the Page. Accepts either full video URL (YouTube, Vimeo, Kaltura, Blip TV) or a file name or path.</p>\n\t\t\t\t\t\t<p><strong>Youtube URL:</strong> https://www.youtube.com/watch?v=<span class=\"highlight\">FgfGOEpZEOw</span></p>\n\t\t\t\t\t\t<p>Examples:</p>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li><code>[[Video(MyVideo.m4v)]]</code></li>\n\t\t\t\t\t\t\t<li><code>[[Video(https://www.youtube.com/watch?v=FgfGOEpZEOw)]]</code></li>\n\t\t\t\t\t\t\t<li><code>[[Video(https://blip.tv/play/hNNNg4uIDAI.x?p=1)]]</code></li>\n\t\t\t\t\t\t\t<li><code>[[Video(https://player.vimeo.com/video/67115692)]]</code></li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<p>Size attributes may be given as single numeric values or with units (%, em, px). When an attribute name is given (e.g., width=600, height=338), order does not matter. Attribute values may be quoted but are not required to be. When a name attribute is not give (e.g., 600, 338), the first value will be set as width and the second value as height.</p>\n\t\t\t\t\t\t<p>Examples:</p>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li><code>[[Video(MyVideo.m4v, width=\"600\", height=\"338\")]]</code></li>\n\t\t\t\t\t\t\t<li><code>[[Video(https://www.youtube.com/watch?v=FgfGOEpZEOw, width=600px, height=338px)]]</code></li>\n\t\t\t\t\t\t\t<li><code>[[Video(https://blip.tv/play/hNNNg4uIDAI.x?p=1, 640, 380)]]</code> - width 640px, height 380px</li>\n\t\t\t\t\t\t\t<li><code>[[Video(https://player.vimeo.com/video/67115692, 100%)]]</code> - width of 100%</li>\n\t\t\t\t\t\t</ul>';\n\n\t\treturn $txt['html'];\n\t}", "function aidtransparency_print_vimeo_videos($post = null, $number = 2)\r\n{\r\n global $post;\r\n $vidoesStr = false; //types_render_field(\"home_page_vimeo\", array( 'post_id' => $post->ID, 'raw' => true ) );\r\n $videoIds = array_map( 'trim', explode(',', $vidoesStr) );//Make into array and trim members\r\n if(count($videoIds) > 0) :\r\n $count = 1;\r\n ?>\r\n <div class=\"videos\">\r\n <?php foreach ($videoIds as $videoId) : if( $count > $number ) continue; ?>\r\n <div class=\"video <?php print sweetapple_get_row_class($count, 2);?>\" >\r\n <a href=\"http://vimeo.com/<?php echo $videoId;?>\" class=\"vimeo-video\" data-vimeoid=\"<?php echo $videoId;?>\">View this Vimeo video</a>\r\n </div>\r\n <?php $count++; endforeach;?>\r\n </div><!--.videos -->\r\n <?php endif;\r\n}", "function zeen_wp_kses_wl( $args ) {\n\n\t$args['iframe'] = array(\n\t\t'src' => array(),\n\t\t'allowfullscreen' => array(),\n\t\t'height' => array(),\n\t\t'scrolling' => array(),\n\t\t'width' => array(),\n\t\t'frameborder' => array(),\n\t);\n\n\treturn $args;\n}", "function do_videos_listing ($atts,$content) {\n\t\t\n\t\textract( shortcode_atts( array(\n\t\t\t\t\t\t\t\t\t/* USELESS */\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t$atts));\n\t\tob_start();\t\t\t\t\n\n\t\t$args = array(\n\t\t\t'posts_per_page'=> -1,\n\t\t\t'post_type'=>'bf_videos_manager',\n\t\t\t);\n\t\t$query = new WP_Query($args);\n\t\t$all_videos = $query->posts;\n\n\t\tob_start();\n\t\t\n\t\t// print_r ($all_videos);\n\t\tforeach ($all_videos as $video_single) {\n\n $bf_video_tag = get_post_meta($video_single->ID,'bf_videos_manager_tag', true);\n $bf_video_link = get_post_meta($video_single->ID,'bf_videos_manager_video_link', true);\n $video_img = get_the_post_thumbnail($video_single->ID);\n $permalink = get_permalink($video_single->ID);\n\n ?>\n <div class=\"textwidget text\">\n <?php\n /* DEBUG */\n // print_r($video_single);\n ?>\n <?php \n\n /* echo (''.$video_img.''); */\n\n ?>\n \n \n <p class=\"video-excerpt\"><?php \n\n\n echo do_shortcode('<code>'.$bf_video_link.' '.$bf_video_main_tag.'</code>');\n \n \n ?></p>\n \n\n\n <?php \n\n $bf_video_tag = get_the_term_list($video_single->ID, 'bf_videos_manager_tag', 'Tag(s) : ', ', ', '' );\n $bf_video_cat = get_the_term_list($video_single->ID, 'bf_videos_manager_cat', 'Categorie(s) : ', ', ', '' );\n\n\n /* AUTHORS */\n if ( !empty( $bf_video_tag)) {\n echo (''.$bf_video_tag.'');\n echo ('<br>');\n } \n\n /* FLAVORS */\n if ( !empty( $bf_video_cat)) {\n echo (''.$bf_video_cat.'');\n echo ('<br>');\n }\n ?>\n\t\t\t\t\t\t\n\t\t\t\t \n\t\t\t\t\n\t\t\t\t <?php\n\t\t\t\t /* SEP */\n print('<br/><br/>');\n\t\t\t\t ?>\n\t\t\t\t</div>\n\t\t\t\t<!-- separator -->\n\t\t\t\t<div class=\"clear-div\"></div>\n\t\t\t\n\n\t\t\t\n\t\t<?php\n\n\t\t}//EFL\n\t\t\n\t\t\t$output_string = ob_get_contents();\n\t\t\twp_reset_query();\n\t\t\tob_end_clean();\t\t\t\n\t\t\treturn $output_string;\n\n\t\t}" ]
[ "0.7561903", "0.75531363", "0.75531363", "0.7405841", "0.7148239", "0.6967088", "0.6799514", "0.6698901", "0.6601806", "0.6538781", "0.6497364", "0.64909273", "0.64761406", "0.6460688", "0.6451055", "0.6430444", "0.6417358", "0.6371981", "0.63511556", "0.6330486", "0.6320806", "0.6298808", "0.62808335", "0.6270721", "0.62576634", "0.62255144", "0.62140256", "0.6186406", "0.6180914", "0.6163832", "0.61599684", "0.6153544", "0.61474836", "0.6139206", "0.6128445", "0.6101875", "0.6100446", "0.60963506", "0.6094637", "0.6089765", "0.60789907", "0.605859", "0.6058514", "0.6051219", "0.60402936", "0.6018055", "0.6013525", "0.60063195", "0.5995436", "0.5994748", "0.5989137", "0.59742844", "0.59581095", "0.5951328", "0.5948404", "0.594646", "0.5934787", "0.5931954", "0.5922924", "0.5918188", "0.59171313", "0.5901206", "0.5898726", "0.5895006", "0.58819306", "0.5881421", "0.5852029", "0.5838815", "0.5838736", "0.58285904", "0.582385", "0.58117485", "0.5806414", "0.57937664", "0.57921", "0.578887", "0.57876647", "0.5786203", "0.57828987", "0.5780168", "0.57777196", "0.5759409", "0.5757987", "0.5747312", "0.5733304", "0.572119", "0.5720132", "0.5707609", "0.5694401", "0.56866646", "0.56790125", "0.56673133", "0.5659273", "0.5656093", "0.5648159", "0.564422", "0.56386596", "0.5634733", "0.5627373", "0.5624051", "0.56229013" ]
0.0
-1
Returns the HTML for the column titles, based on their type
public function column_title($title, $type) { if($type === 'no-divider') return "<h2 class='column-title'>$title</h2>"; return WPV_Text_Divider::shortcode(array( 'more' => '', 'type' => $type, ), $title); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTitleColTemplate(): TitleColTemplate;", "function header() {\n //\n //Get the fields in this sql \n $cols= $this->fields->get_array();\n //\n //Loop through the fields and display the <tds>\n foreach ($cols as $col) {\n //\n $name= is_null($col->alias) ? $col->to_str():$col->alias;\n echo \"<th>$name</th>\"; \n }\n }", "function get_columns() {\n\n\t\treturn $columns = array(\n\t\t\t'cb'\t\t=> '<input type=\"checkbox\" />', //Render a checkbox instead of text\n\t\t\t'title'\t\t=> 'Title',\n\t\t\t'rating'\t=> 'Rating',\n\t\t\t'director'\t=> 'Director'\n\t\t);\n\t}", "public function renderDataTableColumnHTML()\n {\n if (!count($this->Columns)){\n echo \"Not set columns to render\";\n return false;\n }\n\n $begin_tag = '<th>';\n $end_tag = '</th>';\n $break_line = \"\\n\";\n\n $html_result= '';\n foreach ($this->Columns as $key => $value){\n if (!in_array($key, self::HIDDEN_COLUMNS)){\n $html_result .= $begin_tag. $key .$end_tag.$break_line;\n }\n }\n $html_result.= $begin_tag. \"action\" .$end_tag.$break_line;\n return $html_result;\n }", "private function showColumn()\n\t{\n\t\techo '<thead>\n\t\t\t<th></th>';\n\t\t\t\n\t\t\tforeach ($this->col_show as $col)\n\t\t\t\techo '<th>' . $col . '</th>';\n\t\t\n\t\techo '</thead>';\n\t}", "function get_columns()\n {\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />', //Render a checkbox instead of text\n// 'type' => 'Type',\n// 'name' => 'Name',\n 'tag' => 'Shortcode Name',\n 'kind' => 'Kind',\n 'description' => 'Description',\n 'example' => 'Example',\n 'code' => 'Code',\n 'created_datetime' => 'Created Datetime'\n );\n return $columns;\n }", "function get_columns(){\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />', //Render a checkbox instead of text\n 'name' => 'Name',\n 'job' => 'Job',\n 'text' => 'Description',\n\t\t\t'job_en' => 'Job in english',\n 'text_en' => 'Description in english',\n\t\t\t'facebook' => 'Facebook Link',\n\t\t\t'linkedin' => 'Linkedin Link',\n\t\t\t'image' => 'Photo'\n\t\t\t\n );\n return $columns;\n }", "function wpbm_columns_head( $columns ){\n $columns[ 'shortcodes' ] = __( 'Shortcodes', WPBM_TD );\n $columns[ 'template' ] = __( 'Template Include', WPBM_TD );\n return $columns;\n }", "function column_display( $column ) {\n\t\tglobal $post;\n\t\tswitch ( $column ) {\n\t\tcase 'client_name':\n\t\t\tif ( get_post_meta( $post->ID, 'client_name', true ) )\n\t\t\t\techo get_post_meta( $post->ID, 'client_name', true );\n\t\t\tbreak;\n\t\tcase 'description':\n\t\t\techo the_excerpt();\n\t\t\tbreak;\n\t\tcase 'media':\n\t\tif ( has_post_thumbnail( $post->ID ) ){ echo get_the_post_thumbnail( $post->ID, array(80,80) ); }\n\t\t\tbreak;\n\t\tcase $this->taxID:\n\t\t\techo get_the_term_list( $post->ID, $this->taxID, '', ', ', '' );\n\t\t\tbreak;\n\t\t}\n\t}", "public function column_headers($columns) {\n\t\t$ent_list = get_option(str_replace(\"-\", \"_\", $this->textdomain) . '_ent_list');\n\t\tif (!empty($ent_list[$this->post_type]['featured_img'])) {\n\t\t\t$columns['featured_img'] = __('Featured Image', $this->textdomain);\n\t\t}\n\t\tforeach ($this->boxes as $mybox) {\n\t\t\tforeach ($mybox['fields'] as $fkey => $mybox_field) {\n\t\t\t\tif (!in_array($fkey, Array(\n\t\t\t\t\t'wpas_form_name',\n\t\t\t\t\t'wpas_form_submitted_by',\n\t\t\t\t\t'wpas_form_submitted_ip'\n\t\t\t\t)) && !in_array($mybox_field['type'], Array(\n\t\t\t\t\t'textarea',\n\t\t\t\t\t'wysiwyg'\n\t\t\t\t)) && $mybox_field['list_visible'] == 1) {\n\t\t\t\t\t$columns[$fkey] = $mybox_field['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$taxonomies = get_object_taxonomies($this->post_type, 'objects');\n\t\tif (!empty($taxonomies)) {\n\t\t\t$tax_list = get_option(str_replace(\"-\", \"_\", $this->textdomain) . '_tax_list');\n\t\t\tforeach ($taxonomies as $taxonomy) {\n\t\t\t\tif (!empty($tax_list[$this->post_type][$taxonomy->name]) && $tax_list[$this->post_type][$taxonomy->name]['list_visible'] == 1) {\n\t\t\t\t\t$columns[$taxonomy->name] = $taxonomy->label;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$rel_list = get_option(str_replace(\"-\", \"_\", $this->textdomain) . '_rel_list');\n\t\tif (!empty($rel_list)) {\n\t\t\tforeach ($rel_list as $krel => $rel) {\n\t\t\t\tif ($rel['from'] == $this->post_type && in_array($rel['show'], Array(\n\t\t\t\t\t'any',\n\t\t\t\t\t'from'\n\t\t\t\t))) {\n\t\t\t\t\t$columns[$krel] = $rel['from_title'];\n\t\t\t\t} elseif ($rel['to'] == $this->post_type && in_array($rel['show'], Array(\n\t\t\t\t\t'any',\n\t\t\t\t\t'to'\n\t\t\t\t))) {\n\t\t\t\t\t$columns[$krel] = $rel['to_title'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $columns;\n\t}", "function get_columns() {\n return $columns= array(\n 'col_what'=>__('What','wpwt'),\n 'col_user'=>__('User Name','wpwt'),\n 'col_groupName'=>__('Group Name','wpwt'),\n 'col_application'=>__('Application','wpwt')\n );\n }", "public function renderColumns () {\n $cols = '';\n\n foreach (self::getColumnsArray() as $key => $num) {\n if ($key == 0) $cols .= \" \";\n\n $cols .= \" $num \";\n }\n\n return $cols;\n }", "function sideReportColumns() {\n\t\treturn array(\n\t\t\t\"Title\" => array(\n\t\t\t\t\"title\" => \"Title\",\n\t\t\t\t\"link\" => true,\n\t\t\t),\n\t\t\t\"WFApproverTitle\" => array(\n\t\t\t\t\"title\" => \"Approver\",\n\t\t\t\t\"formatting\" => 'Approved by $value',\n\t\t\t),\n\t\t\t\"WFApprovedWhen\" => array(\n\t\t\t\t\"title\" => \"When\",\n\t\t\t\t\"formatting\" => ' on $value',\n\t\t\t\t'casting' => 'SS_Datetime->Full'\n\t\t\t),\n\t\t);\n\t}", "function column_title($item){\n return sprintf('%1$s',$item['post_title']);\n\t}", "public function column_title($post)\n {\n }", "public function column_title($post)\n {\n }", "public function admin_table_columns_html($column_name, $post_id)\n {\n }", "public static function getColumnTitles()\n {\n return array_keys(self::$columns);\n }", "function pgm_subscriber_column_headers($columns){\n $columns = array(\n 'cb'=>'<input type=\"checkbox\" />', //checkbox-HTML empty checkbox\n 'title'=>__('Subscriber Name'), //update header name to 'Subscriber Name'\n 'email'=>__('Email Address'), //create new header for email\n );\n\n return $columns;\n}", "abstract protected function html_column_param();", "protected function columns(): array\n {\n return [\n TD::set('title','Career name')\n ->align('center')\n ->width('200px')\n ->render(function ($career) {\n return Link::make($career->title)\n ->route('platform.career.edit', $career);\n }),\n\n TD::set('body', 'Career description')\n ->sort()\n ->render(function ($career) {\n return Link::make($career->body)\n ->route('platform.career.edit', $career);\n }),\n TD::set('created_at','Date of publication'),\n ];\n }", "public function getHeadFilterColTemplate(): HeadFilterColTemplate;", "public static function getColumns()\n {\n return array('title', 'bindingId', 'minYear', 'maxYear',\n 'preciseDate', 'placePublished', 'publisher', 'printVersion',\n 'firstPage', 'lastPage');\n }", "function get_columns()\n\t{\n\t\t$columns = [\n\t\t\t'cb' => '<input type=\"checkbox\" />',\n\t\t\t'name' => __('Name'),\n\t\t\t'address' => __('Address'),\n\t\t\t'email' => __('Email'),\n\t\t\t'mobileNo' => __('Mobile No'),\n\t\t\t'post' => __('Post Name'),\n\t\t\t'cv' => __('CV'),\n\t\t\t'stime' => __('Submission Date'),\n\t\t];\n\n\t\treturn $columns;\n\t}", "function columns_data( $column ) {\r\n\r\n\t\tglobal $post, $wp_taxonomies;\r\n\r\n\t\tswitch( $column ) {\r\n\t\t\tcase \"listing_thumbnail\":\r\n\t\t\t\tprintf( '<p>%s</p>', genesis_get_image( array( 'size' => 'thumbnail' ) ) );\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"listing_details\":\r\n\t\t\t\tforeach ( (array) $this->property_details['col1'] as $label => $key ) {\r\n\t\t\t\t\tprintf( '<b>%s</b> %s<br />', esc_html( $label ), esc_html( get_post_meta($post->ID, $key, true) ) );\r\n\t\t\t\t}\r\n\t\t\t\tforeach ( (array) $this->property_details['col2'] as $label => $key ) {\r\n\t\t\t\t\tprintf( '<b>%s</b> %s<br />', esc_html( $label ), esc_html( get_post_meta($post->ID, $key, true) ) );\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"listing_features\":\r\n\t\t\t\techo get_the_term_list( $post->ID, 'features', '', ', ', '' );\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"listing_categories\":\r\n\t\t\t\tforeach ( (array) get_option( $this->settings_field ) as $key => $data ) {\r\n\t\t\t\t\tprintf( '<b>%s:</b> %s<br />', esc_html( $data['labels']['singular_name'] ), get_the_term_list( $post->ID, $key, '', ', ', '' ) );\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t}", "function get_columns(){\n $columns = array(\n 'title' => 'Contact Name',\n 'date_created' => 'Date Created',\n 'contact_name' => 'Created By'\n );\n return $columns;\n\t}", "static function generateTableHeaderHTML()\n\t{\n\t\techo \"<p class=left>Description:</p>\\n\";\n\t}", "function outputFormat(array $headers, array $cells, $result, $content_name) {\necho '<h3>'.ucfirst($content_name).' Content</h3>';\necho '<table>';\nforeach ($headers as $val) {\necho '<th>'.$val.'</th>';\n}\nwhile($row = mysqli_fetch_array($result))\n {\n echo '<tr>';\n foreach ($cells as $val) {\n echo '<td>'.$row[$val].'</td>';\n }\n echo '</tr>';\n }\n echo '</table>';\n}", "function getColumns(){\r\n return array(\r\n 'log_id'=>array('label'=>'日志id','class'=>'span-3','readonly'=>true), \r\n 'member_id'=>array('label'=>'用户','class'=>'span-3','type'=>'memberinfo'), \r\n 'mtime'=>array('label'=>'交易时间','class'=>'span-2','type'=>'time'), \r\n 'memo'=>array('label'=>'业务摘要','class'=>'span-3'), \r\n 'import_money'=>array('label'=>'存入金额','class'=>'span-3','type'=>'import_money'), \r\n 'explode_money'=>array('label'=>'支出金额','class'=>'span-3','type'=>'explode_money'), \r\n 'member_advance'=>array('label'=>'当前余额','class'=>'span-3'), \r\n 'paymethod'=>array('label'=>'支付方式','class'=>'span-3'), \r\n 'payment_id'=>array('label'=>'支付单号','class'=>'span-3'), \r\n 'order_id'=>array('label'=>'订单号','class'=>'span-3'), \r\n 'message'=>array('label'=>'管理备注','class'=>'span-3'), \r\n 'money'=>array('label'=>'出入金额','class'=>'span-3','readonly'=>true), \r\n 'shop_advance'=>array('label'=>'商店余额','class'=>'span-3','readonly'=>true), \r\n );\r\n }", "function pgm_list_column_headers($columns){\n $columns = array(\n 'cb'=>'<input type=\"checkbox\" />', //checkbox-HTML empty checkbox\n 'title'=>__('Lists'), //update header name to 'List Name'\n 'shortcode'=>__('Shortcode'),\n );\n\n return $columns;\n}", "public function column_style() {\n\t\techo '<style>#registered{width: 7%}</style>';\n\t\techo '<style>#wp-last-login{width: 7%}</style>';\n\t\techo '<style>.column-wp_capabilities{width: 8%}</style>';\n\t\techo '<style>.column-blogname{width: 13%}</style>';\n\t\techo '<style>.column-primary_blog{width: 5%}</style>';\n\t}", "function get_columns() {\r\n return $columns= array(\r\n 'col_created_on'=>__('Date'),\r\n 'col_type'=>__('Type'),\r\n 'col_ip'=>__('IP'),\r\n 'col_os'=>__('Operating System'),\r\n 'col_browser'=>__('Browser'),\r\n 'col_location'=>__('Location'),\r\n 'col_actions'=>__('Actions')\r\n );\r\n }", "public function get_columns() {\n\n\t\t\treturn array(\n\n\t\t\t\t'cb' \t\t\t\t\t=> '<input type=\"checkbox\" />',\n\n\t\t\t\t'topic_name' \t\t\t\t=> __( 'Topic Name' ),\n\n\t\t\t\t'bright_cove_video_tag'\t=> __( 'BrightCove Video Tag' ),\n\n\t\t\t\t'description' \t\t\t\t=> __( 'Description' )\n\n\t\t\t);\n\n\t\t}", "public function html()\n {\n return data_tables_settings($this,$this->getColumns(),'bloodtypes-table');\n }", "function get_display_columns() {\n return $columns = array('id' => __('id', 'kkl-ligatool'), 'name' => __('name', 'kkl-ligatool'), 'club_id' => __('club', 'kkl-ligatool'), 'season_id' => __('season', 'kkl-ligatool'), 'short_name' => __('url_code', 'kkl-ligatool'),);\n }", "public function getColumnNames();", "abstract protected function getColumnsHeader(): array;", "public function columns(): array\n {\n return [\n MyTD::name(),\n MyTD::boolean('is_active'),\n TD::make('categories')\n ->render(function ($model) {\n return $model->categories\n ->pluck('name')\n ->map(function ($name) {\n return badge($name);\n })\n ->join('&nbsp;');\n }),\n MyTD::money('price'),\n MyTD::money('discount'),\n MyTD::text('presentage')\n ->render(function ($model) {\n return $model->discount_presentage.'%';\n })\n ->sort(false),\n MyTD::createdAt()\n ];\n }", "function render_cell($column, $photo_gallery)\r\n {\r\n $content_object = $photo_gallery->get_publication_object();\r\n \r\n switch ($column->get_name())\r\n {\r\n case ContentObject :: PROPERTY_TITLE :\r\n return $content_object->get_title();\r\n case ContentObject :: PROPERTY_DESCRIPTION :\r\n return Utilities :: truncate_string($content_object->get_description(), 200);\r\n default :\r\n return '&nbsp;';\r\n }\r\n }", "public function printCol()\n\t{\n\t\techo '<div class=\"col\">';\n\t\t\n\t\t// image\n\t\techo $this->getImg();\n\t\techo '<br /><br />';\n\t\t\n\t\t// caption\n\t\techo $this->getCaption();\t\t\n\t\t\n\t\t// delete\n\t\techo $this->getDel();\n\t\t\n\t\techo '</div>'.\"\\n\";\n\t}", "function render_cell($column, $metadata_property_attribute_type)\n\t{\n\t\tswitch ($column->get_name())\n\t\t{\n\t\t\tcase MetadataPropertyAttributeType :: PROPERTY_ID :\n\t\t\t\treturn $metadata_property_attribute_type->get_id();\n\t\t\tcase MetadataPropertyAttributeType :: PROPERTY_NS_PREFIX :\n\t\t\t\treturn $metadata_property_attribute_type->get_ns_prefix();\n\t\t\tcase MetadataPropertyAttributeType :: PROPERTY_NAME :\n\t\t\t\treturn $metadata_property_attribute_type->get_name();\n\t\t\t\n\t\t\tdefault :\n\t\t\t\treturn '&nbsp;';\n\t\t}\n\t}", "protected function columns(): array\n {\n return [\n TD::make('name', __('Name'))\n ->sort()\n ->render(function (User $user){\n return $user->first_name.' '.$user->last_name;\n }),\n\n TD::make('user_email', __('Email'))\n ->sort()\n ->filter(TD::FILTER_TEXT),\n\n TD::make('email', __('ChemHunt Id'))\n ->cantHide()\n ->filter(TD::FILTER_TEXT),\n\n TD::make('result.day_'.config('chemhunt.day').'_r_1', __('Answer 1'))\n ->cantHide()\n ->filter(TD::FILTER_TEXT),\n\n TD::make('result.day_'.config('chemhunt.day').'_r_2', __('Answer 2'))\n ->cantHide()\n ->filter(TD::FILTER_TEXT),\n\n TD::make('result.day_'.config('chemhunt.day').'_r_3', __('Answer 3'))\n ->cantHide()\n ->filter(TD::FILTER_TEXT),\n\n TD::make('result.day_'.config('chemhunt.day').'_r_4', __('Final'))\n ->cantHide()\n ->filter(TD::FILTER_TEXT),\n\n ];\n }", "public function columns_head( $columns ) {\r\n $new = array();\r\n foreach ( $columns as $key => $title ) {\r\n if ( $key == 'title' ){\r\n $new['featured_image'] = esc_html__( 'Image', 'myhome-core' );\r\n $new[$key] = $title;\r\n } elseif ( $key == 'author' ) {\r\n $new[$key] = esc_html__( 'Agent', 'myhome-core' );\r\n $new['price'] = esc_html__( 'Price', 'myhome-core' );\r\n } else {\r\n $new[$key] = $title;\r\n }\r\n }\r\n return $new;\r\n }", "public function GetColumnFormatCSSClass()\n {\n return 'THTMLTableColumnText';\n }", "public function get_person_types_html() {\n $html = '';\n if ( !empty( $this->person_types ) ) {\n foreach ( $this->person_types as $person_type ) {\n $id = isset( $person_type[ 'id' ] ) ? $person_type[ 'id' ] : false;\n $title = isset( $person_type[ 'title' ] ) ? $person_type[ 'title' ] : false;\n $number = isset( $person_type[ 'number' ] ) ? $person_type[ 'number' ] : false;\n\n if ( $id === false || $title === false || !$number )\n continue;\n\n $person_type_title = get_the_title( $id );\n $title = !!$person_type_title ? $person_type_title : $title;\n $html .= \"<strong>{$title}:</strong> {$number}\";\n $html .= \"<br />\";\n }\n }\n\n return $html;\n }", "public function getColumnTypes();", "public static function create_table_head()\n\t{\n\t\t\n\t\tif (!static::$columns)\n\t\t{\n\t\t\treturn static::$template['wrapper_start'].'<tr><th>No columns config</th></tr>'.static::$template['wrapper_end'];\n\t\t}\n\n\t\t$table_head = static::$template['wrapper_start'];\n\t\t$table_head .= '<tr>';\n\t\t\n\t\tforeach(static::$columns as $column)\n\t\t{\n\t\t\t$sort_key \t= (is_array($column) ? isset($column[1]) ? $column[1] : strtolower($column[0]) : $column);\n\t\t\t$col_attr\t= (is_array($column) && isset($column[2]) ? $column[2] : array());\n\t\t\t\n\t\t\t$new_direction = static::$direction;\n\t\t\t\n\t\t\tif(static::$sort_by == $sort_key)\n\t\t\t{\n\t\t\t\t$active_class_name = static::$template['col_class_active'].' '.static::$template['col_class_active'].'_'.$new_direction;\n\t\t\t\tif(isset($col_attr['class']))\n\t\t\t\t{\n\t\t\t\t\t$col_attr['class'] .= ' '.$active_class_name;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$col_attr['class'] = $active_class_name;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$new_direction = (static::$direction == 'asc' ? 'desc' : 'asc');\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(is_array($column) && (!isset($column[1]) || isset($column[1]) && $column[1] !== false)){\n\t\t\t\t\n\t\t\t\t$url \t\t\t= rtrim(static::$base_url, '/').(static::$current_page ? '/'.static::$current_page : '');\n\t\t\t\t$url \t\t\t.= '/'.$sort_key.static::$uri_delimiter.$new_direction;\n\t\t\t\t\n\t\t\t\t$cell_content \t= rtrim(static::$template['link_start'], '> ').' href=\"'.$url.'\">';\n\t\t\t\t$cell_content \t.= $column[0];\n\t\t\t\t$cell_content \t.= static::$template['link_end'];\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tif(is_array($column))\n\t\t\t\t{\n\t\t\t\t\t$column = $column[0];\n\t\t\t\t}\n\t\t\t\t$cell_content = static::$template['nolink_start'].$column.static::$template['nolink_end'];\t\n\t\t\t}\n\t\t\t\n\t\t\t$table_head .= html_tag(static::$template['col_tag'], $col_attr, $cell_content);\n\t\t\t\n\t\t}\n\t\t\n\t\t$table_head .= '</tr>';\n\t\t$table_head .= static::$template['wrapper_end'];\n\n\t\treturn $table_head;\n\t}", "public function get_columns()\n\t{\n\t\t$columns = array();\n\t\t$class = $this->activeRecordClass;\n\t\t\n\t\tif ( ! empty( $this->bulkActions ) )\n\t\t{\n\t\t\t$columns[ 'cb' ] = '<input type=\"checkbox\" />';\n\t\t}\n\t\t\n\t\tif ( isset( $this->columns ) )\n\t\t{\n\t\t\t$columns = array_merge( $columns, $this->columns );\n\t\t\treturn $columns;\n\t\t}\n\t\t\n\t\tforeach( $class::$columns as $key => $column )\n\t\t{\n\t\t\t$slug = NULL;\n\t\t\t$title = NULL;\n\t\t\t\n\t\t\tif ( is_array( $column ) )\n\t\t\t{\n\t\t\t\t$slug = $class::$prefix . $key;\n\t\t\t\tif ( isset( $column[ 'title' ] ) and is_string( $column[ 'title' ] ) )\n\t\t\t\t{\n\t\t\t\t\t$title = $column[ 'title' ];\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ( is_string( $column ) )\n\t\t\t{\n\t\t\t\t$slug = $class::$prefix . $column;\n\t\t\t}\n\t\t\t\n\t\t\tif ( ! $title )\n\t\t\t{\n\t\t\t\t$title = str_replace( '_', ' ', $slug );\n\t\t\t\t$title = ucwords( $title );\n\t\t\t}\n\t\t\t\n\t\t\t$columns[ $slug ] = $title;\n\t\t}\n\t\t\n\t\treturn $columns;\n\t}", "public function createHeader($columns)\n {\n $html = \"<tr>\";\n\n \n foreach ($columns as $column) {\n $html .= \"<th>\".$column['label'].\"</th>\";\n }\n $html .= \"</tr>\";\n return $html; \n }", "function adleex_resource_list_column_header( $cols ) {\nglobal $current_screen;\n\n\tif ($current_screen->post_type!='resource') return $cols;\n\n\tunset($cols['date']);\n\t$header = array(\n 'post_title' => 'title', );\n\tforeach($header\tas $k => $v) $cols[$k]=$v;\n\treturn $cols;\n}", "function generateHTMLCell($type) {\n\t\t\n\t\t$str = \"\";\n\t\t\n\t\tif($this->getClassName()) {\n\t\t\t$str.=\"<td class=\\\"googleTableCell \".$this->getClassName().\"\\\">\";\n\t\t}\telse {\n\t\t\t$str.=\"<td class=\\\"googleTableCell\\\">\";\n\t\t}\n\t\t\n\t\tif($this->getV()) {\n\n\t\t\tif($type==\"string\") {\n\t\t\t\t$str.= $this->getV();\n\t\t\t} elseif($type==\"boolean\") {\n\t\t\t\t$str.= $this->getV();\n\t\t\t} elseif($type==\"date\") {\n\t\t\t\t$str.= substr($this->getV(),8,2).\"/\".(substr($this->getV(),5,2) - 1).\"/\".substr($this->getV(),0,4);\n\t\t\t} elseif($type==\"datetime\") {\n\t\t\t\t$str.= substr($this->getV(),8,2).\"/\".(substr($this->getV(),5,2) - 1).\"/\".substr($this->getV(),0,4).\" \".substr($this->getV(),11,2).\":\".substr($this->getV(),14,2).\":\".substr($this->getV(),17,2);\n\t\t\t} elseif($type==\"timeofday\") {\n\t\t\t\t$str.= substr($this->getV(),11,2).\":\".substr($this->getV(),14,2).\":\".substr($this->getV(),17,2);\n\t\t\t} else {\t\t\n\t\t\t\t$str.= $this->getV();\n\t\t\t}\t\t\n\n\t\t} else {\n\t\t\n\t\t\t$str.= \"&nbsp;\";\n\t\t\t\n\t\t}\n\t\t\n\t\t$str.= \"</td>\";\n\t\t\n\t\treturn $str;\n\t\t\n\t}", "protected function get_title()\n {\n return get_string(\"column_title\", 'local_questionbanktagfilter');\n }", "function custom_columns( $columns ) {\n\t$columns = array(\n\t\t'cb' => '<input type=\"checkbox\" />',\n\t\t'title' => 'Title',\n\t\t'featured_image' => 'Photo',\n\t\t'date' => 'Date'\n\t);\n\treturn $columns;\n}", "public function get_columns() {\n\t\treturn array(\n\t\t\t'cb' => '<input type=\"checkbox\" />',\n\t\t\t'first_name' => __( 'First Name', 'wdaf' ),\n\t\t\t'last_name' => __( 'Last Name', 'wdaf' ),\n\t\t\t'email' => __( 'Email', 'wdaf' ),\n\t\t\t'present_address' => __( 'Address', 'wdaf' ),\n\t\t\t'phone' => __( 'Phone', 'wdaf' ),\n\t\t\t'created_date' => __( 'Date', 'wdaf' ),\n\t\t);\n\t}", "function get_columns() {\n\t\t\n\t\t$columns = array(\n\t\t\t\t\t\t\t'cb' \t=> '<input type=\"checkbox\" />',\n\t\t\t\t\t\t\t'title'\t\t=> __( 'Style Name', 'blog-designer-pack' ),\n\t\t\t\t\t\t\t'id'\t\t=> __( 'Style ID', 'blog-designer-pack' ),\n\t\t\t\t\t\t);\n\t\treturn apply_filters('bdpp_style_columns', $columns);\n\t}", "function get_columns() {\r\r\n $columns = array(\r\r\n 'cb' \t=> '<input type=\"checkbox\" />',\r\r\n 'title' \t=> __( 'Visitor' , 'sc_chat' ),\r\r\n 'email'\t\t\t=> __( 'E-mail', 'sc_chat' ),\r\r\n 'total_logs'\t=> __( 'Total Logs', 'sc_chat' ),\r\r\n\t\t\t'last_date'\t\t=> __( 'Last Chat Date', 'sc_chat' )\r\r\n );\r\r\n return $columns;\r\r\n }", "public function table_headers() {\n\t\t\tglobal $mycred_types;\n\n\t\t\treturn apply_filters( 'mycred_log_column_headers', array(\n\t\t\t\t'column-username' => __( 'User', 'twodayssss' ),\n\t\t\t\t'column-time' => __( 'Date', 'twodayssss' ),\n\t\t\t\t'column-creds' => $this->core->plural(),\n\t\t\t\t'column-entry' => __( 'Entry', 'twodayssss' )\n\t\t\t), $this );\n\t\t}", "public function get_columns() {\n\t\t$columns = [\n\t\t\t'cb' => '<input type=\"checkbox\" />',\n\t\t\t'post_title' => __( 'Estate', 'text_domain' ),\n\t\t\t'action' => __( 'Action', 'text_domain' ),\n\t\t\t'status' => __( 'Status', 'text_domain' ),\n\t\t\t'date' => __( 'Date', 'text_domain' ),\n\t\t];\n\n\t\treturn $columns;\n\t}", "protected function columns(): array\n {\n return [\n TD::set('title', 'Title')\n ->render(function (Blog $blog) {\n return Link::make($blog->title)\n ->route('platform.blog.edit', $blog);\n }),\n\n TD::set('created_at', 'Created'),\n TD::set('updated_at', 'Last Edit'),\n ];\n }", "function echoHeader($spec) {\n\techo('<div class=\"tr\">');\n\tforeach($spec as $col) {\n\t\techo('<div class=\"th\">' . htmlspecialchars($col) . '</div>');\n\t}\n\techo('<div class=\"th\">Actions</div>');\n\techo('</div>');\n}", "public function get_columns()\r\n\t{\r\n\t\treturn [\r\n\t\t\t'name' => __( 'Name', 'giga-messenger-bots' ),\r\n\t\t\t'email' => __( 'Email', 'giga-messenger-bots' ),\r\n\t\t\t'phone' => __( 'Phone', 'giga-messenger-bots' ),\r\n\t\t\t'subscribe' => __( 'Subscribe', 'giga-messenger-bots' ),\r\n 'auto_stop' => __( 'Status', 'giga-messenger-bots' ),\r\n\t\t\t'created_at' => __( 'Created At', 'giga-messenger-bots' ),\r\n\t\t];\r\n\t}", "public function get_columns()\n\t{\n\t\treturn array(\n\t\t\t'cb' => '<input type=\"checkbox\" />',\n\t\t\t'data' \t => 'Data',\n\t\t\t'timestamp' => 'Timestamp',\n\t\t);\n\t}", "function type_column_header( $columns ) {\r\n\t\tunset( $columns['date'] );\r\n\t\treturn $columns;\r\n\t}", "function jeg_post_columns($columns)\n{\n\t$columns['posttype'] = 'Blog Post Type';\n\treturn $columns;\n}", "protected function default_column_class() {\n\t\t$return = array(\n\t\t\t'title' => 'wpo-col-xs-12 wpo-col-sm-12 wpo-col-md-4 wpo-col-lg-4 wpo-col-xl-3',\n\t\t\t'fieldset' => 'wpo-col-xs-12 wpo-col-sm-12 wpo-col-md-8 wpo-col-lg-8 wpo-col-xl-9',\n\t\t);\n\t\tswitch ( $this->module() ) {\n\t\t\tcase 'user_profile':\n\t\t\t\t$return = array(\n\t\t\t\t\t'title' => 'wpo-col-xs-12 wpo-col-sm-12 wpo-col-md-12 wpo-col-lg-2 wpo-col-xl-2',\n\t\t\t\t\t'fieldset' => 'wpo-col-xs-12 wpo-col-sm-12 wpo-col-md-12 wpo-col-lg-10 wpo-col-xl-10',\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'taxonomy':\n\t\t\t\t$return = array(\n\t\t\t\t\t'title' => 'wpo-col-xs-12 wpo-col-sm-12 wpo-col-md-3 wpo-col-lg-3 wpo-col-xl-3',\n\t\t\t\t\t'fieldset' => 'wpo-col-xs-12 wpo-col-sm-12 wpo-col-md-9 wpo-col-lg-9 wpo-col-xl-9',\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'metabox':\n\t\t\t\t$screen = get_current_screen();\n\t\t\t\tif ( $screen && in_array( $screen->base, array( 'term', 'edit-tags' ), true ) ) {\n\t\t\t\t\t$return = array(\n\t\t\t\t\t\t'title' => 'wpo-col-xs-12 wpo-col-sm-12 wpo-col-md-4 wpo-col-lg-4 wpo-col-xl-4',\n\t\t\t\t\t\t'fieldset' => 'wpo-col-xs-12 wpo-col-sm-12 wpo-col-md-8 wpo-col-lg-8 wpo-col-xl-8',\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( false === $this->has( 'title' ) || true === $this->option( 'hide_title' ) ) {\n\t\t\t$return['fieldset'] = 'wpo-col-xs-12 wpo-col-sm-12 wpo-col-md-12 wpo-col-lg-12 wpo-col-xl-12';\n\t\t}\n\t\treturn apply_filters( 'wponion/default/field/column/css_class', $return, $this->module(), $this );\n\t}", "private function render_data()\n\t{\n\t\t// create if the headers exists\n\t\t// 2 header style table\n\t\tif(count($this->headers) == 2 && isset($this->headers[0][0]) && isset($this->headers[1][0]) )\n\t\t{\n\t\t\t// generate the column headers\n\t\t\t$html = '<tr><th></th>';\n\t\t\tforeach($this->headers[0] as $header)\n\t\t\t\t$html .= \"<th>$header</th>\";\n\t\t\t$html .= '</tr>';\n\t\t\t\n\t\t\t// generate the row headers and the data\n\t\t\tfor($i=0; $i<count($this->headers[1]); $i++)\n\t\t\t{\n\t\t\t\t// the header\n\t\t\t\t$html .= \"<tr><th>{$this->headers[1][$i]}</th>\";\n\t\t\t\t\n\t\t\t\t// and now the data\n\t\t\t\tforeach($this->data[$i] as $datum)\n\t\t\t\t\t$html .= \"<td>$datum</td>\";\n\t\t\t\t\n\t\t\t\t$html .= '</tr>';\n\t\t\t}\n\t\t\treturn $html;\n\t\t}//end if\n\t\t\n\t\t// 1 header style table\n\t\tif(count($this->headers) > 0 && isset($this->headers[0]) && !is_array($this->headers[0]) )\n\t\t{\n\t\t\t// generate the column headers\n\t\t\t$html = '<tr>';\n\t\t\tforeach($this->headers as $header)\n\t\t\t\t$html .= \"<th>$header</th>\";\n\t\t\t$html .= '</tr>';\n\t\t\t\n\t\t\t// generate the data\n\t\t\tfor($i=0; $i<count($this->data); $i++)\n\t\t\t{\n\t\t\t\tforeach($this->data[$i] as $datum)\n\t\t\t\t\t$html .= \"<td>$datum</td>\";\n\t\t\t\t\n\t\t\t\t$html .= '</tr>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}//end if\n\t\t\n\t\treturn '';\n\t}", "function get_columns() {\r\n\t\t$columns = [\r\n\t\t\t'cb' => '<input type=\"checkbox\" />',\r\n\t\t\t'name' => __( 'Name', 'ac' ),\r\n\t\t\t'address' => __( 'Address', 'ac' ),\r\n\t\t\t'city' => __( 'City', 'ac' )\r\n\t\t];\r\n\r\n\t\treturn $columns;\r\n\t}", "public function columns($itemType = \"Pages\")\n {\n $columns = array(\n \"Title\" => array(\n \"title\" => _t(\"SitewideContentReport.Name\", \"Name\"),\n \"link\" => true,\n ),\n \"Created.Nice\" => _t(\"SitewideContentReport.Created\", \"Date created\"),\n \"LastEdited.Nice\" => _t(\"SitewideContentReport.LastEdited\", \"Date last edited\"),\n );\n\n $mainSiteLabel = _t(\"SitewideContentReport.MainSite\", \"Main Site\");\n if ($itemType == \"Pages\") {\n $columns[\"ClassName\"] = _t(\"SitewideContentReport.PageType\", \"Page type\");\n $columns[\"StageState\"] = array(\n \"title\" => _t(\"SitewideContentReport.Stage\", \"Stage\"),\n \"formatting\" => function ($value, $item) {\n return ($item->isPublished()) ? _t(\"SitewideContentReport.Published\", \"Published\") : _t(\"SitewideContentReport.Draft\", \"Draft\");\n },\n );\n $columns[\"URLSegment\"] = _t(\"SitewideContentReport.URL\", \"URL\");\n } else {\n $columns[\"FileType\"] = _t(\"SitewideContentReport.FileType\", \"File type\");\n $columns[\"Size\"] = _t(\"SitewideContentReport.Size\", \"Size\");\n $columns[\"Filename\"] = _t(\"SitewideContentReport.Directory\", \"Directory\");\n $mainSiteLabel .= \" \" . _t(\"SitewideContentReport.AccessFromAllSubsites\", \"(accessible by all subsites)\");\n }\n\n if (class_exists(\"Subsite\") && Subsite::get()->count() > 0) {\n $columns[\"SubsiteName\"] = array(\n \"title\" => _t(\"SitewideContentReport.Subsite\", \"Subsite\"),\n \"formatting\" => function ($value, $item) use ($mainSiteLabel) {\n $title = ($item->Subsite()->Title) ? $item->Subsite()->Title : $mainSiteLabel;\n\n return $title;\n },\n );\n }\n\n return $columns;\n }", "function products_column_headers( $columns ) {\r\n\r\n // Creating the custom column header data\r\n $columns = array(\r\n 'cb' => '<input type=\"checkbox\" />',\r\n 'title' => __('Product Name'),\r\n 'Background Color' => __('Background Color')\r\n );\r\n\r\n // Returning the new columns\r\n return $columns;\r\n\r\n}", "function get_columns() {\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />',\n 'customer' => __( 'Vendor', 'wp-erp-ac' ),\n 'company' => __( 'Company', 'wp-erp-ac' ),\n 'email' => __( 'Email', 'wp-erp-ac' ),\n 'phone' => __( 'Phone', 'wp-erp-ac' ),\n 'open' => __( 'Balance', 'wp-erp-ac' ),\n );\n\n return $columns;\n }", "static function generateTableHeaderHTML()\n\t{\n\t\techo \"<tr class='exTableRow'>\\n\";\n\t\techo \"<th class='exTableColLineNum'>Item #</th>\\n\";\n\t\techo \"<th class='exTableColDesc'>Description of Work</th>\\n\";\n\t\techo \"<th class='exTableColAmount'>Amount</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}", "function get_columns() {\n\t\t$columns = array(\n\t\t\t'cb' => '<input type=\"checkbox\" />',\n\t\t\t'id' => __( 'ID', 'mylisttable' ),\n\t\t\t'date' => __( 'Date', 'mylisttable' ),\n\t\t\t'uploader' => __( 'Uploader (#ID)', 'mylisttable' ),\n\t\t\t'uploader_group' => __( 'Uploader Group\t (#ID)', 'mylisttable' ),\n\t\t\t'site' => __( 'Site #ID', 'mylisttable' ),\n\t\t\t'assessment' => __( 'Assessment #ID', 'mylisttable' ),\n\t\t\t'assessment_result' => __( 'View', 'mylisttable' ),\n\t\t);\n\t\tif ( current_user_can( 'manage_options' ) ) {\n\t\t\t$columns['assessment_result_evaluation'] = __( 'Evaluate', 'mylisttable' );\n\t\t}\n\t\treturn $columns;\n\t}", "public function get_columns()\r\n {\r\n $columns = array(\r\n 'cb' => '<input type=\"checkbox\" />',\r\n 'name' => 'Name',\r\n 'sku' => 'SKU',\r\n 'price' => 'Price',\r\n 'categories' => 'Categories',\r\n 'date' => 'Date'\r\n );\r\n return $columns;\r\n }", "public function get_columns() {\n\n\t\treturn $columns = array(\n\t\t\t'title' => __( 'Name' ),\n\t\t\t'client_id' => __( 'Client ID' ),\n\t\t\t//'client_secret' => __( 'Redirect URI' )\n\t\t);\n\t}", "public function get_columns()\n {\n $columns = array(\n 'display_title' => 'Title',\n 'description' => 'Description',\n 'shortcode' => 'PUA Item Shortcode',\n 'tags' => 'WP Tags'\n );\n\n return $columns;\n }", "protected function _prepareColumns()\n {\n $this->addColumn('recipetype_id', array(\n 'header' => Mage::helper('recomiendo_recipes')->__('ID'),\n 'width' => '50px',\n 'index' => 'recipetype_id',\n ));\n\n $this->addColumn('name', array(\n 'header' => Mage::helper('recomiendo_recipes')->__('Nombre Clasificación'),\n 'index' => 'name',\n ));\n\n return parent::_prepareColumns();\n }", "public static function column_headings( $columns ) {\n\n\t\t\tunset( $columns['date'] );\n\n\t\t\t$columns['advanced_headers_display_rules'] = __( 'Display Rules', 'astra-addon' );\n\t\t\t$columns['date'] = __( 'Date', 'astra-addon' );\n\n\t\t\treturn $columns;\n\t\t}", "function edit_columns_html($column, $post_id){\n \n switch($column){\n \n // Name\n case 'name':\n \n echo '<code style=\"font-size: 12px;\">' . $this->get_name($post_id) . '</code>';\n break;\n \n // Post ID\n case 'post_id':\n \n $p_id = get_field('post_id', $post_id);\n \n if(empty($p_id))\n $p_id = 'options';\n \n echo '<code style=\"font-size: 12px;\">' . $p_id. '</code>';\n break;\n \n // Autoload\n case 'autoload':\n \n $al = __('No');\n $autoload = get_field('autoload', $post_id);\n \n if(!empty($autoload))\n $al = __('Yes');\n \n echo $al;\n break;\n \n }\n \n }", "public static function columns()\n {\n return [\n 'id' => trans('persona.id.id'),\n 'module_name' => trans_title('modules'),\n 'module_key' => sections('modules.key'),\n 'module_description' => trans('system.description'),\n ];\n }", "public static function htmlColumnType($value, $column, $record)\n {\n return $value;\n }", "public static function getColumnNames()\n {\n $class = new static([ ]);\n $result = database()->run('DESCRIBE ' . $class->table);\n\n $columns = [ ];\n foreach ($result->fetchAll(PDO::FETCH_COLUMN) as $column):\n if (in_array($column, $class->hidden)) continue;\n\n $columns[] = $column;\n endforeach;\n\n foreach ($class->functionsToShow as $function)\n $columns[] = $function;\n \n unset($class);\n return $columns;\n }", "function column_head($page, $pass_array, $sort_by, $column, $order, $default_sort) {\n\tswitch($column) { \n\t\tcase \"firstname\":\t\n\t\t\t\t\t\t$display=\"Assigned To\"; \n\t\t\t\t\t\tbreak;\n\t\tdefault:\t\n\t\t\t\t\t\t$display=display_format($column);\n\t}\n\n\t// This section makes the activated column for sorting link to it's opposite sort direction\n\t\n\t// Make the sort direction toggle\n\tif ($default_sort==\"desc\") {\n\t\t$anti_sort=\"asc\";\n\t} else {\n\t\t$anti_sort=\"desc\";\n\t}\n\t\n\t// Replace the activated column's link with it's opposite sort direction\n\tif ( ($sort_by == $column) && ($order == $default_sort) ) {\n\t\t$sort_pass = $anti_sort;\t\n\t} else {\n\t\t$sort_pass = $default_sort; \n\t} \n\t\n\tif ($sort_by == $column) {\n\t\tif ($sort_pass == \"desc\") {\n\t\t\t$arrow = \"<span id=sort-arrow>&#x25B2;</span>\";\n\t\t} else {\n\t\t\t$arrow = \"<span id=sort-arrow>&#x25BC;</span>\";\n\t\t}\n\t} else {\n\t\t$arrow = \"\";\n\t}\n\t\n\t// Pass through search terms for re-use so that sorting a column doesn't destroy searches\n\tif ( isset($pass_array['search']) ) {\n\t\t$search_section = \"&search=\".$pass_array['search'].\"&key=\".htmlspecialchars($pass_array['key']); \n\t} else {\n\t\t$search_section = \"\";\n\t}\n\n\techo \"\\t\\t\\t\\t\\t<th class=\\\"main-thead-cell\\\"><a href=\\\"\".$page.\".php?sort=\".$column.\"&order=\".$sort_pass.$search_section.\"\\\">\".$arrow.$display.\"</a></th>\\n\";\n\t\n\treturn;\n}", "function get_column_headers($screen)\n {\n }", "function generateCol() {\n\t\n\t\t$str = \"{id: '\".$this->getId().\"',\";\n\t\tif($this->getLabel()) {\n\t\t\t$str.=\"label: '\".str_replace(\"'\",\"\\'\",$this->getLabel()).\"',\";\n\t\t}\t\t\n\t\t$str.=\"type: '\".$this->getGoogleType().\"',\";\n\t\t\n\t\t$str = substr($str,0,-1);\t\t\n\t\t$str.=\"}\";\n\t\n\t\treturn $str;\n\t\n\t}", "function get_columns() {\n\n return $columns= array(\n 'cb' => '<input type=\"checkbox\" onclick=\"jQuery(\\'.hypernews_checkbox\\').toggleCheckbox();\" />',\n 'status'=>'<img src=\"'.WP_PLUGIN_URL.'/hypernews/img/tag.png\" />',\n 'title'=>__('Headline', 'hypernews'),\n 'pubdate'=>__('Published', 'hypernews'),\n 'channel'=>__('Channel', 'hypernews'),\n 'source'=>__('Source', 'hypernews'),\n 'notes'=>__('Note', 'hypernews')\n );\n}", "static public function JColumns ($tid) {\n $Data = DB::select('select * from '.$tid);\n\n #===generate the data in format for column names \n $jColnames ='[';\n foreach($Data[0] as $key=>$value) {\n $jColnames .= '{\"title\":\"'.$key.'\"},';\n if($key=='id') {\n $jColnames .= '{\"title\":\"Edit\"},';\n $jColnames .= '{\"title\":\"Delete\"},'; \n }\n elseif($key=='study_desc') {\n $jColnames .= '{\"title\":\"Heatmap\"},';\n $jColnames .= '{\"title\":\"GSEA\"},';\n }\n }\n $jColnames .=']';\n return $jColnames;\n }", "protected function columns(): array\n {\n return [\n TD::make('creative_id', 'ID'),\n TD::make('creative_setting_id', 'Тип креатива')\n ->render(static function (CreativeModel $model) {\n return\n Link::make($model->creativeSetting->name)\n ->route('platform.service.creative.settings.edit', $model->creativeSetting)\n ->target('_blank')\n ;\n })\n ,\n TD::make('attachment_id', 'Креатив')\n ->align(TD::ALIGN_CENTER)\n ->render(function (CreativeModel $model) {\n return (\n null !== $model->attachment->id\n && null !== $model->attachment->url()\n )\n ? Link::make($model->attachment->name)\n ->href($model->attachment->url())\n ->target('_blank')\n : '';\n })\n ,\n ];\n }", "public function get_columns()\n {\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />',\n 'perusahaan' => 'Name',\n 'total_ken' => 'Total Kendaraan',\n 'total_pen' => 'Total Pengemudi',\n 'tanggal' => 'Created Date' \n );\n return $columns;\n }", "public function column_headers( $columns = array() ) {\n\t\t\t$new_columns = array(\n\t\t\t\t'cat_talks' => _x( 'Categories', 'talks admin category column header', 'wordcamp-talks' ),\n\t\t\t\t'tag_talks' => _x( 'Tags', 'talks admin tag column header', 'wordcamp-talks' ),\n\t\t\t);\n\n\t\t\tif ( ! wct_is_rating_disabled() ) {\n\t\t\t\t$new_columns['rates'] = '<span class=\"vers\"><span title=\"' . esc_attr__( 'Average Rating', 'wordcamp-talks' ) .'\" class=\"talk-rating-bubble\"></span></span>';\n\t\t\t}\n\n\t\t\t/**\n\t\t\t *\n\t\t\t * @param array $new_columns the specific columns\n\t\t\t */\n\t\t\t$new_columns = apply_filters( 'wct_admin_column_headers', $new_columns );\n\n\t\t\t$temp_remove_columns = array( 'comments', 'date' );\n\t\t\t$has_columns = array_intersect( $temp_remove_columns, array_keys( $columns ) );\n\n\t\t\t// Reorder\n\t\t\tif ( $has_columns == $temp_remove_columns ) {\n\t\t\t\t$new_columns['comments'] = $columns['comments'];\n\t\t\t\t$new_columns['date'] = $columns['date'];\n\t\t\t\tunset( $columns['comments'], $columns['date'] );\n\t\t\t}\n\n\t\t\t// Merge\n\t\t\t$columns = array_merge( $columns, $new_columns );\n\n\n\t\t\tif ( ! empty( $this->downloading_csv ) ) {\n\t\t\t\tunset( $columns['cb'], $columns['date'] );\n\n\t\t\t\tif ( ! empty( $columns['title'] ) ) {\n\t\t\t\t\t$csv_columns = array(\n\t\t\t\t\t\t'title' => $columns['title'],\n\t\t\t\t\t\t'talk_content' => esc_html_x( 'Content', 'downloaded csv content header', 'wordcamp-talks' ),\n\t\t\t\t\t\t'talk_link' => esc_html_x( 'Link', 'downloaded csv link header', 'wordcamp-talks' ),\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t$columns = array_merge( $csv_columns, $columns );\n\n\t\t\t\t// Replace dashicons to text\n\t\t\t\tif ( ! empty( $columns['comments'] ) ) {\n\t\t\t\t\t$columns['comments'] = esc_html_x( '# comments', 'downloaded csv comments num header', 'wordcamp-talks' );\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['rates'] ) ) {\n\t\t\t\t\t$columns['rates'] = esc_html_x( 'Average rating', 'downloaded csv rates num header', 'wordcamp-talks' );\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * User this filter to only add columns for the downloaded csv file\n\t\t\t\t *\n\t\t\t\t * @param array $columns the columns specific to the csv output\n\t\t\t\t */\n\t\t\t\t$columns = apply_filters( 'wct_admin_csv_column_headers', $columns );\n\t\t\t}\n\n\t\t\treturn $columns;\n\t\t}", "function get_columns() {\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />',\n 'template_name' => __('Name', 'mylisttable'),\n 'template_description' => __('Description', 'mylisttable'),\n 'create_by' => __('Created By', 'mylisttable'),\n 'create_date' => __('Create Date', 'mylisttable')\n );\n return $columns;\n }", "static public function JColumns () {\n $smpls = SampleAnnotation::all();\n $samples = $smpls->toArray();\n #$samples = DB::select('select a.biomaterial_id, a.biomaterial_name, a.person from sample_annotation a join sample_annotation_biomaterial b on a.biomaterial_id=b.biomaterial_id');\n\n #===generate the data in format for column names \n $jcolnames ='[';\n foreach($samples[0] as $key=>$value) {\n if($key=='biomaterial_id') {\n $biomaterial_id = $key;\n }\n elseif($key!='subject_id' and $key!='person_id' and $key!='type_sequencing' and $key!='type_seq' and $key!='run_name' and $key!='file_name'){\n if($key==\"diagnosis\") { \n $key=$key.\"(tree)\";\n }\n $jcolnames .= '{\"title\":\"'.$key.'\"},';\n }\n }\n $jcolnames .=']';\n return $jcolnames;\n }", "function overview_columns($columns) {\r\n\r\n $overview_columns = apply_filters('wpi_overview_columns', array(\r\n 'cb' => '',\r\n 'post_title' => __('Title', WPI),\r\n 'total' => __('Total Collected', WPI),\r\n 'user_email' => __('Recipient', WPI),\r\n 'post_modified' => __('Date', WPI),\r\n 'post_status' => __('Status', WPI),\r\n 'type' => __('Type', WPI),\r\n 'invoice_id' => __('Invoice ID', WPI)\r\n ));\r\n\r\n /* We need to grab the columns from the class itself, so we instantiate a new temp object */\r\n foreach ($overview_columns as $column => $title) {\r\n $columns[$column] = $title;\r\n }\r\n\r\n return $columns;\r\n }", "static function get_columns(): array {\r\n return [\r\n 'title' => 'Title',\r\n self::qcol('link') => 'Link',\r\n self::qcol('date_from') => 'In use from',\r\n self::qcol('date_till') => 'In use till',\r\n self::qcol('main') => 'Main website'\r\n ];\r\n }", "function getColumnsDefinition($showPlatforms, $statusLbl, $labels, $platforms)\n{\n $colDef = array();\n\n $colDef[] = array('title_key' => 'test_plan', 'width' => 60, 'type' => 'text', 'sortType' => 'asText',\n 'filter' => 'string');\n\n $colDef[] = array('title_key' => 'build', 'width' => 60, 'type' => 'text', 'sortType' => 'asText',\n 'filter' => 'string');\n \n if ($showPlatforms)\n {\n $colDef[] = array('title_key' => 'platform', 'width' => 60, 'sortType' => 'asText',\n 'filter' => 'list', 'filterOptions' => $platforms);\n }\n\n $colDef[] = array('title_key' => 'th_active_tc', 'width' => 40, 'sortType' => 'asInt',\n 'filter' => 'numeric');\n \n // create 2 columns for each defined status\n foreach($statusLbl as $lbl)\n {\n $colDef[] = array('title_key' => $lbl, 'width' => 40, 'hidden' => true, 'type' => 'int',\n 'sortType' => 'asInt', 'filter' => 'numeric');\n \n $colDef[] = array('title' => lang_get($lbl) . \" \" . $labels['in_percent'], 'width' => 40,\n 'col_id' => 'id_'. $lbl .'_percent', 'type' => 'float', 'sortType' => 'asFloat',\n 'filter' => 'numeric');\n }\n \n $colDef[] = array('title_key' => 'progress', 'width' => 40, 'sortType' => 'asFloat', 'filter' => 'numeric');\n\n return $colDef;\n}", "public function getDataColTemplate(): DataColTemplate;", "abstract protected function columns();", "function bab_pm_column_head($value, $sort = '', $current_event = '', $islink = '', $dir = '')\n{\n $o = '<th class=\"small\"><strong>';\n\n if ($islink) {\n $o.= '<a href=\"index.php';\n $o.= ($sort) ? \"?sort=$sort\":'';\n $o.= ($dir) ? a.\"dir=$dir\":'';\n $o.= ($current_event) ? a.\"event=$current_event\":'';\n $o.= a.'step=subscribers\">';\n }\n\n $o .= gTxt($value);\n\n if ($islink) {\n $o .= \"</a>\";\n }\n\n $o .= '</strong></th>';\n\n return $o;\n}", "abstract public function listColumns();", "function slb_subscriber_column_headers($columns) {\n\n\t// creating custom column header data\n\t$columns = array(\n\t\t'cb' => '<input type=\"checkbox\" />',\n\t\t'title' => __('Subscriber Name'),\n\t\t'email' => __('Email Address'),\n\t);\n\n\t// returning new columns\n\treturn $columns;\n}", "public function tableColumnsContent($column, $postId)\n {\n \tif ($column == 'post_type') {\n \t\t$comment = get_comment($postId, OBJECT);\n \t\t$post_type_slug = get_post_type($comment->comment_post_ID);\n \t\t$post_type_obj = get_post_type_object($post_type_slug);\n \t\techo $post_type_obj->label;\n \t}\n }" ]
[ "0.74423784", "0.70470494", "0.6928609", "0.6759071", "0.6705128", "0.67030287", "0.6564116", "0.65252364", "0.64909834", "0.64689285", "0.64312834", "0.6428453", "0.6419739", "0.6393128", "0.6373143", "0.63673395", "0.6363197", "0.6347214", "0.6315264", "0.62970835", "0.6283764", "0.6283409", "0.628204", "0.6276084", "0.62747175", "0.6266801", "0.6248999", "0.62291884", "0.6228693", "0.6227356", "0.6226331", "0.62259555", "0.62201625", "0.6214654", "0.62112397", "0.62022394", "0.61942", "0.61899585", "0.6187061", "0.6184873", "0.6181125", "0.6174235", "0.61729455", "0.6171939", "0.6151421", "0.61512023", "0.61496025", "0.61331123", "0.6132752", "0.6129908", "0.6127059", "0.612235", "0.612136", "0.6120085", "0.61176807", "0.6108788", "0.6105913", "0.6094008", "0.60867864", "0.6081995", "0.6078311", "0.60657156", "0.60622454", "0.6051694", "0.60507745", "0.60446614", "0.603794", "0.6036215", "0.60253495", "0.60228264", "0.6022761", "0.60210687", "0.6018189", "0.60172176", "0.60140634", "0.6010265", "0.6008433", "0.5991948", "0.5989958", "0.59804785", "0.59739494", "0.5973584", "0.59673536", "0.59647423", "0.5951442", "0.5944969", "0.5944031", "0.59436643", "0.59422135", "0.5937587", "0.59312785", "0.5931254", "0.59241366", "0.591887", "0.59176326", "0.59160507", "0.59139025", "0.59083843", "0.59047955", "0.59019005" ]
0.6776873
3
Correct image size for the multiwidget images
public function posts_widget_img_size($img_size, $args) { if(strpos($args['id'], 'footer-sidebar') !== false) return 43; return 350; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function image_size(){\n\t\t//add_image_size( 'thumb-owl', 205, 205, true );\n//\tadd_image_size( 'thumb-150', 150, 150, true);\n//\tadd_image_size( 'thumb-120', 120, 120, true);\n//\tadd_image_size( 'thumb-100', 100, 100, true );\n//\tadd_image_size( 'thumb-250', 250, 250, true );\n// // add_image_size( 'thumb-150', 150, 150, true ); //wordpress thumbail\n// add_image_size( 'thumb-60', 60, 60, true);\n//\t\t//add_image_size( 'thumb-editor', 500, 9999, true );\n//remove_image_size( 'thumb-editor');\n\t\t//remove_image_size('large');\n\t\t//remove_image_size('medium_large');\n\t}", "public function define_image_sizes(){\n add_image_size('icon', 96, 96, true);\n add_image_size('item_details_featured', 600, 600, true);\n add_image_size('item_details_featured_sm', 480, 480, true);\n add_image_size('post_preview', 300, 300, true);\n\n }", "public function add_image_sizes() {\n add_image_size( 'label_thumbnail', 100, 100, true );\n }", "function dg_add_custom_img_sizes() {\n\t\n\tadd_image_size( 'dg-large', 1250, 1250 );\n\tadd_image_size( 'dg-extra-large', 1700, 1700 );\n\tadd_image_size( 'dg-super-large', 2500, 2500 );\n\t\n\tupdate_option( 'medium_large_size_w', 1000 );\n\tupdate_option( 'medium_large_size_h', 1000 );\n}", "public function addImagesSizes() {\n\t\t// add_image_size( 'small', 225, 9999 );\n\t\t// add_image_size( 'hero', 1600, 9999 );\n\t}", "function _wp_add_additional_image_sizes()\n {\n }", "function image_sizes() {\n\tadd_image_size( 'rwd-small', 400, 200 );\n\tadd_image_size( 'rwd-medium', 800, 400 );\n\tadd_image_size( 'rwd-large', 1200, 600 );\n\tadd_image_size( 'rwd-mediumx2', 1600, 800 );\n\tadd_image_size( 'rwd-xl', 2000, 1000 );\n\tadd_image_size( 'rwd-largex2', 2400, 1200 );\n\tadd_image_size( 'rwd-xlx2', 4000, 2000 );\n}", "function custom_image_sizes() {\n}", "public function image_sizes() {\n add_image_size('careerfy-job-medium', 358, 204, true); // posts for team grid and medium\n add_image_size('careerfy-posts-msmal', 85, 58, true); // posts for team grid and medium\n add_image_size('careerfy-emp-msmal', 132, 47, true); //\n add_image_size('careerfy-candidate-2', 350, 450, true); // posts for team grid and medium\n add_image_size('careerfy-testimonial-thumb', 268, 268, true); // posts for team grid and medium\n add_image_size('careerfy-service', 247, 252, true); // posts for team grid and medium\n }", "protected function scaleImages() {}", "function generate_image_sizes() {\n\t$display_options = get_customizer_settings()[ WPM_PREFIX . 'collection_style' ];\n\n\tadd_image_size(\n\t\tWPM_PREFIX . 'list_thumb',\n\t\t$display_options['list_image_max_width'],\n\t\t$display_options['list_image_max_height']\n\t);\n}", "function reg_image_sizes() {\n add_image_size( 'medium', 480, 0, false );\n add_image_size( 'medium-large', 500, 0, false );\n add_image_size( 'large', 600, 0, false );\n}", "function update_image_size_options() {\n\tupdate_option( 'thumbnail_size_w', 160 );\n\tupdate_option( 'thumbnail_size_h', 160 );\n\tupdate_option( 'thumbnail_crop', 1 );\n\tupdate_option( 'medium_size_w', 320 );\n\tupdate_option( 'medium_size_h', 9999 );\n\tupdate_option( 'medium_large_size_w', 512 ); // Assign this but usually not used.\n\tupdate_option( 'medium_large_size_h', 9999 );\n\tupdate_option( 'large_size_w', 768 );\n\tupdate_option( 'large_size_h', 9999 );\n}", "function rp_image_size_setup() {\n add_image_size( 'rp-md', 450, 450, array( 'center', 'center' ), false );\n\tadd_image_size( 'rp-lg', 1920, 500, array( 'center', 'center' ) );\n}", "public static function set_image_size() {\n $size = get_option( 'yith_woocompare_image_size' );\n\n if( ! $size ) {\n return;\n }\n\n $size['crop'] = isset( $size['crop'] ) ? true : false;\n add_image_size( 'yith-woocompare-image', $size['width'], $size['height'], $size['crop'] );\n }", "function shift_image_sizes() {\n\n\t// image size for members archive\n\tadd_image_size( 'shift_team_thumb', 600, 600, true );\n\n}", "function fanwood_register_image_sizes() {\n\tadd_image_size( 'fanwood-thumbnail', 240, 240, true );\n}", "public function register_image_sizes() {\n\n }", "function wp_ajax_media_create_image_subsizes()\n {\n }", "function mob_images() {\n\tupdate_option( 'thumbnail_size_w', 360 );\n\tupdate_option( 'thumbnail_size_h', 220 );\n\tupdate_option( 'thumbnail_crop', 1 );\n\n\tupdate_option( 'medium_size_w', 654 );\n\tupdate_option( 'medium_size_h', 9999 );\n\tupdate_option( 'medium_crop', 0 );\n\n\tupdate_option( 'medium_large_size_w', 0 );\n\tupdate_option( 'medium_large_size_h', 0 );\n\n\tupdate_option( 'large_size_w', 850 );\n\tupdate_option( 'large_size_h', 400 );\n\tupdate_option( 'large_crop', 1 );\n\n\tadd_image_size( 'archive-blog', 360, 170, true );\t\n}", "function register_image_sizes() {\n\t}", "public function ezbs_add_image_size(){\n \n $obj_ezc_add_image_size = Class_WP_ezClasses_Theme_Add_Image_Size_1::ez_new();\n\t \n\t // $obj_ezc_add_image_size->set_remove_width_height(false);\n\t \n\t // $obj_ezc_add_image_size->set_jpeg_quality(80);\t\n\t \n\t $arr_args['arr_args'] = $this->ezbs_add_image_size_args();\n\t \n\t // ais = add image size\n\t $obj_ezc_add_image_size->ez_ais($arr_args);\n\t \n\t //$obj_ezc_add_image_size->set_image_size_names_choose_defaults(false);\n\t \n\t // isnc = image_size_names_choose (with is a stock WP filter) \n\t $obj_ezc_add_image_size->ez_isnc($arr_args);\t \n\t \n }", "function rp_add_image_sizes() {\n\tadd_image_size( 'wpdentist-thumbnail', 100, 75, true );\n}", "function PREFIX_add_image_sizes() {\n\t/*\n\t// 16:9\n\tadd_image_size( 'wide-xsmall', 295, 165, true );\n\tadd_image_size( 'wide-small', 360, 202, true );\n\tadd_image_size( 'wide-medium', 470, 264, true );\n\tadd_image_size( 'wide-large', 770, 433, true );\n\tadd_image_size( 'wide-xlarge', 1440, 810, true );\n\n\t// 4x3\n\tadd_image_size( 'ratio-4-3-small', 300, 225, true );\n\tadd_image_size( 'ratio-4-3-medium', 470, 353, true );\n\tadd_image_size( 'ratio-4-3-large', 740, 555, true );\n\tadd_image_size( 'ratio-4-3-xlarge', 1440, 1080, true );\n\n\t// Golden Ratio\n\tadd_image_size( 'ratio-gold-small', 300, 300 * 0.618, true );\n\tadd_image_size( 'ratio-gold-medium', 470, 470 * 0.618, true );\n\tadd_image_size( 'ratio-gold-large', 740, 740 * 0.618, true );\n\tadd_image_size( 'ratio-gold-xlarge', 1440, 1440 * 0.618, true );\n\n\t// Square\n\tadd_image_size( 'square-xsmall', 160, 160, true );\n\tadd_image_size( 'square-small', 300, 300, true );\n\tadd_image_size( 'square-medium', 470, 470, true );\n\tadd_image_size( 'square-large', 800, 800, true );\n\t*/\n}", "function bootstrapwp_images() {\n\n set_post_thumbnail_size(260, 180); // 260px wide x 180px high\n add_image_size('bootstrap-small', 300, 200); // 300px wide x 200px high\n add_image_size('bootstrap-medium', 360, 270); // 360px wide by 270px high\n}", "protected function addImageSizeConfigs()\n {\n // TODO: add image size configs\n }", "function rest_add_image_size() {\n add_image_size( 'rest_post_thumbnail', 712, 348, true );\n}", "function wpimprov_vantage_child_locale() {\n load_child_theme_textdomain( 'vantage', get_stylesheet_directory() . '/languages' );\n remove_image_size('post-thumbnail');\n remove_image_size('vantage-thumbnail');\n remove_image_size('vantage-thumbnail-no-sidebar');\n set_post_thumbnail_size(800,600,false);\n\n add_image_size('vantage-thumbnail', 800,600, false);\n add_image_size('vantage-thumbnail-no-sidebar', 1080,500, false);\n\n\t\n add_image_size('post-thumbnail', 800,600, false);\n\n}", "function jacqueline_templates_theme_setup() {\n\t\tadd_filter( 'image_size_names_choose', 'jacqueline_show_thumb_sizes');\n\t}", "function medula_remove_plugin_image_sizes() {\n\tremove_image_size('image-name');\n}", "function wp_get_additional_image_sizes()\n {\n }", "function add_custom_thumbnail_sizes() {\n\tadd_image_size('ra-sm-thumbnail-size', 100, 100, array( 'center', 'center' ) );\t// w, h\n\tadd_image_size('ra-med-thumbnail-size', 186, 150, array( 'center', 'center' ) );\n}", "private function setDimensions(){\r\n list($width, $height) = getimagesize($this->fileName);\r\n $this->imageDimensions = array('width'=>$width,\r\n 'height'=>$height);\r\n \r\n }", "function oniros_image_support(){\n\t// add as many as the project might require\n\t// smaller images do not get resized, but largeones will get cropped.\n\n\t// name width height crop?\n\tadd_image_size( 'image_size_name', 400, 400, true);\n}", "function _mai_cmb_image_size_config() {\n\t$sizes = genesis_get_image_sizes();\n\t$size_options = array();\n\tforeach ( $sizes as $index => $value ) {\n\t\t$size_options[$index] = sprintf( '%s (%s x %s)', $index, $value['width'], $value['height'] );\n\t}\n\treturn array(\n\t\t'name' => __( 'Image Size:', 'mai-theme-engine' ),\n\t\t'id' => 'image_size',\n\t\t'type' => 'select',\n\t\t'before_field' => __( 'Image Size:', 'mai-theme-engine' ) . ' ',\n\t\t'default' => 'one-third',\n\t\t'options' => $size_options,\n\t);\n}", "function adds_new_image_sizes() {\n\t$config = array(\n\t\t'featured-image' => array(\n\t\t\t'width' => 720,\n\t\t\t'height' => 400,\n\t\t\t'crop' => true,\n\t\t)\n\t);\n\n\tforeach( $config as $name => $args) {\n\t\t$crop = array_key_exists( 'crop', $args ) ? $args['crop'] : false;\n\n\t\tadd_image_size( $name, $args['width'], $args['height'], $args['crop'] );\n\t}\n}", "public static function theme_images() {\r\n add_image_size('slideshow-980', 980, 420, true);\r\n add_image_size('slideshow-1200', 1180, 550, true);\r\n add_image_size('slideshow-1560', 1540, 550, true);\r\n add_image_size('slideshow-720', 600, 550, true);\r\n add_image_size('grid-thumbnail', 370, 270, true);\r\n add_image_size('icon-60', 60, 60, true);\r\n add_image_size('icon-100', 100, 100, true);\r\n add_image_size('icon-40', 40, 40, true);\r\n }", "function add_image_sizes() {\n\t\t$cover_width = 350;\n\t\t$cover_height = 250;\n\t\t$cover_size = UM()->options()->get( 'um_user_photos_cover_size' );\n\t\tif ( $cover_size && trim( $cover_size ) != '' ) {\n\t\t\t$cover_size = strtolower( $cover_size );\n\t\t\t$size = explode( 'x', $cover_size );\n\t\t\tif ( is_array( $size ) && count( $size ) == 2 ) {\n\t\t\t\t$cover_width = intval( $size[0] );\n\t\t\t\t$cover_height = intval( $size[1] );\n\t\t\t}\n\t\t}\n\t\tadd_image_size( 'album_cover', $cover_width, $cover_height, true );\n\n\t\t$photo_width = 250;\n\t\t$photo_height = 250;\n\t\t$photo_size = UM()->options()->get( 'um_user_photos_image_size' );\n\t\tif ( $photo_size && trim( $photo_size ) != '' ) {\n\t\t\t$photo_size = strtolower( $photo_size );\n\t\t\t$size = explode( 'x', $photo_size );\n\t\t\tif ( is_array( $size ) && count( $size ) == 2 ) {\n\t\t\t\t$photo_width = intval( $size[0] );\n\t\t\t\t$photo_height = intval( $size[1] );\n\t\t\t}\n\t\t}\n\n\t\tadd_image_size( 'gallery_image', $photo_width, $photo_height, true );\n\t}", "protected static function image_sizes() {\n\t\tif ( null === self::$image_sizes ) {\n\t\t\tglobal $_wp_additional_image_sizes;\n\n\t\t\t// Populate an array matching the data structure of $_wp_additional_image_sizes so we have a consistent structure for image sizes.\n\t\t\t$images = [\n\t\t\t\t'thumb' => [\n\t\t\t\t\t'width' => intval( get_option( 'thumbnail_size_w' ) ),\n\t\t\t\t\t'height' => intval( get_option( 'thumbnail_size_h' ) ),\n\t\t\t\t\t'crop' => (bool) get_option( 'thumbnail_crop' ),\n\t\t\t\t],\n\t\t\t\t'medium' => [\n\t\t\t\t\t'width' => intval( get_option( 'medium_size_w' ) ),\n\t\t\t\t\t'height' => intval( get_option( 'medium_size_h' ) ),\n\t\t\t\t\t'crop' => false,\n\t\t\t\t],\n\t\t\t\t'medium_large' => [\n\t\t\t\t\t'width' => intval( get_option( 'medium_large_size_w' ) ),\n\t\t\t\t\t'height' => intval( get_option( 'medium_large_size_h' ) ),\n\t\t\t\t\t'crop' => false,\n\t\t\t\t],\n\t\t\t\t'large' => [\n\t\t\t\t\t'width' => intval( get_option( 'large_size_w' ) ),\n\t\t\t\t\t'height' => intval( get_option( 'large_size_h' ) ),\n\t\t\t\t\t'crop' => false,\n\t\t\t\t],\n\t\t\t\t'full' => [\n\t\t\t\t\t'width' => null,\n\t\t\t\t\t'height' => null,\n\t\t\t\t\t'crop' => false,\n\t\t\t\t],\n\t\t\t];\n\n\t\t\t// Compatibility mapping as found in wp-includes/media.php.\n\t\t\t$images['thumbnail'] = $images['thumb'];\n\n\t\t\t// Update class variable, merging in $_wp_additional_image_sizes if any are set.\n\t\t\tif ( is_array( $_wp_additional_image_sizes ) && ! empty( $_wp_additional_image_sizes ) ) {\n\t\t\t\tself::$image_sizes = array_merge( $images, $_wp_additional_image_sizes );\n\t\t\t} else {\n\t\t\t\tself::$image_sizes = $images;\n\t\t\t}\n\t\t}\n\n\t\treturn is_array( self::$image_sizes ) ? self::$image_sizes : [];\n\t}", "function refreshImageSize() {\n\t\tif($this->intTableKeyValue != \"\") {\n\t\t\tif ( $this->arrObjInfo['imageurl'] ) {\n\t\t\t\tif($this->arrObjInfo['imagewidth'] == 0) {\n\t\t\t\t\t$imageURL = $this->getLocalImageURL();\n\t\t\t\t\t\n\t\t\t\t\t$imageSize = getimagesize($imageURL);\n\t\t\t\t\t$this->arrObjInfo['imagewidth'] = $imageSize[0];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->arrObjInfo['imageheight'] == 0) {\n\t\t\t\t\t$imageURL = $this->getLocalImageURL();\n\t\t\t\t\n\t\t\t\t\t$imageSize = getimagesize($imageURL);\n\t\t\t\t\t$this->arrObjInfo['imageheight'] = $imageSize[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function confero_register_featured_widget_sizes() {\n add_image_size( 'featured-logo', 400 );\n}", "function aurum_woocommerce_3_3_transfer_image_sizes() {\n\t\t$do_resize = false;\n\t\t\n\t\t// WooCommerce Thumbnail\n\t\tif ( ( $shop_catalog_image_size = get_theme_mod( 'shop_catalog_image_size' ) ) ) {\n\t\t\t\n\t\t\t// {width}x{height} format\n\t\t\tif ( preg_match( '#^(?<width>[0-9]+)x(?<height>[0-9]+)(x(?<cropped>0|1))?$#', $shop_catalog_image_size, $shop_catalog_image_size_matches ) ) {\n\t\t\t\t$width = $shop_catalog_image_size_matches['width'];\n\t\t\t\t$height = $shop_catalog_image_size_matches['height'];\n\t\t\t\t$cropping = ! isset( $shop_catalog_image_size_matches['cropped'] ) || $shop_catalog_image_size_matches['cropped'];\n\t\t\t\t\n\t\t\t\t$ratio = _get_aspect_ratio( $width, $height );\n\t\t\t\t\n\t\t\t\tupdate_option( 'woocommerce_thumbnail_cropping', $cropping ? 'custom' : 'uncropped' );\n\t\t\t\tupdate_option( 'woocommerce_thumbnail_cropping_custom_width', $ratio[0] );\n\t\t\t\tupdate_option( 'woocommerce_thumbnail_cropping_custom_height', $ratio[1] );\n\t\t\t\t\n\t\t\t\t$do_resize = true;\n\t\t\t}\n\t\t\t// Crop width only\n\t\t\telse if( is_numeric( $shop_catalog_image_size ) ) {\n\t\t\t\tupdate_option( 'woocommerce_thumbnail_cropping', 'uncropped' );\n\t\t\t\tupdate_option( 'woocommerce_thumbnail_cropping_custom_width', $shop_catalog_image_size );\n\t\t\t\t\n\t\t\t\t$do_resize = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Single image\n\t\tif ( ( $shop_single_image_size = get_theme_mod( 'shop_single_image_size' ) ) ) {\n\t\t\t\n\t\t\tif ( preg_match( '#^(?<width>[0-9]+)(x(?<height>[0-9]+))?(x(?<cropped>0|1))?$#', $shop_single_image_size, $shop_single_image_size_matches ) ) {\n\t\t\t\tupdate_option( 'woocommerce_single_image_width', $shop_single_image_size_matches['width'] );\n\t\t\t\t\n\t\t\t\t$do_resize = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Request image regeneration\n\t\tif ( $do_resize && class_exists( 'WC_Regenerate_Images' ) ) {\n\t\t\tWC_Regenerate_Images::queue_image_regeneration();\n\t\t}\n\t\t\n\t\t// Lightbox has moved\n\t\tset_theme_mod( 'shop_single_lightbox', ! get_theme_mod( 'shop_single_lightbox_disable', false ) );\n\t\t\n\t\t\n\t\t// WooCommerce columns\n\t\t$shop_product_columns = get_data( 'shop_product_columns' );\n\t\t\n\t\tupdate_option( 'woocommerce_catalog_columns', aurum_get_number_from_word( 'decide' == $shop_product_columns ? 4 : $shop_product_columns ) );\n\t\t\n\t\tif ( preg_match( '#[0-9]+#', get_data( 'shop_products_per_page' ), $matches ) ) {\n\t\t\tupdate_option( 'woocommerce_catalog_rows', $matches[0] );\n\t\t}\n\t\t\n\t\t// Run this once\n\t\tupdate_option( 'aurum_woocommerce_3_3_transfer_image_sizes', true );\n\t}", "function acf_get_image_sizes()\n{\n}", "function register_imagesizes(){\r\n\t\tglobal $businesshub_size_array; // defined in CactusThemes's theme\r\n\t\tif(!$businesshub_size_array) $businesshub_size_array = array();\r\n\r\n\t\t/**\r\n\t\t * register new sizes\r\n\t\t */\r\n\t\t$businesshub_size_array_shortcode = array(\r\n\t\t\t//post-grid\r\n\t\t\t'businesshub_thumb_460x460' => array(460, 460, true, array('businesshub_thumb_460x460','businesshub_thumb_460x460','businesshub_thumb_460x460','businesshub_thumb_920x920')),//\r\n\t\t\t\r\n\t\t\t//retina\r\n\t\t\t'businesshub_thumb_920x920' => array(920, 920, true),\r\n\t\t\t);\r\n\r\n\t\t$businesshub_size_array = array_merge($businesshub_size_array, $businesshub_size_array_shortcode);\r\n\r\n\t\t/**\r\n\t\t * action cactus_reg_thumbnail - defined in theme\r\n\t\t */\r\n\t\tdo_action( 'businesshub_reg_thumbnail', $businesshub_size_array);\r\n\t}", "protected function image_style() {\n\t\t$this->start_controls_section(\n\t\t\t'section_style_retina_image',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Retina Image', 'boostify' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'width',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Width', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'tablet_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'mobile_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'size_units' => array( '%', 'px', 'vw' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'%' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t),\n\t\t\t\t\t'vw' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image .wp-caption .widget-image-caption' => 'width: {{SIZE}}{{UNIT}}; display: inline-block;',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'space',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Max Width', 'boostify' ) . ' (%)',\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'tablet_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'mobile_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'size_units' => array( '%' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'%' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'max-width: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .wp-caption-text' => 'max-width: {{SIZE}}{{UNIT}}; display: inline-block; width: 100%;',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'separator_panel_style',\n\t\t\tarray(\n\t\t\t\t'type' => Controls_Manager::DIVIDER,\n\t\t\t\t'style' => 'thick',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'retina_image_border',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Style', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'none',\n\t\t\t\t'label_block' => false,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'none' => __( 'None', 'boostify' ),\n\t\t\t\t\t'solid' => __( 'Solid', 'boostify' ),\n\t\t\t\t\t'double' => __( 'Double', 'boostify' ),\n\t\t\t\t\t'dotted' => __( 'Dotted', 'boostify' ),\n\t\t\t\t\t'dashed' => __( 'Dashed', 'boostify' ),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container .boostify-retina-img' => 'border-style: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'retina_image_border_size',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Width', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'top' => '1',\n\t\t\t\t\t'bottom' => '1',\n\t\t\t\t\t'left' => '1',\n\t\t\t\t\t'right' => '1',\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'retina_image_border!' => 'none',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container .boostify-retina-img' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'retina_image_border_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Color', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'retina_image_border!' => 'none',\n\t\t\t\t),\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container .boostify-retina-img' => 'border-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'image_border_radius',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Radius', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px', '%' ),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->start_controls_tabs( 'image_effects' );\n\n\t\t$this->start_controls_tab(\n\t\t\t'normal',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Normal', 'boostify' ),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'opacity',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Opacity', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t'min' => 0.10,\n\t\t\t\t\t\t'step' => 0.01,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'opacity: {{SIZE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Css_Filter::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'css_filters',\n\t\t\t\t'selector' => '{{WRAPPER}} .boostify-retina-image img',\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover', 'boostify' ),\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'opacity_hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Opacity', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t'min' => 0.10,\n\t\t\t\t\t\t'step' => 0.01,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image:hover img' => 'opacity: {{SIZE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Css_Filter::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'css_filters_hover',\n\t\t\t\t'selector' => '{{WRAPPER}} .boostify-retina-image:hover img',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'hover_animation',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover Animation', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::HOVER_ANIMATION,\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'background_hover_transition',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Transition Duration', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'max' => 3,\n\t\t\t\t\t\t'step' => 0.1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'transition-duration: {{SIZE}}s',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->end_controls_tabs();\n\n\t\t$this->end_controls_section();\n\t}", "function wp_get_registered_image_subsizes()\n {\n }", "function add_custom_image_sizes() {\n\tremove_image_size( '1536x1536' );\n\tremove_image_size( '2048x2048' );\n\tadd_image_size( 'small', 160, 9999 );\n\tadd_image_size( 'medium-large', 512, 9999 ); // Add a size that is the same size but described differently, for use as CSS class name.\n\tadd_image_size( 'x-large', 1024, 9999 );\n\tadd_image_size( 'xx-large', 1536, 9999 );\n\tadd_image_size( 'xxx-large', 2048, 9999 );\n\n\tadd_filter(\n\t\t'image_size_names_choose',\n\t\tfunction ( $sizes ) {\n\t\t\t$ns = array();\n\t\t\tforeach ( $sizes as $name => $label ) {\n\t\t\t\t$ns[ $name ] = $label;\n\t\t\t\tif ( 'thumbnail' === $name ) {\n\t\t\t\t\t$ns['small'] = _x( 'Small', 'size', 'wpinc_medi' );\n\t\t\t\t}\n\t\t\t\tif ( 'medium' === $name ) {\n\t\t\t\t\t$ns['medium-large'] = _x( 'Medium Large', 'size', 'wpinc_medi' );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $ns;\n\t\t}\n\t);\n}", "public function test_multi_resize() {\n\t\t$file = DIR_TESTDATA . '/images/waffles.jpg';\n\n\t\t$imagick_image_editor = new WP_Image_Editor_Imagick( $file );\n\t\t$imagick_image_editor->load();\n\n\t\t$sizes_array = array(\n\n\t\t\t/**\n\t\t\t * #0 - 10x10 resize, no cropping.\n\t\t\t * By aspect, should be 10x6 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 10,\n\t\t\t\t'height' => 10,\n\t\t\t\t'crop' => false,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #1 - 75x50 resize, with cropping.\n\t\t\t * Output dimensions should be 75x50\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 75,\n\t\t\t\t'height' => 50,\n\t\t\t\t'crop' => true,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #2 - 20 pixel max height, no cropping.\n\t\t\t * By aspect, should be 30x20 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 9999, # Arbitrary High Value\n\t\t\t\t'height' => 20,\n\t\t\t\t'crop' => false,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #3 - 45 pixel max height, with cropping.\n\t\t\t * By aspect, should be 45x400 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 45,\n\t\t\t\t'height' => 9999, # Arbitrary High Value\n\t\t\t\t'crop' => true,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #4 - 50 pixel max width, no cropping.\n\t\t\t * By aspect, should be 50x33 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 50,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #5 - 55 pixel max width, no cropping, null height\n\t\t\t * By aspect, should be 55x36 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 55,\n\t\t\t\t'height' => null,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #6 - 55 pixel max height, no cropping, no width specified.\n\t\t\t * By aspect, should be 82x55 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'height' => 55,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #7 - 60 pixel max height, no cropping, null width.\n\t\t\t * By aspect, should be 90x60 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => null,\n\t\t\t\t'height' => 60,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #8 - 70 pixel max height, no cropping, negative width.\n\t\t\t * By aspect, should be 105x70 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => -9999, # Arbitrary Negative Value\n\t\t\t\t'height' => 70,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #9 - 200 pixel max width, no cropping, negative height.\n\t\t\t * By aspect, should be 200x133 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 200,\n\t\t\t\t'height' => -9999, # Arbitrary Negative Value\n\t\t\t),\n\t\t);\n\n\t\t$resized = $imagick_image_editor->multi_resize( $sizes_array );\n\n\t\t$expected_array = array(\n\n\t\t\t// #0\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-10x7.jpg',\n\t\t\t\t'width' => 10,\n\t\t\t\t'height' => 7,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-10x7.jpg' ),\n\t\t\t),\n\n\t\t\t// #1\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-75x50.jpg',\n\t\t\t\t'width' => 75,\n\t\t\t\t'height' => 50,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-75x50.jpg' ),\n\t\t\t),\n\n\t\t\t// #2\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-30x20.jpg',\n\t\t\t\t'width' => 30,\n\t\t\t\t'height' => 20,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-30x20.jpg' ),\n\t\t\t),\n\n\t\t\t// #3\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-45x400.jpg',\n\t\t\t\t'width' => 45,\n\t\t\t\t'height' => 400,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-45x400.jpg' ),\n\t\t\t),\n\n\t\t\t// #4\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-50x33.jpg',\n\t\t\t\t'width' => 50,\n\t\t\t\t'height' => 33,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-50x33.jpg' ),\n\t\t\t),\n\n\t\t\t// #5\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-55x37.jpg',\n\t\t\t\t'width' => 55,\n\t\t\t\t'height' => 37,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-55x37.jpg' ),\n\t\t\t),\n\n\t\t\t// #6\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-83x55.jpg',\n\t\t\t\t'width' => 83,\n\t\t\t\t'height' => 55,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-83x55.jpg' ),\n\t\t\t),\n\n\t\t\t// #7\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-90x60.jpg',\n\t\t\t\t'width' => 90,\n\t\t\t\t'height' => 60,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-90x60.jpg' ),\n\t\t\t),\n\n\t\t\t// #8\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-105x70.jpg',\n\t\t\t\t'width' => 105,\n\t\t\t\t'height' => 70,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-105x70.jpg' ),\n\t\t\t),\n\n\t\t\t// #9\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-200x133.jpg',\n\t\t\t\t'width' => 200,\n\t\t\t\t'height' => 133,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-200x133.jpg' ),\n\t\t\t),\n\t\t);\n\n\t\t$this->assertNotNull( $resized );\n\t\t$this->assertSame( $expected_array, $resized );\n\n\t\tforeach ( $resized as $key => $image_data ) {\n\t\t\t$image_path = DIR_TESTDATA . '/images/' . $image_data['file'];\n\n\t\t\t// Now, verify real dimensions are as expected\n\t\t\t$this->assertImageDimensions(\n\t\t\t\t$image_path,\n\t\t\t\t$expected_array[ $key ]['width'],\n\t\t\t\t$expected_array[ $key ]['height']\n\t\t\t);\n\t\t}\n\t}", "private function get_image_sizes() {\n\n\t\treturn array(\n\t\t\t'square_medium' => array( 200, 200 ),\n\t\t\t'full' => array( 1200, 1200 ),\n\t\t);\n\n\t}", "function get_intermediate_image_sizes()\n {\n }", "function cultiv8_image_setup(){\n\tadd_image_size( 'ctc-wide', 960, 540 ); // 16x9\n\tadd_image_size( 'ctc-tall', 540, 960 ); // 9x16\n\tadd_image_size( 'ctc-person-tall', 685, 960 ); // 5x7\n\tadd_image_size( 'ctc-person-tall', 960, 685 ); // 7x5\n\t\n\t// Recommend a thumbnail flush after installing theme to regenerate\n}", "public function add_image_sizes() {\n\t\tif ( ! is_array( $this->image_sizes ) || empty( $this->image_sizes ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tforeach ( $this->image_sizes as $key => $value ) {\n\t\t\tforeach ( $value as $name => $attributes ) {\n\t\t\t\tif ( empty( $attributes ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif ( isset( $attributes->width ) && ! empty( $attributes->width ) && isset( $attributes->height ) && ! empty( $attributes->height ) && isset( $attributes->crop ) ) {\n\t\t\t\t\tadd_image_size( $name, $attributes->width, $attributes->height, $attributes->crop );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "private function makeImageSize(): void\n {\n list($width, $height) = getimagesize($this->getUrl());\n $size = array('height' => $height, 'width' => $width );\n\n $this->width = $size['width'];\n $this->height = $size['height'];\n }", "public function ezbs_add_image_size_args(){\n \n $arr_return = array (\n\t \n\t \n\t 'w100' => array(\t\t\t\t\t\t// note: the key can be whatever you want. it's not used as a setting / parm / args. it's just a key. \n\t\t 'active'\t\t\t=> true,\t\t\t// on / off switch for this key's args\n\t\t 'name'\t\t\t=> 'w100',\t\t\t// name, as used for add_image_size() and (filter) image_size_names_choose\n\t\t 'width'\t\t\t=> 100,\t\t\t\t// width (int)\n\t\t 'height'\t\t\t=> false,\t\t\t// height (int)\n\t\t 'crop'\t\t\t=> true,\t\t\t// crop\n\t\t 'ratio'\t\t\t=> 'square',\t\t// see Class_WP_ezClasses_Theme_Add_Image_Size_1 for details\n\t\t 'orientation'\t\t=> 'land', \t\t\t// else 'port' - ratios are defined as 'land'. 'port' will more or less rotate the ratio 90 degrees clockwise\n\t\t 'offset'\t\t\t=> 0,\t\t\t\t// use: - / + . offset only applies when width is used as the baseline (off which the height is calculated)\n\t\t 'names_choose'\t=> array(\n\t\t 'active'\t=> true,\t\t\t\t// add this via the (filter) image_size_names_choose\n\t\t\t'select'\t=> 'Ratio: Square'\t\t// what's the displayed select sting.\n\t\t\t),\n\t\t 'picturefill'\t\t=> array(\t\t\t// Not required for Class_WP_ezClasses_Theme_Add_Image_Size_1 but very useful for Class_WP_ezClasses_Templates_Picturefill_js\n\t\t 'active'\t\t\t\t=> true,\t// active? \n\t\t 'w'\t\t\t\t\t\t=> 'w',\t\t// what's the 'w' (width). for more details see Class_WP_ezClasses_Templates_Picturefill_js\n\t\t\t'exclude_from_sizes'\t=> array() // a list of sizes[] keys that this should be excluded from.\n\t\t\t),\n\t\t),\t \n\t \n\t \n\t 'w600' => array(\n\t\t 'active'\t\t\t=> true,\n\t\t 'name'\t\t\t=> 'w600',\n\t\t 'width'\t\t\t=> 600,\n\t\t 'height'\t\t\t=> false,\n\t\t 'crop'\t\t\t=> true,\n\t\t 'ratio'\t\t\t=> 'widescreen',\t\t\n\t\t 'orientation'\t\t=> 'land', \t\t\n\t\t 'offset'\t\t\t=> 0,\t\t\t\n\t\t 'names_choose'\t=> array(\n\t\t 'active'\t=> true,\n\t\t\t'select'\t=> 'Ratio: Widescreen'\n\t\t\t),\n\t\t 'picturefill'\t\t=> array(\n\t\t 'active'\t\t\t\t=> true,\n\t\t 'w'\t\t\t\t\t\t=> 600,\t\n\t\t\t'exclude_from_sizes'\t=> array()\t\t\t\n\t\t\t),\n\t\t),\t \n\t \n\t 'w750' => array(\n\t\t 'active'\t\t\t=> true,\n\t\t 'name'\t\t\t=> 'w750',\n\t\t 'width'\t\t\t=> 750,\n\t\t 'height'\t\t\t=> false,\n\t\t 'crop'\t\t\t=> true,\n\t\t 'ratio'\t\t\t=> 'widescreen',\t\t\n\t\t 'orientation'\t\t=> 'land', \n\t\t 'offset'\t\t\t=> 0,\n\t\t 'names_choose'\t=> array(\n\t\t 'active'\t=> true,\n\t\t\t'select'\t=> 'Ratio: Widescreen'\n\t\t\t),\n\t\t 'picturefill'\t\t=> array(\n\t\t 'active'\t\t\t\t=> true,\n\t\t 'w'\t\t\t\t\t\t=> 768,\t\n\t\t\t'exclude_from_sizes'\t=> array()\t\t\t\n\t\t\t),\n\t\t),\n\t\t\n\t 'w970' => array(\n\t\t 'active'\t\t\t=> true,\n\t\t 'name'\t\t\t=> 'w970',\n\t\t 'width'\t\t\t=> 970,\n\t\t 'height'\t\t\t=> false,\n\t\t 'crop'\t\t\t=> true,\n\t\t 'ratio'\t\t\t=> 'widescreen',\t\t\n\t\t 'orientation'\t\t=> 'land', \t\t\n\t\t 'offset'\t\t\t=> 0,\t\t\t\n\t\t 'names_choose'\t=> array(\n\t\t 'active'\t=> true,\n\t\t\t'select'\t=> 'Ratio: Widescreen'\n\t\t\t),\n\t\t 'picturefill'\t\t=> array(\n\t\t 'active'\t\t\t\t=> true,\n\t\t 'w'\t\t\t\t\t\t=> 992,\t\n\t\t\t'exclude_from_sizes'\t=> array()\t\t\t\n\t\t\t),\n\t\t),\n\t\t\n\t 'w1170o' => array(\n\t\t 'active'\t\t\t=> true,\n\t\t 'name'\t\t\t=> 'w1170o',\t\t\t\t// o = offset\n\t\t 'width'\t\t\t=> 1170,\n\t\t 'height'\t\t\t=> false,\n\t\t 'crop'\t\t\t=> true,\n\t\t 'ratio'\t\t\t=> 'widescreen',\t\t\n\t\t 'orientation'\t\t=> 'land', \n\t\t 'offset'\t\t\t=> -3/12,\n\t\t 'names_choose'\t=> array(\n\t\t 'active'\t=> true,\n\t\t\t'select'\t=> 'Ratio: Widescreen'\n\t\t\t),\n\t\t 'picturefill'\t\t=> array(\t\t\n\t\t 'active'\t\t\t\t=> true,\n\t\t 'w'\t\t\t\t\t\t=> 1200,\n\t\t\t'exclude_from_sizes'\t=> array()\t\t\t\t\n\t\t\t),\n\t\t),\t\t\n\t\t\n\t 'w1170' => array(\n\t\t 'active'\t\t\t=> true,\n\t\t 'name'\t\t\t=> 'w1170',\n\t\t 'width'\t\t\t=> 1170,\n\t\t 'height'\t\t\t=> false,\n\t\t 'crop'\t\t\t=> true,\n\t\t 'ratio'\t\t\t=> 'widescreen',\t\t\n\t\t 'orientation'\t\t=> 'land', \n\t\t 'offset'\t\t\t=> 0,\n\t\t 'names_choose'\t=> array(\n\t\t 'active'\t=> true,\n\t\t\t'select'\t=> 'Ratio: Widescreen'\n\t\t\t),\n\t\t 'picturefill'\t\t=> array(\t\t\n\t\t 'active'\t\t\t\t=> true,\n\t\t 'w'\t\t\t\t\t\t=> 1200,\n\t\t\t'exclude_from_sizes'\t=> array()\t\t\t\t\n\t\t\t),\n\t\t),\n\t\t\n\t\t'w1920' => array(\n\t\t 'active'\t\t\t=> true,\n\t\t 'name'\t\t\t=> 'w1920',\n\t\t 'width'\t\t\t=> 1920,\n\t\t 'height'\t\t\t=> false,\n\t\t 'crop'\t\t\t=> true,\n\t\t 'ratio'\t\t\t=> 'widescreen',\n\t\t 'orientation'\t\t=> 'land', \t\t\t\t\n\t\t 'offset'\t\t\t=> 0,\t\t\t\t\t\n\t\t 'names_choose'\t=> array(\n\t\t 'active'\t=> true,\n\t\t\t'select'\t=> 'Ratio: Widescreen'\n\t\t\t),\n\t\t 'picturefill'\t\t=> array(\n\t\t 'active'\t\t\t\t=> true,\n\t\t 'w'\t\t\t\t\t\t=> 'w',\n\t\t\t'exclude_from_sizes'\t=> array()\t\t\t\t\n\t\t\t),\n\t\t),\n\t\t\t\t\n );\n\t \n\t /**\n\t * Which of the above should be used for the set_post_thumbnail_size()?\n\t * \n\t * Note 1: This 'name' => array() will be used for set_post_thumbnail_size(), and will NOT (also) be used for the add_image_size() part of the process.\n\t *\n\t * The post_thumbnail is now more commonly known as the featured image. That is, it does not have to be a thumbnail in size. \n\t *\n\t * Ref: http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size\n\t */\n\t $arr_return['w1170o']['post_thumbnail'] = true;\n\t \n\t return $arr_return;\n\t}", "public function registerBootstrapImageSizes() {\n\t\tadd_image_size( 'col-12', 1170, 9999, false );\n\t\tadd_image_size( 'col-12-crop', 1170, 9999, true );\n\n\t\tadd_image_size( 'col-6', 585, 9999, false );\n\t\tadd_image_size( 'col-6-crop', 585, 9999, true );\n\n\t\tadd_image_size( 'col-4', 390, 9999, false );\n\t\tadd_image_size( 'col-4-crop', 390, 9999, true );\n\n\t\tadd_image_size( 'col-3', 292, 9999, false );\n\t\tadd_image_size( 'col-3-crop', 292, 9999, true );\n\t}", "function wp_create_image_subsizes($file, $attachment_id)\n {\n }", "function lambert_get_thumbnail_sizes(){\n if( false == lambert_get_option('enable_custom_sizes') ) return;\n $option_sizes = array(\n 'lambert-gallery-one' =>'galmasonry_thumbnail_size_one',\n 'lambert-gallery-second' =>'galmasonry_thumbnail_size_two',\n 'lambert-gallery-three' =>'galmasonry_thumbnail_size_three',\n\n 'lambert-thumb' =>'blog_image_thumb',\n 'lambert-large' =>'blog_image_large_thumb',\n 'member-thumb' =>'team_member_thumb',\n \n );\n\n foreach ($option_sizes as $name => $opt) {\n $option_size = lambert_get_option($opt);\n if($option_size !== false && is_array($option_size)){\n $size_val = array(\n 'width' => (isset($option_size['width']) && !empty($option_size['width']) )? (int)$option_size['width'] : (int)'9999',\n 'height' => (isset($option_size['height']) && !empty($option_size['height']) )? (int)$option_size['height'] : (int)'9999',\n 'hard_crop' => (isset($option_size['hard_crop']) && !empty($option_size['hard_crop']) )? (bool)$option_size['hard_crop'] : (bool)'0',\n );\n\n add_image_size( $name, $size_val['width'], $size_val['height'], $size_val['hard_crop'] );\n }\n }\n }", "function link_block_thumb()\n{\n add_image_size('link_block_thumb', 884, 540, true); // Hard crop to exact dimensions (crops sides or top and bottom)\n}", "function getImageSize() \n { \n return array($this->_width,$this->_height); \n }", "function ts_add_theme_image_size( $name, $width = 0, $height = 0, $crop = false ) {\r\n\tglobal $_theme_image_sizes;\r\n\t$_theme_image_sizes[$name] = array( 'width' => absint( $width ), 'height' => absint( $height ), 'crop' => (bool) $crop );\r\n}", "protected\n function setImageSizes()\n {\n return config('album.sizes');\n }", "function add_image_size($name, $width = 0, $height = 0, $crop = \\false)\n {\n }", "function calc_size()\n\t{\n\t\t\t$size = getimagesize(ROOT_PATH . $this->file);\n\t\t\t$this->width = $size[0];\n\t\t\t$this->height = $size[1];\n\t}", "private function updateImgThumbnail()\n {\n //====================================================================//\n // Load Object Images List\n foreach (Image::getImages(SLM::getDefaultLangId(), $this->ProductId) as $image) {\n $imageObj = new Image($image['id_image']);\n $imagePath = _PS_PROD_IMG_DIR_.$imageObj->getExistingImgPath();\n if (!file_exists($imagePath.'.jpg')) {\n continue;\n }\n foreach (ImageType::getImagesTypes(\"products\") as $imageType) {\n $imgThumb = _PS_PROD_IMG_DIR_.$imageObj->getExistingImgPath();\n $imgThumb .= '-'.Tools::stripslashes($imageType['name']).'.jpg';\n if (!file_exists($imgThumb)) {\n ImageManager::resize(\n $imagePath.'.jpg',\n $imgThumb,\n (int)($imageType['width']),\n (int)($imageType['height'])\n );\n }\n }\n }\n }", "function pendrell_image_default_size( $size ) {\n if ( PENDRELL_COLUMNS > 1 )\n return 'medium';\n return 'large';\n}", "function config_image_sizes($sizes) {\n\t\tadd_image_size('feature-image', 1400, 300, true);\n\t\t\n\t\t$myimgsizes = array(\n\t\t\t\"feature-image\" => __(\"Feature Image\")\n\t\t);\n\t\t$newimgsizes = array_merge($sizes, $myimgsizes);\n\t\t\n\t\treturn $newimgsizes;\n\t}", "public function image_sizes( $name = '' ) {\r\n\t\t// Add only to bulk smush settings.\r\n\t\tif ( 'bulk' !== $name ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Additional image sizes.\r\n\t\t$image_sizes = $this->settings->get_setting( WP_SMUSH_PREFIX . 'image_sizes', false );\r\n\t\t$sizes = WP_Smush::get_instance()->core()->image_dimensions();\r\n\r\n\t\t$all_selected = false === $image_sizes || count( $image_sizes ) === count( $sizes );\r\n\t\t?>\r\n\t\t<?php if ( ! empty( $sizes ) ) : ?>\r\n\t\t\t<div class=\"sui-side-tabs sui-tabs\">\r\n\t\t\t\t<div data-tabs=\"\">\r\n\t\t\t\t\t<label for=\"all-image-sizes\" class=\"sui-tab-item <?php echo $all_selected ? 'active' : ''; ?>\">\r\n\t\t\t\t\t\t<input type=\"radio\" name=\"wp-smush-auto-image-sizes\" value=\"all\" id=\"all-image-sizes\" <?php checked( $all_selected ); ?>>\r\n\t\t\t\t\t\t<?php esc_html_e( 'All', 'wp-smushit' ); ?>\r\n\t\t\t\t\t</label>\r\n\t\t\t\t\t<label for=\"custom-image-sizes\" class=\"sui-tab-item <?php echo $all_selected ? '' : 'active'; ?>\">\r\n\t\t\t\t\t\t<input type=\"radio\" name=\"wp-smush-auto-image-sizes\" value=\"custom\" id=\"custom-image-sizes\" <?php checked( $all_selected, false ); ?>>\r\n\t\t\t\t\t\t<?php esc_html_e( 'Custom', 'wp-smushit' ); ?>\r\n\t\t\t\t\t</label>\r\n\t\t\t\t</div><!-- end data-tabs -->\r\n\t\t\t\t<div data-panes>\r\n\t\t\t\t\t<div class=\"sui-tab-boxed <?php echo $all_selected ? 'active' : ''; ?>\" style=\"display:none\"></div>\r\n\t\t\t\t\t<div class=\"sui-tab-boxed <?php echo $all_selected ? '' : 'active'; ?>\">\r\n\t\t\t\t\t\t<span class=\"sui-label\"><?php esc_html_e( 'Included image sizes', 'wp-smushit' ); ?></span>\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\tforeach ( $sizes as $size_k => $size ) {\r\n\t\t\t\t\t\t\t// If image sizes array isn't set, mark all checked ( Default Values ).\r\n\t\t\t\t\t\t\tif ( false === $image_sizes ) {\r\n\t\t\t\t\t\t\t\t$checked = true;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// WPMDUDEV hosting support: cast $size_k to string to properly work with object cache.\r\n\t\t\t\t\t\t\t\t$checked = is_array( $image_sizes ) ? in_array( (string) $size_k, $image_sizes, true ) : false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t<label class=\"sui-checkbox sui-checkbox-stacked sui-checkbox-sm\">\r\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" <?php checked( $checked, true ); ?>\r\n\t\t\t\t\t\t\t\t\t\tid=\"wp-smush-size-<?php echo esc_attr( $size_k ); ?>\"\r\n\t\t\t\t\t\t\t\t\t\tname=\"wp-smush-image_sizes[]\"\r\n\t\t\t\t\t\t\t\t\t\tvalue=\"<?php echo esc_attr( $size_k ); ?>\">\r\n\t\t\t\t\t\t\t\t<span aria-hidden=\"true\">&nbsp;</span>\r\n\t\t\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t\t\t<?php if ( isset( $size['width'], $size['height'] ) ) : ?>\r\n\t\t\t\t\t\t\t\t\t\t<?php echo esc_html( $size_k . ' (' . $size['width'] . 'x' . $size['height'] . ') ' ); ?>\r\n\t\t\t\t\t\t\t\t\t<?php else : ?>\r\n\t\t\t\t\t\t\t\t\t\t<?php echo esc_attr( $size_k ); ?>\r\n\t\t\t\t\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t<?php endif; ?>\r\n\t\t<?php if ( has_filter( 'wp_image_editors', 'photon_subsizes_override_image_editors' ) ) : ?>\r\n\t\t\t<?php\r\n\t\t\t$text = sprintf( /* translators: %1$s - <a>, %2$s - </a> */\r\n\t\t\t\tesc_html__( \"We noticed Jetpack's %1\\$sSite Accelerator%2\\$s is active with the “Speed up image load times” option enabled. Since Site Accelerator completely offloads intermediate thumbnail sizes (they don't exist in your Media Library), Smush can't optimize those images.\", 'wp-smushit' ),\r\n\t\t\t\t'<a href=\"https://jetpack.com/support/site-accelerator/\" target=\"_blank\">',\r\n\t\t\t\t'</a>'\r\n\t\t\t);\r\n\r\n\t\t\tif ( WP_Smush::is_pro() ) {\r\n\t\t\t\t$text .= ' ' . sprintf( /* translators: %1$s - <a>, %2$s - </a> */\r\n\t\t\t\t\tesc_html__( 'You can still optimize your %1$sOriginal Images%2$s if you want to.', 'wp-smushit' ),\r\n\t\t\t\t\t'<a href=\"#wp-smush-original\">',\r\n\t\t\t\t\t'</a>'\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\t?>\r\n\t\t\t<div class=\"sui-notice sui-notice-warning\" style=\"margin-top: -20px\">\r\n\t\t\t\t<div class=\"sui-notice-content\">\r\n\t\t\t\t\t<div class=\"sui-notice-message\">\r\n\t\t\t\t\t\t<i class=\"sui-notice-icon sui-icon-info sui-md\" aria-hidden=\"true\"></i>\r\n\t\t\t\t\t\t<p><?php echo wp_kses_post( $text ); ?></p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t<?php endif; ?>\r\n\t\t<?php\r\n\t}", "public function set_thumb_sizes() {\n\n\t\t\t$thumbs = $this->get_config( 'thumbnails' );\n\t\t\tif ( isset( $thumbs['post-thumbnail'] ) ) {\n\t\t\t\tset_post_thumbnail_size(\n\t\t\t\t\t$thumbs['post-thumbnail']['width'],\n\t\t\t\t\t$thumbs['post-thumbnail']['height'],\n\t\t\t\t\t$thumbs['post-thumbnail']['crop']\n\t\t\t\t);\n\n\t\t\t\tunset( $thumbs['post-thumbnail'] );\n\t\t\t}\n\n\t\t\tif ( empty( $thumbs ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tforeach ( $thumbs as $name => $data ) {\n\t\t\t\tadd_image_size( $name, $data['width'], $data['height'], $data['crop'] );\n\t\t\t}\n\t\t}", "protected function retina() {\n\t\t$this->start_controls_section(\n\t\t\t'section_retina_image',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Retina Image', 'boostify' ),\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'retina_image',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Choose Default Image', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::MEDIA,\n\t\t\t\t'dynamic' => array(\n\t\t\t\t\t'active' => true,\n\t\t\t\t),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'url' => Utils::get_placeholder_image_src(),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'real_retina',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Choose Retina Image', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::MEDIA,\n\t\t\t\t'dynamic' => array(\n\t\t\t\t\t'active' => true,\n\t\t\t\t),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'url' => Utils::get_placeholder_image_src(),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Image_Size::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'retina_image',\n\t\t\t\t'label' => __( 'Image Size', 'boostify' ),\n\t\t\t\t'default' => 'medium',\n\t\t\t)\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'align',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Alignment', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::CHOOSE,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'left' => array(\n\t\t\t\t\t\t'title' => __( 'Left', 'boostify' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-left',\n\t\t\t\t\t),\n\t\t\t\t\t'center' => array(\n\t\t\t\t\t\t'title' => __( 'Center', 'boostify' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-center',\n\t\t\t\t\t),\n\t\t\t\t\t'right' => array(\n\t\t\t\t\t\t'title' => __( 'Right', 'boostify' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-right',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => 'center',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container, {{WRAPPER}} .boostify-caption-width' => 'text-align: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'caption',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Custom Caption', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'default' => '',\n\t\t\t\t'placeholder' => __( 'Enter your image caption', 'boostify' ),\n\t\t\t\t'label_block' => true,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'link',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Link', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::URL,\n\t\t\t\t'placeholder' => __( 'https://your-link.com', 'boostify' ),\n\t\t\t)\n\t\t);\n\t\t$this->end_controls_section();\n\t}", "public function differentSizesDataProvider() {}", "function wp_image_add_srcset_and_sizes($image, $image_meta, $attachment_id)\n {\n }", "function my_register_image_sizes() {\r\n\t// Add new image sizes\r\n\tadd_image_size('hero-full', 940, 460, true); // used for destination, library, home\r\n\tadd_image_size('hero-medium', 620, 300, true); // used for region\r\n\tadd_image_size('hero-review', 620, 413, true); // used for reviews - ie, hotel, restaurant, etc\r\n\tadd_image_size('thumb-large', 300, 200, true); // used for destination landing page, home page, special offer page\r\n\tadd_image_size('thumb-feature', 450, 375, true); // used for featured destination partners\r\n\tadd_image_size('thumb-medium', 220, 146, true); // used for related items, and listing pages for hotel, restaurant\r\n\tadd_image_size('thumb-small', 140, 95, true); // used for recent items\r\n}", "public function setOriginalImageWidthHeight() {\n \n $checkError = $this->isError();\n if (!$checkError) {\n \n /*\n * get original width and height\n */\n $this->__originalImageWidth = imagesx($this->__image);\n $this->__originalImageHeight = imagesy($this->__image);\n \n }\n \n }", "function shop_uc_product_image($variables) {\n static $rel_count = 0;\n $images = $variables['images'];\n\n // Get the current product image widget.\n $image_widget = uc_product_get_image_widget();\n\n $first = array_shift($images);\n\n //$output = '<div class=\"product-image\"><div class=\"main-product-image\">'; // Sudhakar\n $output = '<div class=\"product_img_big\">';\n $output .= '<a href=\"' . image_style_url('uc_product_full', $first['uri']) . '\" title=\"' . $first['title'] . '\"';\n if ($image_widget) {\n $image_widget_func = $image_widget['callback'];\n $output .= $image_widget_func($rel_count);\n } \n $output .= '>';\n $output .= theme('image_style', array(\n 'style_name' => 'uc_product',\n 'path' => $first['uri'],\n 'alt' => $first['alt'],\n 'title' => $first['title'],\n\t'width' => 100, // Sudhakar\n\t'height' => 92, // Sudhakar\n ));\n // $output .= '</a></div>'; // Sudhakar\n $output .= '</a>';\n\n if (!empty($images)) {\n $output .= '<div class=\"more-product-images\">';\n foreach ($images as $thumbnail) {\n // Node preview adds extra values to $images that aren't files.\n if (!is_array($thumbnail) || empty($thumbnail['uri'])) {\n continue;\n }\n $output .= '<a href=\"' . image_style_url('uc_product_full', $thumbnail['uri']) . '\" title=\"' . $thumbnail['title'] . '\"';\n if ($image_widget) {\n $output .= $image_widget_func($rel_count);\n }\n $output .= '>';\n $output .= theme('image_style', array(\n 'style_name' => 'uc_thumbnail',\n 'path' => $thumbnail['uri'],\n 'alt' => $thumbnail['alt'],\n 'title' => $thumbnail['title'],\n ));\n $output .= '</a>';\n }\n $output .= '</div>';\n }\n\n $output .= '</div>';\n $rel_count++;\n\n return $output;\n}", "private function updateImgThumbnail(): void\n {\n //====================================================================//\n // Load Object Images List\n $allImages = Image::getImages(\n SLM::getDefaultLangId(),\n $this->ProductId,\n null,\n Shop::getContextShopID(true)\n );\n //====================================================================//\n // Walk on Object Images List\n foreach ($allImages as $image) {\n $imageObj = new Image($image['id_image']);\n $imagePath = _PS_PROD_IMG_DIR_.$imageObj->getExistingImgPath();\n if (!file_exists($imagePath.'.jpg')) {\n continue;\n }\n foreach (ImageType::getImagesTypes(\"products\") as $imageType) {\n $imgThumb = _PS_PROD_IMG_DIR_.$imageObj->getExistingImgPath();\n $imgThumb .= '-'.Tools::stripslashes($imageType['name']).'.jpg';\n if (!file_exists($imgThumb)) {\n ImageManager::resize(\n $imagePath.'.jpg',\n $imgThumb,\n (int)($imageType['width']),\n (int)($imageType['height'])\n );\n }\n }\n }\n }", "function thememount_imag_sizes(){\n\t\n\tglobal $howes;\n\t\n\t$img_array = array(\n\t\t'portfolio-two-column',\n\t\t'portfolio-three-column',\n\t\t'portfolio-four-column',\n\t\t'blog-two-column',\n\t\t'blog-three-column',\n\t\t'blog-four-column',\n\t\t'blog-single',\n\t\t/*'woocommerce-catalog',\n\t\t'woocommerce-single',\n\t\t'woocommerce-thumbnail'*/\n\t);\n\tforeach($img_array as $imgsize){\n\t\t$size = array( 'width' => 1110, 'height' => 624, 'crop' => true );\n\t\t\n\t\tif( $imgsize == 'portfolio-two-column' || $imgsize == 'blog-two-column' ){ // Portfolio - Two Column\n\t\t\t$size = array( 'width' => 1110, 'height' => 624, 'crop' => true );\n\t\t\n\t\t} else if( $imgsize == 'portfolio-three-column' || $imgsize == 'blog-three-column' ){ // Portfolio - Three Column\n\t\t\t$size = array( 'width' => 720, 'height' => 406, 'crop' => true );\n\t\t\t\n\t\t} else if( $imgsize == 'portfolio-four-column' || $imgsize == 'blog-four-column' ){ // Portfolio - Four Column\n\t\t\t$size = array( 'width' => 750, 'height' => 422, 'crop' => true );\n\t\t\t\n\t\t} else if( $imgsize == 'blog-single' ){ // Blog Single Post Imgae\n\t\t\t$size = array( 'width' => 727, 'height' => 409, 'crop' => true );\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Getting redux value\n\t\tif( isset($howes['img-'.$imgsize]) && is_array($howes['img-'.$imgsize]) ){\n\t\t\t$size = $howes['img-'.$imgsize];\n\t\t}\n\t\t\n\t\t// Convrting to Boolean\n\t\tif( $size['crop']=='no' ){\n\t\t\t$size['crop'] = false;\n\t\t} else {\n\t\t\t$size['crop'] = true;\n\t\t}\n\t\t\n\t\tif( $imgsize == 'blog-single' ){\n\t\t\tset_post_thumbnail_size( $size['width'], $size['height'], $size['crop'] );\n\t\t} else {\n\t\t\tadd_image_size( $imgsize, $size['width'], $size['height'], $size['crop'] );\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}\n\t\n\t\n\t/*add_image_size( 'portfolio-two-column', 1110, 624, true );\n\tadd_image_size( 'portfolio-three-column', 720, 406, true );\n\tadd_image_size( 'portfolio-four-column', 750, 422, true );\n\tadd_image_size( 'woocommerce-catalog', 520, 520, true );\n\tadd_image_size( 'woocommerce-single', 800, 800, true );\n\tadd_image_size( 'woocommerce-thumbnail', 120, 120, true );*/\n\t\n}", "function moustachedesign_theme_setup() {\n\n add_theme_support( 'post-thumbnails' );\n\n add_image_size( 'small', 600, 600, false );\n add_image_size( 'medium', 1024, 1024, false );\n add_image_size( 'large', 1920, 1920, false );\n add_image_size( 'ultra', 2048, 2048, false );\n add_image_size( '4k', 4096, 4096, false );\n\n}", "public function size()\n { \n $props = $this->uri->ruri_to_assoc();\n\n if (!isset($props['o'])) exit(0);\n $w = -1;\n $h = -1;\n $m = 0;\n if (isset($props['w'])) $w = $props['w'];\n if (isset($props['h'])) $h = $props['h'];\n if (isset($props['m'])) $m = $props['m'];\n\n $this->img->set_img($props['o']);\n $this->img->set_size($w, $h, $m);\n $this->img->set_square($m);\n $this->img->get_img();\n }", "function liquidchurch_post_thumbnail_sizes_attr( $attr, $attachment, $size ) {\n\tif ( 'post-thumbnail' === $size ) {\n\t\tis_active_sidebar( 'sidebar-1' ) && $attr['sizes'] = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 60vw, (max-width: 1362px) 62vw, 840px';\n\t\t! is_active_sidebar( 'sidebar-1' ) && $attr['sizes'] = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 88vw, 1200px';\n\t}\n\treturn $attr;\n}", "function image_sizes(){\n //add folder name\n $img_sizes = array();\n $img_sizes['thumbnail'] = array('width'=>150, 'height'=>150, 'folder'=>'/thumb');\n $img_sizes['medium'] = array('width'=>600, 'height'=>600, 'folder'=>'/medium');\n return $img_sizes;\n }", "protected function group_image_sizes() \n\t\t{\n\t\t\t$widths = array();\n\t\t\t$all = $this->base_images;\n\t\t\t\n\t\t\tforeach( $all as $sizes ) \n\t\t\t{\n\t\t\t\tif( ! in_array( $sizes['width'], $widths ) )\n\t\t\t\t{\n\t\t\t\t\t$widths[] = $sizes['width'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tsort( $widths );\n\t\t\t\n\t\t\t$groups = array();\n\t\t\t\n\t\t\twhile( count( $widths ) > 0 )\n\t\t\t{\n\t\t\t\t$current_width = array_shift( $widths );\n\t\t\t\t\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\t$found = false;\n\t\t\t\t\t$height_key = '';\n\t\t\t\t\t\n\t\t\t\t\tforeach( $all as $name => $sizes ) \n\t\t\t\t\t{\n\t\t\t\t\t\tif( $sizes['width'] == $current_width )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$height_key = $sizes['height'];\n\t\t\t\t\t\t\t$group_key = $current_width . '*' . $height_key;\n\t\t\t\t\t\t\t$groups[ $group_key ][ $name ] = $sizes;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tunset( $all[ $name ] );\n\t\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif( ! $found )\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t * Check remaining for same aspect ratio\n\t\t\t\t\t */\n\t\t\t\t\tforeach( $all as $name => $sizes ) \n\t\t\t\t\t{\n\t\t\t\t\t\tif( wp_image_matches_ratio( $current_width, $height_key, $sizes['width'], $sizes['height'] ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$groups[ $group_key ][ $name ] = $sizes;\n\t\t\t\t\t\t\tunset( $all[ $name ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t} while ( $found );\n\t\t\t}\n\t\t\t\n\t\t\t$this->size_groups = array();\n\t\t\t\n\t\t\tforeach( $groups as $group => $images ) \n\t\t\t{\n\t\t\t\t$widths = array();\n\t\t\t\t\n\t\t\t\tforeach( $images as $image ) \n\t\t\t\t{\n\t\t\t\t\tif( ! in_array( $image['width'], $widths ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$widths[] = $image['width'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsort( $widths );\n\t\t\t\t\n\t\t\t\twhile( count( $widths ) > 0 )\n\t\t\t\t{\n\t\t\t\t\t$current_width = array_shift( $widths );\n\t\t\t\t\t\n\t\t\t\t\tforeach( $images as $name => $sizes ) \n\t\t\t\t\t{\n\t\t\t\t\t\tif( $sizes['width'] == $current_width )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->size_groups[ $group ][ $name ] = $sizes;\n\t\t\t\t\t\t\tunset( $images[ $name ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}", "function wp_calculate_image_sizes($size, $image_src = \\null, $image_meta = \\null, $attachment_id = 0)\n {\n }", "function wp_img_tag_add_width_and_height_attr($image, $context, $attachment_id)\n {\n }", "public function opengraph_image_size() {\n return 'image--huge';\n }", "function do_scaled() {\n $this->layout = FALSE;\n\n $status = $this->show_scaled_image(IMAGE_RESOLUTION, 'photos');\n if (TRUE !== $status) {\n $this->message($status);\n $this->redirect('/photo/index');\n }\n }", "function add_image_sizes()\n{\n if ( function_exists( 'add_image_size' ) ) { \n add_theme_support( 'post-thumbnails' ); // This feature enables post-thumbnail support for a theme\n add_image_size( 'blog_image', 1280, 855.04, true);\n add_image_size( 'slider_front_page', 1024, 600, true);\n }\n}", "public function resizeImage($filepath) {\n if (is_file($filepath)) {\n \n $dir_name = $this->destinationDirectory;\n\n $drawable_dpi = array();\n $drawable_dpi['drawable-ldpi'] = 0.1875;\n $drawable_dpi['drawable-mdpi'] = 0.25;\n $drawable_dpi['drawable-hdpi'] = 0.375;\n $drawable_dpi['drawable-xhdpi'] = 0.5;\n $drawable_dpi['drawable-xxhdpi'] = 0.75;\n $drawable_dpi['drawable-xxxhdpi'] = 1.0;\n\n $mipmap_dpi = array();\n $mipmap_dpi['mipmap-ldpi'] = 0.1875;\n $mipmap_dpi['mipmap-mdpi'] = 0.25;\n $mipmap_dpi['mipmap-hdpi'] = 0.375;\n $mipmap_dpi['mipmap-xhdpi'] = 0.5;\n $mipmap_dpi['mipmap-xxhdpi'] = 0.75;\n $mipmap_dpi['mipmap-xxxhdpi'] = 1.0;\n\n $selected_dpi = array();\n if($this->folderCode == 0) {\n $selected_dpi = $drawable_dpi; \n }\n if($this->folderCode == 1) {\n $selected_dpi = $mipmap_dpi; \n }\n if($this->folderCode == 2) {\n $selected_dpi = array_merge($drawable_dpi, $mipmap_dpi); \n }\n\n\n // Content type\n $image_ext = \"png\";\n header('\"Content-Type: image/\"'.$image_ext);\n\n // Get new sizes\n $dir_path = $this->dirHelper($dir_name);\n $imageFileName = $this->extract_file_name($filepath);\n $final_dir_path = $dir_path.\"res/\"; \n if (!is_dir($final_dir_path)) {\n mkdir($final_dir_path);\n }\n foreach ($selected_dpi as $key => $value) {\n if (!is_dir($final_dir_path.$key)) {\n mkdir($final_dir_path.$key);\n }\n list($width, $height) = getimagesize($filepath);\n $newwidth = $width * $value;\n $newheight = $height * $value;\n\n // Load\n $thumb = imagecreatetruecolor($newwidth, $newheight);\n $source = imagecreatefrompng($filepath);\n\n // Resize\n imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);\n imagepng($thumb, $final_dir_path.$key.\"/\".$imageFileName);\n }\n echo \"<h1>$filepath has been resized into different sizes</h1>\";\n }\n elseif(!file_exists($filepath)) {\n echo \"<h1>Invalid File path</h1>\";\n }\n else {\n echo \"<h1>This is not a file</h1>\";\n }\n\n }", "public function getThumbnailWidthAlbumItemImageEdit()\n {\n return $this->thumbnailWidthAlbumItemImageEdit;\n }", "function default_image_options() {\n update_option('image_default_align', 'center' );\n update_option('image_default_size', 'medium' );\n}", "function set_sizes($mw, $mh, $img_c = 1){\r\n\r\n $this->max_width = $mw;\r\n $this->max_height = $mh;\r\n $this->is_crop_img = $img_c;\r\n }", "function themify_make_image_size( $attachment_id, $width, $height, $meta, $img_url ) {\r\n\t\tsetlocale( LC_CTYPE, get_locale() . '.UTF-8' );\r\n\t\t$attached_file = get_attached_file( $attachment_id );\r\n\r\n\t\t$source_size = apply_filters( 'themify_image_script_source_size', 'large' );\r\n\t\tif ( $source_size !== 'full' && isset( $meta['sizes'][ $source_size ]['file'] ) )\r\n\t\t\t$attached_file = str_replace( $meta['file'], trailingslashit( dirname( $meta['file'] ) ) . $meta['sizes'][ $source_size ]['file'], $attached_file );\r\n\r\n\t\t$resized = image_make_intermediate_size( $attached_file, $width, $height, true );\r\n\t\tif ( $resized && ! is_wp_error( $resized ) ) {\r\n\r\n\t\t\t// Save the new size in meta data\r\n\t\t\t$key = sprintf( 'resized-%dx%d', $width, $height );\r\n\t\t\t$meta['sizes'][$key] = $resized;\r\n\t\t\t$img_url = str_replace( basename( $img_url ), $resized['file'], $img_url );\r\n\r\n\t\t\twp_update_attachment_metadata( $attachment_id, $meta );\r\n\r\n\t\t\t// Save size in backup sizes so it's deleted when original attachment is deleted.\r\n\t\t\t$backup_sizes = get_post_meta( $attachment_id, '_wp_attachment_backup_sizes', true );\r\n\t\t\tif ( ! is_array( $backup_sizes ) ) $backup_sizes = array();\r\n\t\t\t$backup_sizes[$key] = $resized;\r\n\t\t\tupdate_post_meta( $attachment_id, '_wp_attachment_backup_sizes', $backup_sizes );\r\n\r\n\t\t\t// Return resized image url, width and height.\r\n\t\t\treturn array(\r\n\t\t\t\t'url' => esc_url( $img_url ),\r\n\t\t\t\t'width' => $width,\r\n\t\t\t\t'height' => $height,\r\n\t\t\t);\r\n\t\t}\r\n\t\t// Return original image url, width and height.\r\n\t\treturn array(\r\n\t\t\t'url' => $img_url,\r\n\t\t\t'width' => $width,\r\n\t\t\t'height' => $height,\r\n\t\t);\r\n\t}", "function smbr_custom_image_sizes() {\n\tadd_theme_support( 'post-thumbnails' );\n\tadd_image_size( 'smbr_100', 100, 100 ); // 100 pixels wide used for fresh posts;\n\tadd_image_size( 'smbr_240', 240, 155 ); // 240 pixels wide\n\tadd_image_size( 'smbr_455', 455, 300 ); // 455 pixels wide \n\tadd_image_size( 'smbr_storyline', 475, 356, true ); // 475 pixels wide (and 356 height, crop the images)\n\tadd_image_size( 'smbr_700', 700, 9999 ); // 700 pixels wide (and unlimited height)\n\tadd_image_size( 'smbr_925', 925, 9999 ); // 925 pixels wide (and unlimited height)\n\tadd_image_size( 'smbr_1000', 1000, 9999 ); // 925 pixels wide (and unlimited height) this is full width as of 13 Feb 2014\n\tadd_image_size( 'smbr_236', 236, 132, true );\n\tadd_image_size( 'smbr_630', 630, 550, true ); // 630 mobile banner\n\tadd_image_size( 'smbr_300', 300, 170, true ); // Head posts\n\tadd_image_size( 'smbr_newsletter_main', 378, 260, true ); // Head posts\n\tadd_image_size( 'smbr_newsletter_thumb', 141, 96, true ); // Head posts\n\t//Based on Image optimization request\n\tadd_image_size( 'smbr_660', 660, 495, true ); // 660 pixels wide \n\tadd_image_size( 'smbr_323', 323, 243, true ); // 323 pixels wide \n\tadd_image_size( 'smbr_310', 310, 232, true ); // 310 pixels wide \n\tadd_image_size( 'smbr_206', 206, 155, true ); // 206 pixels wide \n\tadd_image_size( 'smbr_152', 152, 114, true ); // 152 pixels wide \n\tadd_image_size( 'smbr_140', 140, 105, true ); // 140 pixels wide \n}", "private function _setMapSize()\n {\n $this->map_obj->setSize($this->image_size[0], $this->image_size[1]);\n if ($this->_isResize()) {\n $this->map_obj->setSize($this->_download_factor*$this->image_size[0], $this->_download_factor*$this->image_size[1]);\n }\n }", "protected function extractSvgImageSizes() {}", "private function setup_theme() {\n\n\t\tforeach( $this->get_image_sizes() as $image_size => $values ) {\n\t\t\tadd_image_size( $image_size, $values[0], $values[1] );\n\t\t}\n\n\t}", "private function register_logo_image_size() {\n\t\t\\add_image_size( $this->image_size_name, 60, 60, false );\n\t}", "function set_post_thumbnail_size($width = 0, $height = 0, $crop = \\false)\n {\n }", "public function testThemeImageWithSizes() {\n // Test with multipliers.\n $sizes = '(max-width: ' . rand(10, 30) . 'em) 100vw, (max-width: ' . rand(30, 50) . 'em) 50vw, 30vw';\n $image = [\n '#theme' => 'image',\n '#sizes' => $sizes,\n '#uri' => reset($this->testImages),\n '#width' => rand(0, 1000) . 'px',\n '#height' => rand(0, 500) . 'px',\n '#alt' => $this->randomMachineName(),\n '#title' => $this->randomMachineName(),\n ];\n $this->render($image);\n\n // Make sure sizes is set.\n $this->assertRaw($sizes, 'Sizes is set correctly.');\n }", "function getThumbResizeSize () {\n if ($this->thumbToolkit == null) {\n return '';\n return imagetoolkit::getImageDimensions($this->getAsThumb ());\n }\n return sprintf ('width=\"%s\" height=\"%s\"',\n\t\t\t\t $this->thumbToolkit->getImageDestWidth(),\n\t\t\t\t $this->thumbToolkit->getImageDestHeight());\n }", "public function _override_image_downsize_in_rest_edit_context() {\n\t\treturn true;\n\t}" ]
[ "0.72241586", "0.72085947", "0.71654737", "0.7053895", "0.70389926", "0.7023754", "0.6955483", "0.69494057", "0.69162506", "0.6912746", "0.6868146", "0.6838917", "0.68373936", "0.67575914", "0.6756643", "0.67295784", "0.66742134", "0.66678786", "0.6629777", "0.662493", "0.662386", "0.6620984", "0.66190165", "0.6577482", "0.64689314", "0.6465341", "0.64379483", "0.64200276", "0.6412132", "0.6409901", "0.6406433", "0.6396544", "0.63913727", "0.6375641", "0.63500214", "0.6343684", "0.62802905", "0.6270887", "0.62522846", "0.62487763", "0.62473625", "0.62400234", "0.62259364", "0.6224197", "0.6199826", "0.6180522", "0.6146248", "0.61461043", "0.61376673", "0.61209065", "0.60702187", "0.60314935", "0.60313433", "0.60198754", "0.60106343", "0.60019606", "0.5994283", "0.5979412", "0.59668964", "0.5944712", "0.5942197", "0.5929213", "0.59291726", "0.5928917", "0.58928835", "0.58831865", "0.58757055", "0.58608776", "0.5858359", "0.584413", "0.58302665", "0.5827457", "0.5817311", "0.58119494", "0.5810583", "0.5799658", "0.57975847", "0.5793814", "0.57921237", "0.57869047", "0.5782274", "0.57816434", "0.57706857", "0.5763976", "0.5761586", "0.5758066", "0.5757197", "0.5745881", "0.5743271", "0.5739681", "0.5738018", "0.5736943", "0.57249653", "0.57192105", "0.5709181", "0.5708437", "0.568491", "0.56838346", "0.5672595", "0.56703895" ]
0.62066513
44
Correct thumbnail name for the multiwidget images
public function posts_widget_thumbnail_name($img_size, $args) { if(strpos($args['id'], 'footer-sidebar') !== false) return 'posts-widget-thumb-small'; return 'posts-widget-thumb'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_thumb_name(){\n\t\treturn \"{$this->id}_thumb.png\";\n\t}", "function getName() \t\t { return 'NP_ImageCreateThumbnail'; }", "function makeThumbnailName($image)\n{\n $i = strrpos($image, '.');\n $image_name = substr($image, 0, $i);\n $ext = substr($image, $i);\n $image = $image_name . '-tn' . $ext;\n return $image;\n}", "function makeThumbnailName($image) {\r\n $i = strrpos($image, '.');\r\n $image_name = substr($image, 0, $i);\r\n $ext = substr($image, $i);\r\n $image = $image_name . '-tn' . $ext;\r\n return $image;\r\n }", "protected function imageName() {}", "private function generateThumbnailImagick(){\n\t}", "public function img_thumb($image_name)\n {\n //The Way It work Is only for thumb make\n return substr_replace($image_name, \"_thumb\", stripos($image_name, '.'), 0);\n }", "public function gen_thumbnail()\n {\n }", "public function gen_thumbnail()\n {\n }", "public function getSliderImageNameAttribute(){\n $photo_src=explode('.',$this->attributes['name']);\n if(count($photo_src)>1)\n {\n $photo_details = pathinfo($this->attributes['name']); \n $name = @$photo_details['filename'].'_1440x960.'.@$photo_details['extension'];\n return url('/').'/images/multiple_rooms/'.$this->attributes['multiple_room_id'].'/'.$name;\n }\n else\n {\n $options['secure']=TRUE;\n $options['width']=1440;\n $options['height']=960;\n $options['crop']='fill';\n return $src=\\Cloudder::show($this->attributes['name'],$options);\n }\n }", "public function get_name() {\n\t\treturn 'single-product-images';\n\t}", "function add_custom_thumbnail_sizes() {\n\tadd_image_size('ra-sm-thumbnail-size', 100, 100, array( 'center', 'center' ) );\t// w, h\n\tadd_image_size('ra-med-thumbnail-size', 186, 150, array( 'center', 'center' ) );\n}", "function getThumbnailName($file){\n $parts = explode('.',$file);\n $ext = array_pop($parts);\n //return implode('.',$parts).'_thumb.'.$ext;\n return 'thumb_'.$file;\n }", "function get_thumbnail($image_name)\n{\n $pieces=explode('.',$image_name);\n\n return $pieces[0].'_thumb.'.$pieces[1];\n}", "public function get_preview_name(){\n\t\treturn \"{$this->id}_preview.png\";\n\t}", "private function generateThumbnailGD(){\n\t\t\n\t}", "private function getThumbnailFileName($image)\n {\n return sprintf(\n \"%s_thumb.png\",\n basename($image, '.png')\n );\n }", "private function thumb()\n {\n $preview = array('png', 'jpg', 'gif', 'bmp');\n\n $publicBaseUrl = 'packages/spescina/mediabrowser/src/img/icons/';\n\n if ($this->folder)\n {\n if ($this->back)\n {\n $icon = 'back';\n }\n else\n {\n $icon = 'folder';\n }\n\n $url = $publicBaseUrl . $icon . '.png';\n }\n else\n {\n if (in_array($this->extension, $preview))\n {\n $url = $this->path;\n }\n else\n {\n $url = $publicBaseUrl . $this->extension . '.png';\n }\n }\n\n return $url;\n }", "function jacqueline_templates_theme_setup() {\n\t\tadd_filter( 'image_size_names_choose', 'jacqueline_show_thumb_sizes');\n\t}", "public function add_image_sizes() {\n add_image_size( 'label_thumbnail', 100, 100, true );\n }", "function fanwood_register_image_sizes() {\n\tadd_image_size( 'fanwood-thumbnail', 240, 240, true );\n}", "private function getThumbName() {\n $thumbName = $this->randomize();\n while (file_exists($this->thumbPath.$thumbName)) {\n $thumbName = $this->randomize($thumbName);\n }\n return $thumbName;\n }", "private function getThumbFilename() {\n\t\t$info = pathInfo( $this->filename );\n\n\t\t// add dirname as postfix (if exists)\n\t\t$postfix = '';\n\n\t\t$dirname = UniteFunctionsRev::getVal( $info, 'dirname' );\n\t\tif ( ! empty( $dirname ) ) {\n\t\t\t$postfix = str_replace( '/', '-', $dirname );\n\t\t}\n\n\t\t$ext = $info['extension'];\n\t\t$name = $info['filename'];\n\t\t$width = ceil( $this->maxWidth );\n\t\t$height = ceil( $this->maxHeight );\n\t\t$thumbFilename = $name . '_' . $width . 'x' . $height;\n\n\t\tif ( ! empty( $this->type ) ) {\n\t\t\t$thumbFilename .= '_' . $this->type; }\n\n\t\tif ( ! empty( $this->effect ) ) {\n\t\t\t$thumbFilename .= '_e' . $this->effect;\n\t\t\tif ( ! empty( $this->effect_arg1 ) ) {\n\t\t\t\t$thumbFilename .= 'x' . $this->effect_arg1;\n\t\t\t}\n\t\t}\n\n\t\t// add postfix\n\t\tif ( ! empty( $postfix ) ) {\n\t\t\t$thumbFilename .= '_' . $postfix; }\n\n\t\t$thumbFilename .= '.' . $ext;\n\n\t\treturn($thumbFilename);\n\t}", "function default_thumbnail($url)\n{\n\tif($url == 'url' ){\n\t\treturn \"holder.js/300x300\";\n\t} else {\n\t\treturn \"<img data-src='holder.js/300x300' />\";\n\t}\n}", "function is_default_thumb($i)\r\n{\r\n if(getname($i)=='processing.jpg')\r\n return true;\r\n else\r\n return false;\r\n}", "function video_cck_tudou_thumbnail($field, $item, $formatter, $node, $width, $height) {\n}", "abstract public function get_custom_thumbnail( $size = 'thumb' );", "static function thumbnail($filename , $disk='local'){\n return pathinfo( $filename , PATHINFO_FILENAME ) . '.jpg';\n\n }", "public function get_thumbnail()\n {\n }", "protected function imageName() {\n\n\t\treturn NULL;\n\t}", "public function getThumbFilename() {\n if ($this->has_thumb) {\n $path_info = pathinfo($this->thumb_file_name);\n\n return $path_info['filename'];\n }\n\n return 'default';\n }", "function mob_images() {\n\tupdate_option( 'thumbnail_size_w', 360 );\n\tupdate_option( 'thumbnail_size_h', 220 );\n\tupdate_option( 'thumbnail_crop', 1 );\n\n\tupdate_option( 'medium_size_w', 654 );\n\tupdate_option( 'medium_size_h', 9999 );\n\tupdate_option( 'medium_crop', 0 );\n\n\tupdate_option( 'medium_large_size_w', 0 );\n\tupdate_option( 'medium_large_size_h', 0 );\n\n\tupdate_option( 'large_size_w', 850 );\n\tupdate_option( 'large_size_h', 400 );\n\tupdate_option( 'large_crop', 1 );\n\n\tadd_image_size( 'archive-blog', 360, 170, true );\t\n}", "function generate_image_sizes() {\n\t$display_options = get_customizer_settings()[ WPM_PREFIX . 'collection_style' ];\n\n\tadd_image_size(\n\t\tWPM_PREFIX . 'list_thumb',\n\t\t$display_options['list_image_max_width'],\n\t\t$display_options['list_image_max_height']\n\t);\n}", "public function getDefaultThumbnail();", "private function generateThumbnailCmd(){\n\t}", "private function updateImgThumbnail()\n {\n //====================================================================//\n // Load Object Images List\n foreach (Image::getImages(SLM::getDefaultLangId(), $this->ProductId) as $image) {\n $imageObj = new Image($image['id_image']);\n $imagePath = _PS_PROD_IMG_DIR_.$imageObj->getExistingImgPath();\n if (!file_exists($imagePath.'.jpg')) {\n continue;\n }\n foreach (ImageType::getImagesTypes(\"products\") as $imageType) {\n $imgThumb = _PS_PROD_IMG_DIR_.$imageObj->getExistingImgPath();\n $imgThumb .= '-'.Tools::stripslashes($imageType['name']).'.jpg';\n if (!file_exists($imgThumb)) {\n ImageManager::resize(\n $imagePath.'.jpg',\n $imgThumb,\n (int)($imageType['width']),\n (int)($imageType['height'])\n );\n }\n }\n }\n }", "function thumbnail($image , $type)\n{\n $ext = pathinfo($image, PATHINFO_EXTENSION);\n // We remove extension from file name so we can append thumbnail type\n $num = strlen($ext)*(-1)-1;\n $name = substr($image, 0, $num);\n // We merge original name + type + extension\n return $name . '-' . $type . '.' . $ext;\n}", "function the_post_thumbnail($size = 'post-thumbnail', $attr = '')\n {\n }", "public function getImageName();", "function wpimprov_vantage_child_locale() {\n load_child_theme_textdomain( 'vantage', get_stylesheet_directory() . '/languages' );\n remove_image_size('post-thumbnail');\n remove_image_size('vantage-thumbnail');\n remove_image_size('vantage-thumbnail-no-sidebar');\n set_post_thumbnail_size(800,600,false);\n\n add_image_size('vantage-thumbnail', 800,600, false);\n add_image_size('vantage-thumbnail-no-sidebar', 1080,500, false);\n\n\t\n add_image_size('post-thumbnail', 800,600, false);\n\n}", "public function getThumbnailUrl();", "function newsdot_post_thumbnail() {\n\t\tif ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( is_singular() ) :\n\t\t\t?>\n\n\t\t\t<div class=\"post-thumbnail mb-4\">\n\t\t\t\t<figure>\n\t\t\t\t\t<?php\n\t\t\t\t\tthe_post_thumbnail();\n\t\t\t\t\tif ( get_the_post_thumbnail_caption() ) {\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<figcaption><?php the_post_thumbnail_caption(); ?></figcaption>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</figure>\n\t\t\t</div><!-- .post-thumbnail -->\n\n\t\t<?php else : ?>\n\n\t\t\t<a class=\"post-thumbnail\" href=\"<?php the_permalink(); ?>\" aria-hidden=\"true\" tabindex=\"-1\">\n\t\t\t\t<?php\n\t\t\t\t\tthe_post_thumbnail(\n\t\t\t\t\t\t'newsdot-wide-image',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'alt' => the_title_attribute(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'echo' => false,\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</a>\n\n\t\t\t<?php\n\t\tendif; // End is_singular().\n\t}", "public function thumbnailPath() {\n return $this->baseDir() . '/tn-' . $this->fileName();\n }", "public function getThumbnail() {\n return Mage::helper('landingpage/image')->getImageUrl($this->getData('thumbnail'));\n }", "public function get_name() {\n\t\treturn 'listeo-imagebox';\n\t}", "function get_thumb_name($fichier) {\n\t\t$name = explode('.',$fichier);\n\t\treturn $name[0].'_th.'.$name[1];\n\t}", "public function resolveThumbnailUrl();", "function st_images_thumb($image_data, $size ='st_medium', $custom_title=''){\r\r if(empty($size) || $size==''){\r $size = 'st_medium';\r }\r $html ='';\r $title = esc_attr ( get_the_title($post_id) );\r $link = get_permalink($post_id);\r if(count($image_data['images'])){\r $first_img = '';\r $list_img = array();\r $gallery_id = 'gl'.uniqid();\r\r $i = 0;\r $img_0 = '';\r foreach($image_data['images'] as $k=> $thumb_id){\r\r if($i==0){\r $thumb_image_url_0 = wp_get_attachment_image_src($thumb_id,$size);\r $img_0= $thumb_image_url_0[0];\r }\r\r // for light box\r $thumb_image_url = wp_get_attachment_image_src($thumb_id,'full');\r $list_img[$k]['src'] = $thumb_image_url[0];\r\r $i++;\r }\r\r $html = '';\r if($list_img){\r $html ='<img src=\"'.$img_0.'\" alt=\"\">\r <div class=\"thumb-control-wrapper\">\r <ul class=\"thumb-control clearfix\">\r <li><a rel=\"prettyPhoto['.$gallery_id.']\" title=\"'.$title.'\" href=\"'.$list_img[0]['src'].'\" class=\"go-gallery\">'.__('Open Gallery','smooththemes') .'</a></li>\r ';\r\r unset($list_img[0]);\r if(count($list_img)){\r $html .='<div style=\"display:none\">';\r foreach($list_img as $img){\r $html .='<a rel=\"prettyPhoto['.$gallery_id.']\" title=\"'.$title.'\" href=\"'.$img['src'].'\"></a>';\r }\r $html .='</div>';\r }\r\r $html .= '</ul>\r </div>';\r }\r\r\r }\r\r\r\r return apply_filters('st_images_thumb',$html,$image_data, $size ='st_medium');\r}", "public function getThumbnail() {\r return $this->Image()->CMSThumbnail();\r }", "function shop_uc_product_image($variables) {\n static $rel_count = 0;\n $images = $variables['images'];\n\n // Get the current product image widget.\n $image_widget = uc_product_get_image_widget();\n\n $first = array_shift($images);\n\n //$output = '<div class=\"product-image\"><div class=\"main-product-image\">'; // Sudhakar\n $output = '<div class=\"product_img_big\">';\n $output .= '<a href=\"' . image_style_url('uc_product_full', $first['uri']) . '\" title=\"' . $first['title'] . '\"';\n if ($image_widget) {\n $image_widget_func = $image_widget['callback'];\n $output .= $image_widget_func($rel_count);\n } \n $output .= '>';\n $output .= theme('image_style', array(\n 'style_name' => 'uc_product',\n 'path' => $first['uri'],\n 'alt' => $first['alt'],\n 'title' => $first['title'],\n\t'width' => 100, // Sudhakar\n\t'height' => 92, // Sudhakar\n ));\n // $output .= '</a></div>'; // Sudhakar\n $output .= '</a>';\n\n if (!empty($images)) {\n $output .= '<div class=\"more-product-images\">';\n foreach ($images as $thumbnail) {\n // Node preview adds extra values to $images that aren't files.\n if (!is_array($thumbnail) || empty($thumbnail['uri'])) {\n continue;\n }\n $output .= '<a href=\"' . image_style_url('uc_product_full', $thumbnail['uri']) . '\" title=\"' . $thumbnail['title'] . '\"';\n if ($image_widget) {\n $output .= $image_widget_func($rel_count);\n }\n $output .= '>';\n $output .= theme('image_style', array(\n 'style_name' => 'uc_thumbnail',\n 'path' => $thumbnail['uri'],\n 'alt' => $thumbnail['alt'],\n 'title' => $thumbnail['title'],\n ));\n $output .= '</a>';\n }\n $output .= '</div>';\n }\n\n $output .= '</div>';\n $rel_count++;\n\n return $output;\n}", "public static function thumbnail(){\n\n}", "function getThumbnail($actual_filename)\n{\n\tif(trim($actual_filename)== \"\")\n\t{\n\t\t$actual_filename = \"default.jpg\"; \t\n\t}\n\treturn $actual_filename;\n}", "public function getThumbFileNameAttribute()\n {\n return $this->id . '-th.'. $this->thumb_extension;\n }", "function default_thumb()\r\n{\r\n if(file_exists(TEMPLATEDIR.'/images/thumbs/processing.png'))\r\n {\r\n return TEMPLATEURL.'/images/thumbs/processing.png';\r\n }elseif(file_exists(TEMPLATEDIR.'/images/thumbs/processing.jpg'))\r\n {\r\n return TEMPLATEURL.'/images/thumbs/processing.jpg';\r\n }else\r\n return BASEURL.'/files/thumbs/processing.jpg';\r\n}", "public function get_name() {\n\t\treturn 'main-gallery';\n\t}", "function video_cck_dailymotion_thumbnail($field, $item, $formatter, $node, $width, $height) {\n return 'http://www.dailymotion.com/thumbnail/160x120/video/'. $item['value'];\n}", "private function createThumbs() {\n if (preg_match('/image/', $this->mime_type)) {\n Thumb::add($this->id);\n }\n }", "abstract public function get_thumbnail_source_path();", "public function thumbnail()\n {\n if (null !== $this->_image) {\n return $this->_createImgTag($this->_image->thumbnail);\n }\n }", "function bootstrapwp_images() {\n\n set_post_thumbnail_size(260, 180); // 260px wide x 180px high\n add_image_size('bootstrap-small', 300, 200); // 300px wide x 200px high\n add_image_size('bootstrap-medium', 360, 270); // 360px wide by 270px high\n}", "private function updateImgThumbnail(): void\n {\n //====================================================================//\n // Load Object Images List\n $allImages = Image::getImages(\n SLM::getDefaultLangId(),\n $this->ProductId,\n null,\n Shop::getContextShopID(true)\n );\n //====================================================================//\n // Walk on Object Images List\n foreach ($allImages as $image) {\n $imageObj = new Image($image['id_image']);\n $imagePath = _PS_PROD_IMG_DIR_.$imageObj->getExistingImgPath();\n if (!file_exists($imagePath.'.jpg')) {\n continue;\n }\n foreach (ImageType::getImagesTypes(\"products\") as $imageType) {\n $imgThumb = _PS_PROD_IMG_DIR_.$imageObj->getExistingImgPath();\n $imgThumb .= '-'.Tools::stripslashes($imageType['name']).'.jpg';\n if (!file_exists($imgThumb)) {\n ImageManager::resize(\n $imagePath.'.jpg',\n $imgThumb,\n (int)($imageType['width']),\n (int)($imageType['height'])\n );\n }\n }\n }\n }", "function generate_thumbnail () {\n global $Config;\n\n //Builds thumbnail filename\n $sourceFile = $this->path;\n $pos = strrpos($this->path, '.');\n $thumbnailFile = substr($sourceFile, 0, $pos) . 'Square' . substr($sourceFile, $pos);\n\n //Executes imagemagick command\n $command = $Config['ImageMagick']['convert'] . \" \\\"$sourceFile\\\" -resize 162x162 \\\"$thumbnailFile\\\"\";\n @system($command, $code);\n\n //Returns true if the command have exited with errorcode 0 (= ok)\n return ($code == 0);\n }", "public static function getThumbnail($name)\n {\n $thumb = '/product/image/name/' . $name;\n \n return $thumb;\n }", "public function image_size(){\n\t\t//add_image_size( 'thumb-owl', 205, 205, true );\n//\tadd_image_size( 'thumb-150', 150, 150, true);\n//\tadd_image_size( 'thumb-120', 120, 120, true);\n//\tadd_image_size( 'thumb-100', 100, 100, true );\n//\tadd_image_size( 'thumb-250', 250, 250, true );\n// // add_image_size( 'thumb-150', 150, 150, true ); //wordpress thumbail\n// add_image_size( 'thumb-60', 60, 60, true);\n//\t\t//add_image_size( 'thumb-editor', 500, 9999, true );\n//remove_image_size( 'thumb-editor');\n\t\t//remove_image_size('large');\n\t\t//remove_image_size('medium_large');\n\t}", "function the_post_thumbnail_caption($post = \\null)\n {\n }", "function the_post_thumbnail_url($size = 'post-thumbnail')\n {\n }", "public function thumbnail(MultibannerInterface $multibanner);", "private function add_custom_thumbnails() {\n\n\t\tif( true === $this->disable_thumbnail_generation_on_upload ) {\n\t\t\tif( isset($_SERVER['REQUEST_URI']) && ($_SERVER['REQUEST_URI'] === '/wp-admin/async-upload.php') ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t//Init vars\n\t\t$defaults = array(\n\t\t\t'width' \t=> NULL,\n\t\t\t'height'\t=> NULL,\n\t\t\t'crop'\t\t=> false,\n\t\t);\n\n\t\t//Check settings from config class\n\t\tif( isset($this->theme_thumbnail_settings) && is_array($this->theme_thumbnail_settings) ) {\n\n\t\t\t//Loop thumbnail sizes\n\t\t\tforeach( $this->theme_thumbnail_settings as $name => $args ) {\n\n\t\t\t\tif( !isset($args['config']) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$image_config = wp_parse_args( $args['config'], $defaults );\n\n\t\t\t\textract($image_config);\n\n\t\t\t\tif( isset( $width, $height, $crop ) ) {\n\n\t\t\t\t\t//Check for requests to update WP default thumbnails\n\t\t\t\t\tswitch( $name ) {\n\t\t\t\t\t\tcase 'featured';\n\t\t\t\t\t\t\t//Add default thumb size\n\t\t\t\t\t\t\tset_post_thumbnail_size( $width, $height, $crop ); // default thumb size\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'thumbnail';\n\t\t\t\t\t\t\tif( is_admin() ) {\n\t\t\t\t\t\t\t\tupdate_option('thumbnail_size_w', $width);\n\t\t\t\t\t\t\t\tupdate_option('thumbnail_size_h', $height);\n\t\t\t\t\t\t\t\tupdate_option('thumbnail_crop', $crop);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'medium':\n\t\t\t\t\t\t\tif( is_admin() ) {\n\t\t\t\t\t\t\t\tupdate_option('medium_size_w', $width);\n\t\t\t\t\t\t\t\tupdate_option('medium_size_h', $height);\n\t\t\t\t\t\t\t\tupdate_option('medium_crop', $crop);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'large':\n\t\t\t\t\t\t\tif( is_admin() ) {\n\t\t\t\t\t\t\t\tupdate_option('large_size_w', $width);\n\t\t\t\t\t\t\t\tupdate_option('large_size_h', $height);\n\t\t\t\t\t\t\t\tupdate_option('large_crop', $crop);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\n\t\t\t\t\t\t\t//Add custom thumbnail image size to wordpress\n\t\t\t\t\t\t\tadd_image_size( $name, $width, $height, $crop );\n\n//\t\t\t\t\t\t\t//High res version\n//\t\t\t\t\t\t\tif( is_int($width) ) {\n//\t\t\t\t\t\t\t\t$width = $width * 2;\n//\t\t\t\t\t\t\t}\n//\n//\t\t\t\t\t\t\tif( is_int($height) ) {\n//\t\t\t\t\t\t\t\t$height = $height * 2;\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\tadd_image_size( \"{$name}--x2\", $width, $height, $crop );\n\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t//Set any custom srcset rules\n\t\t\t\tif( isset($args['srcset']) && is_array($args['srcset']) ) {\n\n\t\t\t\t\t$this->register_theme_custom_image_srcset( $name, $args['srcset'] );\n\n\t\t\t\t\t//\t\t\t\t\tforeach($args['srcset'] as $srcset_attribute) {\n\t\t\t\t\t//\t\t\t\t\t\t$this->register_theme_custom_image_srcset( $name, $srcset_attribute );\n\t\t\t\t\t//\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t//Add custom image sizes to \"add media:\" option for edit post/page\n\t\tadd_filter( 'image_size_names_choose', array($this, 'insert_custom_image_sizes') );\n\n\t\t//Filter image srcset attributes\n\t\tadd_filter( 'wp_get_attachment_image_attributes', array($this, 'get_image_size_srcset_attr'), 900, 3 );\n\n\t\t//Filter sizes attribute added to images\n\t\tadd_filter( 'wp_calculate_image_sizes', array($this, 'default_image_srcset_sizes_attr'), 900, 2 );\n\n\t}", "function rp_add_image_sizes() {\n\tadd_image_size( 'wpdentist-thumbnail', 100, 75, true );\n}", "function _wp_post_thumbnail_html($thumbnail_id = \\null, $post = \\null)\n {\n }", "function wp_ajax_set_attachment_thumbnail()\n {\n }", "function show_thumb($w,$h,$zc,$cropfrom) {\n\tglobal $post;\n\t$img_customfield = get_post_meta($post->ID, 'thumb', true);\n\t$img_attachment_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'large' );\n\t$img_uploads = get_children( array('post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID', 'numberposts' => 1) );\n\t$img_post = preg_match_all('/\\< *[img][^\\>]*src *= *[\\\"\\']{0,1}([^\\\"\\'\\ >]*)/',get_the_content(),$matches);\n\t$img_default = get_bloginfo('template_directory').'/images/no-thumb.png';\n\n\t$thumbnail = 'thumbnail.php';\n\t\n\t// get thumbnail\n\tif ($img_customfield) {\n\t\tprint '<img src=\"'.get_bloginfo('template_directory').'/'.$thumbnail.'?src='.urlencode($img_customfield).'&amp;w='.$w.'&amp;h='.$h.'&amp;zc='.$zc.'&amp;a='.$cropfrom.'\" alt=\"'.get_the_title($post).'\" title=\"'.get_the_title($post).'\"/>';\n\t} elseif ($img_attachment_image) {\n\t\tprint '<img src=\"'.get_bloginfo('template_directory').'/'.$thumbnail.'?src='.urlencode($img_attachment_image[0]).'&amp;w='.$w.'&amp;h='.$h.'&amp;zc='.$zc.'&amp;a='.$cropfrom.'\" alt=\"'.get_the_title($post).'\" title=\"'.get_the_title($post).'\"/>';\n\t} elseif ($img_uploads == true) {\n\t\tforeach($img_uploads as $id => $attachment) {\n\t\t\t$img = wp_get_attachment_image_src($id, 'full');\n\t\t\tprint '<img src=\"'.get_bloginfo('template_directory').'/'.$thumbnail.'?src='.urlencode($img[0]).'&amp;w='.$w.'&amp;h='.$h.'&amp;zc='.$zc.'&amp;a='.$cropfrom.'\" alt=\"'.get_the_title($post).'\" title=\"'.get_the_title($post).'\" />';\n\t\t}\n\t} elseif (count($matches[1]) > 0) {\n\t\tprint '<img src=\"'.get_bloginfo('template_directory').'/'.$thumbnail.'?src='.urlencode($matches[1][0]).'&amp;w='.$w.'&amp;h='.$h.'&amp;zc='.$zc.'&amp;a='.$cropfrom.'\" alt=\"'.get_the_title($post).'\" title=\"'.get_the_title($post).'\" />';\n\t} else {\n\t\tprint '<img src=\"'.get_bloginfo('template_directory').'/'.$thumbnail.'?src='.urlencode($img_default).'&amp;w='.$w.'&amp;h='.$h.'&amp;zc='.$zc.'&amp;a='.$cropfrom.'\" alt=\"'.get_the_title($post).'\" title=\"'.get_the_title($post).'\" />';\n\t}\n}", "public function catch_thumbnail_url_rewritted() {\n\n if( isset($_GET['name_image']) && !empty($_GET['name_image']) && preg_match('/^w(\\d+)-h(\\d+)-(\\d+)-(.*)$/', $_GET['name_image'], $matches) && is_array($matches) && count($matches) > 1 && is_numeric($matches[3]) ) {\n\n $size_image = 'large';\n\n $consider_width = ( isset($_GET['w']) && is_numeric($_GET['w']) );\n $consider_height = ( isset($_GET['h']) && is_numeric($_GET['h']) );\n \n if( $consider_width || $consider_height ) {\n \n $attachment_metadata = wp_get_attachment_metadata($matches[3]);\n $sizes_available = $attachment_metadata['sizes'];\n if( !isset($sizes_available['large']) ) {\n $sizes_available['large'] = [\n 'width' => $attachment_metadata['width'],\n 'height' => $attachment_metadata['height']\n ];\n }\n\n $nearby_size_w = null;\n $nearby_size_h = null;\n foreach( $sizes_available as $key_size => $size ) {\n if(\n $key_size != 'thumbnail' &&\n (\n (\n $consider_width && \n $size['width'] >= $_GET['w'] && (\n is_null($nearby_size_w) || $size['width'] < $nearby_size_w\n )\n ) || !$consider_width\n )\n &&\n (\n (\n $consider_height && \n $size['height'] >= $_GET['h'] && (\n is_null($nearby_size_h) || $size['height'] < $nearby_size_h\n )\n ) || !$consider_height\n )\n ){\n $nearby_size_w = $size['width'];\n $nearby_size_h = $size['height'];\n $size_image = $key_size;\n }\n }\n\n // If none size was selected, choose larger image\n if( is_null($nearby_size_w) && is_null($nearby_size_h) ) {\n foreach( $sizes_available as $key_size => $size ) {\n if(\n $key_size != 'thumbnail' &&\n (\n (\n is_null($nearby_size_w) && is_null($nearby_size_h)\n )\n ||\n (\n (\n ( $consider_width && $nearby_size_w < $size['width'] ) || !$consider_width\n )\n &&\n (\n ( $consider_height && $nearby_size_h < $size['height'] ) || !$consider_height\n )\n )\n )\n ){\n $nearby_size_w = $size['width'];\n $nearby_size_h = $size['height'];\n $size_image = $key_size;\n }\n }\n }\n }\n \n // Render image\n $data_image = wp_get_attachment_image_src($matches[3], $size_image);\n if( $data_image && is_array($data_image) && count($data_image) > 0 ) {\n\n // Get image PATH\n $wp_upload_dir = wp_upload_dir();\n $path_image = str_replace($wp_upload_dir['baseurl'], $wp_upload_dir['basedir'], $data_image[0]);\n if( file_exists($path_image) ) {\n\n // Copy image\n $name_directory_image_copy = dirname(ABSPATH) . '/' . $this->path_generated_images . '/';\n if( !file_exists($name_directory_image_copy) )\n mkdir($name_directory_image_copy);\n copy( $path_image, $name_directory_image_copy . $matches[0] );\n\n $last_modified_time = filemtime($path_image);\n $cache_duration = 3600 * 24 * 30; // 30 days...\n $etag = 'W/\"' . md5($last_modified_time) . '\"';\n\n // Define some header\n header('Content-Type: image/jpeg');\n header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $last_modified_time) . ' GMT');\n header(\"Cache-Control: public, max-age=\" . $cache_duration);\n header(\"Etag: $etag\");\n\n // Send 304 if no update\n if (\n (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) === $last_modified_time) ||\n (isset($_SERVER['HTTP_IF_NONE_MATCH']) && $etag === trim($_SERVER['HTTP_IF_NONE_MATCH']))\n ) {\n header('HTTP/1.1 304 Not Modified');\n exit();\n }\n else {\n // Else generate PHP image and return\n readfile($path_image, false, stream_context_create([\n 'ssl' => [\n 'verify_peer' => false\n ]\n ]));\n }\n }\n }\n }\n }", "public function get_title() {\n\t\treturn __( 'ImageBox', 'elementor-listeo' );\n\t}", "function rest_add_image_size() {\n add_image_size( 'rest_post_thumbnail', 712, 348, true );\n}", "function makethumbnail($image_name,$src,$dest) {\n global $_CONF, $CONF_SE;\n $do_create = 0;\n if ($image_info = @getimagesize($src)) {\n if ($image_info[2] == 1 || $image_info[2] == 2 || $image_info[2] == 3) {\n $do_create = 1;\n }\n }\n if ($do_create) {\n $dimension = (intval($CONF_SE['auto_thumbnail_dimension'])) ? intval($CONF_SE['auto_thumbnail_dimension']) : 100;\n $resize_type = (intval($CONF_SE['auto_thumbnail_resize_type'])) ? intval($CONF_SE['auto_thumbnail_resize_type']) : 1;\n $quality = (intval($CONF_SE['auto_thumbnail_quality']) && intval($CONF_SE['auto_thumbnail_quality']) <= 100) ? intval($CONF_SE['auto_thumbnail_quality']) : 100;\n\n if (create_thumbnail($src, $dest, $quality, $dimension, $resize_type)) {\n $new_thumb_name = $new_name;\n $chmod = @chmod ($dest,$CONF_SE['image_perms']);\n }\n }\n}", "protected function getImageName() {\n\n\t\treturn NULL;\n\t}", "function set_post_thumbnail($post, $thumbnail_id)\n {\n }", "public function GetThumbPath() {\n\t\t\t// calculate the web/docroot-relative path\n\t\t\t$strThumbPath = $this->GetThumbFolder() . '/thumb-' . $this->intId . '.' . ImageFileType::$ExtensionArray[$this->intImageFileTypeId];\n\n\t\t\t// See if the thumbnail image, itself exists\n\t\t\tif (file_exists(__DOCROOT__ . $strThumbPath))\n\t\t\t\treturn $strThumbPath;\n\n\t\t\t// It does NOT exist -- we need to create it first\n\t\t\tQApplication::MakeDirectory(__DOCROOT__ . $this->GetThumbFolder(), 0777);\n\n\t\t\t$objImageControl = new QImageControl(null);\n\t\t\t$objImageControl->ImagePath = $this->GetImagePath();\n\t\t\t$objImageControl->Width = 100;\n\t\t\t$objImageControl->Height = 100;\n\t\t\t$objImageControl->ScaleCanvasDown = false;\n\t\t\t$objImageControl->ScaleImageUp = true;\n\t\t\t$objImageControl->RenderImage(__DOCROOT__ . $strThumbPath);\n\n\t\t\treturn $strThumbPath;\n\t\t}", "protected function buildFileName()\n\t{\n\t\t$upscale = $this->upscale ? 'upscale' : 'noupscale';\n\t\treturn $this->namePrefix . '-' . $this->width . 'x' . $this->height . '-' . $upscale . '-' . $this->quality . '-' . $this->imageName;\n\t}", "public static function rename_featured_image_metabox() {\n\n\t\tremove_meta_box( 'postimagediv', self::$post_type_name, 'side' );\n\n\t\tadd_meta_box( 'postimagediv', __( \"Sponsor Logo\", self::$text_domain ), 'post_thumbnail_meta_box', self::$post_type_name, 'side', 'low' );\n\n\t}", "function ThumbFile()\n\t{\treturn $this->imagedir . \"thumbs/\" . (int)$this->id . \".jpg\";\n\t}", "function ThumbSRC()\n\t{\treturn $this->imagelocation . \"thumbs/\" . (int)$this->id . \".jpg\";\n\t}", "public function thumbnailCustomColumn($column_name, $id)\n {\n if ($column_name === '$this->postThumbs') {\n echo the_post_thumbnail([100, 100]);\n }\n }", "public function get_thumbnail($key = 0)\n {\n }", "public function getPictureName()\n {\n $pictureName = \"nopicture.png\";\n $articleModel = new ArticleModel();\n $articles = $articleModel->where(\"id_products\", $this->id_products)->findAll();\n\n if (count($articles) > 0) {\n\n if ($articles[0]->getPicture() != null) {\n $pictureName = $articles[0]->getPicture()->name . \".\" . $articles[0]->getPicture()->extension;\n }\n }\n return $pictureName;\n }", "public function getCategoryImageFileNameAttribute()\n {\n return $this->id . '-image.png';\n }", "public function get_full_name(){\n\t\treturn \"{$this->id}_full.png\";\n\t}", "function post_thumbnail() {\n\techo prepend_post_thumbnail( '' );\n}", "function emvideo_dotsub_thumbnail($field, $item, $formatter, $node, $width, $height) {\n // In this demonstration, we previously retrieved a thumbnail using oEmbed\n // during the data hook.\n return $data['thumbnail'];\n}", "function get_the_post_thumbnail_caption($post = \\null)\n {\n }", "public function getThumbnailImageType()\r\n\t{\r\n\t\treturn 'home'; // change this to 'home_default' if images don't show in Prestashop 1.5\r\n\t}", "function album_list_thumbnail($albumList)\n{\n\tforeach ($albumList as $album) {\n\t\t$id = $album->album_id;\n\t\t$title = $album->album_title;\n\t\t$year = $album->album_year;\n\t\techo \"<div class='col-md-6' data-toggle='tooltip' data-placement='top' title='$title'> \";\n\t\t\techo a_open(\"thumbnail\", base_url().\"album/$id\");\n\t\t\t\techo img(\"data/music/albums/$id/cover.png\");\n\t\t\techo a_close();\n\t\techo div_close();\n\t}\n}", "function addImage($path,$title,$description,$thumb,$lightbox,$uniqueID,$limitImages=0) {\n\t // count of images\n\t if ($limitImages > 1 || $limitImages==0) {\n $this->config['count']++;\n\t }\n // just add the wraps if there is a text for it\n $title = (!$title) ? '' : \"<h3>$title</h3>\";\n $description = (!$description) ? '' : \"<p>$description</p>\";\n \n // generate images\n if ($this->config['watermark']) {\n $imgTSConfigBig = $this->conf['big2.'];\n $imgTSConfigBig['file.']['10.']['file'] = $path;\n $imgTSConfigLightbox = $this->conf['lightbox2.'];\n $imgTSConfigLightbox['file.']['10.']['file'] = $path; \n } else {\n $imgTSConfigBig = $this->conf['big.'];\n $imgTSConfigBig['file'] = $path;\n $imgTSConfigLightbox = $this->conf['lightbox.'];\n $imgTSConfigLightbox['file'] = $path; \n } \n $bigImage = $this->cObj->IMG_RESOURCE($imgTSConfigBig);\n\n $lightbox = ($lightbox=='#' || $lightbox=='' || $this->config['showLightbox']!=1) ? 'javascript:void(0)' : $this->cObj->IMG_RESOURCE($imgTSConfigLightbox);\n \t$lightBoxImage='<a href=\"'.$lightbox.'\" title=\"'.$this->pi_getLL('textOpenImage').'\" class=\"open\"></a>';\n\n if ($thumb) {\n $imgTSConfigThumb = $this->conf['thumb.'];\n $imgTSConfigThumb['file'] = $path; \n $thumbImage = '<img src=\"'.$this->cObj->IMG_RESOURCE($imgTSConfigThumb).'\" class=\"thumbnail\" />';\n }\n\n\t // if just 1 image should be returned\n if ($limitImages==1) {\n \treturn '<img src=\"'.$bigImage.'\" class=\"full\" />';\n }\n\n // build the image element \n $singleImage .= '\n <div class=\"imageElement\">'.$title.$description.\n $lightBoxImage.'\n <img src=\"'.$bigImage.'\" class=\"full\" />\n '.$thumbImage.'\n </div>';\n\n\t\t// Adds hook for processing the image\n\t\t$config['path'] = $path;\n $config['title'] = $title;\n\t\t$config['description'] = $description;\n\t\t$config['uniqueID'] = $uniqueID;\n\t\t$config['thumb'] = $thumb;\n\t\t$config['large'] = $large;\n\t\t$config['lightbox'] = $lightbox;\n\t\t$config['limitImages'] = $limitImages;\n\t\t$config['lightBoxCode'] = $lightBoxImage;\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraImageHook'])) {\n\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraImageHook'] as $_classRef) {\n\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\n\t\t\t\t$singleImage = $_procObj->extraImageProcessor($singleImage,$config, $this);\n\t\t\t}\n\t\t} \n \n return $singleImage;\n }", "protected function makeThumbnails()\n {\n $sizes = [\n 'image_211' => [\n 'width' => 211,\n 'mode' => ImageInterface::THUMBNAIL_OUTBOUND,\n ],\n ];\n $data = $this->image;\n if (!$data) {\n return;\n }\n\n if (is_string($data)) {\n $tempFile = tempnam('/tmp', 'temp_');\n file_put_contents($tempFile, $data);\n $data = fopen($tempFile, 'r+');\n }\n\n if (stream_get_contents($data) == '') {\n return;\n }\n\n fseek($data, 0);\n $sourceImage = @ImagineImage::getImagine()->read($data);\n foreach ($sizes as $sizeName => $size) {\n $thumbnailAttributeName = $sizeName;\n if (!empty($size['width'])) {\n $width = $size['width'];\n if ($width < 0) {\n $originalWidgth = $sourceImage->getSize()->getWidth();\n if (-$originalWidgth < $width * 4) {\n $width = $sourceImage->getSize()->getWidth() + $width;\n } else {\n $width = $originalWidgth;\n }\n }\n } else {\n $width = null;\n }\n\n if (!empty($size['height'])) {\n $height = $size['height'];\n if ($height < 0) {\n $originalHeight = $sourceImage->getSize()->getHeight();\n if (-$originalHeight < $height * 4) {\n $height = $sourceImage->getSize()->getHeight() + $height;\n } else {\n $height = $originalHeight;\n }\n }\n } else {\n $height = null;\n }\n\n if (!empty($size['mode'])) {\n $mode = $size['mode'];\n } else {\n $mode = ImageInterface::THUMBNAIL_INSET;\n }\n\n BaseImage::$thumbnailBackgroundAlpha = 0;\n $image = ImagineImage::thumbnail($sourceImage, $width, $height, $mode);\n\n if (!empty($size['watermark'])) {\n $watermark = fopen($size['watermark'], 'r+');\n $watermark = ImagineImage::thumbnail($watermark, $image->getSize()->getWidth(), $image->getSize()->getHeight(), ManipulatorInterface::THUMBNAIL_OUTBOUND);\n $watermark = ImagineImage::crop($watermark, $image->getSize()->getWidth(), $image->getSize()->getHeight());\n\n $image = ImagineImage::watermark($image, $watermark);\n }\n\n $fileName = tempnam(sys_get_temp_dir(), 'test');\n $image->save($fileName, [\n 'format' => $this->image_extension,\n ]);\n\n $thumbData = fopen($fileName, 'r+');\n $this->$thumbnailAttributeName = $thumbData;\n }\n\n fseek($data, 0);\n }", "function dark_urban_custom_image_sizes_names( $sizes ) {\n /* Pinegrow generated Image Sizes Names Begin*/\n /* This code will be replaced by returning names of custom image sizes. */\n /* Pinegrow generated Image Sizes Names End */\n return $sizes;\n}", "public function withThumb( $name = 'thumbnail' )\n {\n if($table_p = $this->getTable('posts')){\n $table_pm = $this->addTable('postmeta', false);\n $table_post = $this->addTable('posts', false);\n $table_ppm = $this->addTable('postmeta', false);\n $this->addSimpleJoint($table_pm, new Column('ID', false, $table_p), new Column('post_id', false, $table_pm));\n $this->addSimpleJoint($table_post, new Column('meta_value', false, $table_pm), new Column('ID', false, $table_post));\n $this->addSimpleJoint($table_ppm, new Column('ID', false, $table_post), new Column('post_id', false, $table_ppm));\n $this->addColumns( $table_post, [ 'ID' => $name . '_id', 'guid' => $name . '_src' ] );\n $this->addColumn( $table_ppm, 'meta_value', $name . '_data' );\n $this->whereComplex()->where($table_pm->alias . '.meta_key', '_thumbnail_id')->where($table_ppm->alias . '.meta_key', '_wp_attachment_metadata');\n }\n return $this;\n }", "public function thumb(){\n\treturn '/images/products/thumbs/'.$this->path;\n}", "public function define_image_sizes(){\n add_image_size('icon', 96, 96, true);\n add_image_size('item_details_featured', 600, 600, true);\n add_image_size('item_details_featured_sm', 480, 480, true);\n add_image_size('post_preview', 300, 300, true);\n\n }", "function _createThumbnail()\r\n\t{\r\n\t\t$user=$this->auth(PNH_EMPLOYEE);\r\n\t\t$config['image_library']= 'gd';\r\n\t\t$config['source_image']= './resources/employee_assets/image/';\r\n\t\t$config['create_thumb']= TRUE;\r\n\t\t$config['maintain_ratio']= TRUE;\r\n\t\t$config['width']= 75;\r\n\t\t$config['height']=75;\r\n\r\n\t\t$this->image_lib->initialize($config);\r\n\r\n\t\t$this->image_lib->resize();\r\n\r\n\t\tif(!$this->image_lib->resize())\r\n\t\t\techo $this->image_lib->display_errors();\r\n\t}" ]
[ "0.7621408", "0.7425551", "0.6870915", "0.6870706", "0.6790062", "0.67330444", "0.67270553", "0.6707585", "0.6707585", "0.66884357", "0.6642252", "0.65671974", "0.6562075", "0.65507853", "0.65245175", "0.65006876", "0.646468", "0.6458054", "0.6414787", "0.63837826", "0.6357674", "0.63430357", "0.63362527", "0.6301078", "0.6197736", "0.6187433", "0.6146904", "0.61413944", "0.6140341", "0.6139819", "0.6139008", "0.61312914", "0.6126138", "0.6112925", "0.609145", "0.60861826", "0.6085122", "0.60791695", "0.60763854", "0.6068424", "0.6055258", "0.6050549", "0.6044599", "0.6041937", "0.6028982", "0.6020852", "0.6016903", "0.6005484", "0.6002357", "0.59990513", "0.59863704", "0.5983636", "0.5980142", "0.59719545", "0.5967918", "0.5944127", "0.59407276", "0.59371704", "0.5922802", "0.5912805", "0.5912734", "0.5910336", "0.59043175", "0.58979493", "0.58842987", "0.58837485", "0.5882112", "0.58598727", "0.585654", "0.5853409", "0.5850041", "0.5849387", "0.5849096", "0.58421874", "0.583889", "0.583627", "0.58312166", "0.5830548", "0.5826111", "0.5824973", "0.5807386", "0.58042717", "0.5801817", "0.57935417", "0.5793491", "0.5782618", "0.57807523", "0.5776534", "0.5773784", "0.5768384", "0.57649136", "0.57572913", "0.5756768", "0.5755888", "0.5755696", "0.5754642", "0.5753597", "0.57522863", "0.5751295", "0.5748636" ]
0.6760387
5
Sets the excerpt length
public function excerpt_length($length) { global $wpv_loop_vars; if(isset($wpv_loop_vars) && $wpv_loop_vars['news']) return 15; return $length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function t_excerpt_length(){\n\t// sets the amount of characters an excerpt contains\n\treturn 50;\n}", "public function excerpt($length = 300);", "function cheffism_custom_excerpt_length( $length ) {\n return 50;\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 20;\n }", "function tn_custom_excerpt_length( $length ) {\r\n\t\treturn 15;\r\n\t\t}", "static public function change_excerpt_length($length)\n\t{\n\t\treturn 12;\n\t}", "function wpdocs_custom_excerpt_length( $length ) {\n return 25;\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 25;\n}", "function custom_excerpt_length( $length ) {\n\treturn 25;\n}", "function wpdocs_custom_excerpt_length($length) {\n return 12;\n }", "function d4tw_custom_excerpt_length( $length ) {\r\nreturn 35;\r\n}", "function custom_excerpt_length(){\n\t\treturn 25;\n\t}", "function tn_custom_excerpt_length( $length ) {\r\n return 15;\r\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 1000;\n}", "function wprm_custom_excerpt_length( $length ) {\n return 200;\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 150;\n}", "function d4tw_excerpt_length( $length ) {\n return 20;\n}", "function thoughts_custom_excerpt_length( $length ) {\n\treturn 100;\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 15;\n}", "function wfs_custom_excerpt_length( $length ) {\n return 20;\n}", "function new_excerpt_length($length) {\nreturn 50;\n}", "function new_excerpt_length($length) {\nreturn 50;\n}", "function custom_excerpt_length( $length ) {\n\treturn 90;\n}", "function custom_excerpt_length() {\n\treturn 120;\n}", "function studiare_custom_excerpt_length( $length ) {\n\treturn 30;\n}", "function custom_excerpt_length( $length ) {\n\treturn 20;\n}", "function custom_excerpt_length($length) {\n return 25;\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 26;\n\t\t}", "function new_excerpt_length($length) { \n return 75;\n}", "public static function excerpt_length() {\n\t\t\t$cpt = self::get_post_type();\n\n\t\t\tif ( $cpt && $cpt !== 'post' ) {\n\t\t\t\treturn self::option( 'post_excerpt_' . $cpt, 20 );\n\t\t\t}\n\n\t\t\treturn self::option( 'post_excerpt', 20 );\n\t\t}", "function custom_excerpt_length( $length ) {\n return 16;\n }", "function wpdocs_custom_excerpt_length( $length ) {\n\treturn 18;\n}", "function new_excerpt_length($length) {\n\treturn 15;\n}", "function twentyten_excerpt_length( $length ) {\n\treturn 40;\n}", "function twentyten_excerpt_length( $length ) {\n\treturn 40;\n}", "function new_excerpt_length($length) {\r\n return 40;\r\n}", "function new_excerpt_length($length) {\r\nreturn 30;\r\n}", "function custom_excerpt_length( $length ) {\r\n return 50;\r\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 30;\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 30;\n}", "function wpdocs_custom_excerpt_length( $length ) {\r\n return 45;\r\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 40;\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 8;\n}", "function new_excerpt_length($length) {\n\treturn 100;\n}", "function new_excerpt_length($length) {\n\treturn 100;\n}", "function custom_excerpt_length( $length ) {\n\treturn 30;\n}", "function custom_excerpt_length( $length ) {\n\treturn 30;\n}", "function leafbase_custom_excerpt_length( $length ) {\n\n return 40;\n\n}", "function be_excerpt_length( $length ) { \n\t\n\t$length = '40'; \n\t\n\treturn $length;\n\t \n\t}", "function custom_excerpt_length( $length ) {\nreturn 20;\n}", "function voyage_mikado_excerpt_length($length) {\n\n if(voyage_mikado_options()->getOptionValue('number_of_chars') !== '') {\n return esc_attr(voyage_mikado_options()->getOptionValue('number_of_chars'));\n } else {\n return 45;\n }\n }", "function uwmadison_excerpt_length( $length ) {\n\t\treturn 40;\n\t}", "function wpdocs_custom_excerpt_length( $length ) {\r\n return 20;\r\n}", "function custom_excerpt_length() {\n return 50;\n}", "function custom_excerpt_length( $length ) {\n return 30;\n}", "function custom_excerpt_length( $length ) {\n return 30;\n}", "function theme_excerpt_length($length){\r\n return 35; //el número aquí es nueva cantidad de palabras en el excerpt\r\n}", "function custom_excerpt_length() {\n\treturn 40;\n}", "function custom_excerpt_length() {\n\treturn 100;\n}", "function xo_excerpt_length( $length ) {\n return 12;\n}", "function custom_excerpt_length($length) {\n return 15;\n}", "function custom_excerpt_length($length) {\n return 20;\n}", "function ti_excerpt_length( $length ) {\n\treturn 24;\n}", "function my_excerpt_length($length) {\nreturn 20; // Or whatever we want the length to be.\n}", "function wpex_new_excerpt_length($length) {\n\n\treturn 50;\n\n}", "function medigroup_mikado_excerpt_length($length) {\n\n if(medigroup_mikado_options()->getOptionValue('number_of_chars') !== '') {\n return esc_attr(medigroup_mikado_options()->getOptionValue('number_of_chars'));\n } else {\n return 45;\n }\n }", "function sp_excerpt_length( $length ) {\n\treturn 50;\n}", "function new_excerpt_length($length) {\n return 30;\n}", "function mt_filter_excerpt_length($length) {\n\treturn 20;\n }", "function custom_excerpt_length(){\n return 25;\n}", "function custom_excerpt_length(){\n return 25;\n}", "function wow_theme_excerpt_length( $length ) {\n return 100;\n}", "function tz_excerpt_length($length) {\nreturn 55; }", "function mobject_excerpt_length( $length ) {\n\tif ( is_admin() ) {\n\t\treturn $length;\n\t}\n\t$display_options = get_customizer_settings()[ WPM_PREFIX . 'collection_style' ];\n\tif ( $display_options['excerpt_max_length'] ) {\n\t\treturn $display_options['excerpt_max_length'];\n\t}\n\treturn $length;\n}", "function sm_modern_post_excerpt_length () {\n\treturn 20;\n}", "function classiera_blog_excerpt_length($length) {\r\n\tglobal $post;\r\n\tif ($post->post_type == 'blog_posts'){\r\n\t\treturn 150;\r\n\t}\r\n\telse {\r\n\t\treturn $length;\r\n\t}\r\n}", "function new_excerpt_more($length) {\n\treturn 18;\n}", "function rls_text_excerpt($length) {\n return 25;\n}", "function darksnow_excerpt_length( $length ) {\n\treturn 40;\n}", "function recent_posts_excerpt_length( $length ) {\r\n\treturn 20;\r\n}", "function rocked_excerpt_length( $length ) {\n\t$excerpt = get_theme_mod('exc_lenght', '55');\n\treturn $excerpt;\n}", "function rls_media_excerpt($length) {\n return 25;\n}", "function wpt_excerpt_length( $length ) {\n\treturn 40;\n}", "function gallo_excerpt( $length ) {\n\treturn 30;\n}", "function isacustom_excerpt_length($length) {\n global $post;\n if ($post->post_type == 'post')\n return 48;\n else if ($post->post_type == 'clases_yoga')\n return 24;\n else\n return 48;\n\t}", "public function setExcerpt(string $excerpt): void\n {\n $this->_excerpt = $excerpt;\n }", "function block_core_latest_posts_get_excerpt_length()\n {\n }", "public function setExcerpt($excerpt)\r\n\t\t{\r\n\t\t\t$this->setExcerpt = $excerpt;\r\n\t\t}", "function excerpt_size($legth = 150) {\r\n global $post;\r\n return substr(strip_tags($post->post_content), 0, $legth).'...';\r\n}", "function rw_excerpt_length( $length=100 )\n{\n return $length;\n}", "public function getExcerpt($maxLength = 255);", "function excerpt_length($length) {\n global $data;\n return $data['blog_excerptlength'];\n}", "public function setExcerptAttribute($value)\n {\n $this->attributes['excerpt'] = $value ? $value : null;\n }", "function custom_excerpt_length( $length ) {\r\n if (is_search()) {\r\n return 10;\r\n }\r\n else return 35;\r\n}", "public function excerpt($length = 600): string\n {\n return str_limit(strip_tags($this->description), $length);\n }", "public function excerpt($length)\n {\n return \\Str::limit(strip_tags($this->bodyHtml()), $length, '...');\n }", "function <%= functionPrefix %>_custom_excerpt_length($length) {\n\treturn 55;\n}", "function set_length($length) {\n $this->length = $length;\n }", "function trim_excerpt_length ($length) {\n return 20;\n}", "function the_excerpt_max_charlength($charlength) {\n $excerpt = get_the_excerpt();\n $charlength++;\n if(strlen($excerpt)>$charlength) {\n $subex = substr($excerpt,0,$charlength-5);\n $exwords = explode(\" \",$subex);\n $excut = -(strlen($exwords[count($exwords)-1]));\n if($excut<0) {\n echo substr($subex,0,$excut);\n } else {\n \t echo $subex;\n }\n echo ' <a href=\"'.get_permalink().'\"> Read more ...</a>';\n } else {\n\t echo $excerpt;\n }\n}" ]
[ "0.8081721", "0.7576608", "0.7507579", "0.7507363", "0.75065815", "0.75009954", "0.7492817", "0.7492817", "0.7478013", "0.7435886", "0.74347025", "0.7429723", "0.7398464", "0.7388961", "0.7386184", "0.7376455", "0.73690224", "0.7359125", "0.7356135", "0.73504376", "0.73466796", "0.73466796", "0.73349786", "0.73174626", "0.7316097", "0.73133546", "0.7307373", "0.73035467", "0.7302782", "0.73013186", "0.72999704", "0.72951216", "0.7295033", "0.7292119", "0.7292119", "0.72897273", "0.7289219", "0.7284706", "0.72782135", "0.72782135", "0.72769827", "0.72768503", "0.7268036", "0.72664136", "0.72664136", "0.7262291", "0.7262291", "0.7260967", "0.7256716", "0.725609", "0.7255365", "0.72545904", "0.7248758", "0.7244798", "0.7242549", "0.7242549", "0.72392106", "0.7215168", "0.72044766", "0.72035086", "0.71826965", "0.7182455", "0.7182243", "0.7178084", "0.71718866", "0.7168303", "0.7165891", "0.7165389", "0.7160752", "0.71192247", "0.71192247", "0.7108016", "0.70387185", "0.7029204", "0.70125586", "0.69261336", "0.6924037", "0.69203013", "0.6906603", "0.6904562", "0.68892246", "0.687256", "0.6869139", "0.6845457", "0.68401355", "0.67981136", "0.6789172", "0.678604", "0.676327", "0.6756097", "0.66954195", "0.66747534", "0.6665846", "0.6608587", "0.65858597", "0.6542506", "0.6464657", "0.6418553", "0.63640165", "0.63047403" ]
0.74925864
8
Sets the excerpt ending
public function excerpt_more($more) { return '...'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setExcerpt(string $excerpt): void\n {\n $this->_excerpt = $excerpt;\n }", "public function setExcerptAttribute($value)\n {\n $this->attributes['excerpt'] = $value ? $value : null;\n }", "public function setExcerpt($excerpt)\r\n\t\t{\r\n\t\t\t$this->setExcerpt = $excerpt;\r\n\t\t}", "function flatsome_excerpt_suffix() {\n\treturn get_theme_mod( 'blog_excerpt_suffix', ' [...]' );\n}", "function excerpt($str, $len, $end = '...')\n{\n\tif(strlen($str) > $len)\n\t{\n\t\t$str = mb_substr($str, 0, $len, 'UTF-8');\n\t\t$pos = max(strrpos($str, '.'), strrpos($str, ' '), strrpos($str, \"\\n\"));\n\t\tif($pos) $str = substr($str, 0, $pos);\n\t\t$str .= $end;\n\t}\n\treturn $str;\n}", "function t_excerpt_length(){\n\t// sets the amount of characters an excerpt contains\n\treturn 50;\n}", "public static function after_get_the_excerpt( $excerpt ) {\n\t\tself::$force_disable = false;\n\n\t\treturn $excerpt;\n\t}", "function set_end($end)\n {\n $this->set_default_property(self :: PROPERTY_END, $end);\n }", "function wp_html_excerpt($str, $count, $more = \\null)\n {\n }", "function neu_excerpt($num) {\n\t$limit = $num+1;\n\tif( get_the_excerpt() ){\n\t\t$excerpt = get_the_excerpt();\n\t}else{\n\t\t//no hay extracto es un postevento\n\t\t$excerpt = get_field('descripcion_postevento');\n\t}\n\t$excerpt = explode(' ', $excerpt, $limit);\n\tarray_pop($excerpt);\n\t$excerpt = implode(\" \",$excerpt).\" [...]\"; \n\techo $excerpt;\n}", "function concatenate( $excerpt, $limit = false ) {\n\t\n\tif ( ! $limit )\n\t\t$limit = apply_filters( 'excerpt_length', 30 );\n\n\n\tmb_internal_encoding( 'UTF-8' );\n\n\tif ( mb_strlen( $excerpt ) > $limit )\n\t\t$dots = apply_filters( 'excerpt_more', '[...]' );\n\n\n\t$excerpt = mb_substr( esc_html( $excerpt ), 0, $limit );\n\n\treturn $excerpt;\n\n}", "function emphasis_close() {\n $this->doc .= '</em>';\n }", "function neu_custom_excerpt($content, $num) {\n\t\n\t$limit = $num+1;\n\n\t$custom_excerpt = $content;\n\n\n\t$custom_excerpt = explode(' ', $custom_excerpt, $limit);\n\n\tarray_pop($custom_excerpt);\n\n\t$custom_excerpt = implode(\" \",$custom_excerpt).\" [...]\"; \n\n\techo $custom_excerpt;\n\n}", "public function setPlaceholderEnd($string) {\n $this->placeHolderEnd = $string;\n }", "function excerpt($num) {\n$limit = $num+1;\n$excerpt = explode(' ', get_the_excerpt(), $limit);\narray_pop($excerpt);\n$excerpt = implode(\" \",$excerpt).\" <a href='\" .get_permalink($post->ID) .\" ' class='\".readmore.\"'>READ THIS</a>\";\necho $excerpt;\n}", "function rw_auto_excerpt_more( )\n{\n return in_the_loop() ? '&hellip;' . rw_continue_reading_link() : '&hellip;';\n}", "function tz_excerpt_more($excerpt) {\nreturn str_replace('[...]', '...', $excerpt); }", "function mithpress_auto_excerpt_more( $more ) {\n\treturn ' . . . ' . mithpress_continue_reading_link();\n}", "function the_excerpt_limit($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'...';\n } else {\n $excerpt = implode(\" \",$excerpt);\n }\n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n echo $excerpt;\n}", "function excerpt($num) {\n$limit = $num+1;\n$excerpt = explode(' ', get_the_excerpt(), $limit);\narray_pop($excerpt);\n$excerpt = implode(\" \",$excerpt).\" <a href='\" .get_permalink($post->ID) .\" ' class='\".readmore.\"'>Read More</a>\";\necho $excerpt;\n}", "function echotheme_auto_excerpt_more($more) {\n\treturn '&hellip; <br />' . echotheme_continue_reading_link();\n}", "function excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'...';\n } else {\n $excerpt = implode(\" \",$excerpt);\n } \n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n }", "function wpdocs_custom_excerpt_length( $length ) {\n return 25;\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 25;\n}", "public function setEnd(string $end)\n {\n $this->end = $end;\n\n return $this;\n }", "function excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'....';\n } else {\n $excerpt = implode(\" \",$excerpt);\n } \n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}", "function excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'....';\n } else {\n $excerpt = implode(\" \",$excerpt);\n } \n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}", "function labs_auto_excerpt_more( $more ) {\n\treturn ' &hellip;' . labs_continue_reading_link();\n}", "function start_replace_excerpt_more( $more ) {\n\tglobal $post;\n\t// edit here if you like\n\treturn null;\n}", "function my_excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n\tarray_pop($excerpt);\n\t$excerpt = implode(\" \",$excerpt).'...';\n } else {\n\t$excerpt = implode(\" \",$excerpt);\n } \n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}", "public function end($end)\n {\n $this->end = (string) $end;\n return $this;\n }", "function register_block_core_post_excerpt()\n {\n }", "function new_excerpt_more( $more ) {\n return '';\n}", "function medigroup_mikado_excerpt_more($more) {\n return '...';\n }", "function excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'...';\n } else {\n $excerpt = implode(\" \",$excerpt);\n }\t\n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}", "public function excerpt()\n\t{\n\t\treturn ( ! empty($this->excerpt))? $this->excerpt : truncate_word($this->content, 200);\n\t}", "public static function excerpt_more( $more ) {\n\t\t\treturn '';\n\t\t}", "function custom_excerpt_length(){\n\t\treturn 25;\n\t}", "function wpdocs_custom_excerpt_length( $length ) {\n return 1000;\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 150;\n}", "public function end($end);", "function custom_excerpt($content, $limit) {\n\n\t$excerpt = explode(' ', $content, $limit);\t\n\n\tif (count($excerpt)>=$limit) {\n\n\t\tarray_pop($excerpt);\n\t\t$excerpt = implode(\" \",$excerpt).'...';\n\n\t} else {\n\n\t\t$excerpt = implode(\" \",$excerpt);\n\t\t\n\t} \n\n\t$excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n\treturn $excerpt;\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 15;\n}", "function cc_post_excerpt() {\n\tglobal $post;\n\n\t$excerpt = htmlentities(strip_tags($post->post_content));\n\t$excerpt_a = array_slice (explode(\" \", $excerpt), 0, 55);\n\techo implode(\" \", $excerpt_a) . \"...\";\n}", "function excerpt($limit) {\n\t$excerpt = explode(' ', get_the_excerpt(), $limit);\n\tif (count($excerpt)>=$limit) {\n\t\tarray_pop($excerpt);\n\t\t$excerpt = implode(\" \",$excerpt).'...';\n\t} else {\n\t\t$excerpt = implode(\" \",$excerpt);\n\t} \n\t$excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n\treturn $excerpt;\n}", "function voyage_mikado_excerpt_more($more) {\n return '...';\n }", "function excerpt($limit) {\n\t $excerpt = explode(' ', get_the_excerpt(), $limit);\n\t if (count($excerpt)>=$limit) {\n\t array_pop($excerpt);\n\t $excerpt = implode(\" \",$excerpt).'...';\n\t } else {\n\t $excerpt = implode(\" \",$excerpt);\n\t } \n\t $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n\t return $excerpt;\n\t}", "function my_string_limit_char($excerpt, $substr=0)\r\n{\r\n\r\n\t$string = strip_tags(str_replace('...', '...', $excerpt));\r\n\tif ($substr>0) {\r\n\t\t$string = substr($string, 0, $substr);\r\n\t}\r\n\treturn $string;\r\n\t\t}", "public static function end()\n\t{\n\t\treturn '\n\t\t</div>\n\t</div>\n</div>\n<!-- CE: End Pagination -->\n';\n\t}", "function wpdocs_custom_excerpt_length( $length ) {\n return 20;\n }", "function excerpt($limit) {\n\t\t$excerpt = explode(' ', get_the_excerpt(), $limit);\n\t\tif (count($excerpt)>=$limit) {\n\t\t\tarray_pop($excerpt);\n\t\t\t$excerpt = implode(\" \",$excerpt).'...';\n\t\t}\n\t\telse {\n\t\t\t$excerpt = implode(\" \",$excerpt);\n\t\t}\n\t\t$excerpt = preg_replace('`[[^]]*]`','',$excerpt);\n\t\treturn $excerpt;\n\t}", "function wpdocs_custom_excerpt_length( $length ) {\n return 8;\n}", "function echotheme_custom_excerpt_more($output) {\n\tif (has_excerpt() && ! is_attachment()) {\n\t\t$output .= echotheme_continue_reading_link();\n\t}\n\treturn $output;\n}", "function excerpt($limit) {\n\t$excerpt = explode(' ', get_the_excerpt(), $limit);\n\tif (count($excerpt)>=$limit) {\n\t\tarray_pop($excerpt);\n\t\t$excerpt = implode(\" \",$excerpt).'...';\n\t} else {\n\t\t$excerpt = implode(\" \",$excerpt);\n\t}\n\t$excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n\treturn $excerpt;\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 30;\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 30;\n}", "function excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'...';\n } else {\n $excerpt = implode(\" \",$excerpt);\n }\n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}", "function wpdocs_custom_excerpt_length($length) {\n return 12;\n }", "function wpdocs_custom_excerpt_length( $length ) {\r\n return 45;\r\n}", "public function getExcerptAttribute()\n {\n return str_limit(strip_tags($this->description), 140);\n }", "function wpdocs_custom_excerpt_length( $length ) {\r\n return 20;\r\n}", "function new_excerpt_more( $more ) {\n\treturn '...';\n}", "public function setEndAt($end_at)\n {\n $this->end_at = $end_at;\n }", "function postExcerpt($content) {\n\t\t$clean = strip_tags($content);\n\t\tif (strlen($clean) > 120){\n\t\t\t$excerpt = substr($clean, 0, strpos($clean, ' ', 120));\n\t\t\tprint $excerpt . ' ...';\n\t\t}\n\t}", "public function setEnd($end) {\n\t\t$this->attributes['end'] = $end;\n\t\t$this->end = $end;\n\t\treturn $this;\n\t}", "public function post_excerpt( $key ) {\n\t\t$this->data['post_excerpt'] = $key;\n\t}", "function custom_excerpt_length() {\n\treturn 100;\n}", "function voyage_mikado_excerpt($excerpt_length = '') {\n global $post;\n\n if(post_password_required()) {\n echo get_the_password_form();\n } //does current post has read more tag set?\n elseif(voyage_mikado_post_has_read_more()) {\n global $more;\n\n //override global $more variable so this can be used in blog templates\n $more = 0;\n the_content(true);\n } //is word count set to something different that 0?\n elseif($excerpt_length != '0') {\n //if word count is set and different than empty take that value, else that general option from theme options\n $word_count = '45';\n if(isset($excerpt_length) && $excerpt_length != \"\") {\n $word_count = $excerpt_length;\n\n } elseif(voyage_mikado_options()->getOptionValue('number_of_chars') != '') {\n $word_count = esc_attr(voyage_mikado_options()->getOptionValue('number_of_chars'));\n }\n //if post excerpt field is filled take that as post excerpt, else that content of the post\n $post_excerpt = $post->post_excerpt != \"\" ? $post->post_excerpt : strip_tags($post->post_content);\n\n //remove leading dots if those exists\n $clean_excerpt = strlen($post_excerpt) && strpos($post_excerpt, '...') ? strstr($post_excerpt, '...', true) : $post_excerpt;\n\n //if clean excerpt has text left\n if($clean_excerpt !== '') {\n //explode current excerpt to words\n $excerpt_word_array = explode(' ', $clean_excerpt);\n\n //cut down that array based on the number of the words option\n $excerpt_word_array = array_slice($excerpt_word_array, 0, $word_count);\n\n //add exerpt postfix\n $excert_postfix = apply_filters('voyage_mikado_excerpt_postfix', '...');\n\n //and finally implode words together\n $excerpt = implode(' ', $excerpt_word_array).$excert_postfix;\n\n //is excerpt different than empty string?\n if($excerpt !== '') {\n echo '<p class=\"mkdf-post-excerpt\">'.wp_kses_post($excerpt).'</p>';\n }\n }\n }\n }", "function uwmadison_auto_excerpt_more( $more ) {\n\t\treturn ' &hellip;' . uwmadison_continue_reading_link();\n\t}", "function gg_add_metabox_excerpt() {\n add_meta_box(\n 'gg_single_excerpt',\n 'Excerpt',\n 'gg_create_field_excerpt',\n 'testowy',\n 'normal',\n 'high'\n );\n }", "public function getExcerpt($nb = NULL)\n {\n if ($this->getResume() != NULL) return $this->getResume();\n \n $text = $this->getTexte();\n $excerpt = substr($text, 0, $nb);\n $excerpt = substr($excerpt, 0, strrpos($excerpt, \" \"));\n $etc = \"...\";\n $excerpt = $excerpt.$etc;\n return $excerpt;\n }", "function excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt);\n } else {\n $excerpt = implode(\" \",$excerpt);\n } \n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}", "function dustrial_excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'';\n } else {\n $excerpt = implode(\" \",$excerpt);\n } \n $excerpt = preg_replace('`[[^]]*]`','',$excerpt);\n return $excerpt;\n}", "function new_excerpt_length($length) {\nreturn 50;\n}", "function new_excerpt_length($length) {\nreturn 50;\n}", "protected function prepare_excerpt_response($excerpt, $post)\n {\n }", "function wpdocs_custom_excerpt_length( $length ) {\n return 40;\n}", "public function excerpt($length = 300);", "function custom_excerpt_length( $length ) {\n\treturn 25;\n}", "function ration_excerpt_more( $more ) {\n\t\treturn ' ';\n\t}", "function wpdocs_custom_excerpt_length( $length ) {\n return 26;\n\t\t}", "function trim_excerpt($text) { return rtrim($text,'[...]'); }", "public function getNoteExcerptAttribute()\n {\n return $this->note ? (\n strlen($this->note) >= 30 ? substr($this->note,0, 30) . '...' : $this->note\n ): '';\n }", "function custom_excerpt_more( $more ) {\r\n\t return '...';\r\n}", "public function excerpt(): string\n {\n $excerpt = get_the_excerpt($this->wpPost);\n\n return $this->setAttribute(__METHOD__, $excerpt);\n }", "public function end() {\n\n $this->current = 0;\n\n // remove the suffix which was set by self::start()\n $suffixes = Zend_Registry::get(\"pimcore_tag_block_current\");\n array_pop($suffixes);\n Zend_Registry::set(\"pimcore_tag_block_current\", $suffixes);\n\n $this->outputEditmode(\"</div>\");\n }", "public function setEnd($val)\n {\n $this->_propDict[\"end\"] = $val;\n return $this;\n }", "static function add_eb_nom_end(): void {\r\n\t\tself::add_acf_inner_field(self::ebs, self::eb_nom_end, [\r\n\t\t\t'label' => 'Nomination period end',\r\n\t\t\t'type' => 'text',\r\n\t\t\t'instructions' => 'e.g. March 26 @ 11 p.m.',\r\n\t\t\t'required' => 1,\r\n\t\t\t'conditional_logic' => [\r\n\t\t\t\t[\r\n\t\t\t\t\t[\r\n\t\t\t\t\t\t'field' => self::qualify_field(self::eb_finished),\r\n\t\t\t\t\t\t'operator' => '!=',\r\n\t\t\t\t\t\t'value' => '1',\r\n\t\t\t\t\t],\r\n\t\t\t\t],\r\n\t\t\t],\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t]);\r\n\t}", "function wpdocs_custom_excerpt_length( $length ) {\n\treturn 18;\n}", "function d4tw_custom_excerpt_length( $length ) {\r\nreturn 35;\r\n}", "function custom_excerpt_length(){\n return 25;\n}", "function custom_excerpt_length(){\n return 25;\n}", "function custom_excerpt_length( $length ) {\nreturn 20;\n}", "function custom_excerpt_length( $length ) {\r\n return 50;\r\n}", "public static function excerpt_length() {\n\t\t\t$cpt = self::get_post_type();\n\n\t\t\tif ( $cpt && $cpt !== 'post' ) {\n\t\t\t\treturn self::option( 'post_excerpt_' . $cpt, 20 );\n\t\t\t}\n\n\t\t\treturn self::option( 'post_excerpt', 20 );\n\t\t}", "function tn_custom_excerpt_length( $length ) {\r\n return 15;\r\n}", "function wprt_excerpt_more( $more ) {\n\treturn '&hellip;';\n}", "function wprm_custom_excerpt_length( $length ) {\n return 200;\n}", "function excerpt($limit)\n{\n\t$excerpt = explode(' ', do_shortcode(get_the_content()), $limit);\n\n\tif (count($excerpt)>=$limit)\n\t{\n\t\tarray_pop($excerpt);\n\t\t$excerpt = implode(\" \",$excerpt).'...';\n\t}\n\telse\n\t{\n\t\t$excerpt = implode(\" \",$excerpt);\n\t}\n\t\t$excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n\t\treturn $excerpt;\n}", "function maat_variable_length_excerpt($text, $length, $finish_sentence = 1)\n{\n\n $tokens = array();\n $out = '';\n $word = 0;\n\n //Divide the string into tokens; HTML tags, or words, followed by any whitespace.\n $regex = '/(<[^>]+>|[^<>\\s]+)\\s*/u';\n preg_match_all($regex, $text, $tokens);\n foreach ($tokens[0] as $t) {\n //Parse each token\n if ($word >= $length && !$finish_sentence) {\n //Limit reached\n break;\n }\n if ($t[0] != '<') {\n //Token is not a tag.\n //Regular expression that checks for the end of the sentence: '.', '?' or '!'\n $regex1 = '/[\\?\\.\\!]\\s*$/uS';\n if ($word >= $length && $finish_sentence && preg_match($regex1, $t) == 1) {\n //Limit reached, continue until ? . or ! occur to reach the end of the sentence.\n $out .= trim($t);\n break;\n }\n $word++;\n }\n //Append what's left of the token.\n $out .= $t;\n }\n //Add the excerpt ending as a link.\n $excerpt_end = '';\n\n //Add the excerpt ending as a non-linked ellipsis with brackets.\n //$excerpt_end = ' [&hellip;]';\n\n //Append the excerpt ending to the token.\n $out .= $excerpt_end;\n\n return trim(force_balance_tags($out));\n}" ]
[ "0.59883", "0.5922214", "0.5890393", "0.5856856", "0.57968324", "0.5759573", "0.55200624", "0.5514128", "0.5493126", "0.54888433", "0.5480273", "0.54789585", "0.5445467", "0.5410916", "0.5407641", "0.53905845", "0.53852606", "0.5382787", "0.5370503", "0.5367101", "0.5358457", "0.5293661", "0.5293294", "0.5293294", "0.52860695", "0.5276241", "0.5276241", "0.5249451", "0.52418375", "0.5241105", "0.5239944", "0.5227316", "0.5221764", "0.52192", "0.52188224", "0.5216739", "0.5215889", "0.5207541", "0.5206184", "0.5201553", "0.51992553", "0.5197514", "0.5197141", "0.51945394", "0.519432", "0.51936734", "0.5187864", "0.518622", "0.5181783", "0.518123", "0.51809543", "0.51806396", "0.5176886", "0.5173583", "0.5171707", "0.5171707", "0.5170164", "0.5165554", "0.51554096", "0.51542705", "0.5154195", "0.51525104", "0.5149652", "0.5148958", "0.5148355", "0.513977", "0.5139594", "0.5136562", "0.5129908", "0.5128828", "0.5128208", "0.51217896", "0.51176906", "0.51172566", "0.51172566", "0.5114362", "0.510953", "0.51082575", "0.51055783", "0.51051897", "0.5102844", "0.50958896", "0.5089466", "0.5087743", "0.5087597", "0.50855833", "0.50824314", "0.5082082", "0.5078485", "0.5077814", "0.5076444", "0.5076444", "0.5069042", "0.5066112", "0.5065291", "0.5063921", "0.5056323", "0.50559604", "0.5054987", "0.50517803" ]
0.544739
12
Add the tabbed widget icons
public function multiwidget_tab_title($title, $slug, $single) { if($single) return ''; $icons = array( 'comment_count' => 'theme-heart', 'date' => 'theme-pencil', 'comments' => 'theme-comment', 'tags' => 'theme-tag', ); if(isset($icons[$slug])) { $title = esc_attr($title); return "<span title='$title'>".do_shortcode('[icon name="'.$icons[$slug].'"]').'</span>'; } return $title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inkpro_set_customizer_tabs_icons() {\r\n\t$mods = inkpro_customizer_get_mods();\r\n\r\n\t$css = '';\r\n\r\n\tforeach ( $mods as $key => $value) {\r\n\t\t\r\n\t\tif ( isset( $value['icon'] ) && isset( $value['id'] ) ) {\r\n\r\n\t\t\t$section_id = $value['id'];\r\n\t\t\t$icon_slug = $value['icon'];\r\n\r\n\t\t\t$css .= '\r\n\t\t\t\t#accordion-section-' . $section_id . ' .accordion-section-title:before{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tfont-family:Dashicons;\r\n\t\t\t\t\tcontent : \"' . inkpro_get_dashicon_css_unicode( $icon_slug ) . '\";\r\n\t\t\t\t\tposition: relative;\r\n\t\t\t\t\ttop: 2px;\r\n\t\t\t\t\tmargin-left: 5px;\r\n\t\t\t\t\tleft: -6px;\r\n\t\t\t\t\tline-height: inherit;\r\n\t\t\t\t\tfont-weight: normal;\r\n\t\t\t\t}\r\n\t\t\t';\r\n\t\t}\r\n\t}\r\n\r\n\tif ( ! SCRIPT_DEBUG ) {\r\n\t\t$css = wolf_compact_css( $css );\r\n\t}\r\n\r\n\twp_add_inline_style( 'inkpro-customizer-style', $css );\r\n}", "protected function buildCssAndRegisterIcons() {}", "function account_tab( $tabs ) {\n\n\t\t$tabs[1000]['points']['icon'] = 'um-faicon-trophy';\n\t\t$tabs[1000]['points']['title'] = __( 'My Points', 'twodayssss' );\n\t\t$tabs[1000]['points']['submit_title'] = __( 'My Points', 'twodayssss' );\n\t\t$tabs[1000]['points']['show_button'] = false;\n\n\t\treturn $tabs;\n\t}", "protected function _register_controls()\n {\n $this->tab_content();\n $this->tab_style();\n }", "public function setIcons() {\n\t\t$this->icons = array(\n\t\t\t'slider' => $this->getSkinURI().'/assets/img/admin-logo-icon.png',\n\t\t\t'carousel' => $this->getSkinURI().'/assets/img/admin-logo-icon.png',\n\t\t\t'testimonial' => $this->getSkinURI().'/assets/img/admin-logo-icon.png',\n\t\t\t'portfolio' => $this->getSkinURI().'/assets/img/admin-logo-icon.png',\n\t\t\t'options' => 'dashicons-admin-generic'\n\t\t);\n\t}", "protected function registerTCAIcons() {}", "public function registerTabs()\n {\n\n Tab::put('promotion.promotion-code', function (TabItem $tab) {\n $tab->key('promotion.promotion-code.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::promotion.promotion-code._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.product.cards._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.image')\n ->label('avored::system.images')\n ->view('avored::catalog.product.cards.images');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.property')\n ->label('avored::system.property')\n ->view('avored::catalog.product.cards.property');\n });\n\n // Tab::put('catalog.product', function (TabItem $tab) {\n // $tab->key('catalog.product.attribute')\n // ->label('avored::system.tab.attribute')\n // ->view('avored::catalog.product.cards.attribute');\n // });\n\n /****** CATALOG CATEGORY TABS *******/\n Tab::put('catalog.category', function (TabItem $tab) {\n $tab->key('catalog.category.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.category._fields');\n });\n\n /****** CATALOG PROPERTY TABS *******/\n Tab::put('catalog.property', function (TabItem $tab) {\n $tab->key('catalog.property.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.property._fields');\n });\n\n /****** CATALOG ATTRIBUTE TABS *******/\n Tab::put('catalog.attribute', function (TabItem $tab) {\n $tab->key('catalog.attribute.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.attribute._fields');\n });\n\n /******CMS PAGES TABS *******/\n Tab::put('cms.page', function (TabItem $tab) {\n $tab->key('cms.page.info')\n ->label('avored::system.basic_info')\n ->view('avored::cms.page._fields');\n });\n\n /******ORDER ORDER STATUS TABS *******/\n Tab::put('order.order-status', function (TabItem $tab) {\n $tab->key('order.order-status.info')\n ->label('avored::system.basic_info')\n ->view('avored::order.order-status._fields');\n });\n\n /****** CUSTOMER GROUPS TABS *******/\n Tab::put('user.customer-group', function (TabItem $tab) {\n $tab->key('user.customer-group.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer-group._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.customer._addresses');\n });\n\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer.show');\n });\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.address._fields');\n });\n\n /******USER ADMIN USER TABS *******/\n Tab::put('user.staff', function (TabItem $tab) {\n $tab->key('user.staff.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.staff._fields');\n });\n Tab::put('user.subscriber', function (TabItem $tab) {\n $tab->key('user.subscriber.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.subscriber._fields');\n });\n\n /******SYSTEM CURRENCY TABS *******/\n Tab::put('system.currency', function (TabItem $tab) {\n $tab->key('system.currency.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.currency._fields');\n });\n\n /******SYSTEM STATE TABS *******/\n Tab::put('system.state', function (TabItem $tab) {\n $tab->key('system.state.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.state._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.role', function (TabItem $tab) {\n $tab->key('system.role.info')\n ->label('avored::system.basic_info')\n ->view('avored::system.role._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.language', function (TabItem $tab) {\n $tab->key('system.language.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.language._fields');\n });\n\n /******SYSTEM CONFIGURATION TABS *******/\n Tab::put('system.configuration', function (TabItem $tab) {\n $tab->key('system.configuration.basic')\n ->label('avored::system.basic_configuration')\n ->view('avored::system.configuration.cards.basic');\n });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.user')\n // ->label('avored::system.tab.user_configuration')\n // ->view('avored::system.configuration.cards.user');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.tax')\n // ->label('avored::system.tax_configuration')\n // ->view('avored::system.configuration.cards.tax');\n // });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.shipping')\n // ->label('avored::system.tab.shipping_configuration')\n // ->view('avored::system.configuration.cards.shipping');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.payment')\n // ->label('avored::system.tab.payment_configuration')\n // ->view('avored::system.configuration.cards.payment');\n // });\n }", "public function register_tabs() {\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/base-form-tab.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/captcha.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/active-campaign.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/get-response.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/mailchimp.php' );\n\n\t\t$tabs = apply_filters( 'jet-engine/dashboard/form-tabs', array(\n\t\t\tnew Captcha(),\n\t\t\tnew Active_Campaign(),\n\t\t\tnew Get_Response(),\n\t\t\tnew Mailchimp(),\n\t\t) );\n\n\t\tforeach ( $tabs as $tab ) {\n\t\t\tif ( $tab instanceof Base_Form_Tab ) {\n\t\t\t\t$this->register_tab( $tab );\n\t\t\t}\n\t\t}\n\t}", "public function add_settings_tabs() {\n\t\t$install_tabs = [ 'git_updater_addons' => esc_html__( 'API Add-Ons', 'git-updater' ) ];\n\t\tadd_filter(\n\t\t\t'gu_add_settings_tabs',\n\t\t\tfunction ( $tabs ) use ( $install_tabs ) {\n\t\t\t\treturn array_merge( $tabs, $install_tabs );\n\t\t\t}\n\t\t);\n\t\tadd_filter(\n\t\t\t'gu_add_admin_page',\n\t\t\tfunction ( $tab, $action ) {\n\t\t\t\t$this->add_admin_page( $tab, $action );\n\t\t\t},\n\t\t\t10,\n\t\t\t2\n\t\t);\n\t}", "protected function createTabs() {}", "function demotheme_admin_tabs( $current = 'general' ) {\n $tabs = array( \n 'demotheme_tab_general' => __( 'General', 'demotheme' ),\n 'demotheme_tab_images' => __( 'Images', 'demotheme' ),\n 'demotheme_tab_social' => __( 'Social', 'demotheme' ),\n 'demotheme_tab_footer' => __( 'Footer', 'demotheme' )\n ); \n $links = array();\n echo '<div id=\"icon-themes\" class=\"icon32\"><br></div>';\n echo '<h2 class=\"nav-tab-wrapper\">';\n foreach( $tabs as $tab => $name ){\n $class = ( $tab == $current ) ? ' nav-tab-active' : '';\n echo \"<a class='nav-tab$class' href='#$tab'>$name</a>\";\n }\n echo '</h2>';\n }", "function klippe_mikado_register_icon_widget( $widgets ) {\n\t\t$widgets[] = 'KlippeMikadoIconWidget';\n\t\t\n\t\treturn $widgets;\n\t}", "function bd_custom_tabs_Widget(){\n\n\t\t// Widget settings\n\t\t$ops = array('classname' => 'widget_custom_tabs', 'description' => __('3 tabs: last posts, popular posts, and last comments', 'wolf'));\n\n\t\t/* Create the widget. */\n\t\tparent::__construct( 'widget_custom_tabs', __('Custom tabs', 'wolf'), $ops );\n\t\t\n\t}", "function addIcon($i){\n return $this->add('Icon',null,'Icon')->set($i)->addClass('atk-size-mega');\n }", "function Dahz_Widget_Icon() {\n\t\t/* Widget settings. */\n $widget_ops = array('classname' => 'icon-widget', 'description' => __('This is a DahzFramework standardized widget to add any type of Fontawesome Icons or Material Design Iconic Font as a widget.', 'dahztheme'));\n\n /* Widget control settings. */\n $control_ops = array('width' => 250, 'height' => 350, 'id_base' => 'icon-widget');\n\n /* Create the widget. */\n WP_Widget::__construct('icon-widget', __('DF Widget - Icon Widget', 'dahztheme'), $widget_ops, $control_ops);\n\t}", "function setTabs(){\n global $ilTabs, $ilCtrl, $ilAccess, $ilLocator;\n\n // show current quiz round inlcuding link and QR code (deadline)\n if ($ilAccess->checkAccess(\"read\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showCurrentRound\", $this->txt(\"tabmenu_showCurrentRound\"), $ilCtrl->getLinkTarget($this, \"showCurrentRound\"));\n }\n\n // tab for the \"edit quiz\" command\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"editQuiz\", $this->txt(\"tabmenu_edit_quiz\"), $ilCtrl->getLinkTarget($this, \"editQuiz\"));\n }\n\n // show round results\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showResults\", $this->txt(\"tabmenu_show_result\"), $ilCtrl->getLinkTarget($this, \"showResults\"));\n }\n\n // a \"properties\" tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"properties\", $this->txt(\"tabmenu_properties\"), $ilCtrl->getLinkTarget($this, \"editProperties\"));\n $this->addPermissionTab();\n }\n\n // information Tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"info\", $this->txt(\"tabmenu_info\"), $ilCtrl->getLinkTarget($this, \"info\"));\n }\n\n }", "function buildTabs()\r\n {\r\n $this->_formBuilt = true;\r\n\r\n // Here we get all page names in the controller\r\n $pages = array();\r\n $myName = $current = $this->getAttribute('id');\r\n while (null !== ($current = $this->controller->getPrevName($current))) {\r\n $pages[] = $current;\r\n }\r\n $pages = array_reverse($pages);\r\n $pages[] = $current = $myName;\r\n while (null !== ($current = $this->controller->getNextName($current))) {\r\n $pages[] = $current;\r\n }\r\n // Here we display buttons for all pages, the current one's is disabled\r\n foreach ($pages as $pageName) {\r\n $disabled = ($pageName == $myName ? array('disabled' => 'disabled')\r\n : array());\r\n\r\n $tabs[] = $this->createElement('submit',\r\n $this->getButtonName($pageName),\r\n ucfirst($pageName),\r\n array('class' => 'flat') + $disabled);\r\n }\r\n $this->addGroup($tabs, 'tabs', null, '&nbsp;', false);\r\n }", "public function set_tabs() {\n\t\t\t$tabs = [\n\t\t\t\t[\n\t\t\t\t\t'id' => 'business_info',\n\t\t\t\t\t'title' => __( 'Business info', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'admin-home',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'opening_hours',\n\t\t\t\t\t'title' => __( 'Opening hours', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'clock',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'maps_settings',\n\t\t\t\t\t'title' => __( 'Map settings', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'location-alt',\n\t\t\t\t],\n\t\t\t];\n\n\t\t\t$tabs = apply_filters( 'wpseo-local-location-meta-tabs', $tabs );\n\n\t\t\t$this->tabs = $tabs;\n\t\t}", "function ds_register_social_icons_widget() {\n\tregister_widget( 'ds_Social_Icons_Widget' );\n}", "public function register_data_tab( $tabs ) {\r\n $tabs['tm_extra_product_options'] = array(\r\n 'label' => __( 'TM Extra Product Options', TM_EPO_TRANSLATION ),\r\n 'target' => 'tm_extra_product_options',\r\n 'class' => array( 'tm_epo_class', 'hide_if_grouped' )\r\n );\r\n return $tabs;\r\n }", "function webplayer_admin_tabs($current = 'webplayer') {\r\n\t$tabs = array('webplayer' => 'HD Webplayer', 'videos' => 'Videos', 'playlist' => 'Playlist', 'license' => 'License', 'documentation' => 'Documentation');\r\n\t$links = array();\r\n\t\r\n\tforeach( $tabs as $tab => $name ) {\r\n\t\tif( $tab == $current) {\r\n\t\t\t$links[] = \"<a class='nav-tab nav-tab-active' href='?page=$tab'>$name</a>\";\r\n\t\t} else {\r\n\t\t\t$links[] = \"<a class='nav-tab' href='?page=$tab'>$name</a>\";\r\n\t\t}\r\n\t}\r\n\t\r\n\techo '<div id=\"icon-upload\" class=\"icon32\"></div>';\r\n\techo \"<h2 class='nav-tab-wrapper'>\";\r\n\tforeach( $links as $link ) {\r\n\t\techo $link;\r\n\t}\r\n\techo \"</h2>\";\r\n\t\r\n}", "function widgets_icons($widgets){\n\t$widgets['SiteOrigin_Panels_Widgets_Layout']['icon'] = 'dashicons dashicons-analytics';\n\t$widgets['button']['icon'] = 'dashicons dashicons-admin-links';\n\t$widgets['SiteOrigin_Widget_GoogleMap_Widget']['icon'] = 'dashicons dashicons-location-alt';\n\treturn $widgets;\n}", "protected function register_content_social_icons_controls() {\n\t\t$this->start_controls_section(\n\t\t\t'section_social_icon',\n\t\t\tarray(\n\t\t\t\t'label' => 'Social Icons',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'social_icons_settings',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Social Icons', 'uael' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Show', 'uael' ),\n\t\t\t\t'label_off' => __( 'Hide', 'uael' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t\t'default' => 'yes',\n\t\t\t)\n\t\t);\n\n\t\t$repeater = new Repeater();\n\n\t\tif ( UAEL_Helper::is_elementor_updated() ) {\n\t\t\t$repeater->add_control(\n\t\t\t\t'new_social',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Icon', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::ICONS,\n\t\t\t\t\t'fa4compatibility' => 'social',\n\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t'value' => 'fab fa-wordpress',\n\t\t\t\t\t\t'library' => 'fa-brands',\n\t\t\t\t\t),\n\t\t\t\t\t'recommended' => array(\n\t\t\t\t\t\t'fa-brands' => array(\n\t\t\t\t\t\t\t'android',\n\t\t\t\t\t\t\t'apple',\n\t\t\t\t\t\t\t'behance',\n\t\t\t\t\t\t\t'bitbucket',\n\t\t\t\t\t\t\t'codepen',\n\t\t\t\t\t\t\t'delicious',\n\t\t\t\t\t\t\t'deviantart',\n\t\t\t\t\t\t\t'digg',\n\t\t\t\t\t\t\t'dribbble',\n\t\t\t\t\t\t\t'elementor',\n\t\t\t\t\t\t\t'facebook',\n\t\t\t\t\t\t\t'flickr',\n\t\t\t\t\t\t\t'foursquare',\n\t\t\t\t\t\t\t'free-code-camp',\n\t\t\t\t\t\t\t'github',\n\t\t\t\t\t\t\t'gitlab',\n\t\t\t\t\t\t\t'globe',\n\t\t\t\t\t\t\t'google-plus',\n\t\t\t\t\t\t\t'houzz',\n\t\t\t\t\t\t\t'instagram',\n\t\t\t\t\t\t\t'jsfiddle',\n\t\t\t\t\t\t\t'linkedin',\n\t\t\t\t\t\t\t'medium',\n\t\t\t\t\t\t\t'meetup',\n\t\t\t\t\t\t\t'mixcloud',\n\t\t\t\t\t\t\t'odnoklassniki',\n\t\t\t\t\t\t\t'pinterest',\n\t\t\t\t\t\t\t'product-hunt',\n\t\t\t\t\t\t\t'reddit',\n\t\t\t\t\t\t\t'shopping-cart',\n\t\t\t\t\t\t\t'skype',\n\t\t\t\t\t\t\t'slideshare',\n\t\t\t\t\t\t\t'snapchat',\n\t\t\t\t\t\t\t'soundcloud',\n\t\t\t\t\t\t\t'spotify',\n\t\t\t\t\t\t\t'stack-overflow',\n\t\t\t\t\t\t\t'steam',\n\t\t\t\t\t\t\t'stumbleupon',\n\t\t\t\t\t\t\t'telegram',\n\t\t\t\t\t\t\t'thumb-tack',\n\t\t\t\t\t\t\t'tripadvisor',\n\t\t\t\t\t\t\t'tumblr',\n\t\t\t\t\t\t\t'twitch',\n\t\t\t\t\t\t\t'twitter',\n\t\t\t\t\t\t\t'viber',\n\t\t\t\t\t\t\t'vimeo',\n\t\t\t\t\t\t\t'vk',\n\t\t\t\t\t\t\t'weibo',\n\t\t\t\t\t\t\t'weixin',\n\t\t\t\t\t\t\t'whatsapp',\n\t\t\t\t\t\t\t'wordpress',\n\t\t\t\t\t\t\t'xing',\n\t\t\t\t\t\t\t'yelp',\n\t\t\t\t\t\t\t'youtube',\n\t\t\t\t\t\t\t'500px',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'fa-solid' => array(\n\t\t\t\t\t\t\t'envelope',\n\t\t\t\t\t\t\t'link',\n\t\t\t\t\t\t\t'rss',\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} else {\n\t\t\t$repeater->add_control(\n\t\t\t\t'social',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Icon', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::ICON,\n\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t'default' => 'fa fa-wordpress',\n\t\t\t\t\t'include' => array(\n\t\t\t\t\t\t'fa fa-android',\n\t\t\t\t\t\t'fa fa-apple',\n\t\t\t\t\t\t'fa fa-behance',\n\t\t\t\t\t\t'fa fa-bitbucket',\n\t\t\t\t\t\t'fa fa-codepen',\n\t\t\t\t\t\t'fa fa-delicious',\n\t\t\t\t\t\t'fa fa-deviantart',\n\t\t\t\t\t\t'fa fa-digg',\n\t\t\t\t\t\t'fa fa-dribbble',\n\t\t\t\t\t\t'fa fa-envelope',\n\t\t\t\t\t\t'fa fa-facebook',\n\t\t\t\t\t\t'fa fa-flickr',\n\t\t\t\t\t\t'fa fa-foursquare',\n\t\t\t\t\t\t'fa fa-free-code-camp',\n\t\t\t\t\t\t'fa fa-github',\n\t\t\t\t\t\t'fa fa-gitlab',\n\t\t\t\t\t\t'fa fa-google-plus',\n\t\t\t\t\t\t'fa fa-houzz',\n\t\t\t\t\t\t'fa fa-instagram',\n\t\t\t\t\t\t'fa fa-jsfiddle',\n\t\t\t\t\t\t'fa fa-linkedin',\n\t\t\t\t\t\t'fa fa-medium',\n\t\t\t\t\t\t'fa fa-meetup',\n\t\t\t\t\t\t'fa fa-mixcloud',\n\t\t\t\t\t\t'fa fa-odnoklassniki',\n\t\t\t\t\t\t'fa fa-pinterest',\n\t\t\t\t\t\t'fa fa-product-hunt',\n\t\t\t\t\t\t'fa fa-reddit',\n\t\t\t\t\t\t'fa fa-rss',\n\t\t\t\t\t\t'fa fa-shopping-cart',\n\t\t\t\t\t\t'fa fa-skype',\n\t\t\t\t\t\t'fa fa-slideshare',\n\t\t\t\t\t\t'fa fa-snapchat',\n\t\t\t\t\t\t'fa fa-soundcloud',\n\t\t\t\t\t\t'fa fa-spotify',\n\t\t\t\t\t\t'fa fa-stack-overflow',\n\t\t\t\t\t\t'fa fa-steam',\n\t\t\t\t\t\t'fa fa-stumbleupon',\n\t\t\t\t\t\t'fa fa-telegram',\n\t\t\t\t\t\t'fa fa-thumb-tack',\n\t\t\t\t\t\t'fa fa-tripadvisor',\n\t\t\t\t\t\t'fa fa-tumblr',\n\t\t\t\t\t\t'fa fa-twitch',\n\t\t\t\t\t\t'fa fa-twitter',\n\t\t\t\t\t\t'fa fa-vimeo',\n\t\t\t\t\t\t'fa fa-vk',\n\t\t\t\t\t\t'fa fa-weibo',\n\t\t\t\t\t\t'fa fa-weixin',\n\t\t\t\t\t\t'fa fa-whatsapp',\n\t\t\t\t\t\t'fa fa-wordpress',\n\t\t\t\t\t\t'fa fa-xing',\n\t\t\t\t\t\t'fa fa-yelp',\n\t\t\t\t\t\t'fa fa-youtube',\n\t\t\t\t\t\t'fa fa-500px',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$repeater->add_control(\n\t\t\t'link',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Link', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::URL,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'default' => array(\n\t\t\t\t\t'is_external' => 'true',\n\t\t\t\t),\n\t\t\t\t'placeholder' => __( 'https://your-link.com', 'uael' ),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'social_icon_list',\n\t\t\tarray(\n\t\t\t\t'type' => Controls_Manager::REPEATER,\n\t\t\t\t'fields' => $repeater->get_controls(),\n\t\t\t\t'default' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'new_social' => array(\n\t\t\t\t\t\t\t'value' => 'fab fa-facebook',\n\t\t\t\t\t\t\t'library' => 'fa-brands',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'new_social' => array(\n\t\t\t\t\t\t\t'value' => 'fab fa-twitter',\n\t\t\t\t\t\t\t'library' => 'fa-brands',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'new_social' => array(\n\t\t\t\t\t\t\t'value' => 'fab fa-google-plus',\n\t\t\t\t\t\t\t'library' => 'fa-brands',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'social_icons_settings' => 'yes',\n\t\t\t\t),\n\t\t\t\t'title_field' => '<# var migrated = \"undefined\" !== typeof __fa4_migrated, social = ( \"undefined\" === typeof social ) ? false : social; #>{{{ elementor.helpers.getSocialNetworkNameFromIcon( new_social, social, true, migrated, true ) }}}',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'shape',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Shape', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'square',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'square' => __( 'Square', 'uael' ),\n\t\t\t\t\t'rounded' => __( 'Rounded', 'uael' ),\n\t\t\t\t\t'circle' => __( 'Circle', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'prefix_class' => 'elementor-shape-',\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'social_icons_settings' => 'yes',\n\t\t\t\t),\n\t\t\t\t'default' => 'rounded',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'social_icons_border_radius',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Radius', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px', '%' ),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'top' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'right' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'bottom' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'left' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'shape' => array( 'rounded' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_section();\n\t}", "function add_galleries_icon() {\n\n\t\t$plugin_css = plugin_dir_url( __FILE__ ) . '/css/admin-style.css';\n\n\t\twp_register_style( 'admin-style', $plugin_css );\n\n\t\twp_enqueue_style( 'admin-style' );\n\t}", "function load_icons() {\n themify_get_icon( 'ti-import' );\n themify_get_icon( 'ti-export' );\n Themify_Enqueue_Assets::loadIcons();\n }", "function woocommerce_product_write_panel_tabs(){\n ?>\n <li class=\"custom_tab\">\n <a href=\"#custom_tab_data_ctabs\">\n <?php _e('Custom Tabs', 'GWP'); ?>\n </a>\n </li>\n <?php\n }", "protected function _register_controls() {\n /*-----------------------------------------------------------------------------------*/\n /* Content TAB\n /*-----------------------------------------------------------------------------------*/\n $this->start_controls_section(\n 'title_section',\n array(\n 'label' => __('APR Heading', 'apr-core' ),\n )\n );\n /* Heading 1*/\n $this->add_control(\n 'title',\n array(\n 'label' => __( 'Title', 'apr-core' ),\n 'type' => Controls_Manager::TEXTAREA,\n 'dynamic' => array(\n 'active' => true\n ),\n 'placeholder' => __( 'Enter your title', 'apr-core' ),\n 'default' => __( 'Enter your title', 'apr-core' ),\n 'label_block' => true,\n )\n );\n $this->add_control(\n 'heading_size',\n array(\n 'label' => __( 'HTML Tag', 'apr-core' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => array(\n 'h1' => __( 'H1', 'apr-core' ),\n 'h2' => __( 'H2', 'apr-core' ),\n 'h3' => __( 'H3', 'apr-core' ),\n 'h4' => __( 'H4', 'apr-core' ),\n 'h5' => __( 'H5', 'apr-core' ),\n 'p' => __( 'p', 'apr-core' ),\n ),\n 'default' => 'h3',\n )\n );\n $this->add_control(\n 'link',\n [\n 'label' => __( 'Link', 'elementor' ),\n 'type' => Controls_Manager::URL,\n 'dynamic' => [\n 'active' => true,\n ],\n 'default' => [\n 'url' => '',\n ],\n 'separator' => 'before',\n ]\n );\n $this->add_responsive_control(\n 'alignment',\n array(\n 'label' => __('Alignment', 'apr-core'),\n 'type' => Controls_Manager::CHOOSE,\n 'default' => 'left',\n 'options' => array(\n 'left' => array(\n 'title' => __( 'Left', 'apr-core' ),\n 'icon' => 'fa fa-align-left',\n ),\n 'center' => array(\n 'title' => __( 'Center', 'apr-core' ),\n 'icon' => 'fa fa-align-center',\n ),\n 'right' => array(\n 'title' => __( 'Right', 'apr-core' ),\n 'icon' => 'fa fa-align-right',\n )\n ),\n )\n );\n $this->add_control(\n 'description',\n array(\n 'label' => __( 'Description', 'apr-core' ),\n 'type' => Controls_Manager::TEXTAREA,\n 'dynamic' => array(\n 'active' \t=> true\n ),\n )\n );\n $this->add_control(\n 'description_position',\n [\n 'label' => __( 'Description Position', 'apr-core' ),\n 'type' => Controls_Manager::SELECT,\n 'default' => 'bottom',\n 'options' => [\n 'aside' => __( 'Aside', 'apr-core' ),\n 'bottom' => __( 'Bottom', 'apr-core' ),\n ],\n ]\n );\n $this->add_control(\n 'list_divider',\n [\n 'label' => __( 'Divider', 'apr-core' ),\n 'type' => Controls_Manager::SWITCHER,\n 'default' => 'no',\n 'separator' => 'before',\n ]\n );\n\n $this->add_control(\n 'divider_position',\n [\n 'label' => __( 'Position', 'apr-core' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n 'top' => __( 'Top', 'apr-core' ),\n 'bottom' => __( 'Bottom', 'apr-core' )\n ],\n 'default' => 'bottom',\n 'condition' => [\n 'list_divider' => 'yes',\n ]\n ]\n );\n\n $this->add_control(\n 'divider_color',\n [\n 'label' => __( 'Color', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'default' => '',\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_3,\n ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'background-color: {{VALUE}};',\n ],\n ]\n );\n $this->add_control(\n 'divider_color_hover',\n [\n 'label' => __( 'Color Hover', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'default' => '',\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_3,\n ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:hover:before' => 'background-color: {{VALUE}};',\n ],\n ]\n );\n $this->add_responsive_control(\n 'divider_top',\n [\n 'label' => __( 'Top Space', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'default' => [\n 'size' => '',\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n ],\n 'size_units' => [ 'px' ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'top: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'divider_left',\n [\n 'label' => __( 'Left Space', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'default' => [\n 'size' => '',\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n ],\n 'size_units' => [ 'px' ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'left: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'divider_weight',\n [\n 'label' => __( 'Height', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'default' => [\n 'size' => 1,\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n '%' => [\n 'min' => 0,\n 'max' => 100,\n ],\n ],\n 'size_units' => [ '%', 'px' ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'height: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'divider_width',\n [\n 'label' => __( 'Width', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'default' => [\n 'size' => 100,\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n '%' => [\n 'min' => 0,\n 'max' => 100,\n ],\n ],\n 'size_units' => [ '%', 'px' ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'width: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n \n $this->end_controls_section();\n /*-----------------------------------------------------------------------------------*/\n /* Style TAB\n /*-----------------------------------------------------------------------------------*/\n $this->start_controls_section(\n 'title_style_section',\n array(\n 'label' => __( 'Color', 'apr-core' ),\n 'tab' => Controls_Manager::TAB_STYLE,\n )\n );\n $this->add_control(\n 'title_color',\n [\n 'label' => __( 'Title Color', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n // Stronger selector to avoid section style from overwriting\n '{{WRAPPER}} .heading-modern .heading-title,\n {{WRAPPER}} .heading-modern .heading-title a' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->add_control(\n 'desc_color',\n [\n 'label' \t=> __( 'Description color', 'apr-core' ),\n 'type' \t\t=> Controls_Manager::COLOR,\n 'scheme' \t=> [\n 'type' \t\t=> Scheme_Color::get_type(),\n 'value' \t=> Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .description' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->end_controls_section();\n $this->start_controls_section(\n 'desc_style',\n array(\n 'label' => __( 'Typography', 'apr-core' ),\n 'tab' => Controls_Manager::TAB_STYLE,\n )\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' \t\t=> 'title_typo',\n 'label' \t=> __( 'Title', 'apr-core' ),\n 'selector' => '{{WRAPPER}} .heading-modern .heading-title',\n ]\n );\n $this->add_responsive_control(\n 'title_width',\n array(\n 'label' => __('Max width Title','apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => array('px','%'),\n 'range' => array(\n '%' => array(\n 'min' => 1,\n 'max' => 100,\n ),\n 'px' => array(\n 'min' => 1,\n 'max' => 1600,\n 'step' => 5\n )\n ),\n 'selectors' => array(\n '{{WRAPPER}} .heading-modern .heading-title' => 'max-width:{{SIZE}}{{UNIT}};'\n ),\n )\n );\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' \t\t=> 'desc_typo',\n 'label' \t=> __( 'Description', 'apr-core' ),\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' \t=> '{{WRAPPER}} .heading-modern .description',\n ]\n );\n $this->add_responsive_control(\n 'desc_width',\n array(\n 'label' => __('Max width Description','apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => array('px','%'),\n 'range' => array(\n '%' => array(\n 'min' => 1,\n 'max' => 100,\n ),\n 'px' => array(\n 'min' => 1,\n 'max' => 1600,\n 'step' => 5\n )\n ),\n 'selectors' => array(\n '{{WRAPPER}} .heading-modern .description' => 'max-width:{{SIZE}}{{UNIT}};'\n ),\n )\n );\n $this->add_responsive_control(\n 'title_margin',\n array(\n 'label' => __( 'Margin Title', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', '%' ],\n 'allowed_dimensions' => 'vertical',\n 'placeholder' => [\n 'top' => '',\n 'right' => 'auto',\n 'bottom' => '',\n 'left' => 'auto',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .heading-title' => 'margin-top: {{TOP}}{{UNIT}}; margin-bottom: {{BOTTOM}}{{UNIT}};',\n ],\n )\n );\n\n $this->add_responsive_control(\n 'title_padding',\n [\n 'label' => __( 'Padding Title', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', 'em', '%' ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .heading-title' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'\n ],\n ]\n );\n $this->add_responsive_control(\n 'desc_margin',\n array(\n 'label' => __( 'Margin Description', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', '%' ],\n 'allowed_dimensions' => 'vertical',\n 'placeholder' => [\n 'top' => '',\n 'right' => 'auto',\n 'bottom' => '',\n 'left' => 'auto',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .description' => 'margin-top: {{TOP}}{{UNIT}}; margin-bottom: {{BOTTOM}}{{UNIT}};',\n ],\n )\n );\n $this->add_responsive_control(\n 'description_padding',\n [\n 'label' => __( 'Padding Description', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', 'em', '%' ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .description' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'\n ],\n ]\n );\n $this->add_control(\n 'title_color_hover',\n [\n 'label' => __( 'Title Color Hover', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n // Stronger selector to avoid section style from overwriting\n '{{WRAPPER}} .heading-modern .heading-title:hover,\n {{WRAPPER}} .heading-modern .heading-title a:hover' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->add_control(\n 'desc_color_hover',\n [\n 'label' => __( 'Description Color Hover', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n // Stronger selector to avoid section style from overwriting\n '{{WRAPPER}} .heading-modern .description:hover' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->end_controls_section();\n }", "public function display_tablenav( $which ) \n{\n ?>\n <div class=\"tablenav <?php echo esc_attr( $which ); ?>\">\n\n <div class=\"alignleft actions\">\n <?php $this->bulk_actions(); ?>\n </div>\n <?php\n $this->extra_tablenav( $which );\n $this->pagination( $which );\n ?>\n <br class=\"clear\" />\n </div>\n <?php\n}", "public function setButtonsIcons() {\n $defaultSettings = $this->getDefaultSettings();\n $this->settings['labels']['start'] = $defaultSettings['labels']['start'];\n $this->settings['labels']['previous'] = $defaultSettings['labels']['previous'];\n $this->settings['labels']['next'] = $defaultSettings['labels']['next'];\n $this->settings['labels']['end'] = $defaultSettings['labels']['end'];\n return $this;\n }", "protected function _addTab(\n TDProject_Core_Interfaces_Block_Widget_Tab $tab) {\n \t$this->addBlock($tab);\n \treturn $tab;\n }", "function add_from_tab() {\n ?>\n <a href=\"#wpuf-metabox-qr-code\" class=\"nav-tab\" id=\"wpuf-qr-code-tab\"><?php _e( 'QR Code', 'wpuf-pro' ); ?></a>\n <?php\n }", "public function after_tab( $tab ) {\r\n\t\t// Don't display the count on the network admin for MU.\r\n\t\tif ( 'bulk' === $tab && ! is_network_admin() ) {\r\n\t\t\t$remaining = $this->get_total_images_to_smush();\r\n\t\t\techo '<span class=\"sui-tag sui-tag-warning wp-smush-remaining-count' . ( 0 < $remaining ? '' : ' sui-hidden' ) . '\">' . absint( $remaining ) . '</span>';\r\n\t\t\techo '<i class=\"sui-icon-check-tick sui-success' . ( 0 < $remaining ? ' sui-hidden' : '' ) . '\" aria-hidden=\"true\"></i>';\r\n\t\t} elseif ( 'cdn' === $tab ) {\r\n\t\t\t$status = WP_Smush::get_instance()->core()->mod->cdn->status();\r\n\t\t\tif ( 'overcap' === $status ) {\r\n\t\t\t\techo '<i class=\"sui-icon-warning-alert sui-error\" aria-hidden=\"true\"></i>';\r\n\t\t\t} elseif ( 'upgrade' === $status || 'activating' === $status ) {\r\n\t\t\t\techo '<i class=\"sui-icon-warning-alert sui-warning\" aria-hidden=\"true\"></i>';\r\n\t\t\t} elseif ( 'enabled' === $status ) {\r\n\t\t\t\techo '<i class=\"sui-icon-check-tick sui-success\" aria-hidden=\"true\"></i>';\r\n\t\t\t}\r\n\t\t} elseif ( 'lazy_load' === $tab && $this->settings->get( 'lazy_load' ) ) {\r\n\t\t\techo '<i class=\"sui-icon-check-tick sui-success\" aria-hidden=\"true\"></i>';\r\n\t\t} elseif ( 'webp' === $tab ) {\r\n\t\t\tif ( ! WP_Smush::is_pro() || ! $this->settings->get( 'webp_mod' ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif ( true === WP_Smush::get_instance()->core()->mod->webp->is_configured() ) {\r\n\t\t\t\techo '<i id=\"webp-tab-icon\" class=\"sui-icon-check-tick sui-success\" aria-hidden=\"true\"></i>';\r\n\t\t\t} else {\r\n\t\t\t\techo '<i id=\"webp-tab-icon\" class=\"sui-icon-warning-alert sui-warning\" aria-hidden=\"true\"></i>';\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function registerTab()\n {\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.review')\n ->label('a-review::review.product-tab')\n ->view('a-review::admin.review.tab');\n });\n }", "private function installModuleTabs()\n {\n foreach ($this->admin_tabs as $value) {\n @copy(_PS_MODULE_DIR_ . $this->name . '/logo.png', _PS_IMG_DIR_ . 't/' . $value['class'] . '.png');\n $parent_tab = new Tab();\n $parent_tab->name[$this->context->language->id] = $this->l($value['title']);\n $parent_tab->class_name = $value['class'];\n $parent_tab->id_parent = 0; // Home tab\n $parent_tab->module = $this->name;\n $parent_tab->add();\n \n if (isset($value['children'])) {\n foreach ($value['children'] as $k => $v) {\n $tab = new Tab();\n // Need a foreach for the language\n foreach (Language::getLanguages(true) as $lang)\n $tab->name[$lang['id_lang']] = $this->l($v);\n \n $tab->class_name = $k;\n $tab->id_parent = $parent_tab->id;\n $tab->module = $this->name;\n $tab->add();\n }\n \n foreach ($value['hidden'] as $k => $v) {\n $tab = new Tab();\n // Need a foreach for the language\n foreach (Language::getLanguages(true) as $lang)\n $tab->name[$lang['id_lang']] = $this->l($v);\n \n $tab->class_name = $k;\n $tab->id_parent = - 1;\n $tab->module = $this->name;\n $tab->add();\n }\n }\n }\n \n return true;\n }", "function side_tab_register_sidebars() {\r\n $Sidetab_newOptions = get_option('Sidetab_options');\r\n $tabs=$Sidetab_newOptions['tabs'];\r\n for($i=1;$i<=$tabs;$i++){\r\n register_sidebar( array( 'name' => __('Side Tab'.$i, 'side-tab'), 'id' => 'side-tab'.$i, 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s widget-%2$s\"><div class=\"widget-inside\">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class=\"widget-title\">', 'after_title' => '</h3>' ) ); \r\n }\r\n \r\n\t\r\n}", "protected function register_style_team_member_icon() {\n\t\t$this->start_controls_section(\n\t\t\t'section_social_style',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Social Icons', 'uael' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'social_icons_settings' => 'yes',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'icon_size',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Icon Size', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 6,\n\t\t\t\t\t\t'max' => 50,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon' => 'font-size: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon svg' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'icon_padding',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Padding', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon' => 'padding: {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t\t'tablet_default' => array(\n\t\t\t\t\t'unit' => 'em',\n\t\t\t\t),\n\t\t\t\t'mobile_default' => array(\n\t\t\t\t\t'unit' => 'em',\n\t\t\t\t),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'em' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 5,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$icon_spacing = is_rtl() ? 'margin-left: {{SIZE}}{{UNIT}};' : 'margin-right: {{SIZE}}{{UNIT}};';\n\n\t\t$this->add_responsive_control(\n\t\t\t'icon_spacing',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Spacing', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:not(:last-child)' => $icon_spacing,\n\t\t\t\t),\n\t\t\t\t'separator' => 'after',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'icon_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'default',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'default' => __( 'Official Color', 'uael' ),\n\t\t\t\t\t'custom' => __( 'Custom', 'uael' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->start_controls_tabs(\n\t\t\t'icon_style_tabs'\n\t\t);\n\n\t\t$this->start_controls_tab(\n\t\t\t'icon_style_normal_tab',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Normal', 'uael' ),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'icon_color' => 'custom',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'icon_primary_color_normal',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Background Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'icon_color' => 'custom',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:not(:hover), {{WRAPPER}} .elementor-social-icon:not(:hover) svg' => 'background-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'icon_secondary_color_normal',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Icon Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'icon_color' => 'custom',\n\t\t\t\t),\n\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:not(:hover) i' => 'color: {{VALUE}};',\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:not(:hover) svg' => 'fill: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'icon_style_hover_tab',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover', 'uael' ),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'icon_color' => 'custom',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'icon_primary_color_hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Background Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'icon_color' => 'custom',\n\t\t\t\t),\n\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:hover, {{WRAPPER}} .elementor-social-icon:hover svg' => 'background-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'icon_secondary_color_hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Icon Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'icon_color' => 'custom',\n\t\t\t\t),\n\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:hover i' => 'color: {{VALUE}};',\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:hover svg' => 'fill: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\t\t$this->end_controls_tabs();\n\n\t\t$this->add_control(\n\t\t\t'social_icon_border',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Style', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'none',\n\t\t\t\t'label_block' => false,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'none' => __( 'None', 'uael' ),\n\t\t\t\t\t'solid' => __( 'Solid', 'uael' ),\n\t\t\t\t\t'double' => __( 'Double', 'uael' ),\n\t\t\t\t\t'dotted' => __( 'Dotted', 'uael' ),\n\t\t\t\t\t'dashed' => __( 'Dashed', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon' => 'border-style: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t\t$this->add_control(\n\t\t\t\t'social_icon_border_size',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Border Width', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t'top' => '1',\n\t\t\t\t\t\t'bottom' => '1',\n\t\t\t\t\t\t'left' => '1',\n\t\t\t\t\t\t'right' => '1',\n\t\t\t\t\t\t'unit' => 'px',\n\t\t\t\t\t),\n\t\t\t\t\t'condition' => array(\n\t\t\t\t\t\t'social_icon_border!' => 'none',\n\t\t\t\t\t),\n\t\t\t\t\t'selectors' => array(\n\t\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; box-sizing:content-box;',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->add_control(\n\t\t\t\t'social_icon_border_color',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Border Color', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t\t'scheme' => array(\n\t\t\t\t\t\t'type' => Scheme_Color::get_type(),\n\t\t\t\t\t\t'value' => Scheme_Color::COLOR_1,\n\t\t\t\t\t),\n\t\t\t\t\t'condition' => array(\n\t\t\t\t\t\t'social_icon_border!' => 'none',\n\t\t\t\t\t),\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'selectors' => array(\n\t\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon' => 'border-color: {{VALUE}};',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t$this->add_control(\n\t\t\t'social_icon_border_hover_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Hover Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'scheme' => array(\n\t\t\t\t\t'type' => Scheme_Color::get_type(),\n\t\t\t\t\t'value' => Scheme_Color::COLOR_2,\n\t\t\t\t),\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:hover' => 'border-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'social_icon_border!' => 'none',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'icon_hover_animation',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover Animation', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::HOVER_ANIMATION,\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_section();\n\t}", "function tabber_tabs_plugin_init() {\n\n\t// Loads and registers the new widget.\n\tadd_action( 'widgets_init', 'tabber_tabs_load_widget' );\n\n\t// Add Javascript if not admin area. No need to run in backend.\n\tif ( !is_admin() ) {\n\t\t\n\t};\n\n\t// Hide Tabber until page load \n\tadd_action( 'wp_head', 'tabber_tabs_temp_hide' );\n\t\t\n\t// Load css \n\tadd_action( 'wp_head', 'tabber_tabs_css' );\n\t\n}", "function tabber_tabs_plugin_init() {\n\n\t// Loads and registers the new widget.\n\tadd_action( 'widgets_init', 'tabber_tabs_load_widget' );\n\t\n\t//Registers the new widget area.\n\tregister_sidebar(\n\t\tarray(\n\t\t\t'name' => __('WPZOOM: Tabs Widget Area'),\n\t\t\t'id' => 'tabber_tabs',\n\t\t\t'description' => __('Build your tabbed area by placing widgets here. !! DO NOT PLACE THE WPZOOM: TABS IN THIS AREA. '),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"tabbertab %2$s\">',\n\t\t\t'after_widget' => '</div>'\n \t\t));\n\n// Hide Tabber until page load \nadd_action( 'wp_head', 'tabber_tabs_temp_hide' ); \n}", "public function get_envira_tab_nav() {\n\n $tabs = array(\n 'images' => __( 'Images', 'envira-gallery' ),\n 'config' => __( 'Config', 'envira-gallery' ),\n 'lightbox' => __( 'Lightbox', 'envira-gallery' ),\n 'mobile' => __( 'Mobile', 'envira-gallery' ),\n );\n $tabs = apply_filters( 'envira_gallery_tab_nav', $tabs );\n\n // \"Misc\" tab is required.\n $tabs['misc'] = __( 'Misc', 'envira-gallery' );\n\n return $tabs;\n\n }", "public function add_tab( $tabs ) {\n\t$tabs['account']['Billing'] = 'billing';\n\treturn $tabs;\n\t}", "protected function _register_controls()\n {\n\n /**\n * Style tab\n */\n\n $this->start_controls_section(\n 'general',\n [\n 'label' => __('Content', 'akash-hp'),\n 'tab' => Controls_Manager::TAB_CONTENT,\n ]\n );\n\n $this->add_control(\n\t\t\t'menu_style',\n\t\t\t[\n\t\t\t\t'label' => __( 'Border Style', 'akash-hp' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'inline',\n\t\t\t\t'options' => [\n\t\t\t\t\t'inline' => __( 'Inline', 'akash-hp' ),\n\t\t\t\t\t'flyout' => __( 'Flyout', 'akash-hp' ),\n\t\t\t\t],\n\t\t\t]\n );\n \n $this->add_control(\n\t\t\t'trigger_label',\n\t\t\t[\n\t\t\t\t'label' => __( 'Trigger Label', 'akash-hp' ),\n 'type' => Controls_Manager::TEXT,\n\t\t\t]\n );\n \n $this->add_control(\n\t\t\t'trigger_open_icon',\n\t\t\t[\n\t\t\t\t'label' => __( 'Trigger Icon', 'text-domain' ),\n\t\t\t\t'type' => Controls_Manager::ICONS,\n\t\t\t\t'default' => [\n\t\t\t\t\t'value' => 'fa fa-align-justify',\n\t\t\t\t\t'library' => 'solid',\n ],\n \n\t\t\t]\n );\n \n $this->add_control(\n\t\t\t'trigger_close_icon',\n\t\t\t[\n\t\t\t\t'label' => __( 'Trigger Close Icon', 'text-domain' ),\n\t\t\t\t'type' => Controls_Manager::ICONS,\n\t\t\t\t'default' => [\n\t\t\t\t\t'value' => 'far fa-window-close',\n\t\t\t\t\t'library' => 'solid',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n $this->add_responsive_control(\n 'menu_align',\n [\n 'label' => __('Align', 'akash-hp'),\n 'type' => Controls_Manager::CHOOSE,\n 'options' => [\n 'start' => [\n 'title' => __('Left', 'akash-hp'),\n 'icon' => 'fa fa-align-left',\n ],\n 'center' => [\n 'title' => __('top', 'akash-hp'),\n 'icon' => 'fa fa-align-center',\n ],\n 'flex-end' => [\n 'title' => __('Right', 'akash-hp'),\n 'icon' => 'fa fa-align-right',\n ],\n ],\n 'default' => 'left',\n\t\t\t\t'toggle' => true,\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .akash-main-menu-wrap.navbar' => 'justify-content: {{VALUE}}'\n\t\t\t\t\t] \n ]\n );\n $this->end_controls_section();\n $this->start_controls_section(\n\t\t\t'header_infos_section',\n\t\t\t[\n\t\t\t\t'label' => __( 'Header Info', 'akash-hp' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_CONTENT,\n\t\t\t]\n );\n \n $this->add_control(\n\t\t\t'show_infos',\n\t\t\t[\n\t\t\t\t'label' => __( 'Show Title', 'akash-hp' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Show', 'akash-hp' ),\n\t\t\t\t'label_off' => __( 'Hide', 'akash-hp' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t\t'default' => 'no',\n\t\t\t]\n\t\t);\n\n\t\t$repeater = new Repeater();\n\n\t\t$repeater->add_control(\n\t\t\t'info_title', [\n\t\t\t\t'label' => __( 'Title', 'akash-hp' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'default' => __( 'info Title' , 'akash-hp' ),\n\t\t\t\t'label_block' => true,\n\t\t\t]\n\t\t);\n\n\t\t$repeater->add_control(\n\t\t\t'info_content', [\n\t\t\t\t'label' => __( 'Content', 'akash-hp' ),\n\t\t\t\t'type' => Controls_Manager::WYSIWYG,\n\t\t\t\t'default' => __( 'info Content' , 'akash-hp' ),\n\t\t\t\t'show_label' => false,\n\t\t\t]\n );\n \n $repeater->add_control(\n\t\t\t'info_url',\n\t\t\t[\n\t\t\t\t'label' => __( 'Link', 'akash-hp' ),\n\t\t\t\t'type' => Controls_Manager::URL,\n\t\t\t\t'placeholder' => __( 'https://your-link.com', 'akash-hp' ),\n\t\t\t\t'show_external' => true,\n\t\t\t]\n );\n \n\t\t$this->add_control(\n\t\t\t'header_infos',\n\t\t\t[\n\t\t\t\t'label' => __( 'Repeater info', 'akash-hp' ),\n\t\t\t\t'type' => Controls_Manager::REPEATER,\n\t\t\t\t'fields' => $repeater->get_controls(),\n\t\t\t\t'default' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'info_title' => __( 'Call us:', 'akash-hp' ),\n\t\t\t\t\t\t'info_content' => __( '(234) 567 8901', 'akash-hp' ),\n\t\t\t\t\t],\n\t\t\t\t],\n 'title_field' => '{{{ info_title }}}',\n 'condition' => [\n 'show_infos' => 'yes',\n ]\n\t\t\t]\n\t\t);\n\n $this->end_controls_section();\n\n $this->start_controls_section(\n 'section_menu_style',\n [\n 'label' => __('Menu Style', 'akash-hp'),\n 'tab' => Controls_Manager::TAB_STYLE,\n 'condition' => [\n 'menu_style' => 'inline',\n ]\n ]\n );\n\n\n\n\t\t$this->start_controls_tabs(\n\t\t\t'menu_items_tabs'\n );\n \n\t\t$this->start_controls_tab(\n\t\t\t'menu_normal_tab',\n\t\t\t[\n\t\t\t\t'label' => __( 'Normal', 'akash-hp' ),\n\t\t\t]\n );\n \n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'menu_typography',\n 'label' => __('Menu Typography', 'akash-hp'),\n 'selector' => '{{WRAPPER}} .main-navigation ul.navbar-nav>li>a',\n ]\n );\n\n $this->add_control(\n 'menu_color',\n [\n 'label' => __('Item Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-inline.navbar:not(.active) .main-navigation ul.navbar-nav>li>a, \n {{WRAPPER}} .menu-style-inline.navbar:not(.active) .main-navigation ul.navbar-nav > .menu-item-has-children > a .dropdownToggle' => 'color: {{VALUE}}',\n\n '{{WRAPPER}} .menu-style-inline.navbar:not(.active) .main-navigation ul.navbar-nav > .menu-item-has-children > a .dropdownToggle' => 'color: {{VALUE}}',\n \n ],\n ]\n );\n\n $this->add_control(\n 'menu_bg_color',\n [\n 'label' => __('Item Background Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-inline.navbar:not(.active) .main-navigation ul.navbar-nav>li>a' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n\n \n $this->add_responsive_control(\n 'item_gap',\n [\n 'label' => __('Menu Gap', 'akash-hp'),\n 'type' => Controls_Manager::SLIDER,\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 100,\n ],\n ],\n 'devices' => ['desktop', 'tablet', 'mobile'],\n 'selectors' => [\n 'body:not(.rtl) {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav>li>a' => 'margin-left: {{SIZE}}{{UNIT}};margin-right: {{SIZE}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav>li>a' => 'margin-right: {{SIZE}}{{UNIT}};margin-right: {{SIZE}}{{UNIT}};',\n ],\n\n ]\n );\n\n $this->add_responsive_control(\n 'item_padding',\n [\n 'label' => __('Item Padding', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n 'body:not(.rtl) {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav>li>a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body:not(.rtl) {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav>.menu-item-has-children>a' => 'padding: {{TOP}}{{UNIT}} calc({{RIGHT}}{{UNIT}} + 20px) {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n \n 'body.rtl {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav>li>a' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav>.menu-item-has-children>a' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} calc({{RIGHT}}{{UNIT}} + 20px);',\n ],\n\n ]\n );\n\n $this->add_responsive_control(\n 'item_readius',\n [\n 'label' => __('Item Radius', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n 'body:not(.rtl) {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav>li>a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav>li>a' => 'border-radius: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n ],\n\n ]\n );\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'menu_hover_tab',\n\t\t\t[\n\t\t\t\t'label' => __( 'Hover', 'akash-hp' ),\n\t\t\t]\n\t\t);\n\n $this->add_control(\n 'menu_hover_color',\n [\n 'label' => __('Menu Hover Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-inline.navbar:not(.active) .main-navigation ul.navbar-nav>li>a:hover, \n {{WRAPPER}} .menu-style-inline.navbar:not(.active) .main-navigation ul.navbar-nav > .menu-item-has-children > a:hover .dropdownToggle,\n {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav li.current-menu-item>a' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'menu_bg_hover_color',\n [\n 'label' => __('Item Background Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-inline.navbar:not(.active) .main-navigation ul.navbar-nav>li:hover>a' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->end_controls_tabs();\n\n $this->end_controls_section();\n\n $this->start_controls_section(\n 'dropdown_style',\n [\n 'label' => __('Dropdown Style', 'akash-hp'),\n 'tab' => Controls_Manager::TAB_STYLE,\n 'condition' => [\n 'menu_style' => 'inline',\n ]\n ]\n );\n\n\t\t$this->start_controls_tabs(\n\t\t\t'dropdown_items_tabs'\n\t\t);\n\t\t$this->start_controls_tab(\n\t\t\t'dropdown_normal_tab',\n\t\t\t[\n\t\t\t\t'label' => __( 'Normal', 'akash-hp' ),\n\t\t\t]\n );\n \n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'dripdown_typography',\n 'label' => __('Menu Typography', 'akash-hp'),\n 'selector' => '{{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav>li .sub-menu a',\n ]\n );\n \n $this->add_control(\n 'dropdown_item_color',\n [\n 'label' => __('Item Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a,\n {{WRAPPER}} .menu-style-inline.navbar:not(.active) .main-navigation ul.navbar-nav .menu-item-has-children > a .dropdownToggle' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'dropdown_item_bg_color',\n [\n 'label' => __('Item Background Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'ddown_menu_border_color',\n [\n 'label' => __('Menu Border Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu' => 'border-color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'dropdown_item_radius',\n [\n 'label' => __('Menu radius', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n 'body:not(.rtl) {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu' => 'border-radius: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n ],\n\n ]\n );\n\n $this->add_responsive_control(\n 'dropdown_item_padding',\n [\n 'label' => __('Item Padding', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n 'body:not(.rtl) {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n ],\n\n ]\n );\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'dropdown_hover_tab',\n\t\t\t[\n\t\t\t\t'label' => __( 'Hover', 'akash-hp' ),\n\t\t\t]\n\t\t);\n\n $this->add_control(\n 'dropdown_item_hover_color',\n [\n 'label' => __('Item Hover Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a:hover,\n {{WRAPPER}} .menu-style-inline.navbar:not(.active) .main-navigation ul.navbar-nav .sub-menu .menu-item-has-children > a:hover .dropdownToggle' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'dropdown_item_bg_hover_color',\n [\n 'label' => __('Item Background Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a:hover' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n\n $this->end_controls_tab();\n \n $this->end_controls_tabs();\n\n $this->end_controls_section();\n\n $this->start_controls_section(\n 'section_flyout_style',\n [\n 'label' => __('Flyout/Mobile Menu Style', 'akash-hp'),\n 'tab' => Controls_Manager::TAB_STYLE,\n ]\n );\n\n\n\t\t$this->start_controls_tabs(\n\t\t\t'flyout_items_tabs'\n );\n \n\t\t$this->start_controls_tab(\n\t\t\t'flyout_menu_normal_tab',\n\t\t\t[\n\t\t\t\t'label' => __( 'Normal', 'akash-hp' ),\n\t\t\t]\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'flyout_menu_typography',\n 'label' => __('Item Typography', 'akash-hp'),\n 'selector' => '{{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav>li>a',\n ]\n );\n\n $this->add_control(\n 'flyout_menu_color',\n [\n 'label' => __('Item Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav>li>a, \n {{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav > .menu-item-has-children > a .dropdownToggle' => 'color: {{VALUE}}',\n\n '{{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav > .menu-item-has-children > a .dropdownToggle' => 'color: {{VALUE}}',\n ],\n ]\n );\n $this->add_responsive_control(\n 'flyout_item_padding',\n [\n 'label' => __('Item Padding', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n 'body:not(.rtl) {{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav>li>a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body:not(.rtl) {{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav>.menu-item-has-children>a' => 'padding: {{TOP}}{{UNIT}} calc({{RIGHT}}{{UNIT}} + 20px) {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n \n 'body.rtl {{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav>li>a' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav>.menu-item-has-children>a' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} calc({{RIGHT}}{{UNIT}} + 20px);',\n ],\n\n ]\n );\n\n $this->add_responsive_control(\n 'flyout_menu_padding',\n [\n 'label' => __('Menu Padding', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n 'body:not(.rtl) {{WRAPPER}} .menu-style-flyout .main-navigation' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\n 'body.rtl {{WRAPPER}} .menu-style-flyout .main-navigation' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n \n ],\n\n ]\n );\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'flyout_menu_hover_tab',\n\t\t\t[\n\t\t\t\t'label' => __( 'Hover', 'akash-hp' ),\n\t\t\t]\n\t\t);\n\n $this->add_control(\n 'flyout_menu_hover_color',\n [\n 'label' => __('Menu Hover Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .menu-style-flyout .main-navigation ul.navbar-nav>li>a:hover, \n {{WRAPPER}} .menu-style-flyout .menu-style-flyout .main-navigation ul.navbar-nav > .menu-item-has-children > a:hover .dropdownToggle,\n {{WRAPPER}} .menu-style-flyout .menu-style-flyout .main-navigation ul.navbar-nav li.current-menu-item>a' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n\n\t\t$this->end_controls_tab();\n\n $this->end_controls_tabs();\n \n $this->end_controls_section();\n\n $this->start_controls_section(\n 'flyout_dropdown_style',\n [\n 'label' => __('Flyout/Mobile Dropdown Style', 'akash-hp'),\n 'tab' => Controls_Manager::TAB_STYLE,\n ]\n );\n\n\t\t$this->start_controls_tabs(\n\t\t\t'flyout_dropdown_items_tabs'\n\t\t);\n\t\t$this->start_controls_tab(\n\t\t\t'flyout_dropdown_normal_tab',\n\t\t\t[\n\t\t\t\t'label' => __( 'Normal', 'akash-hp' ),\n\t\t\t]\n\t\t);\n \n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'flyout_dripdown_typography',\n 'label' => __('Dropdown Typography', 'akash-hp'),\n 'selector' => '{{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav>li .sub-menu a',\n ]\n );\n\n $this->add_control(\n 'flyout_dropdown_item_color',\n [\n 'label' => __('Item Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a,\n {{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav .menu-item-has-children > a .dropdownToggle' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'flyout_dropdown_item_bg_color',\n [\n 'label' => __('Item Background Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'flyout_dropdown_item_padding',\n [\n 'label' => __('Item Padding', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n 'body:not(.rtl) {{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n ],\n\n ]\n );\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'flyout_dropdown_hover_tab',\n\t\t\t[\n\t\t\t\t'label' => __( 'Hover', 'akash-hp' ),\n\t\t\t]\n\t\t);\n\n $this->add_control(\n 'flyout_dropdown_item_hover_color',\n [\n 'label' => __('Item Hover Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a:hover,\n {{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav .sub-menu .menu-item-has-children > a:hover .dropdownToggle' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'flyout_dropdown_item_bg_hover_color',\n [\n 'label' => __('Item Background Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a:hover' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n\n\t\t$this->end_controls_tab();\n $this->end_controls_tabs();\n\n $this->end_controls_section();\n\n\n $this->start_controls_section(\n 'trigger_style',\n [\n 'label' => __('Trigger Style', 'akash-hp'),\n 'tab' => Controls_Manager::TAB_STYLE,\n ]\n );\n\n\n $this->start_controls_tabs(\n 'trigger_style_tabs'\n );\n \n $this->start_controls_tab(\n 'trigger_style_normal_tab',\n [\n 'label' => __('Normal', 'akash-hp'),\n ]\n );\n \n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'trigger_typography',\n 'label' => __('Trigger Typography', 'akash-hp'),\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' => '{{WRAPPER}} .navbar-toggler.open-menu',\n ]\n );\n\n $this->add_control(\n 'trigger_color',\n [\n 'label' => __('Trigger Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .navbar-toggler.open-menu' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'trigger_background',\n [\n 'label' => __('Background Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .navbar-toggler.open-menu' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_group_control(\n Group_Control_Border::get_type(),\n [\n 'name' => 'trigger_border',\n 'label' => __('Border', 'akash-hp'),\n 'selector' => '{{WRAPPER}} .navbar-toggler.open-menu',\n ]\n );\n\n $this->add_control(\n\t\t\t'trigger_icon_size',\n\t\t\t[\n\t\t\t\t'label' => __( 'Icon size', 'plugin-domain' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => [ 'px', '%' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t],\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t],\n\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .navbar-toggler.open-menu .navbar-toggler-icon svg' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .navbar-toggler.open-menu .navbar-toggler-icon i' => 'font-size: {{SIZE}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n $this->add_control(\n\t\t\t'trigger_icon_gap',\n\t\t\t[\n\t\t\t\t'label' => __( 'Icon Gap', 'plugin-domain' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => [ 'px', '%' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t],\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t],\n\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .navbar-toggler.open-menu .navbar-toggler-icon' => 'margin-right: {{SIZE}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n $this->add_responsive_control(\n 'trigger_radius',\n [\n 'label' => __('Border Radius', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n '{{WRAPPER}} .navbar-toggler.open-menu' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .navbar-toggler.open-menu' => 'border-radius: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}}\n ;',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'trigger_padding',\n [\n 'label' => __('Button Padding', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n '{{WRAPPER}} .navbar-toggler.open-menu' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .navbar-toggler.open-menu' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n ],\n ]\n );\n $this->end_controls_tab();\n\n $this->start_controls_tab(\n 'trigger_style_hover_tab',\n [\n 'label' => __('Hover', 'akash-hp'),\n ]\n );\n \n\n $this->add_control(\n 'trigger_hover_color',\n [\n 'label' => __('Trigger Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .navbar-toggler.open-menu:hover' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'trigger_hover_background',\n [\n 'label' => __('Background Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .navbar-toggler.open-menu:hover' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_group_control(\n Group_Control_Border::get_type(),\n [\n 'name' => 'trigger_hover_border',\n 'label' => __('Border', 'akash-hp'),\n 'selector' => '{{WRAPPER}} .navbar-toggler.open-menu:hover',\n ]\n );\n\n $this->add_control(\n 'trigger_hover_animation',\n [\n 'label' => __('Hover Animation', 'akash-hp'),\n 'type' => Controls_Manager::HOVER_ANIMATION,\n ]\n );\n\n $this->add_responsive_control(\n 'trigger_hover_radius',\n [\n 'label' => __('Border Radius', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n '{{WRAPPER}} .navbar-toggler.open-menu:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .navbar-toggler.open-menu:hover' => 'border-radius: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}}\n ;',\n ],\n ]\n );\n \n $this->end_controls_tab();\n \n $this->end_controls_tabs();\n\n $this->end_controls_section();\n \n $this->start_controls_section(\n 'infos_style_section',\n [\n 'label' => __('Info Style', 'akash-hp'),\n 'tab' => Controls_Manager::TAB_STYLE,\n 'condition' => [\n 'show_infos' => 'yes',\n ]\n ]\n );\n\n $this->start_controls_tabs(\n 'info_style_tabs'\n );\n \n $this->start_controls_tab(\n 'info_style_normal_tab',\n [\n 'label' => __('Normal', 'akash-hp'),\n ]\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'info_title_typography',\n 'label' => __('Title Typography', 'akash-hp'),\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' => '{{WRAPPER}} .header-info span',\n ]\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'info_typography',\n 'label' => __('Info Typography', 'akash-hp'),\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' => '{{WRAPPER}} .header-info h3 ',\n ]\n );\n\n $this->add_control(\n 'info_title_color',\n [\n 'label' => __('Info Title Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .header-info span' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'info_color',\n [\n 'label' => __('Info Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .header-info h3' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_group_control(\n Group_Control_Border::get_type(),\n [\n 'name' => 'info_box_border',\n 'label' => __('Box Border', 'akash-hp'),\n 'selector' => '{{WRAPPER}} .akash-header-infos',\n ]\n );\n\n $this->add_control(\n\t\t\t'info_title_gap',\n\t\t\t[\n\t\t\t\t'label' => __( 'Info Title Gap', 'plugin-domain' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => [ 'px', '%' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t],\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t],\n\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .header-info span' => 'margin-bottom: {{SIZE}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n $this->add_responsive_control(\n 'ifno_item_padding',\n [\n 'label' => __('Info item Padding', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n '{{WRAPPER}} .header-info' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\n 'body.rtl {{WRAPPER}} .header-info' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n ],\n ]\n );\n\n $this->end_controls_tab();\n\n $this->start_controls_tab(\n 'info_style_hover_tab',\n [\n 'label' => __('Hover', 'akash-hp'),\n ]\n );\n \n $this->add_control(\n 'info_title_color_hover',\n [\n 'label' => __('Info Title Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .header-info:hover span' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'info_color_hover',\n [\n 'label' => __('Info Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .header-info:hover h3' => 'color: {{VALUE}}',\n ],\n ]\n );\n \n \n $this->end_controls_tab();\n \n $this->end_controls_tabs();\n\n $this->end_controls_section();\n $this->start_controls_section(\n 'panel_style',\n [\n 'label' => __('Panel Style', 'akash-hp'),\n 'tab' => Controls_Manager::TAB_STYLE,\n ]\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'panel_label_typography',\n 'label' => __('Label Typography', 'akash-hp'),\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' => '{{WRAPPER}} .menu-style-flyout .navbar-inner .navbar-toggler',\n ]\n );\n\n \n $this->add_control(\n 'panel_label_color',\n [\n 'label' => __('Label Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .navbar-inner .navbar-toggler' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'close_trigger_color',\n [\n 'label' => __('Close Trigger Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .navbar-inner .navbar-toggler i' => 'color: {{VALUE}}',\n '{{WRAPPER}} .menu-style-flyout .navbar-inner .navbar-toggler svg path' => 'stroke: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'close_trigger_fill_color',\n [\n 'label' => __('Close Trigger Fill Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .navbar-inner .navbar-toggler svg path' => 'fill: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'close_label_background',\n [\n 'label' => __('Label Background Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .navbar-toggler.close-menu' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n \n $this->add_control(\n 'panel_background',\n [\n 'label' => __('Panel Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .navbar-inner' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n\t\t\t'trigger_cloxe_icon_size',\n\t\t\t[\n\t\t\t\t'label' => __( 'Close Icon size', 'plugin-domain' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => [ 'px', '%' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t],\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t],\n\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .menu-style-flyout .navbar-toggler.close-menu .navbar-toggler-icon svg' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .menu-style-flyout .navbar-toggler.close-menu .navbar-toggler-icon i' => 'font-size: {{SIZE}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n \n $this->add_group_control(\n Group_Control_Box_Shadow::get_type(),\n [\n 'name' => 'panel_shadow',\n 'label' => __('Panel Shadow', 'akash-hp'),\n 'selector' => '{{WRAPPER}} .navbar-inner',\n ]\n );\n\n $this->add_responsive_control(\n 'close_label_padding',\n [\n 'label' => __('Label Padding', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .navbar-toggler.close-menu' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .navbar-toggler.close-menu' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n ],\n ]\n );\n \n $this->add_responsive_control(\n 'panel_padding',\n [\n 'label' => __('Panel Padding', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .navbar-inner' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .menu-style-flyout .navbar-inner' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n ],\n ]\n );\n\n\n $this->end_controls_section();\n }", "public function get_tab( $tabs ) {\n\t\t$tabs['tweaks'] = array(\n\t\t\t'label' => __( 'Tweaks', 'wpcd' ),\n\t\t\t'icon' => 'fad fa-car-tilt',\n\t\t);\n\t\treturn $tabs;\n\t}", "function widgetopts_tab_devices( $args ){ ?>\n <li class=\"extended-widget-opts-tab-devices\">\n <a href=\"#extended-widget-opts-tab-<?php echo $args['id'];?>-devices\" title=\"<?php _e( 'Devices', 'widget-options' );?>\" ><span class=\"dashicons dashicons-smartphone\"></span> <span class=\"tabtitle\"><?php _e( 'Devices', 'widget-options' );?></span></a>\n </li>\n <?php\n }", "public function get_icon() {\n\t\treturn parent::get_widget_icon( 'Team_Member' );\n\t}", "private function createTabImage()\n {\n $filePath = _PS_MODULE_LENGOW_DIR_ . 'views/img/AdminLengow.gif';\n $fileDest = _PS_MODULE_LENGOW_DIR_ . 'AdminLengow.gif';\n if (!file_exists($fileDest) && LengowMain::compareVersion('1.5') == 0) {\n copy($filePath, $fileDest);\n }\n }", "protected function registerButtons() {}", "protected function registerButtons() {}", "public function get_tab( $tabs ) {\n\t\t$tabs['goaccess'] = array(\n\t\t\t'label' => __( 'Goaccess', 'wpcd' ),\n\t\t\t'icon' => 'fad fa-user-chart',\n\t\t);\n\t\treturn $tabs;\n\t}", "public function addsButtons() {}", "function activity_tabs_init(){\n // add our own css\n elgg_extend_view('css/elgg', 'activity_tabs/css');\n \n elgg_register_page_handler('activity_tabs', 'activity_tabs_pagehandler');\n elgg_register_event_handler('pagesetup', 'system', 'activity_tabs_pagesetup');\n \n // default menu items are registered with relative paths\n // need to change it due to different page handlers\n elgg_register_plugin_hook_handler('register', 'menu:filter', 'activity_tabs_filtermenu');\n \n // set user activity link on menu:user_hover dropdown\n $user_activity = elgg_get_plugin_setting('user_activity', 'mt_activity_tabs');\n \n if($user_activity != 'no'){\n elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'activity_tabs_user_hover');\n elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'activity_tabs_user_hover');\n }\n}", "public function create_tabs_script(){\n\t\treturn $this->style.'\n<script>\n\tjQuery(function () {\n\t\tjQuery(\".nav-tab-wrapper a\").click(function (e) {\n\t\t\te.preventDefault();\n\t\t\tvar tab_class = jQuery(this).data(\"tab\"); \n\t\t\tvar target = jQuery(this).data(\"target\");\n\t\t\tvar title = jQuery(this).text();\n\n\t\t\tjQuery(\".tabs-title\").fadeOut(function(){\n\t \tjQuery(\".tabs-title\").text(title).fadeIn();\n\t })\n\n\t\t\tjQuery(this).parent().find(\".nav-tab\").removeClass(\"nav-tab-active\");\n\t\t\tjQuery(this).addClass(\"nav-tab-active\");\n\t\t\n\t\t\tjQuery(\".tab\").not(\".\"+tab_class).parentsUntil(\".cmb-repeat-group-wrap\").fadeOut(600);\n\t\t\tjQuery(\".\"+tab_class).parentsUntil(\".cmb-repeat-group-wrap\").fadeIn(1000);\n\n\t\t});\n\t\tjQuery(\".hide-clone\").parentsUntil(\".cmb-row\").fadeOut();\n\t\tjQuery(\".hide-remove\").parentsUntil(\".cmb-remove-field-row\").fadeOut();\n\t});\n</script>\n<style>\n\t.page, .component{\n\t\tbackground:#6bb1a3;\n\t\tborder-radius: 10px 10px 0px 0px;\n\t\tborder:solid 2px gray;\n\t\tcolor:white;\n\n\t}\n\t.page:hover, .component:hover{\n\t\tbackground:#4b9183;\n\t\tcolor:black;\n\n\t}\n\t.component{\n\t\tbackground:#8bd1c3;\n\t}\n</style>';\n\t}", "function klippe_mikado_register_social_icons_widget( $widgets ) {\n\t\t$widgets[] = 'KlippeMikadoClassIconsGroupWidget';\n\t\t\n\t\treturn $widgets;\n\t}", "protected function init_tabs() {\r\n\t\t$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'firstrun' ), $_SERVER['REQUEST_URI'] );\r\n\r\n\t\tadd_action( 'qc_settings_head', 'qc_status_colors_css' );\r\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );\r\n\r\n\t\t$this->tabs->add( 'general', __( 'General', APP_TD ) );\r\n\r\n\t\t$this->tab_sections['general']['main'] = array(\r\n\t\t\t'title' => __( 'General Settings', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Permissions', APP_TD ),\r\n\t\t\t\t\t'type' => 'radio',\r\n\t\t\t\t\t'name' => 'assigned_perms',\r\n\t\t\t\t\t'values' => array(\r\n\t\t\t\t\t\t'protected' => __( 'Users can only view their own tickets and tickets they are assigned to.', APP_TD ),\r\n\t\t\t\t\t\t'read-only' => __( 'Users can view all tickets.', APP_TD ),\r\n\t\t\t\t\t\t'read-write' => __( 'Users can view and updated all tickets.', APP_TD ),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Lock Site from Visitors', APP_TD ),\r\n\t\t\t\t\t'name' => 'lock_site',\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'desc' => __( 'Yes', APP_TD ),\r\n\t\t\t\t\t'tip' => __( 'Visitors will be asked to login, and will not be able to browse site. Also content of the sidebars and menus will be hidden.', APP_TD ),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t\t$this->tab_sections['general']['states'] = array(\r\n\t\t\t'title' => __( 'States', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Default State', APP_TD ),\r\n\t\t\t\t\t'desc' => __( 'This state will be selected by default when creating a ticket.', APP_TD ),\r\n\t\t\t\t\t'type' => 'select',\r\n\t\t\t\t\t'sanitize' => 'absint',\r\n\t\t\t\t\t'name' => 'ticket_status_new',\r\n\t\t\t\t\t'values' => $this->ticket_states(),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Resolved State', APP_TD ),\r\n\t\t\t\t\t'desc' => __( 'Tickets in this state are assumed to no longer need attention.', APP_TD ),\r\n\t\t\t\t\t'type' => 'select',\r\n\t\t\t\t\t'sanitize' => 'absint',\r\n\t\t\t\t\t'name' => 'ticket_status_closed',\r\n\t\t\t\t\t'values' => $this->ticket_states(),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\t\t$this->tab_sections['general']['colors'] = array(\r\n\t\t\t'fields' => $this->status_colors_options(),\r\n\t\t\t'renderer' => array( $this, 'render_status_colors' ),\r\n\t\t);\r\n\r\n\t\t$this->tab_sections['general']['modules'] = array(\r\n\t\t\t'title' => __( 'Modules', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Enable Modules', APP_TD ),\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'name' => 'modules',\r\n\t\t\t\t\t'values' => array(\r\n\t\t\t\t\t\t'assignment' => __( 'Assignment', APP_TD ),\r\n\t\t\t\t\t\t'attachments' => __( 'Attachments', APP_TD ),\r\n\t\t\t\t\t\t'categories' => __( 'Categories', APP_TD ),\r\n\t\t\t\t\t\t'changesets' => __( 'Changesets', APP_TD ),\r\n\t\t\t\t\t\t'milestones' => __( 'Milestones', APP_TD ),\r\n\t\t\t\t\t\t'priorities' => __( 'Priorities', APP_TD ),\r\n\t\t\t\t\t\t'tags' => __( 'Tags', APP_TD ),\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'tip' => __( 'Choose the modules that you want to use on your site.', APP_TD ),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t}", "public function dt_icon_list_loadCssAndJs() {\n wp_register_style( 'dt_extend_style', plugins_url('assets/droit-wbpakery-addons.css', __FILE__) );\n // If you need any javascript files on front end, here is how you can load them.\n //wp_enqueue_script( 'droit-wbpakery-addons_js', plugins_url('assets/droit-wbpakery-addons.js', __FILE__), array('jquery') );\n }", "protected function establish_icon() {\n\t\t$this->icon = \"<i class='sw swp_{$this->key}_icon'></i>\";\n\t}", "function the_media_upload_tabs()\n {\n }", "function settings_nav( $tabs ) {\n\n $tabs[ 'admin_tools' ] = array(\n 'slug' => 'admin_tools',\n 'title' => __( 'Developer', 'wpp' )\n );\n\n return $tabs;\n\n }", "function add_from_tab_content () {\n require_once dirname(__FILE__).'/templates/form-tab-content.php';\n }", "public function registerFontBox(){\n\t\t$param = WPBMap::getParam( 'vc_icon', 'type' );\n\t\t\n\t\t$param['value'][$this->getIconHeader()] = $this->getIconLib();\n\t\tvc_update_shortcode_param( 'vc_icon', $param );\n\t}", "function tabber_tabs_register_sidebar() {\n\tregister_sidebar(\n\t\tarray(\n\t\t\t'name' => __('Tabber Tabs Widget Area', 'slipfire'),\n\t\t\t'id' => 'tabber_tabs',\n\t\t\t'description' => __('Build your tabbed area by placing widgets here. !! IMPORTANT: DO NOT PLACE THE TABBER TABS WIDGET IN THIS AREA. BAD THINGS WILL HAPPEN !! Place the TABBER TABS widget in another widget area. ', 'slipfire'),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s tabbertab\"><div class=\"sdfsdf\"></div>',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title section-title\">',\n\t\t\t'after_title' => '</h3>'\n\t\t)\n\t);\n}", "function widget($args, $instance){\n\t\t\n\t\textract($args);\n\t\techo $before_widget;\n\t\tbd_custom_tabs();\n\t\techo $after_widget;\n\t\n\t}", "function register_ib_act_widget() {\n\tregister_widget( 'IB_Act_Widget_Widget' );\n}", "function cre_banner_metabox_tab($property_metabox_tabs)\n{\n\tif (is_array($property_metabox_tabs)) {\n\t\t$property_metabox_tabs['banner'] = array(\n\t\t\t'label' => esc_html__('Top Banner', 'crucial-real-estate'),\n\t\t\t'icon' => 'dashicons-format-image',\n\t\t);\n\t}\n\n\treturn $property_metabox_tabs;\n}", "public function lite_tabs( $tabs ) {\n\n $tabs['mobile'] = __( 'Mobile', 'envira-gallery' );\n $tabs['videos'] = __( 'Videos', 'envira-gallery' );\n $tabs['social'] = __( 'Social', 'envira-gallery' );\n $tabs['tags'] = __( 'Tags', 'envira-gallery' );\n $tabs['pagination'] = __( 'Pagination', 'envira-gallery' );\n return $tabs;\n\n }", "public function add_product_tab( $tabs ) {\n\n $tabs['simple'] = array(\n 'label' => __( 'DM bookable', 'mvr' ),\n 'target' => 'dm_bookable_product_options',\n 'class' => 'show_if_simple',\n );\n\n unset( $tabs['shipping'] );\n\n return $tabs;\n }", "function __construct()\n {\n\t $this->tabs = array( \n//\t array ( 'tab_id' => 'properties',\t\t'tab_op' => 'administration.customization_properties.edit', \t'tab_name' => 'Application properties'),\n\t array ( 'tab_id' => 'fields',\t\t\t'tab_op' => 'administration.customization_fields.edit', \t\t'tab_name' => 'Field properties'),\n\t array ( 'tab_id' => 'searches', \t\t'tab_op' => 'administration.customization_searches.edit',\t\t'tab_name' => 'Search filters'),\n\t array ( 'tab_id' => 'results', \t\t\t'tab_op' => 'administration.customization_results.edit',\t\t'tab_name' => 'Search results'),\n\t array ( 'tab_id' => 'bulk',\t\t\t\t'tab_op' => 'administration.customization_bulk.edit', \t\t\t'tab_name' => 'Bulk form'),\t \n\t array ( 'tab_id' => 'view', \t\t\t'tab_op' => 'administration.customization_view.edit',\t\t\t'tab_name' => 'View form'),\n\t array ( 'tab_id' => 'edit', \t\t\t'tab_op' => 'administration.customization_edit.edit',\t\t\t'tab_name' => 'Edit form'),\n\t array ( 'tab_id' => 'linked', \t\t\t'tab_op' => 'administration.customization_linked.edit',\t\t\t'tab_name' => 'Linked applications'),\n\t array ( 'tab_id' => 'linked_view', \t\t'tab_op' => 'administration.customization_linked_view.edit',\t'tab_name' => 'Linked view form'),\n\t array ( 'tab_id' => 'popup_searches', \t'tab_op' => 'administration.customization_popup_searches.edit',\t'tab_name' => 'Popup search filters'),\n\t array ( 'tab_id' => 'popup_results', \t'tab_op' => 'administration.customization_popup_results.edit',\t'tab_name' => 'Popup search results'),\n\t array ( 'tab_id' => 'popup_view', \t\t'tab_op' => 'administration.customization_popup_view.edit',\t\t'tab_name' => 'Popup view form'),\n\t array ( 'tab_id' => 'popup_edit', \t\t'tab_op' => 'administration.customization_popup_edit.edit',\t\t'tab_name' => 'Popup edit form')\n\t ); \n\n\t\tparent::__construct();\n }", "function fillPostIcons(){\n\t\t?>\n\t\t<input class=\"regular-text\" id=\"post_icon_dashicons_picker\" type=\"text\" />\n\t\t<span class=\"dashicons dashicon-preview\"></span>\n\t\t<input class=\"button dashicons-picker\" type=\"button\" value=\"Choose Icon\" data-target=\"#post_icon_dashicons_picker\" />\n\t\t<?php\n\t}", "protected function _register_controls() {\n\n $nav_menus = wp_get_nav_menus();\n\n $nav_menus_option = array(\n esc_html__( 'Select a menu', 'Alita-extensions' ) => '',\n );\n\n foreach ( $nav_menus as $key => $nav_menu ) {\n $nav_menus_option[$nav_menu->name] = $nav_menu->name;\n }\n\n $this->start_controls_section(\n 'content_section',\n [\n 'label' => esc_html__( 'Content', 'Alita-extensions' ),\n 'tab' => Controls_Manager::TAB_CONTENT,\n ]\n );\n\n $this->add_control(\n 'title',\n [\n 'label' => esc_html__( 'Title', 'Alita-extensions' ),\n 'description' => esc_html__( 'Enter the title of menu.', 'Alita-extensions' ),\n 'type' => Controls_Manager::TEXT,\n 'default' => 'Alita Best Selling:',\n ]\n );\n\n $this->add_control(\n 'menu',\n [\n\n 'label' => esc_html__( 'Menu', 'Alita-extensions' ),\n 'type' => Controls_Manager::SELECT,\n 'default' => 'vertical-menu',\n 'options' => $nav_menus_option,\n ]\n );\n \n\n $this->end_controls_section();\n\n }", "private function loadButtons()\n {\n $objAdd = $this->addButtonNew(_FEST);\n $objAdd->setInline();\n }", "abstract protected function tabs();", "function bd_custom_tabs(){\n\t\n\n\twp_enqueue_script( 'jquery-ui-tabs' );\n\n\tglobal $wpdb, $post;\n\t\n\t$args1 = array( \n\t\t'post_type' => array('post'),\n\t\t'posts_per_page' => 3,\n\t\t'meta_key' => '_thumbnail_id',\n\t\t'ignore_sticky_posts' => 1,\n\t);\n\t$args2 = array( \n\t\t'post_type' => array('post') ,\n\t\t'orderby' => 'comment_count',\n\t\t'meta_key' => '_thumbnail_id',\n\t\t'posts_per_page' => 3,\n\t\t'ignore_sticky_posts' => 1,\n\t);\n\n\t$loop1 = new WP_Query($args1);\n\t$loop2 = new WP_Query($args2);\n\t?>\n\t<script type=\"text/javascript\"> jQuery(function($){ $( \".widget_custom_tabs .bd-tabgroup\" ).tabs(); });</script>\n\t<div class=\"bd-tabgroup\">\n\t\t<ul class=\"tabs-menu\" style=\"margin-top:0\">\n\t\t\t<li><a href=\"#tab-1\"><?php _e('Recent', 'wolf'); ?></a></li>\n\t\t\t<li><a href=\"#tab-2\"><?php _e('Popular', 'wolf'); ?></a></li>\n\t\t\t<li><a href=\"#tab-3\"><?php _e('Comments', 'wolf'); ?></a></li>\n\t\t</ul>\n\t\t<div style=\"clear:both;\"></div>\n\n\t\t<div class=\"widget-custom-tabs-container\">\n\t\t\t<div id=\"tab-1\">\n\t\t\t\t<div class=\"widget-thumbnails-list\">\n\t\t\t\t\t<?php while ($loop1->have_posts()) : $loop1->the_post(); ?>\n\t\t\t\t\t<article>\n\t\t\t\t\t\t<a href=\"<?php esc_url(the_permalink()); ?>\" class=\"widget-thumb-link\">\n\t\t\t\t\t\t\t<?php the_post_thumbnail('mini', array('title' => \"\")); ?>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<span class=\"entry-title\"><a href=\"<?php esc_url(the_permalink()); ?>\" title=\"<?php printf(__('Permanent Link to %s', 'wolf'), get_the_title()); ?>\"><?php echo wolf_sample(get_the_title(), 40); ?></a></span>\n\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<span class=\"time\"><?php echo get_the_date( get_option('date_format') ); ?></span><br>\n\t\t\t\t\t\t<span class=\"comment-count\">\n\t\t\t\t\t\t\t<?php if ( comments_open() ) : ?>\n\t\t\t\t\t\t\t\t<?php comments_popup_link( '<span class=\"leave-reply\">' . __( 'Leave a comment', 'wolf' ) . '</span>', __( 'One comment so far', 'wolf' ), __( 'View all % comments', 'wolf' ) ); ?>\n\t\t\t\t\t\t\t<?php endif; // comments_open() ?>\n\t\t\t\t\t\t</span>\n\t\t\n\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t</article>\n\t\t\t\t\t<?php endwhile; ?>\n\t\t\t\t</div>\n\n\t\t\t</div>\n\n\t\t\t<div id=\"tab-2\">\n\t\t\t\t<div class=\"widget-thumbnails-list\">\n\t\t\t\t<?php while ($loop2->have_posts()) : $loop2->the_post(); ?>\n\t\t\t\t<article>\n\t\t\t\t\t<a href=\"<?php esc_url(the_permalink()); ?>\" class=\"widget-thumb-link\">\n\t\t\t\t\t\t<?php the_post_thumbnail('mini', array('title' => \"\")); ?>\n\t\t\t\t\t</a>\n\t\t\t\t\t<span class=\"entry-title\"><a href=\"<?php esc_url(the_permalink()); ?>\" title=\"<?php printf(__('Permanent Link to %s', 'wolf'), get_the_title()); ?>\"><?php echo wolf_sample(get_the_title(), 40); ?></a></span>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t<span class=\"time\"><?php echo get_the_date( get_option('date_format') ); ?></span><br>\n\t\t\t\t\t<span class=\"comment-count\"><?php bd_comment_number(); ?></span>\n\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t</article>\n\t\t\t\t<?php endwhile; ?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div id=\"tab-3\">\n\t\t\t<?php \n\t\t\t/**\n\t\t\t* bd_recent_comments() is used from the recent-comments-widget.php file\n\t\t\t*/\n\t\t\tif(function_exists('bd_recent_comments'))\n\t\t\t\tbd_recent_comments(3); \n\t\t\t?>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<?php\t\n}", "public function get_admin_tabs() {\n\n $slide_id = absint($this->slide->ID);\n $attachment_id = $this->get_attachment_id();\n $attachment = get_post($attachment_id);\n\n $url = esc_attr(get_post_meta($slide_id, 'ml-slider_url', true));\n $target = get_post_meta($slide_id, 'ml-slider_new_window', true) ? 'checked=checked' : '';\n \n // TODO: make this DRY\n // caption\n $caption = esc_textarea($this->slide->post_excerpt);\n $image_caption = html_entity_decode($attachment->post_excerpt, ENT_NOQUOTES, 'UTF-8');\n\t\t$inherit_image_caption_check = '';\n\t\t$inherit_image_caption_class = '';\n\t\tif ($this->is_field_inherited('caption')) {\n\t\t\t$inherit_image_caption_check = 'checked=checked';\n\t\t\t$inherit_image_caption_class = ' inherit-from-image';\n\t\t}\n // alt\n $alt = esc_attr(get_post_meta($slide_id, '_wp_attachment_image_alt', true));\n $image_alt = esc_attr(get_post_meta($attachment_id, '_wp_attachment_image_alt', true ));\n\t\t$inherit_image_alt_check = ''; \n\t\t$inherit_image_alt_class = '';\n\t\tif ($this->is_field_inherited('alt')) {\n\t\t\t$inherit_image_alt_check = 'checked=checked';\n\t\t\t$inherit_image_alt_class = ' inherit-from-image';\t\n\t\t}\n // title\n $title = esc_attr(get_post_meta($slide_id, 'ml-slider_title', true));\n\t\t$image_title = esc_attr($attachment->post_title);\n\t\t$inherit_image_title_check = '';\n $inherit_image_title_class = '';\n\t\tif ($this->is_field_inherited('title')) {\n\t\t\t$inherit_image_title_check = 'checked=checked';\n\t\t\t$inherit_image_title_class = ' inherit-from-image';\n\t\t}\n\n ob_start();\n include(METASLIDER_PATH . 'admin/views/slides/tabs/general.php');\n $general_tab = ob_get_clean();\n\n if (!$this->is_valid_image()) {\n $message = __(\"Warning: The image data does not exist. Please re-upload the image.\", \"ml-slider\");\n\n $general_tab = \"<div class='warning'>{$message}</div>\" . $general_tab;\n }\n\n ob_start();\n include(METASLIDER_PATH .'admin/views/slides/tabs/seo.php');\n $seo_tab = ob_get_clean();\n\n $tabs = array(\n 'general' => array(\n 'title' => __(\"General\", \"ml-slider\"),\n 'content' => $general_tab\n ),\n 'seo' => array(\n 'title' => __(\"SEO\", \"ml-slider\"),\n 'content' => $seo_tab\n )\n );\n\n if (version_compare(get_bloginfo('version'), 3.9, '>=')) {\n\n $crop_position = get_post_meta($slide_id, 'ml-slider_crop_position', true); \n\n if (!$crop_position) {\n $crop_position = 'center-center';\n }\n\n ob_start();\n include(METASLIDER_PATH .'admin/views/slides/tabs/crop.php');\n $crop_tab = ob_get_clean();\n \n $tabs['crop'] = array(\n 'title' => __(\"Crop\", \"ml-slider\"),\n 'content' => $crop_tab\n );\n\n }\n\n return apply_filters(\"metaslider_image_slide_tabs\", $tabs, $this->slide, $this->slider, $this->settings);\n\n }", "private function setIconPaths()\n {\n // Directory URL and path\n $plugin = CGIT_SOCIALIZE_PLUGIN;\n $dir = 'icons';\n $url = plugin_dir_url($plugin) . $dir;\n $path = plugin_dir_path($plugin) . $dir;\n\n // Apply filters for customization\n $ext = apply_filters('cgit_socialize_icon_extension', '.svg');\n $url = apply_filters('cgit_socialize_icon_url', $url);\n $path = apply_filters('cgit_socialize_icon_path', $path);\n\n // Make sure directories have trailing slashes\n $url = trailingslashit($url);\n $path = trailingslashit($path);\n\n // Add URLs and paths to each network\n foreach ($this->networks as $key => $value) {\n $this->networks[$key]['icon'] = $url . $key . $ext;\n $this->networks[$key]['icon_path'] = $path . $key . $ext;\n }\n }", "public function admin_enqueue_fontawesomeBlock(){\n\t\t}", "function ch_widget_tabcontent($args, $number = 1) {\n\textract($args);\n\t$options = get_option('widget_tabcontent');\n\t\n\tinclude(TEMPLATEPATH . '/tabcontent.php');\n\t\n}", "function sl_add_toolbar_site_icon() {\n\t\tif ( ! is_admin_bar_showing() ) {\n\t\t\treturn;\n\t\t}\n\t\techo '<style>\n\t\t\t#wp-admin-bar-site-name > a.ab-item:before {\n\t\t\t\tfloat: left;\n\t\t\t\twidth: 16px;\n\t\t\t\theight: 16px;\n\t\t\t\tmargin: 5px 5px 0 -1px;\n\t\t\t\tdisplay: block;\n\t\t\t\tcontent: \"\";\n\t\t\t\topacity: 0.4;\n\t\t\t\tbackground: #000 url(\"http://www.google.com/s2/u/0/favicons?domain=' . parse_url( home_url(), PHP_URL_HOST ). '\");\n\t\t\t\tborder-radius: 16px;\n\t\t\t}\n\t\t\t#wp-admin-bar-site-name:hover > a.ab-item:before {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t</style>';\n\t}", "function render_tabs( $attributes ) {\n\t\t\t\tglobal $post;\n\t\t\t\t// If a page, then do split\n\t\t\t\t// Get ids of children\n\t\t\t\t$children = get_pages( array(\n\t\t\t\t\t\t'child_of' => $post->ID\n\t\t\t\t\t\t, 'parent' => $post->ID\n\t\t\t\t\t\t, 'sort_column' => 'menu_order'\n\t\t\t\t) );\n\n\t\t\t\t$child_titles = array();\n\t\t\t\t$child_contents = \"\n\";\n// TODO: start jquery 'loading' action here.\n\n\t\t\t\t$child_tablinks = \"\n<div id='subpage-tabs' class='ui-tabs'>\n\t<ul>\n\";\n\t\t\t\tforeach ( $children as $child ) {\n\t\t\t\t\t$child_tablinks .= \"\t\t<li><a href='#ctab-$child->ID'>$child->post_title</a></li>\n\";\n\t\t\t\t\t// Render any shortcodes\n\t\t\t\t\t$new_content = do_shortcode( $child->post_content );\n\t\t\t\t\t$child_contents .= \"<div id='ctab-$child->ID' class='ui-tabs-hide'>\n$new_content\n</div>\n\";\n\t\t\t\t}\n\t\t\t\t$child_tablinks .= \"\t</ul>\n\";\n\t\t\t\t$child_contents .= \"</div>\n<script type='text/javascript'>\n/*<![CDATA[*/\njQuery(\n\tfunction(){\n\t\tjQuery('#subpage-tabs').tabs();\n }\n);\n/*]]>*/\n</script>\n\";\n// TODO: destroy jquery 'loading' action here.\n\n\t\t\t\t$content = $child_tablinks . $child_contents;\n\t\t\t\treturn $content;\n\t\t}", "public function register_tab( $tabs, $current ) {\n\t\t$query = array();\n\n\t\t$query['autofocus[panel]'] = 'helpful';\n\n\t\t$section_link = add_query_arg( $query, admin_url( 'customize.php' ) );\n\n\t\t$tabs['design'] = array(\n\t\t\t'id' => 'design',\n\t\t\t'name' => esc_html_x( 'Design', 'tab name', 'helpful' ),\n\t\t\t'href' => $section_link,\n\t\t);\n\n\t\treturn $tabs;\n\t}", "private function tab_navigation() {\n\t\t\techo '<div class=\"wpseo-local-metabox-menu\">';\n\t\t\techo '<ul role=\"tablist\" class=\"yoast-seo-local-aria-tabs\" aria-label=\"Yoast SEO: Local\">';\n\t\t\tforeach ( $this->tabs as $key => $tab ) {\n\t\t\t\t$active = ( $key === 0 );\n\n\t\t\t\t$link_class = [ 'wpseo-local-meta-section-link' ];\n\t\t\t\tif ( $active ) {\n\t\t\t\t\t$link_class[] = 'yoast-active-tab';\n\t\t\t\t}\n\n\t\t\t\techo '<li role=\"presentation\" ' . ( ( $active ) ? 'class=\"active\"' : '' ) . '>';\n\t\t\t\techo '<a role=\"tab\" href=\"#wpseo-local-tab-' . $tab['id'] . '\" class=\"' . implode( ' ', $link_class ) . '\" id=\"wpseo-local-tab-' . $tab['id'] . '-content\">';\n\t\t\t\techo '<span class=\"dashicons dashicons-' . $tab['icon'] . '\"></span>';\n\t\t\t\techo $tab['title'];\n\t\t\t\techo '</a>';\n\t\t\t\techo '</li>';\n\t\t\t}\n\t\t\techo '</ul>';\n\t\t\techo '</div> <!-- .wpseo-metabox-menu -->';\n\t\t}", "function register_plugin_menu(){\r\n add_menu_page( 'Aw Social Tabs', 'Aw Social Tabs', 'manage_options', 'awsocialtabs', array('AwstAdminPages', 'plugin_homepage'), 'dashicons-share', 6 );\r\n add_submenu_page('awsocialtabs', 'Aw Social Tabs | settings', 'Settings', 'manage_options','awst_settings', array('AwstAdminPages', 'awst_settings'));\r\n add_submenu_page('', 'Aw Social Tabs | Likes', 'Likes', 'manage_options','awst_likes', array('AwstAdminPages', 'awst_likes'));\r\n add_submenu_page('', 'Aw Social Tabs | Ratings', 'Ratings', 'manage_options','awst_ratings', array('AwstAdminPages', 'awst_ratings'));\r\n add_submenu_page('', 'Aw Social Tabs | Review', 'Review', 'manage_options','awst_review', array('AwstAdminPages', 'awst_review'));\r\n }", "public function setHelpTabs() {\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-1',\n 'title' => __( 'Theme Information 1', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-2',\n 'title' => __( 'Theme Information 2', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n // Set the help sidebar\n $this->args['help_sidebar'] = __( '<p>This is the sidebar content, HTML is allowed.</p>', 'slova' );\n }", "public function _register_widgets()\n {\n }", "public function metabox_tabs() {\n\t\t$tabs = array(\n\t\t\t'vpn-general' => array(\n\t\t\t\t'label' => 'General',\n\t\t\t\t'icon' => 'dashicons-text',\n\t\t\t),\n\t\t\t'vpn-scripts' => array(\n\t\t\t\t'label' => 'Scripts',\n\t\t\t\t'icon' => 'dashicons-format-aside',\n\t\t\t),\n\t\t\t'vpn-promotions' => array(\n\t\t\t\t'label' => 'Promotions',\n\t\t\t\t'icon' => 'dashicons-testimonial',\n\t\t\t),\n\t\t);\n\n\t\treturn $tabs;\n\t}", "private function metabox_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n\n <div class=\"tabbed\">\n <div class=\"tabbed-sections\">\n <ul class=\"tr-tabs alignleft\">\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"tabbed-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"tr-sections clearfix\">\n <?php\n $classes = 'tab-section active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"<?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'tab-section';\n endforeach;\n ?>\n </div>\n </div>\n <?php\n }", "private function renderTabs()\n {\n ?>\n <h2 class=\"nav-tab-wrapper wp-clearfix\">\n <?php\n array_walk(\n $this->tabs,\n [$this, 'renderTab'],\n $this->currentlyActiveTab()\n );\n ?>\n </h2>\n <?php\n }", "private function createButtonsTab()\n {\n $tab = $this->createTab(\n 'buttons_tab',\n '__responsive_tab_buttons__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 90]);\n $fieldSetButtons = $this->createFieldSet(\n 'buttons_fieldset',\n '__responsive_tab_buttons_fieldset_global__',\n ['attributes' => $attributes]\n );\n\n $fieldSetButtons->addElement(\n $this->createTextField(\n 'btn-font-size',\n '@btn-font-size',\n $this->themeFontDefaults['btn-font-size']\n )\n );\n $fieldSetButtons->addElement(\n $this->createTextField(\n 'btn-icon-size',\n '@btn-icon-size',\n $this->themeFontDefaults['btn-icon-size']\n )\n );\n\n $tab->addElement($fieldSetButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 200]);\n $fieldSetDefaultButtons = $this->createFieldSet(\n 'buttons_default_fieldset',\n '__responsive_tab_buttons_fieldset_default__',\n ['attributes' => $attributes]\n );\n\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-top-bg',\n '@btn-default-top-bg',\n $this->themeColorDefaults['btn-default-top-bg']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-bottom-bg',\n '@btn-default-bottom-bg',\n $this->themeColorDefaults['btn-default-bottom-bg']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-hover-bg',\n '@btn-default-hover-bg',\n $this->themeColorDefaults['btn-default-hover-bg']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-text-color',\n '@btn-default-text-color',\n $this->themeColorDefaults['btn-default-text-color']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-hover-text-color',\n '@btn-default-hover-text-color',\n $this->themeColorDefaults['btn-default-hover-text-color']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-border-color',\n '@btn-default-border-color',\n $this->themeColorDefaults['btn-default-border-color']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-hover-border-color',\n '@btn-default-hover-border-color',\n $this->themeColorDefaults['btn-default-hover-border-color']\n )\n );\n\n $tab->addElement($fieldSetDefaultButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetPrimaryButtons = $this->createFieldSet(\n 'buttons_primary_fieldset',\n '__responsive_tab_buttons_fieldset_primary__',\n ['attributes' => $attributes]\n );\n\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-top-bg',\n '@btn-primary-top-bg',\n $this->themeColorDefaults['btn-primary-top-bg']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-bottom-bg',\n '@btn-primary-bottom-bg',\n $this->themeColorDefaults['btn-primary-bottom-bg']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-hover-bg',\n '@btn-primary-hover-bg',\n $this->themeColorDefaults['btn-primary-hover-bg']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-text-color',\n '@btn-primary-text-color',\n $this->themeColorDefaults['btn-primary-text-color']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-hover-text-color',\n '@btn-primary-hover-text-color',\n $this->themeColorDefaults['btn-primary-hover-text-color']\n )\n );\n\n $tab->addElement($fieldSetPrimaryButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetSecondaryButtons = $this->createFieldSet(\n 'buttons_secondary_fieldset',\n '__responsive_tab_buttons_fieldset_secondary__',\n ['attributes' => $attributes]\n );\n\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-top-bg',\n '@btn-secondary-top-bg',\n $this->themeColorDefaults['btn-secondary-top-bg']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-bottom-bg',\n '@btn-secondary-bottom-bg',\n $this->themeColorDefaults['btn-secondary-bottom-bg']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-hover-bg',\n '@btn-secondary-hover-bg',\n $this->themeColorDefaults['btn-secondary-hover-bg']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-text-color',\n '@btn-secondary-text-color',\n $this->themeColorDefaults['btn-secondary-text-color']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-hover-text-color',\n '@btn-secondary-hover-text-color',\n $this->themeColorDefaults['btn-secondary-hover-text-color']\n )\n );\n\n $tab->addElement($fieldSetSecondaryButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetPanels = $this->createFieldSet(\n 'panels_fieldset',\n '__responsive_tab_buttons_fieldset_panels__',\n ['attributes' => $attributes]\n );\n\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-header-bg',\n '@panel-header-bg',\n $this->themeColorDefaults['panel-header-bg']\n )\n );\n $fieldSetPanels->addElement(\n $this->createTextField(\n 'panel-header-font-size',\n '@panel-header-font-size',\n $this->themeFontDefaults['panel-header-font-size']\n )\n );\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-header-color',\n '@panel-header-color',\n $this->themeColorDefaults['panel-header-color']\n )\n );\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-border',\n '@panel-border',\n $this->themeColorDefaults['panel-border']\n )\n );\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-bg',\n '@panel-bg',\n $this->themeColorDefaults['panel-bg']\n )\n );\n\n $tab->addElement($fieldSetPanels);\n\n return $tab;\n }", "private function get_tabs() {\n return array(\n 'general' => array(\n 'title' => __( 'General', 'jpid' ),\n 'group' => 'jpid_general_settings'\n ),\n 'delivery' => array(\n 'title' => __( 'Delivery', 'jpid' ),\n 'group' => 'jpid_delivery_settings'\n ),\n 'payment' => array(\n 'title' => __( 'Payment', 'jpid' ),\n 'group' => 'jpid_payment_settings'\n )\n );\n }", "protected function register_dynamic_templates()\n\t\t{\n\t\t\t\n\t\t\t/**\n\t\t\t * Content Tab\n\t\t\t * ===========\n\t\t\t */\n\t\t\t\n\t\t\t$c = array(\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'name'\t\t=> __( 'Button Title', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc'\t\t=> __( 'This is the text that appears on your button.', 'avia_framework' ),\n\t\t\t\t\t\t\t'id'\t\t=> 'label',\n\t\t\t\t\t\t\t'type'\t\t=> 'input',\n\t\t\t\t\t\t\t'std'\t\t=> __( 'Click me', 'avia_framework' ),\n\t\t\t\t\t\t\t'lockable'\t=> true,\n\t\t\t\t\t\t\t'tmpl_set_default'\t=> false\n\t\t\t\t\t\t),\n\t\t\t\t\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'name'\t\t=> __( 'Additional Description Position', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc'\t\t=> __( 'Select, where to show an additional description', 'avia_framework' ),\n\t\t\t\t\t\t\t'id'\t\t=> 'description_pos',\n\t\t\t\t\t\t\t'type'\t\t=> 'select',\n\t\t\t\t\t\t\t'std'\t\t=> '',\n\t\t\t\t\t\t\t'lockable'\t=> true,\n\t\t\t\t\t\t\t'subtype'\t=> array(\t\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'No description', 'avia_framework' )\t\t\t=> '',\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'Description above title', 'avia_framework' )\t=> 'above',\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'Description below title', 'avia_framework' )\t=> 'below',\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'name' \t=> __( 'Additional Description', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc' \t=> __( 'Enter an additional description', 'avia_framework' ),\n\t\t\t\t\t\t\t'id' \t=> 'content',\n\t\t\t\t\t\t\t'type' \t=> 'textarea',\n\t\t\t\t\t\t\t'std' \t=> '',\n\t\t\t\t\t\t\t'lockable'\t=> true,\n\t\t\t\t\t\t\t'tmpl_set_default'\t=> false,\n\t\t\t\t\t\t\t'required'\t=> array( 'description_pos', 'not', '' )\n\t\t\t\t\t\t),\n\t\t\t\t\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'name' \t=> __( 'Button Icon', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc' \t=> __( 'Should an icon be displayed at the left side of the button', 'avia_framework' ),\n\t\t\t\t\t\t\t'id' \t=> 'icon_select',\n\t\t\t\t\t\t\t'type' \t=> 'select',\n\t\t\t\t\t\t\t'std' \t=> 'yes-left-icon',\n\t\t\t\t\t\t\t'lockable'\t=> true,\n\t\t\t\t\t\t\t'subtype'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'No Icon', 'avia_framework' )\t\t\t\t\t\t\t\t\t\t=> 'no',\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'Yes, display Icon to the left of the title', 'avia_framework' )\t=> 'yes-left-icon' ,\t\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'Yes, display Icon to the right of the title', 'avia_framework' )\t=> 'yes-right-icon',\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'name' \t=> __( 'Button Icon', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc' \t=> __( 'Select an icon for your Button below', 'avia_framework' ),\n\t\t\t\t\t\t\t'id' \t=> 'icon',\n\t\t\t\t\t\t\t'type' \t=> 'iconfont',\n\t\t\t\t\t\t\t'std' \t=> '',\n\t\t\t\t\t\t\t'lockable'\t=> true,\n\t\t\t\t\t\t\t'locked'\t=> array( 'icon', 'font' ),\n\t\t\t\t\t\t\t'required'\t=> array( 'icon_select', 'not_empty_and', 'no' )\n\t\t\t\t\t\t\t),\n\t\t\t\t\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'name' \t=> __( 'Icon Visibility', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc' \t=> __( 'Check to only display icon on hover', 'avia_framework' ),\n\t\t\t\t\t\t\t'id' \t=> 'icon_hover',\n\t\t\t\t\t\t\t'type' \t=> 'checkbox',\n\t\t\t\t\t\t\t'std' \t=> '',\n\t\t\t\t\t\t\t'lockable'\t=> true,\n\t\t\t\t\t\t\t'required'\t=> array( 'icon_select', 'not_empty_and', 'no' )\n\t\t\t\t\t\t)\n\t\t\t\t\n\t\t\t\t);\n\t\t\t\n\t\t\t$template = array(\n\t\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\t'type'\t\t\t=> 'template',\n\t\t\t\t\t\t\t\t'template_id'\t=> 'toggle',\n\t\t\t\t\t\t\t\t'title'\t\t\t=> __( 'Button', 'avia_framework' ),\n\t\t\t\t\t\t\t\t'content'\t\t=> $c \n\t\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\n\t\t\tAviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'content_button' ), $template );\n\t\t\t\n\t\t\t$c = array(\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'type'\t\t\t=> 'template',\n\t\t\t\t\t\t\t'template_id'\t=> 'linkpicker_toggle',\n\t\t\t\t\t\t\t'name'\t\t\t=> __( 'Button Link?', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc'\t\t\t=> __( 'Where should your button link to?', 'avia_framework' ),\n\t\t\t\t\t\t\t'subtypes'\t\t=> array( 'manually', 'single', 'taxonomy' ),\n\t\t\t\t\t\t\t'target_id'\t\t=> 'link_target',\n\t\t\t\t\t\t\t'lockable'\t\t=> true\n\t\t\t\t\t\t),\n\t\t\t\t\t\t\n\t\t\t\t);\n\t\t\t\n\t\t\tAviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'content_link' ), $c );\n\t\t\t\n\t\t\t/**\n\t\t\t * Styling Tab\n\t\t\t * ===========\n\t\t\t */\n\t\t\t\n\t\t\t$c = array(\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'name'\t\t=> __( 'Button Title Attribute', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc'\t\t=> __( 'Add a title attribute for this button.', 'avia_framework' ),\n\t\t\t\t\t\t\t'id'\t\t=> 'title_attr',\n\t\t\t\t\t\t\t'type'\t\t=> 'input',\n\t\t\t\t\t\t\t'std'\t\t=> '',\n\t\t\t\t\t\t\t'lockable'\t=> true\n\t\t\t\t\t\t)\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t);\n\t\t\t\n\t\t\t$template = array(\n\t\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\t'type'\t\t\t=> 'template',\n\t\t\t\t\t\t\t\t'template_id'\t=> 'toggle',\n\t\t\t\t\t\t\t\t'title'\t\t\t=> __( 'Appearance', 'avia_framework' ),\n\t\t\t\t\t\t\t\t'content'\t\t=> $c \n\t\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\n\t\t\tAviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'styling_appearance' ), $template );\n\t\t\t\n\t\t\t$c = array(\n\t\t\t\t\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'type'\t\t\t=> 'template',\n\t\t\t\t\t\t\t'template_id'\t=> 'button_colors',\n\t\t\t\t\t\t\t'lockable'\t\t=> true,\n\t\t\t\t\t\t\t'ids'\t\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t'bg'\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'color'\t\t=> 'color',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom'\t=> 'custom',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom_id'\t=> 'custom_bg',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'gradient'\t=> 'btn_custom_grad'\n\t\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'bg_hover'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'color'\t\t=> 'color_hover',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom'\t=> 'custom',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom_id'\t=> 'custom_bg_hover',\n\t\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'font'\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'color'\t\t=> 'color_font',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom'\t=> 'custom',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom_id'\t=> 'custom_font',\n\t\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'font_hover' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'color'\t\t=> 'color_font_hover',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom'\t=> 'custom',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom_id'\t=> 'custom_font_hover',\n\t\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)\n\t\t\t\t\t\t)\n\t\t\t\t\n\t\t\t\t);\n\t\t\t\n\t\t\t$template = array(\n\t\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\t'type'\t\t\t=> 'template',\n\t\t\t\t\t\t\t\t'template_id'\t=> 'toggle',\n\t\t\t\t\t\t\t\t'title'\t\t\t=> __( 'Colors', 'avia_framework' ),\n\t\t\t\t\t\t\t\t'content'\t\t=> $c \n\t\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\n\t\t\tAviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'styling_colors' ), $template );\n\t\t\t\n\t\t}", "function init()\n\t{\n\t\t$this->setType(\"tabs\");\n\t}", "public function installTabs()\n {\n TabManager::addTab('AdminTraining', 'Training Menu', 'training', 'AdminTools');\n TabManager::addTab('AdminTrainingIndexClass', 'Controller exemple', 'training', 'AdminTraining');\n TabManager::addTab('AdminTrainingGridClass', 'Grid exemple', 'training', 'AdminTraining');\n\n return true;\n }", "function rc_add_woocommerce_product_data_tab( $tabs ) {\n\n\t$tabs['access'] = array(\n\t\t'label' => __( 'Access Control', 'restrict-content' ),\n\t\t'target' => 'rc_access_control',\n\t\t'class' => array(),\n\t);\n\n\treturn $tabs;\n}", "function getTabs(&$tabs_gui)\n\t{\n\t\tglobal $rbacsystem;\n\n\t\t// properties\n\t\tif ($rbacsystem->checkAccess(\"write\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"edit_properties\",\n\t\t\t\t\"repository.php?cmd=properties&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"properties\");\n\t\t}\n\n\t\t// edit permission\n\t\tif ($rbacsystem->checkAccess(\"edit_permission\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"perm_settings\",\n\t\t\t\t\"repository.php?cmd=permissions&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"permissions\");\n\t\t}\n\t}", "function woocommerce_settings_tabs_array( $settings_tabs ) {\n $settings_tabs[$this->id] = __('GWP Custom Tabs','GWP');\n return $settings_tabs;\n }", "public function add_editor_buttons() {\n\t\tif ( ! current_user_can( 'iggogrid_list_tables' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->init_i18n_support();\n\t\tadd_thickbox(); // usually already loaded by media upload functions\n\t\t$admin_page = IggoGrid::load_class( 'IggoGrid_Admin_Page', 'class-admin-page-helper.php', 'classes' );\n\t\t$admin_page->enqueue_script( 'quicktags-button', array( 'quicktags', 'media-upload' ), array(\n\t\t\t'editor_button' => array(\n\t\t\t\t'caption' => __( 'Table', 'iggogrid' ),\n\t\t\t\t'title' => __( 'Insert a Table from IggoGrid', 'iggogrid' ),\n\t\t\t\t'thickbox_title' => __( 'Insert a Table from IggoGrid', 'iggogrid' ),\n\t\t\t\t'thickbox_url' => IggoGrid::url( array( 'action' => 'editor_button_thickbox' ), true, 'admin-post.php' ),\n\t\t\t),\n\t\t) );\n\n\t\t// TinyMCE integration\n\t\tif ( user_can_richedit() ) {\n\t\t\tadd_filter( 'mce_external_plugins', array( $this, 'add_tinymce_plugin' ) );\n\t\t\tadd_filter( 'mce_buttons', array( $this, 'add_tinymce_button' ) );\n\t\t\tadd_action( 'admin_print_styles', array( $this, 'add_iggogrid_hidpi_css' ), 21 );\n\t\t}\n\t}", "function __construct() {\n\n //Call the parent constructor with the required arguments.\n parent::__construct(\n // The unique id for your widget.\n 'icon-widget',\n\n // The name of the widget for display purposes.\n __('Icon Widget', 'sage'),\n\n // The $widget_options array, which is passed through to WP_Widget.\n // It has a couple of extras like the optional help URL, which should link to your sites help or support page.\n array(\n 'description' => __('An Opus Energy Widget', 'sage'),\n 'panels_groups' => array('opus'),\n ),\n\n //The $control_options array, which is passed through to WP_Widget\n array(\n ),\n\n //The $form_options array, which describes the form fields used to configure SiteOrigin widgets. We'll explain these in more detail later.\n array(\n 'icon_selection' => array(\n 'type' => 'select',\n 'prompt' => __( 'Choose an icon', 'sage' ),\n 'options' => array(\n 'icon-shop' => __( 'Shop Icon', 'sage' ),\n 'icon-question-mark' => __( 'Question Mark', 'sage' ),\n 'icon-document' => __( 'Document Icon', 'sage' ),\n 'icon-chat' => __( 'Chat Icon', 'sage' ),\n 'icon-conversation' => __( 'Conversation Icon', 'sage' ),\n 'icon-electricity' => __( 'Electricity Icon', 'sage' ),\n 'icon-gas' => __( 'Gas Icon', 'sage' ),\n 'icon-office' => __( 'Office Icon', 'sage' ),\n 'icon-meters' => __( 'Meters Icon', 'sage' ),\n 'icon-moving-truck' => __( 'Moving Truck', 'sage' ),\n 'icon-computer' => __( 'Computer Icon', 'sage' ),\n 'icon-pound' => __( 'British Pound', 'sage' ),\n 'icon-windmill' => __( 'Wind Energy', 'sage' ),\n 'icon-switch-to-us-icon' => __( 'Switch To Us', 'sage' )\n )\n ),\n 'icon_text' => array(\n 'type' => 'text',\n 'label' => __( 'Icon Text', 'sage' ),\n 'prompt' => __( 'Icon Caption', 'sage' )\n ), \n 'button' => array(\n 'type' => 'select',\n 'prompt' => __( 'Choose a Button Colour', 'sage' ),\n 'options' => array(\n 'btn-primary' => __('Pink', 'sage'),\n 'btn-default' => __('Green', 'sage')\n )\n ),\n 'button_text' => array(\n 'type' => 'text',\n 'label' => __( 'Button Text', 'sage' )\n ),\n 'url' => array(\n 'type' => 'link',\n 'label' => __('Button URL', 'sage')\n ),\n // 'some_icon' => array(\n // 'type' => 'icon',\n // 'label' => __('Select an icon', 'widget-form-fields-text-domain'),\n // )\n ),\n \n //The $base_folder path string.\n plugin_dir_path(__FILE__)\n );\n }", "function addOptionsPage(){\n\t\tadd_options_page( 'Post icon', 'Post icon', 'manage_options', 'post_icon_options', array( $this, 'showPostIconOptions' ) );\n\t}", "private function createTab() {\n\t\t$moduleToken = t3lib_formprotection_Factory::get()->generateToken('moduleCall', self::MODULE_NAME);\n\t\treturn $this->doc->getTabMenu(\n\t\t\tarray('M' => self::MODULE_NAME, 'moduleToken' => $moduleToken, 'id' => $this->id),\n\t\t\t'tab',\n\t\t\tself::IMPORT_TAB,\n\t\t\tarray(self::IMPORT_TAB => $GLOBALS['LANG']->getLL('import_tab'))\n\t\t\t) . $this->doc->spacer(5);\n\t}", "function display_tablenav( $which ) {\n $mode = isset($_REQUEST['mode']) ? wpla_clean($_REQUEST['mode']) : 'list';\n ?>\n <div class=\"tablenav <?php echo esc_attr( $which ); ?>\">\n <div class=\"alignleft actions\">\n <?php $this->bulk_actions(); ?>\n </div>\n <?php\n $this->extra_tablenav( $which );\n $this->pagination( $which );\n $this->view_switcher( $mode );\n ?>\n <br class=\"clear\" />\n </div>\n <?php\n }", "function holistic_nav_widget() {\n\tregister_widget( 'Holistic_Nav_Widget' );\n}", "public function addDashWidgets()\n {\n wp_add_dashboard_widget('custom_help_widget_2017', 'True Agency', [$this, 'brandDashboard']);\n }", "protected function _register_controls() {\n\n\t\t$this->start_controls_section(\n\t\t\t'content_section',\n\t\t\t[\n\t\t\t\t'label' => __( 'Content', 'portfolio-elementor' ),\n\t\t\t\t'tab' => \\Elementor\\Controls_Manager::TAB_CONTENT,\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Counter Number\n\t\t$this->add_control(\n\t\t\t'portfolio_counter_number',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Counter Number', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::TEXT,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'default' => esc_html__( 'Enter Counter Number' , 'portfolio-elementor' ),\n\t\t\t]\n\t\t);\n\n\t\t// Counter Title\n\t\t$this->add_control(\n\t\t\t'portfolio_counter_title',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Title', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::TEXT,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'default' => esc_html__( 'Enter Counter Title' , 'portfolio-elementor' ),\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_section();\n\t\t// end of the Content tab section\n\t\t\n\t\t// start of the Style tab section\n\t\t$this->start_controls_section(\n\t\t\t'style_section',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Content Style', 'portfolio-elementor' ),\n\t\t\t\t'tab' => \\Elementor\\Controls_Manager::TAB_STYLE,\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->start_controls_tabs(\n\t\t\t'style_tabs'\n\t\t);\n\t\t\n\t\t// start everything related to Normal state here\n\t\t$this->start_controls_tab(\n\t\t\t'style_normal_tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Normal', 'portfolio-elementor' ),\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Counter Box Options\n\t\t$this->add_control(\n\t\t\t'portfolio_counter_box_options',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Counter Box', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::HEADING,\n\t\t\t\t'separator' => 'before',\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Counter Box Background Color\n\t\t$this->add_control(\n\t\t\t'portfolio_counter_box_background',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Background-Color', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::COLOR,\n\t\t\t\t'scheme' => [\n\t\t\t\t\t'type' => \\Elementor\\Scheme_Color::get_type(),\n\t\t\t\t\t'value' => \\Elementor\\Scheme_Color::COLOR_1,\n\t\t\t\t],\n\t\t\t\t'default' => '#f7f7f7',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .counter-box' => 'background: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Counter Box Border\n\t\t$this->add_control(\n\t\t\t'portfolio_counter_box_border',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Border', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::COLOR,\n\t\t\t\t'scheme' => [\n\t\t\t\t\t'type' => \\Elementor\\Scheme_Color::get_type(),\n\t\t\t\t\t'value' => \\Elementor\\Scheme_Color::COLOR_1,\n\t\t\t\t],\n\t\t\t\t'default' => '#eee',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .counter-box' => 'border: 8px solid {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t// Counter Number Options\n\t\t$this->add_control(\n\t\t\t'portfolio_counter_number_options',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Counter Number', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::HEADING,\n\t\t\t\t'separator' => 'before',\n\t\t\t]\n\t\t);\n\n\t\t// Counter Number Color\n\t\t$this->add_control(\n\t\t\t'portfolio_counter_number_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Number Color', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::COLOR,\n\t\t\t\t'scheme' => [\n\t\t\t\t\t'type' => \\Elementor\\Scheme_Color::get_type(),\n\t\t\t\t\t'value' => \\Elementor\\Scheme_Color::COLOR_1,\n\t\t\t\t],\n\t\t\t\t'default' => '232332',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .counter-box h3' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Counter Number Typography\n\t\t$this->add_group_control(\n\t\t\t\\Elementor\\Group_Control_Typography::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'portfolio_counter_number_typography',\n\t\t\t\t'label' => esc_html__( 'Typography', 'portfolio-elementor' ),\n\t\t\t\t'scheme' => \\Elementor\\Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t\t'selector' => '{{WRAPPER}} .counter-box h3',\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Counter Title Options\n\t\t$this->add_control(\n\t\t\t'portfolio_counter_title_options',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Counter Title', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::HEADING,\n\t\t\t\t'separator' => 'before',\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Counter Title Color\n\t\t$this->add_control(\n\t\t\t'portfolio_counter_title_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::COLOR,\n\t\t\t\t'scheme' => [\n\t\t\t\t\t'type' => \\Elementor\\Scheme_Color::get_type(),\n\t\t\t\t\t'value' => \\Elementor\\Scheme_Color::COLOR_1,\n\t\t\t\t],\n\t\t\t\t'default' => '#232332',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .counter-box h6' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Counter Title Typography\n\t\t$this->add_group_control(\n\t\t\t\\Elementor\\Group_Control_Typography::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'portfolio_counter_title_typography',\n\t\t\t\t'label' => esc_html__( 'Typography', 'portfolio-elementor' ),\n\t\t\t\t'scheme' => \\Elementor\\Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t\t'selector' => '{{WRAPPER}} .counter-box h6',\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_tab();\n\t\t// end everything related to Normal state here\n\n\t\t// start everything related to Hover state here\n\t\t$this->start_controls_tab(\n\t\t\t'style_hover_tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Hover', 'portfolio-elementor' ),\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_tab();\n\t\t// end everything related to Hover state here\n\n\t\t$this->end_controls_tabs();\n\n\t\t$this->end_controls_section();\n\t\t// end of the Style tab section\n\n\t}" ]
[ "0.6808254", "0.6362116", "0.62383133", "0.6144933", "0.60969317", "0.60567397", "0.6024435", "0.60198903", "0.6017377", "0.6002193", "0.60003424", "0.5975321", "0.5955275", "0.58772314", "0.5862733", "0.5848616", "0.58180535", "0.58064556", "0.5798938", "0.5744497", "0.57255495", "0.57244724", "0.5691688", "0.56743836", "0.5661558", "0.5655252", "0.5651596", "0.5614768", "0.561147", "0.55711305", "0.5558107", "0.5549523", "0.55448157", "0.5538474", "0.5528614", "0.55242103", "0.55152273", "0.5509632", "0.55079544", "0.55051", "0.5499572", "0.5484526", "0.5480618", "0.5465603", "0.5453645", "0.54424554", "0.54396343", "0.5435615", "0.5430563", "0.54290766", "0.5420171", "0.5418427", "0.5414848", "0.5408563", "0.54043126", "0.5398004", "0.5388362", "0.53743374", "0.53703135", "0.53668404", "0.5365578", "0.5357972", "0.5345688", "0.534493", "0.5336717", "0.5336665", "0.5335315", "0.53324443", "0.53229064", "0.5311249", "0.5302556", "0.53006995", "0.52973026", "0.5284552", "0.5282642", "0.5280875", "0.52790356", "0.52754945", "0.52622324", "0.5261592", "0.525906", "0.52515715", "0.52424914", "0.5232082", "0.52304447", "0.52212274", "0.5212669", "0.52089524", "0.5206112", "0.51937354", "0.5188513", "0.51804805", "0.5177685", "0.5170488", "0.51636493", "0.516237", "0.515019", "0.5145068", "0.5143317", "0.5138221", "0.51357853" ]
0.0
-1
Show the tab title if only one tab is to be displayed
public function multiwidget_single_title($only, $title) { echo $title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTabTitle()\n {\n return __('Single Page Details');\n }", "public function getTabTitle()\r\n\t{\r\n\t\treturn Mage::helper('slider')->__('Banner Info');\r\n\t}", "public function getTabTitle()\r\n {\r\n return Mage::helper('slideshow')->__('Slide Information');\r\n }", "public function getTabTitle()\n {\n return $this->__('Click here to view data of supplier subscribtion plans');\n }", "public function getTabTitle()\n {\n return Mage::helper('magna_news')->__('Content');\n }", "public function getTabTitle()\n {\n return __('Home Page Banners');\n }", "public function getTabTitle()\n {\n return __('Slider Details');\n }", "public function getTabTitle()\n {\n return __('Slider Information');\n }", "public function getTabTitle()\n {\n return Mage::helper('lavi_news')->__('News Info');\n }", "public function getTabTitle()\n {\n return __('Staff Profile');\n }", "public function getTabTitle()\n {\n return Mage::helper('temando')->__('General');\n }", "public function getTabTitle() {\r\n return Mage::helper('amlanding')->__('Links');\r\n }", "public function getTabTitle()\n {\n return Mage::helper('cms')->__('CSS & JS');\n }", "public function getTabTitle()\n {\n return Mage::helper('gri_cms')->__('Versions');\n }", "private function titleTab($title = \"\"){\n \t$title .= \"\";\n \treturn $title;\n }", "public function getTabTitle()\r\n {\r\n return Mage::helper('attributeSplash')->__('Conditions');\r\n }", "public function getTabTitle()\r\n {\r\n return __('Template Information');\r\n }", "public function getTabTitle()\r\n {\r\n return __('Design');\r\n }", "public function get_title()\n {\n return __('Vertical Tabs', 'hslanding-elementor');\n }", "public function getTabTitle()\n {\n return __('General information');\n }", "public function getTabTitle()\n {\n return __('Subscription Information');\n }", "public function getTabTitle()\n\t{\n\t\treturn __('Qa Info');\n\t}", "public function getTabTitle() {\n return $this->__('Click here for GlobalLink Translation');\n }", "public function getTabTitle()\n {\n return $this->_getHelper()->__('General Information');\n }", "public function getTabTitle()\r\n {\r\n return __('Designer Information');\r\n }", "public function getTabTitle()\r\n {\r\n return __('Conditions');\r\n }", "public function getTabTitle()\n {\n return Mage::helper('sc_cmsblockmanagement')->__('Versions');\n }", "public function ShowTitle()\n {\n return true;\n }", "public function getTabTitle()\n {\n return __('General Information');\n }", "public function getTabTitle()\r\n {\r\n return __('General Group');\r\n }", "public function getTabLabel()\r\n {\r\n return Mage::helper('slideshow')->__('Slide Information');\r\n }", "public function getTabLabel()\n {\n return __('Single Page Details');\n }", "public function getTabTitle()\n {\n return Mage::helper('recomiendo_recipes')->__('Ingredients');\n }", "public function getTabTitle() {\r\n return $this->__('Cutomer settings section');\r\n }", "public function canShowTab()\r\n {\r\n return true;\r\n }", "public function canShowTab()\r\n {\r\n return true;\r\n }", "public function canShowTab()\r\n {\r\n return true;\r\n }", "public function tab1() {\n $output = '<p>' . $this->t('This is the content of Tab 1') . '</p>';\n\n if ($this->currentUser->hasPermission('administer nodes')){\n $output .= '<p>' . $this->t('This extra text is only displayed if the current user can administer nodes.') . '</p>';\n }\n\n return ['#markup' => $output];\n }", "public function getTabTitle()\n {\n return __('Configuration');\n }", "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "public function getTabTitle()\n {\n return __('General');\n }", "public function canShowTab() {\r\n return true;\r\n }", "public function canShowTab() {\r\n return true;\r\n }", "public function canShowTab()\r\n\t{\r\n\t\treturn true;\r\n\t}", "public function isShow_title() {\n\t\t$this->getShow_title();\n\t}", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function canShowTab()\n {\n return true;\n }", "public function getTabTitle()\n {\n return $this->__('Hot Offers');\n }", "function title() {\n parent::title();\n\n if (Session::haveRight('internet', UPDATE)\n && Session::canViewAllEntities()) {\n\n echo \"<div class='spaced' id='tabsbody'>\";\n echo \"<table class='tab_cadre_fixe'>\";\n\n echo \"<tr><td class='center'>\";\n Html::showSimpleForm(IPNetwork::getFormURL(), 'reinit_network',\n __('Reinit the network topology'));\n\n echo \"</td></tr>\";\n\n echo \"</table>\";\n echo \"</div>\";\n }\n }", "public function getTabLabel()\n {\n return Mage::helper('magna_news')->__('Content');\n }", "public function canShowTab() {\n return true;\n }", "public function canShowTab() {\n return true;\n }", "public function getTabTitle()\n {\n return Mage::helper('blog')->__('Comment Information');\n }", "public function getTabTitle()\n {\n return Mage::helper('catalogrule')->__('Conditions');\n }", "public function canShowTab() {\n return true;\n }", "public function getTabLabel()\n {\n return __('Home Page Banners');\n }", "public function getTabTitle()\n {\n return __('EVENTS');\n }", "protected static function showTab($name) {\n\t\t\n\t\t$show_tab_setting = elgg_get_plugin_setting(\"group_listing_{$name}_available\", 'group_tools');\n\t\t\n\t\treturn ($show_tab_setting !== '0');\n\t}", "public function getTabLabel()\r\n\t{\r\n\t\treturn Mage::helper('slider')->__('Banner Info');\r\n\t}", "public function isTitle()\n {\n return $this->getName() === 'title';\n }", "public function getTabLabel()\n {\n return Mage::helper('lavi_news')->__('News Info');\n }", "public function getTabLabel()\n {\n return __('Content and Design');\n }", "public function getTabTitle()\n {\n return Mage::helper('chirpify_seller')->__('Product');\n }", "public function getTabTitle()\n {\n return __('Message');\n }", "public function getTabLabel()\n {\n return __('Slider Details');\n }", "public function getShowTitle()\n {\n return !$this->HideTitle;\n }", "public function getTabLabel()\n {\n return __('Slider Information');\n }", "function ihf_node_type_tabs_title($tab, $node) {\n $text = '';\n switch ($tab) {\n case 'type':\n $type = node_type_load($node->type);\n $text = 'Manage '. $type->name;\n break;\n case 'fields':\n $text = 'Manage Fields';\n break;\n case 'display':\n $text = 'Manage Display';\n break;\n }\n return t($text);\n}", "function show_normal_tabs() {\n //$this->log(\"show_normal_tabs() top\", LOG_DEBUG);\n $this->show_tabs(Configure::read('tabs_order_default'));\n }", "private function renderTabs()\n {\n ?>\n <h2 class=\"nav-tab-wrapper wp-clearfix\">\n <?php\n array_walk(\n $this->tabs,\n [$this, 'renderTab'],\n $this->currentlyActiveTab()\n );\n ?>\n </h2>\n <?php\n }", "public function getTabTitle()\n {\n return __('Paypal Payment Information');\n }", "public function getTabLabel()\n {\n return Mage::helper('cms')->__('CSS & JS');\n }", "public function getTabLabel()\n {\n return Mage::helper('temando')->__('General');\n }", "public function getTabLabel() {\r\n return Mage::helper('amlanding')->__('Links');\r\n }", "public function title(){\r\n\r\n echo ISSET($this->pageSettings->page_title)?$this->pageSettings->page_title:'';\r\n\r\n }", "public function describeTabs();", "public function getTabLabel()\n {\n return __('Staff Profile');\n }" ]
[ "0.7138815", "0.7108961", "0.7105105", "0.70524544", "0.70360774", "0.7021039", "0.7016205", "0.700888", "0.69673294", "0.6954351", "0.69278586", "0.69069386", "0.68949056", "0.6850852", "0.6848776", "0.68394005", "0.67961806", "0.67853516", "0.67739546", "0.67701215", "0.67497844", "0.674472", "0.67431515", "0.6735271", "0.67341757", "0.6694582", "0.66799617", "0.66660386", "0.66537744", "0.6647812", "0.6645519", "0.6632038", "0.6628171", "0.662092", "0.661848", "0.661848", "0.661848", "0.6617661", "0.6614013", "0.66031444", "0.66031444", "0.66031444", "0.66031444", "0.66031444", "0.66031444", "0.66031444", "0.6592383", "0.6588894", "0.6588894", "0.65820897", "0.6577953", "0.65751064", "0.65751064", "0.65751064", "0.65751064", "0.65751064", "0.65751064", "0.65751064", "0.65751064", "0.65751064", "0.65751064", "0.65751064", "0.65751064", "0.65751064", "0.65751064", "0.65751064", "0.65751064", "0.65751064", "0.65751064", "0.65751064", "0.65751064", "0.6561859", "0.65609705", "0.65580326", "0.654988", "0.654988", "0.65449923", "0.65285367", "0.6511542", "0.64895195", "0.64826584", "0.6441151", "0.6412723", "0.6396484", "0.6391591", "0.63914865", "0.6381005", "0.63740164", "0.6373807", "0.6371008", "0.6302421", "0.62856144", "0.62846476", "0.6254049", "0.62528604", "0.6232713", "0.6229382", "0.62269425", "0.6211141", "0.6200538", "0.6199556" ]
0.0
-1
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }", "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "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 }", "public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n return $this->auth->check();\n }", "public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "function isAuthorized($request) {\n return true;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }" ]
[ "0.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.7891453", "0.7890965", "0.7862504", "0.78414804", "0.78414804", "0.7837965", "0.78248763", "0.7812292", "0.7809632", "0.77928597", "0.7788316", "0.7781619", "0.77815884", "0.7763308", "0.7754035", "0.7717961", "0.7717961", "0.77171147", "0.77138597", "0.7705001", "0.7693082", "0.7692783", "0.76915383", "0.76909506", "0.76733255", "0.7667128", "0.7665592", "0.7656238", "0.7650853", "0.764326", "0.76431626", "0.76431614", "0.7635147", "0.76311624", "0.76294273", "0.7627076", "0.76207024", "0.76207024", "0.76139116", "0.76036394", "0.76035625", "0.76035625", "0.76032084", "0.7602515", "0.76007926", "0.75971127", "0.7588128", "0.7586303", "0.7581912", "0.7563037", "0.7554785", "0.75526226", "0.755171", "0.75436753", "0.75432944", "0.7540682", "0.7538806", "0.75280696", "0.751548", "0.75149626", "0.7501161", "0.74959517", "0.74956346", "0.74911124", "0.7489147", "0.74858016", "0.748033", "0.7478443", "0.7472642", "0.7472576", "0.7465409", "0.7464371", "0.74630046", "0.7462218", "0.7461453", "0.7449168", "0.74399257", "0.74358094", "0.7433247", "0.7432659", "0.74248093" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { if (str_contains($this->url(), 'course/sort/update')) { return [ 'course_ids' => 'required|array', 'course_ids.*' => 'sometimes|integer' ]; } else { return [ 'name' => 'required|max:64', 'web_reception' => 'required|enum_value:' . WebReception::class . ',false', 'calendar_id' => 'nullable|exists:calendars,id', 'is_category' => [ 'required', Rule::in([0, 1]) ], 'reception_start_day' => 'required|integer|min:0', 'reception_start_month' => 'required|integer|min:0', 'reception_end_day' => 'required|integer|min:0', 'reception_end_month' => 'required|integer|min:0', //'reception_acceptance_day' => 'required|integer|min:0', //'reception_acceptance_month' => 'required|integer|min:0', 'cancellation_deadline' => 'required|integer|min:0', 'pre_account_price' => 'nullable|integer', 'is_price' => [Rule::in([0, 1])], 'is_price_memo' => [Rule::in([0, 1])], 'price' => 'required_if:is_price,1|numeric|required_without:price_memo', 'price_memo' => 'required_if:is_price_memo,1|required_without:price', 'is_pre_account' => ['required', Rule::in([0, 1])], 'course_option_ids' => 'array', 'course_option_ids.*' => 'sometimes|integer', 'minor_ids' => 'array', 'minor_values' => 'array', 'is_questions' => 'required|array', 'is_questions.*' => [ Rule::in([0, 1]) ], 'question_titles' => 'array', 'answer01s' => 'array', 'answer02s' => 'array', 'answer03s' => 'array', 'answer04s' => 'array', 'answer05s' => 'array', 'answer06s' => 'array', 'answer07s' => 'array', 'answer08s' => 'array', 'answer09s' => 'array', 'answer10s' => 'array', 'publish_start_date' => 'date|nullable', 'publish_end_date' => 'date|nullable', 'reception_acceptance_day_end' => 'date|nullable', ]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
Display a listing of the resource.
public function index() { $supplier = Supplier::orderBy('created_at', 'desc')->paginate(10); return view('supplier.index',['supplier' => $supplier]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\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\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('supplier.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "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 }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "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}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "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 }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "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 }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "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 }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "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}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "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 }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "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 }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "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 }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "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 }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "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 }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "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 }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "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}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $supplier = new Supplier(); $supplier->supplier_name = $request->supplier_name; $supplier->company_name = $request->company_name; $supplier->telephone = $request->telephone; $supplier->email = $request->email; $supplier->address = $request->address; $supplier->supplier_type = $request->supplier_type; $supplier->save(); \Session::put('info','Supplier has been inserted successfully!'); return redirect('supplier'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { $supplier = Supplier::find($id); return view('supplier.show',['supplier' => $supplier]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "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\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\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::error('event.view.not_allowed');\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}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $supplier = Supplier::find($id); return view('supplier.edit',['supplier' => $supplier]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\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('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.7855196", "0.76957726", "0.7273917", "0.7241426", "0.71717227", "0.7064183", "0.70528984", "0.69836885", "0.694763", "0.69469565", "0.6941572", "0.69301945", "0.6903868", "0.68989486", "0.68989486", "0.68787694", "0.68641657", "0.6860115", "0.6857286", "0.68464494", "0.6834566", "0.68116575", "0.68075293", "0.6805924", "0.6801357", "0.6796291", "0.67915684", "0.67915684", "0.67874014", "0.678544", "0.67787844", "0.6777662", "0.67675763", "0.676299", "0.6746726", "0.6745706", "0.67450166", "0.67450166", "0.6739429", "0.6734577", "0.6725992", "0.67127997", "0.6694406", "0.6692487", "0.6689421", "0.66884303", "0.6687299", "0.6685663", "0.6682167", "0.66701853", "0.66697115", "0.6666091", "0.6666091", "0.66627705", "0.6661716", "0.6661522", "0.6657919", "0.6656454", "0.6653187", "0.6642113", "0.66332614", "0.66324973", "0.66275465", "0.66275465", "0.6619777", "0.6619387", "0.6617973", "0.66154003", "0.66110945", "0.6607966", "0.66065043", "0.6596376", "0.65953517", "0.65941286", "0.6591486", "0.6590759", "0.6588404", "0.658161", "0.6580548", "0.6579757", "0.6577171", "0.65761065", "0.657386", "0.65686774", "0.6567784", "0.65672046", "0.6566417", "0.65615803", "0.65615714", "0.65615714", "0.65592474", "0.65586483", "0.65568006", "0.6556628", "0.65564895", "0.6555322", "0.65551996", "0.6555016", "0.654888", "0.65477645", "0.65451735" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $supplier = Supplier::find($id); $supplier->supplier_name = $request->supplier_name; $supplier->company_name = $request->company_name; $supplier->telephone = $request->telephone; $supplier->email = $request->email; $supplier->address = $request->address; $supplier->supplier_type = $request->supplier_type; $supplier->save(); \Session::put('info','Supplier has been updated successfully!'); return redirect('supplier'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Array of property to type mappings. Used for (de)serialization.
public static function openAPITypes() : array { return self::$openAPITypes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTypes()\n {\n $types = PropertyType::all();\n $values = [];\n foreach ($types as $key) {\n $values[] = $key->id;\n }\n return $values;\n }", "public static function getTypesMap(): array\n {\n return self::$typesMap;\n }", "public function getTypes(): array\n {\n return $this->types;\n }", "public function getTypes() : array\n {\n return \\array_map(function ($t) {\n return $t instanceof self ? $t : new self([$t]);\n }, $this->types);\n }", "public static function getTypeMap() {\n return [\n 'session_id' => self::FIELD_INT,\n 'user_id' => self::FIELD_INT,\n 'session_string' => self::FIELD_STRING,\n 'create_date' => self::FIELD_EPOCH,\n 'update_date' => self::FIELD_EPOCH,\n ];\n }", "public static function getTypeMap() {\n return [\n 'charge_id' => self::FIELD_INT,\n 'user_id' => self::FIELD_INT,\n 'amount' => self::FIELD_INT,\n 'description' => self::FIELD_STRING,\n 'charge_date' => self::FIELD_EPOCH,\n 'create_date' => self::FIELD_EPOCH,\n 'update_date' => self::FIELD_EPOCH,\n ];\n }", "public function get_types()\n\t{\n\t\treturn array();\n\t}", "public static function getPropertyTypes() {\n\t\treturn self::$PROPERTY_TYPES;\n\t}", "public static function getPropertyTypes() {\n\t\treturn self::$PROPERTY_TYPES;\n\t}", "public static function getPropertyTypes() {\n\t\treturn self::$PROPERTY_TYPES;\n\t}", "static protected function getPropertyTypes($typeArray) {\n\n\t\t$types = array();\n\t\t// Types are mapped to this entry by typoscript\n\t\t// (e.g. postProcessor.1.properties.1.type.1 = WORK)\n\t\t$typeKeys = \\TYPO3\\CMS\\Core\\TypoScript\\TemplateService::sortedKeyList($typeArray);\n\n\t\tforeach ($typeKeys as $typeKey) {\n\t\t\tif (!intval($typeKey) || strpos($typeKey, '.') !== FALSE) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$types[] = strtoupper($typeArray[$typeKey]);\n\t\t}\n\t\treturn $types;\n\t}", "public function getTypeMap()\n {\n }", "public function getTypeMap()\n {\n return $this->typeMap;\n }", "public static function getTypeArray()\n {\n return [\n self::TYPE_GENERIC => Yii::t('app', 'Generic'),\n ];\n }", "static function getTypes(): array\n\t{\n return self::$types;\n }", "public function getTypes(): array;", "public function getTypes(): array;", "public function getTypes() {\n\t\treturn $this->types;\n\t}", "public function getTypes()\n {\n return $this->types;\n }", "public function getTypes()\n {\n return $this->types;\n }", "public function getTypeArr(){\n\t\treturn [\n\t\t\t'normal' =>'Normal',\n\t\t\t'ip'\t =>'IP',\n\t\t\t'iprange'=>'IP Bereich'\n\t\t];\n\t}", "function getTypes() {\n\t\treturn $this->types;\n\t}", "public function getTypes()\n {\n return $this->getTypesCollection()->getArrayCopy();\n }", "public function toArray()\n {\n $data = parent::toArray();\n if (isset($this->type)) {\n $data['type'] = $this->type;\n }\n return $data;\n }", "public static function getTypesMap()\n {\n return self::$typesMap;\n }", "public function validPropertyTypes()\n {\n return [\n ['integer'],\n ['int'],\n ['float'],\n ['boolean'],\n ['bool'],\n ['string'],\n ['DateTime'],\n ['array'],\n ['ArrayObject'],\n ['SplObjectStorage'],\n ['Neos\\Flow\\Foo'],\n ['\\Neos\\Flow\\Bar'],\n ['\\Some\\Object'],\n ['SomeObject'],\n ['array<string>'],\n ['array<Neos\\Flow\\Baz>'],\n ['?string'],\n ['null|string'],\n ['string|null'],\n ['?\\Some\\Object'],\n ['\\Some\\Object|null'],\n ['?array<Neos\\Flow\\Baz>'],\n ['null|array<Neos\\Flow\\Baz>']\n ];\n }", "public function types()\n {\n return $this->types;\n }", "public function typesProvider()\n {\n return [\n '1 Type' => ['Type1'],\n '2 Type' => [['Type1', 'Type2']],\n ];\n }", "protected function types()\n {\n return [\n 'bigint',\n 'blob',\n 'boolean',\n 'date',\n 'decimal',\n 'integer',\n 'longText',\n 'smallint',\n 'text',\n 'time',\n 'timestamp',\n 'timestamptz',\n ];\n }", "public function getTypes()\n {\n return $this->getData(self::TYPES);\n }", "public static function getTypes()\n {\n return [\n ModelRegistry::TRANSACTION => ModelRegistry::getById(ModelRegistry::TRANSACTION)->label,\n ModelRegistry::PRODUCT => ModelRegistry::getById(ModelRegistry::PRODUCT)->label,\n ];\n }", "public function getMimetypeMapping()\n {\n if (isset($this->raw->mimetypes)) {\n return (array) $this->raw->mimetypes;\n }\n\n return array();\n }", "public function getTypes()\n {\n return get_object_vars($this);\n }", "protected function getTypes() {}", "public static function getTypes(): array\n {\n return self::getRelevancyTypes();\n }", "protected function _listTypes()\n {\n global $config;\n $types = objects::types();\n\n $result = array();\n foreach ($types as $type) {\n $infos = objects::infos($type);\n $result[$type] = $infos['name'];\n }\n return $result;\n }", "protected function property_map() { return array(); }", "public function getTypes(): array\n {\n return $this->map(static function (DataSetColumn $column) {\n return $column->getType();\n })->toArray();\n }", "public static function getArrayTypes() {\n return array(\n self::TYPE_NEWS => DomainConst::CONTENT00472,\n self::TYPE_OTHER => DomainConst::CONTENT00031,\n );\n }", "protected function getPropertyTypeAttributes()\n {\n return array_merge(\n $this->getCommonAttributes(),\n array(\n 'multiple' => array('values' => array('*', 'mul', 'multiple'), 'variant' => true),\n 'queryops' => array('values' => array('qop', 'queryops'), 'variant' => true), // Needs special handling !\n 'nofulltext' => array('values' => array('nof', 'nofulltext'), 'variant' => true),\n 'noqueryorder' => array('values' => array('nqord', 'noqueryorder'), 'variant' => true),\n )\n );\n }", "public function get_types()\n {\n return self::$TYPES;\n }", "public function types(): array\n {\n return collect($this->modelSchemas)->map(function ($modelSchema) {\n return $modelSchema instanceof RootType\n ? $modelSchema\n : $this->registry->type($this->registry->getModelSchema($modelSchema)->typename());\n })->toArray();\n }", "public static function types()\n {\n return self::$types;\n }", "public function get(): array\n {\n if ($this->types === []) {\n return self::$allowedTypes;\n }\n return $this->types;\n }", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function types(): array\n {\n $json = $this->parent->performAPICallWithJsonResponse('get', 'artwork/types');\n return DataParser::parseDataArray($json, ArtworkType::class);\n }", "public function typeProvider()\n {\n return array(\n array(true, false),\n array(12, false),\n array(24.50, false),\n array(new \\stdClass(), false),\n array('string', true),\n );\n }", "public function toArray(): array\n {\n return [\n 'type' => self::typeToString($this->type),\n 'required' => $this->required,\n 'list' => $this->list,\n 'hidden' => $this->hidden\n ];\n }", "public function dataTypeMap()\n {\n return config('codegenerator.eloquent_type_to_method');\n }", "public static function mapping()\r\n {\r\n return [\r\n self::BUS_TICKET_NAME => self::BUS_TICKET_CLASS,\r\n self::AIRPORTBUS_TICKET_NAME => self::AIRPORTBUS_TICKET_CLASS,\r\n self::TRAIN_TICKET_NAME => self::TRAIN_TICKET_CLASS,\r\n self::FLIGHT_TICKET_NAME => self::FLIGHT_TICKET_CLASS,\r\n ];\r\n }", "public function getTypeMapper();", "public function invalidPropertyTypes()\n {\n return [\n ['string<string>'],\n ['int<Neos\\Flow\\Baz>']\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'settingDefinitionId' => fn(ParseNode $n) => $o->setSettingDefinitionId($n->getStringValue()),\n 'settingInstanceTemplateReference' => fn(ParseNode $n) => $o->setSettingInstanceTemplateReference($n->getObjectValue([DeviceManagementConfigurationSettingInstanceTemplateReference::class, 'createFromDiscriminatorValue'])),\n ];\n }", "public static function getTypes()\n\t{\n\t\t\n\t\treturn [\n\t\t\tself::TYPE_SHARES\t\t\t =>\t\"Shares\",\n\t\t\tself::TYPE_PROPERTY\t\t\t =>\t\"Property\",\n\t\t];\n\t\t\n\t}", "public static function types(): array\n {\n $all = self::getAll();\n\n return array_keys($all);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'attributeMappings' => fn(ParseNode $n) => $o->setAttributeMappings($n->getCollectionOfObjectValues([AttributeMapping::class, 'createFromDiscriminatorValue'])),\n 'enabled' => fn(ParseNode $n) => $o->setEnabled($n->getBooleanValue()),\n 'flowTypes' => fn(ParseNode $n) => $o->setFlowTypes($n->getEnumValue(ObjectFlowTypes::class)),\n 'metadata' => fn(ParseNode $n) => $o->setMetadata($n->getCollectionOfObjectValues([ObjectMappingMetadataEntry::class, 'createFromDiscriminatorValue'])),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'scope' => fn(ParseNode $n) => $o->setScope($n->getObjectValue([Filter::class, 'createFromDiscriminatorValue'])),\n 'sourceObjectName' => fn(ParseNode $n) => $o->setSourceObjectName($n->getStringValue()),\n 'targetObjectName' => fn(ParseNode $n) => $o->setTargetObjectName($n->getStringValue()),\n ];\n }", "public static function types() : array\n {\n return ['questions', 'pictures', 'video'];\n }", "public static function get_types()\n {\n return self::$TYPES;\n }", "public static function getTypes(): array {\n\t\treturn ['pizza'];\n\t}", "public function toArray(): array\n {\n return [\n 'name' => $this->name,\n 'type' => $this->type,\n ];\n }", "protected function loadPropertyTypes() {\n\t\tif (empty($this->cachedPropertyTypes)) {\n\t\t\t$completePropertyTypeConfiguration = $this->configurationManager->getConfiguration('PropertyTypes');\n\t\t\tforeach (array_keys($completePropertyTypeConfiguration) as $propertyTypeName) {\n\t\t\t\t$this->loadPropertyType($propertyTypeName, $completePropertyTypeConfiguration);\n\t\t\t}\n\t\t}\n\t}", "public static function getTypesList()\n {\n return ArrayHelper::map(Yii::$app->get('cms')->getPageTypes(), 'type', 'name');\n }", "public function types()\n {\n return [\n static::TYPE_APP,\n static::TYPE_GALLERY,\n static::TYPE_PHOTO,\n static::TYPE_PLAYER,\n static::TYPE_PRODUCT,\n static::TYPE_SUMMARY,\n static::TYPE_SUMMARY_LARGE_IMAGE,\n ];\n }", "public static function getTypeList() {\n return array(\n self::TYPE_CODE_1=>self::TYPE_STRING_1,\n self::TYPE_CODE_2=>self::TYPE_STRING_2,\n self::TYPE_CODE_3=>self::TYPE_STRING_3,\n self::TYPE_CODE_4=>self::TYPE_STRING_4,\n self::TYPE_CODE_5=>self::TYPE_STRING_5,\n self::TYPE_CODE_6=>self::TYPE_STRING_6\n );\n }", "private function &getSerializableAttributeTypesFromCache(): array {\n $key = \\get_class($this);\n if (!isset(self::$__attrTypeCache[$key])) {\n self::$__attrTypeCache[$key] = $this->getSerializableAttributeTypes();\n }\n return self::$__attrTypeCache[$key];\n }", "public function get_types()\n {\n }", "protected static function _getDataTypes()\n {\n return [];\n }", "public function toArray(): array\n {\n return $this->_mapping;\n }", "public function toJson() {\n\t\t$array = array(\"types\"=>array());\n\t\tforeach ($this->types as $type) {\n\t\t\t$array[\"types\"][] = $type->toJson();\n\t\t}\n\t\tif ($this->warningMessage) {\n\t\t\t$array[\"warning\"] = $this->warningMessage;\n\t\t}\n\t\treturn $array;\n\t}", "protected static function getPossibleVarTypes() {\n\t\treturn [\n\t\t\tPropertiesInterface::DTYPE_DEP_CURRENCY => CurrencyType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_EMAIL => EmailType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_FILE => FileType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_FORM_SECTION => FormSectionType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_FORM_SECTION_CLOSE => FormSectionCloseType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_IMAGE => ImageType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_MTIME => MtimeType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_SOURCE => SourceType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_STIME => StimeType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_TIME_ONLY => TimeOnlyType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_TXTBOX => TxtboxType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_URL => UrlType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_URLLINK => UrllinkType::class,\n\t\t\tPropertiesInterface::DTYPE_ARRAY => ArrayType::class,\n\t\t\tPropertiesInterface::DTYPE_BOOLEAN => BooleanType::class,\n\t\t\tPropertiesInterface::DTYPE_DATETIME => DateTimeType::class,\n\t\t\tPropertiesInterface::DTYPE_FILE => \\Imponeer\\Properties\\Types\\FileType::class,\n\t\t\tPropertiesInterface::DTYPE_FLOAT => FloatType::class,\n\t\t\tPropertiesInterface::DTYPE_INTEGER => IntegerType::class,\n\t\t\tPropertiesInterface::DTYPE_LIST => ListType::class,\n\t\t\tPropertiesInterface::DTYPE_OBJECT => ObjectType::class,\n\t\t\tPropertiesInterface::DTYPE_OTHER => OtherType::class,\n\t\t\tPropertiesInterface::DTYPE_STRING => StringType::class\n\t\t];\n\t}", "public function transform(Type $type) : array\n {\n return [\n 'id' => (int) $type->id,\n 'name' => (string) $type->name,\n 'slug' => (string) $type->slug\n ];\n }", "public function getTypeFields(): array\n {\n return array_merge(\n $this->getAttributesFields(),\n $this->getTypeRelations(),\n $this->getAggregatedFields(),\n $this->getOptionalFields()\n );\n }", "public function getTypes()\n {\n $oDb = Factory::service('Database');\n $oResult = $oDb->query('SHOW COLUMNS FROM `' . $this->table . '` LIKE \"type\"')->row();\n $sTypes = $oResult->Type;\n $sTypes = preg_replace('/enum\\((.*)\\)/', '$1', $sTypes);\n $sTypes = str_replace(\"'\", '', $sTypes);\n $aTypes = explode(',', $sTypes);\n\n $aOut = [];\n\n foreach ($aTypes as $sType) {\n $aOut[$sType] = ucwords(strtolower($sType));\n }\n\n return $aOut;\n }", "public function toArray()\n {\n return [\n 'config' => $this->config,\n 'type' => $this->type,\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'response' => fn(ParseNode $n) => $o->setResponse($n->getEnumValue(ResponseType::class)),\n 'time' => fn(ParseNode $n) => $o->setTime($n->getDateTimeValue()),\n ];\n }", "public function toArray()\n {\n $type = $this->getType();\n $array = [\n 'type' => $type,\n ];\n if ('function' == $type) {\n $array['function'] = $this->getFunction();\n } else {\n $array['class'] = $this->getClass();\n $array['method'] = $this->getMethod();\n }\n return $array;\n }", "public function serializeProperties(\n VisitorInterface $visitor,\n Properties $properties,\n array $type,\n Context $context\n ): array {\n $type['name'] = 'array';\n $type['params'] = [\n 'name' => 'string'\n ];\n\n return $visitor->visitArray($properties->toArray(), $type, $context);\n }", "public function getClassMap()\n {\n return array();\n }", "public static function types()\n\t{\n\t\t$states = array(\n\t\t\t'blog' => __('Blog'),\n\t\t\t'page' => __('Page'),\n\t\t\t'user' => __('User')\n\t\t);\n\n\t\t$values = Module::action('gleez_types', $states);\n\n\t\treturn $values;\n\t}", "function FieldTypesArray() {}", "public function toArray()\n {\n return [\n 'type' => 'object',\n 'properties' => [\n 'email' => ['type' => 'string'],\n 'key' => ['type' => 'string'],\n 'name' => ['type' => 'string'],\n 'picture' => ['type' => 'string'],\n 'phone' => ['type' => 'string'],\n 'balance' => ['type' => 'integer', 'format' => 'int32'],\n 'codes' => ['type' => 'array', 'items' => ['type' => 'string']],\n 'order_comment_tracking_code' => ['type' => 'string'],\n 'title' => ['type' => 'string'],\n ],\n 'required' => ['email', 'key', 'name', 'phone', 'balance', 'codes', 'order_comment_tracking_code', 'title'],\n ];\n }", "public function getFieldTypeClasses() : array\n {\n return [TableType::class];\n }", "public static function getTypes() {\n\t\treturn [\n\t\t\t'text' => self::RESOURCE_TYPE_TEXT,\n\t\t\t'img' => self::RESOURCE_TYPE_IMG\n\t\t];\n\t}", "public static function getTypeList()\n {\n return [\n self::TYPE_TEXT_FIELD => '',\n self::TYPE_DROP_DOWN => '',\n ];\n }", "public static function getTypeArray() {\n\t\treturn array( \n\t\t\t'hash' => 'EthD32',\n\t\t\t'nonce' => 'EthQ',\n\t\t\t'blockHash' => 'EthD32',\n\t\t\t'blockNumber' => 'EthQ',\n\t\t\t'transactionIndex' => 'EthQ',\n\t\t\t'from' => 'EthD20',\n\t\t\t'to' => 'EthD20',\n\t\t\t'value' => 'EthQ',\n\t\t\t'gasPrice' => 'EthQ',\n\t\t\t'gas' => 'EthQ',\n\t\t\t'input' => 'EthD',\n\t\t);\n\t}", "public function get_post_types() {\n\n\t\treturn [\n\t\t\tPost_Type_Movie::SLUG,\n\t\t];\n\n\t}", "public static function getTypeArray() {\n return array( \n 'to' => 'EthD20',\n 'from' => 'EthD20',\n 'gas' => 'EthQ',\n 'gasPrice' => 'EthQ',\n 'value' => 'EthQ',\n 'data' => 'EthD',\n 'nonce' => 'EthQ',\n );\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'file' => fn(ParseNode $n) => $o->setFile($n->getBinaryContent()),\n 'sensitiveTypeIds' => function (ParseNode $n) {\n $val = $n->getCollectionOfPrimitiveValues();\n if (is_array($val)) {\n TypeUtils::validateCollectionValues($val, 'string');\n }\n /** @var array<string>|null $val */\n $this->setSensitiveTypeIds($val);\n },\n ]);\n }", "protected function get_array_field_types() {\n\t\treturn array( 'multicheck' );\n\t}", "public function getMapPaymentTypes()\n {\n return $this->map_payment_types;\n }", "public function getDataClasses()\n {\n return $this->data_types;\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'attributeDestination' => fn(ParseNode $n) => $o->setAttributeDestination($n->getObjectValue([AccessPackageResourceAttributeDestination::class, 'createFromDiscriminatorValue'])),\n 'attributeName' => fn(ParseNode $n) => $o->setAttributeName($n->getStringValue()),\n 'attributeSource' => fn(ParseNode $n) => $o->setAttributeSource($n->getObjectValue([AccessPackageResourceAttributeSource::class, 'createFromDiscriminatorValue'])),\n 'id' => fn(ParseNode $n) => $o->setId($n->getStringValue()),\n 'isEditable' => fn(ParseNode $n) => $o->setIsEditable($n->getBooleanValue()),\n 'isPersistedOnAssignmentRemoval' => fn(ParseNode $n) => $o->setIsPersistedOnAssignmentRemoval($n->getBooleanValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n ];\n }", "protected function loadTypes()\n {\n return array(\n new RecaptchaType(\n $this->app['salberts_recaptcha2.public_key'],\n $this->app['salberts_recaptcha2.enabled'],\n $this->app['salberts_recaptcha2.ajax'],\n $this->app['salberts_recaptcha2.locale_key']\n )\n );\n }", "public static function types(): array\n {\n $config = app(ConfigInterface::class);\n\n return $config\n ->get('alert.types');\n }", "public static function types()\n {\n return [\n self::TYPE_PERSONAL => Yii::t('app', 'Personal'),\n self::TYPE_BUSINESS => Yii::t('app', 'Business'),\n self::TYPE_CUSTOM => Yii::t('app', Yii::$app->holidaySettings->customHolidayName)\n ];\n }", "public function getTypeLoaders(): array\n {\n return $this->typeLoaders;\n }", "public function getPropertyTypes()\n\t{\n\t\treturn $this->hasOne(PropertyTypes:: className(), ['id' => 'property_type_id']);\n\t}", "public function getObjectMaps()\n {\n return array(\n 'id' => self::TYPE_STRING,\n 'self' => self::TYPE_STRING,\n 'author' => self::TYPE_USER,\n 'comment' => self::TYPE_STRING,\n 'timeSpentSeconds' => 'integer',\n 'billedSeconds' => 'integer',\n 'dateStarted' => 'datatime',\n 'issue' => self::TYPE_ISSUE,\n// 'workAttributeValues'\n );\n }" ]
[ "0.68564117", "0.6678997", "0.66784334", "0.6625645", "0.65831053", "0.6510718", "0.65102845", "0.6483358", "0.6483358", "0.6483358", "0.6480469", "0.63242066", "0.62419933", "0.61962336", "0.6169887", "0.61274546", "0.61274546", "0.6111657", "0.611102", "0.611102", "0.61096454", "0.61004514", "0.6089724", "0.60677075", "0.6049932", "0.6044848", "0.6041334", "0.6013341", "0.59942627", "0.59723747", "0.5969972", "0.5935072", "0.59189355", "0.59049666", "0.5886405", "0.58816475", "0.588163", "0.58784336", "0.58759665", "0.5857793", "0.584989", "0.5838559", "0.58197284", "0.58081263", "0.57869357", "0.57869357", "0.57869357", "0.57869357", "0.57854944", "0.57852983", "0.57741076", "0.5743319", "0.57411164", "0.57237977", "0.5716051", "0.5698422", "0.5683469", "0.5669394", "0.56685835", "0.566462", "0.56575537", "0.5657305", "0.56376094", "0.5635739", "0.5613902", "0.5611564", "0.56114894", "0.56071466", "0.55997306", "0.5594574", "0.55945456", "0.5574459", "0.5574202", "0.5571615", "0.55687743", "0.5551253", "0.5542834", "0.5541835", "0.55399853", "0.55369633", "0.55315596", "0.55273867", "0.5524559", "0.5520454", "0.55198926", "0.5519653", "0.5518397", "0.5511725", "0.5510279", "0.5504286", "0.55034286", "0.5501756", "0.5500182", "0.5490139", "0.548862", "0.5478781", "0.5478263", "0.5476193", "0.54724336", "0.54664814", "0.5465734" ]
0.0
-1
Array of property to format mappings. Used for (de)serialization.
public static function openAPIFormats() : array { return self::$openAPIFormats; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormats()\n {\n\t $format_field = $this->getValue('format');\n\t return wed_decodeJSON($format_field,true);\n }", "protected function getFormats(): array\n {\n return [self::FORMAT_JSON, self::FORMAT_XML];\n }", "public function provideSetFormat()\n {\n return [\n 'json' => [\n 'format' => 'json',\n ],\n 'html' => [\n 'format' => 'html',\n ],\n 'plain' => [\n 'format' => 'text',\n ],\n 'xml' => [\n 'format' => 'xml',\n ],\n ];\n }", "public static function getFormats() {\n return array(\n 'none',\n 'pretty',\n 'php',\n 'php-data',\n 'json-pretty',\n 'json-strict',\n 'serialize',\n 'shell',\n );\n }", "public function getFormats()\n {\n return $this->_formats;\n }", "public function getFormatList()\n {\n return $this->formatList;\n }", "public function toArray() {\n $output = array();\n foreach($this->_magicProperties as $key => $value) {\n if (in_array($key,$this->translation)) {\n $output[array_search($key,$this->translation)] = $value;\n }else{\n $output[$key] = $value;\n }\n }\n return $this->_postarray($output);\n }", "public static function getFormats()\n {\n return self::$formats;\n }", "public function getFormatKeys()\n {\n return $this->formatKeys;\n }", "public function getFormat(): array;", "public function getFormatList() {\r\n\t\treturn $this->formatList;\r\n\t}", "public static function formats()\n {\n return self::$formats;\n }", "public function format() {\n\n /* * Add the mandatary props* */\n if (!is_null($this->name)) {\n $result[self::NAME_KEY] = $this->name;\n }\n\n /* * Add the optional props if any* */\n if (!is_null($this->optionalProperties)) {\n $result = array_merge($result, $this->optionalProperties);\n }\n\n\n return $result;\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'format' => fn(ParseNode $n) => $o->setFormat($n->getObjectValue([WorkbookChartSeriesFormat::class, 'createFromDiscriminatorValue'])),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n 'points' => fn(ParseNode $n) => $o->setPoints($n->getCollectionOfObjectValues([WorkbookChartPoint::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "public function toArray()\n {\n return [\n 'PDF_10x15_300dpi' => '10x15 300dpi',\n 'PDF_A4_300dpi' => 'A4 300dpi',\n ];\n }", "protected function toArray()\n {\n $properties = array();\n\n foreach ( $this as $property => $value ) {\n $properties[$property] = $value;\n }\n\n return $properties;\n }", "public function format(): array\n {\n $result[self::FROM_EMAIL_KEY] = $this->fromEmail;\n\n return array_merge($result, $this->optionalProperties);\n }", "protected function property_map() { return array(); }", "public function getExportFormats(): array;", "public function toArray(): array\n {\n return [\n 'background' => __('Background'),\n 'center' => __('Center'),\n ];\n }", "public function formatToArray(){\n return [\n 'nombre' => $this->name,\n 'ciudad' => $this->cityId,\n 'email' => $this->email,\n 'telefono' => $this->tel,\n 'tipo_documento' => $this->typeDoc,\n 'documento' => $this->doc,\n 'direccion' => $this->addr,\n 'direccion_referencia' => $this->addRef,\n 'coordenadas' => $this->addrCoo,\n 'ruc' => $this->ruc,\n 'razon_social' => $this->socialReason,\n ];\n }", "public function dataProviderFormat()\n {\n return [\n [RefData::EBSR_STATUS_PROCESSING, 'orange', 'processing'],\n [RefData::EBSR_STATUS_VALIDATING, 'orange', 'processing'],\n [RefData::EBSR_STATUS_SUBMITTED, 'orange', 'processing'],\n [RefData::EBSR_STATUS_PROCESSED, 'green', 'successful'],\n [RefData::EBSR_STATUS_FAILED, 'red', 'failed'],\n ];\n }", "public function getValueFormatersNames(): array;", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'format' => fn(ParseNode $n) => $o->setFormat($n->getObjectValue([WorkbookChartAxisFormat::class, 'createFromDiscriminatorValue'])),\n 'majorGridlines' => fn(ParseNode $n) => $o->setMajorGridlines($n->getObjectValue([WorkbookChartGridlines::class, 'createFromDiscriminatorValue'])),\n 'majorUnit' => fn(ParseNode $n) => $o->setMajorUnit($n->getObjectValue([Json::class, 'createFromDiscriminatorValue'])),\n 'maximum' => fn(ParseNode $n) => $o->setMaximum($n->getObjectValue([Json::class, 'createFromDiscriminatorValue'])),\n 'minimum' => fn(ParseNode $n) => $o->setMinimum($n->getObjectValue([Json::class, 'createFromDiscriminatorValue'])),\n 'minorGridlines' => fn(ParseNode $n) => $o->setMinorGridlines($n->getObjectValue([WorkbookChartGridlines::class, 'createFromDiscriminatorValue'])),\n 'minorUnit' => fn(ParseNode $n) => $o->setMinorUnit($n->getObjectValue([Json::class, 'createFromDiscriminatorValue'])),\n 'title' => fn(ParseNode $n) => $o->setTitle($n->getObjectValue([WorkbookChartAxisTitle::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "public function &GetFormats()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_formats;\n }", "public static function axerveFormats()\n {\n return self::$axerveFormats;\n }", "public static function getDateFormats() {\n $settings = self::getSettings();\n \n $dateformats = array();\n $dateformats[$settings->language] = json_decode($settings->dateformat, true);\n \n $translations = self::getTranslations();\n foreach($translations as $language => $df) {\n $dateformats[$language] = $df;\n }\n return $dateformats;\n }", "public function toArray()\n {\n return [\n LSR::STORE_HOURS_TIME_FORMAT_24HRS => __('24 Hours'),\n LSR::STORE_HOURS_TIME_FORMAT_12HRS => __('12 Hours')\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'templateId' => fn(ParseNode $n) => $o->setTemplateId($n->getStringValue()),\n 'values' => fn(ParseNode $n) => $o->setValues($n->getCollectionOfObjectValues([SettingValue::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'platformType' => fn(ParseNode $n) => $o->setPlatformType($n->getEnumValue(PolicyPlatformType::class)),\n 'settingCount' => fn(ParseNode $n) => $o->setSettingCount($n->getIntegerValue()),\n 'settingStates' => fn(ParseNode $n) => $o->setSettingStates($n->getCollectionOfObjectValues([ManagedDeviceMobileAppConfigurationSettingState::class, 'createFromDiscriminatorValue'])),\n 'state' => fn(ParseNode $n) => $o->setState($n->getEnumValue(ComplianceStatus::class)),\n 'userId' => fn(ParseNode $n) => $o->setUserId($n->getStringValue()),\n 'userPrincipalName' => fn(ParseNode $n) => $o->setUserPrincipalName($n->getStringValue()),\n 'version' => fn(ParseNode $n) => $o->setVersion($n->getIntegerValue()),\n ]);\n }", "public function toArray()\n {\n return (array)$this->properties;\n }", "public function jsonSerialize(): array\n {\n return array_merge([\n 'value' => $this->resolveTransformedValue($this->value),\n 'previous' => $this->resolveTransformedValue($this->previous),\n 'percent_changed' => $percentChanged = $this->percentChanged(),\n 'positive_change' => $percentChanged >= 0,\n // 'previousLabel' => $this->previousLabel,\n 'prefix' => $this->prefix,\n 'suffix' => $this->suffix,\n // 'suffixInflection' => $this->suffixInflection,\n // 'format' => $this->format,\n 'zero_result' => $this->zeroResult,\n ], parent::jsonSerialize());\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'filter' => fn(ParseNode $n) => $o->setFilter($n->getObjectValue([WorkbookFilter::class, 'createFromDiscriminatorValue'])),\n 'index' => fn(ParseNode $n) => $o->setIndex($n->getIntegerValue()),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n 'values' => fn(ParseNode $n) => $o->setValues($n->getObjectValue([Json::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'bold' => fn(ParseNode $n) => $o->setBold($n->getBooleanValue()),\n 'color' => fn(ParseNode $n) => $o->setColor($n->getStringValue()),\n 'italic' => fn(ParseNode $n) => $o->setItalic($n->getBooleanValue()),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n 'size' => fn(ParseNode $n) => $o->setSize($n->getFloatValue()),\n 'underline' => fn(ParseNode $n) => $o->setUnderline($n->getStringValue()),\n ]);\n }", "public function jsonSerialize()\n {\n return array_merge([\n 'component' => $this->component(),\n 'prefixComponent' => true,\n 'INDEX' => self::INDEX,\n 'ATTRIBUTE_PREFIX' => self::ATTRIBUTE_PREFIX,\n 'UNCHANGED' => self::UNCHANGED,\n 'CREATED' => self::CREATED,\n 'REMOVED' => self::REMOVED,\n 'UPDATED' => self::UPDATED,\n 'STATUS' => self::STATUS,\n 'PREFIX' => self::PREFIX,\n 'name' => $this->name,\n 'singularName' => str_singular($this->name),\n ], $this->meta());\n }", "public function toArray(): array\n {\n $serialized = collect($this->properties);\n\n //partial serialization only for initialized properties\n if ($this->isPartial) {\n $serialized = $serialized->intersectByKeys(array_flip($this->initializedProperties));\n }\n\n $serialized = $serialized->mapWithKeys(function ($value, $property) {\n if ($value instanceof Arrayable) {\n $value = $value->toArray();\n }\n\n if ($this->snakeOnSerialize) {\n $property = Str::snake($property);\n }\n\n return [$property => $value];\n });\n\n $this->resetSerializationConditions();\n\n return $serialized->toArray();\n }", "public function format()\n {\n return json_decode($this->renderer->format(), false, JSON_FORCE_OBJECT);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'action' => fn(ParseNode $n) => $o->setAction($n->getEnumValue(OnenotePatchActionType::class)),\n 'content' => fn(ParseNode $n) => $o->setContent($n->getStringValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'position' => fn(ParseNode $n) => $o->setPosition($n->getEnumValue(OnenotePatchInsertPosition::class)),\n 'target' => fn(ParseNode $n) => $o->setTarget($n->getStringValue()),\n ];\n }", "public static function listFormats(){\n $list = array();\n foreach(self::$_resultFormats as $key => $item){\n $list[$key] = $item['description'];\n }\n return $list;\n }", "public static function serialFormats()\n {\n return self::$serialFormats;\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'settingDefinitionId' => fn(ParseNode $n) => $o->setSettingDefinitionId($n->getStringValue()),\n 'settingInstanceTemplateReference' => fn(ParseNode $n) => $o->setSettingInstanceTemplateReference($n->getObjectValue([DeviceManagementConfigurationSettingInstanceTemplateReference::class, 'createFromDiscriminatorValue'])),\n ];\n }", "public function toArray() \n\t{\n\t\t$properties = array_merge(parent::toArray(), $this->properties);\n\t\tforeach ($properties as $name => $rawValue) {\n\t\t\t$value = $this->get($name, $rawValue);\n\t\t\t\n\t\t\tif ($value instanceof \\Bliss\\Component || $value instanceof \\Bliss\\Collection) {\n\t\t\t\t$properties[$name] = $value->toArray();\n\t\t\t} else {\n\t\t\t\t$properties[$name] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $properties;\n\t}", "public function jsonSerialize()\n {\n $output = [];\n foreach ($this::getReflection()->getProperties() as $propertyName => $property) {\n\n $value = $this->{$propertyName};\n if ($value instanceof Entity\\Collection || $value instanceof Entity) {\n $output[$propertyName] = $value->jsonSerialize();\n } elseif ($value instanceof \\DateTime\n && $property->getType() === Entity\\Reflection\\Property::TYPE_DATE\n ) {\n $output[$propertyName] = (array) $value;\n $output[$propertyName][\"date\"] = $value->format(self::$dateFormat);\n } else {\n $output[$propertyName] = $value;\n }\n }\n\n return $output;\n }", "protected static function getCardFormats() : array\n {\n return Formats::getList();\n }", "public function toArray()\n {\n return ['Lax' => __('Lax'), 'Strict' => __('Strict'), 'None' => __('Strict')];\n }", "public function applicable_formats() {\n return array('my' => true);\n }", "public static function get_prop_array( array $mf, $properties, $args = null ) {\n\t\tif ( ! self::is_microformat( $mf ) ) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$data = array();\n\t\tforeach ( $properties as $p ) {\n\t\t\tif ( array_key_exists( $p, $mf['properties'] ) ) {\n\t\t\t\tforeach ( $mf['properties'][ $p ] as $v ) {\n\t\t\t\t\tif ( self::is_microformat( $v ) ) {\n\t\t\t\t\t\t$v = self::parse_item( $v, $mf, $args );\n\t\t\t\t\t}\n\t\t\t\t\t$data[ $p ] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'mailExchange' => fn(ParseNode $n) => $o->setMailExchange($n->getStringValue()),\n 'preference' => fn(ParseNode $n) => $o->setPreference($n->getIntegerValue()),\n ]);\n }", "public static function getDefaultFormatSettings(): array\n {\n return static::$defaultFormatSettings;\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n ]);\n }", "public function toArray()\n {\n return array(\n \"httpGet\" => $this->httpGet,\n \"httpPost\" => $this->httpPost,\n \"formats\" => $this->formats\n );\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'classification' => fn(ParseNode $n) => $o->setClassification($n->getEnumValue(PermissionClassificationType::class)),\n 'permissionId' => fn(ParseNode $n) => $o->setPermissionId($n->getStringValue()),\n 'permissionName' => fn(ParseNode $n) => $o->setPermissionName($n->getStringValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'classification' => fn(ParseNode $n) => $o->setClassification($n->getEnumValue(WindowsQualityUpdateClassification::class)),\n 'isExpeditable' => fn(ParseNode $n) => $o->setIsExpeditable($n->getBooleanValue()),\n 'kbArticleId' => fn(ParseNode $n) => $o->setKbArticleId($n->getStringValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'deliveryFrequency' => fn(ParseNode $n) => $o->setDeliveryFrequency($n->getEnumValue(NotificationDeliveryFrequency::class)),\n ]);\n }", "public function getDisplayFormatTypeAllowableValues()\n {\n return [\n self::DISPLAY_FORMAT_TYPE__DEFAULT,\n self::DISPLAY_FORMAT_TYPE_DATE,\n self::DISPLAY_FORMAT_TYPE_NUMBER,\n ];\n }", "public static function getProperties()\n {\n return [\n 'id' => [true, self::PROPERTY_TYPE_STRING, null, false, false],\n 'endDate' => [false, self::PROPERTY_TYPE_DATE, null, false, false],\n 'startDate' => [true, self::PROPERTY_TYPE_DATE, null, false, false],\n 'status' => [true, self::PROPERTY_TYPE_ENUM, null, false, false],\n 'price' => [true, self::PROPERTY_TYPE_OBJECT, '\\\\Price', false, false],\n 'product' => [true, self::PROPERTY_TYPE_OBJECT, '\\\\Product', false, false],\n ];\n }", "public function toArray()\n {\n return [\n Import::BEHAVIOR_ADD_UPDATE => __('Add/Update'),\n Import::BEHAVIOR_REPLACE => __('Replace'),\n Import::BEHAVIOR_DELETE => __('Delete')\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'deviceCount' => fn(ParseNode $n) => $o->setDeviceCount($n->getIntegerValue()),\n 'medianImpactInMs' => fn(ParseNode $n) => $o->setMedianImpactInMs($n->getIntegerValue()),\n 'processName' => fn(ParseNode $n) => $o->setProcessName($n->getStringValue()),\n 'productName' => fn(ParseNode $n) => $o->setProductName($n->getStringValue()),\n 'publisher' => fn(ParseNode $n) => $o->setPublisher($n->getStringValue()),\n 'totalImpactInMs' => fn(ParseNode $n) => $o->setTotalImpactInMs($n->getIntegerValue()),\n ]);\n }", "public function sectionSerialize()\n {\n $templatePrefix = $this->getTranslationTemplate();\n\n $properties = array_combine(\n array_map(function ($k) use ($templatePrefix) {\n return $templatePrefix . $k;\n },\n array_keys(get_object_vars($this))),\n get_object_vars($this)\n );\n return $properties;\n }", "public static function getProperties()\n {\n return [\n 'Description' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'Note' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'Code' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'Billable' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'Quantity' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'UnitCost' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'UnitPrice' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'Amount' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'AmountTax' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'AmountIncludingTax' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n ];\n }", "public function toArray()\n {\n return array(\n \"field_name\" => $this->fieldName,\n \"direction\" => $this->direction,\n );\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'endDate' => fn(ParseNode $n) => $o->setEndDate($n->getDateValue()),\n 'expirationDate' => fn(ParseNode $n) => $o->setExpirationDate($n->getDateValue()),\n 'offer' => fn(ParseNode $n) => $o->setOffer($n->getStringValue()),\n 'offerDisplayName' => fn(ParseNode $n) => $o->setOfferDisplayName($n->getStringValue()),\n 'publisher' => fn(ParseNode $n) => $o->setPublisher($n->getStringValue()),\n 'recommendedSku' => fn(ParseNode $n) => $o->setRecommendedSku($n->getStringValue()),\n 'sizeInGB' => fn(ParseNode $n) => $o->setSizeInGB($n->getIntegerValue()),\n 'sku' => fn(ParseNode $n) => $o->setSku($n->getStringValue()),\n 'skuDisplayName' => fn(ParseNode $n) => $o->setSkuDisplayName($n->getStringValue()),\n 'startDate' => fn(ParseNode $n) => $o->setStartDate($n->getDateValue()),\n 'status' => fn(ParseNode $n) => $o->setStatus($n->getEnumValue(CloudPcGalleryImageStatus::class)),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'archiveFolder' => fn(ParseNode $n) => $o->setArchiveFolder($n->getStringValue()),\n 'automaticRepliesSetting' => fn(ParseNode $n) => $o->setAutomaticRepliesSetting($n->getObjectValue([AutomaticRepliesSetting::class, 'createFromDiscriminatorValue'])),\n 'dateFormat' => fn(ParseNode $n) => $o->setDateFormat($n->getStringValue()),\n 'delegateMeetingMessageDeliveryOptions' => fn(ParseNode $n) => $o->setDelegateMeetingMessageDeliveryOptions($n->getEnumValue(DelegateMeetingMessageDeliveryOptions::class)),\n 'language' => fn(ParseNode $n) => $o->setLanguage($n->getObjectValue([LocaleInfo::class, 'createFromDiscriminatorValue'])),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'timeFormat' => fn(ParseNode $n) => $o->setTimeFormat($n->getStringValue()),\n 'timeZone' => fn(ParseNode $n) => $o->setTimeZone($n->getStringValue()),\n 'userPurpose' => fn(ParseNode $n) => $o->setUserPurpose($n->getEnumValue(UserPurpose::class)),\n 'userPurposeV2' => fn(ParseNode $n) => $o->setUserPurposeV2($n->getEnumValue(MailboxRecipientType::class)),\n 'workingHours' => fn(ParseNode $n) => $o->setWorkingHours($n->getObjectValue([WorkingHours::class, 'createFromDiscriminatorValue'])),\n ];\n }", "public static function getProperties()\n {\n return [\n 'NumberOfUnits' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'PayPeriodEndDate' => [false, self::PROPERTY_TYPE_DATE, '\\\\DateTimeInterface', false, false],\n 'PayPeriodStartDate' => [false, self::PROPERTY_TYPE_DATE, '\\\\DateTimeInterface', false, false],\n 'LeavePeriodStatus' => [false, self::PROPERTY_TYPE_ENUM, null, false, false],\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'regionGroup' => fn(ParseNode $n) => $o->setRegionGroup($n->getEnumValue(CloudPcRegionGroup::class)),\n 'regionStatus' => fn(ParseNode $n) => $o->setRegionStatus($n->getEnumValue(CloudPcSupportedRegionStatus::class)),\n 'supportedSolution' => fn(ParseNode $n) => $o->setSupportedSolution($n->getEnumValue(CloudPcManagementService::class)),\n ]);\n }", "public function toArray()\n {\n return [\n 'xsmall' => __('Extra small'),\n 'small' => __('Small'),\n 'medium' => __('Medium'),\n 'large' => __('Large'),\n 'xlarge' => __('Extra large'),\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'assignees' => fn(ParseNode $n) => $o->setAssignees($n->getCollectionOfObjectValues([WorkbookEmailIdentity::class, 'createFromDiscriminatorValue'])),\n 'changes' => fn(ParseNode $n) => $o->setChanges($n->getCollectionOfObjectValues([WorkbookDocumentTaskChange::class, 'createFromDiscriminatorValue'])),\n 'comment' => fn(ParseNode $n) => $o->setComment($n->getObjectValue([WorkbookComment::class, 'createFromDiscriminatorValue'])),\n 'completedBy' => fn(ParseNode $n) => $o->setCompletedBy($n->getObjectValue([WorkbookEmailIdentity::class, 'createFromDiscriminatorValue'])),\n 'completedDateTime' => fn(ParseNode $n) => $o->setCompletedDateTime($n->getDateTimeValue()),\n 'createdBy' => fn(ParseNode $n) => $o->setCreatedBy($n->getObjectValue([WorkbookEmailIdentity::class, 'createFromDiscriminatorValue'])),\n 'createdDateTime' => fn(ParseNode $n) => $o->setCreatedDateTime($n->getDateTimeValue()),\n 'percentComplete' => fn(ParseNode $n) => $o->setPercentComplete($n->getIntegerValue()),\n 'priority' => fn(ParseNode $n) => $o->setPriority($n->getIntegerValue()),\n 'startAndDueDateTime' => fn(ParseNode $n) => $o->setStartAndDueDateTime($n->getObjectValue([WorkbookDocumentTaskSchedule::class, 'createFromDiscriminatorValue'])),\n 'title' => fn(ParseNode $n) => $o->setTitle($n->getStringValue()),\n ]);\n }", "public function toArray()\n {\n return [\n 'field-changes' => $this->fieldChanges,\n 'index-changes' => $this->indexChanges,\n 'add-timestamp' => $this->addTimestamps,\n 'add-soft-delete' => $this->addSoftDelete,\n 'drop-timestamp' => $this->dropTimestamps,\n 'drop-soft-delete' => $this->dropSoftDelete,\n ];\n }", "protected function get_props_data() {\n\t\treturn array(\n\t\t\t'mimeTypes' => array( $this->mime_type ),\n\t\t);\n\t}", "public function getProperties(): array\n {\n return $this->properties;\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'attributeMappings' => fn(ParseNode $n) => $o->setAttributeMappings($n->getCollectionOfObjectValues([AttributeMapping::class, 'createFromDiscriminatorValue'])),\n 'enabled' => fn(ParseNode $n) => $o->setEnabled($n->getBooleanValue()),\n 'flowTypes' => fn(ParseNode $n) => $o->setFlowTypes($n->getEnumValue(ObjectFlowTypes::class)),\n 'metadata' => fn(ParseNode $n) => $o->setMetadata($n->getCollectionOfObjectValues([ObjectMappingMetadataEntry::class, 'createFromDiscriminatorValue'])),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'scope' => fn(ParseNode $n) => $o->setScope($n->getObjectValue([Filter::class, 'createFromDiscriminatorValue'])),\n 'sourceObjectName' => fn(ParseNode $n) => $o->setSourceObjectName($n->getStringValue()),\n 'targetObjectName' => fn(ParseNode $n) => $o->setTargetObjectName($n->getStringValue()),\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'attributeDestination' => fn(ParseNode $n) => $o->setAttributeDestination($n->getObjectValue([AccessPackageResourceAttributeDestination::class, 'createFromDiscriminatorValue'])),\n 'attributeName' => fn(ParseNode $n) => $o->setAttributeName($n->getStringValue()),\n 'attributeSource' => fn(ParseNode $n) => $o->setAttributeSource($n->getObjectValue([AccessPackageResourceAttributeSource::class, 'createFromDiscriminatorValue'])),\n 'id' => fn(ParseNode $n) => $o->setId($n->getStringValue()),\n 'isEditable' => fn(ParseNode $n) => $o->setIsEditable($n->getBooleanValue()),\n 'isPersistedOnAssignmentRemoval' => fn(ParseNode $n) => $o->setIsPersistedOnAssignmentRemoval($n->getBooleanValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n ];\n }", "public function applicable_formats() {\n return array('all'=>true);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'number' => fn(ParseNode $n) => $o->setNumber($n->getStringValue()),\n 'type' => fn(ParseNode $n) => $o->setType($n->getEnumValue(PhoneType::class)),\n ]);\n }", "public function getFormatters(): ArrayObject\n {\n $arr = new ArrayObject();\n foreach ($this->columns as $key => $column) {\n if (($formatter = $column->getFormatter()) !== null) {\n $arr->offsetSet($key, $formatter);\n }\n }\n\n return $arr;\n }", "public static function _getPropertyNames(): array\n {\n return [\n 'url',\n ];\n }", "public function toArray(): array\n {\n $array = [];\n $str = new Str();\n\n foreach (\\get_object_vars($this) as $property => $value) {\n $array[$str->snake($property)] = $value;\n }\n\n return $array;\n }", "public function supportedFormats();", "public function toArray()\n {\n return [\n 'location' => $this->location(),\n 'from' => $this->from(),\n 'to' => $this->to(),\n 'pencil' => $this->pencil\n ];\n }", "public function formatStringsAndParsedFormats(): array\n {\n return [\n ['de', ['dd', ['.'], 'MM', ['.'], 'y']],\n ['en', ['MMM', [' '], 'd', [','], [' '], 'y']],\n ];\n }", "function custom_field_formats_for_select() {\n $model = ClassRegistry::init('CustomField');\n $formats = $model->FIELD_FORMATS;\n uasort($formats, array($this, '__sort_custom_field_formats_for_select'));\n $select = array();\n foreach ($formats as $k=>$format) {\n $select[$k] = __($format['name']);\n }\n return $select;\n }", "public function toArray(): array\n {\n return $this->_mapping;\n }", "public function toArray(): array\n {\n return [\n 'type' => 'javascript',\n 'name' => $this->outputName,\n 'fieldNames' => $this->fieldNames,\n 'fnAggregate' => $this->fnAggregate,\n 'fnCombine' => $this->fnCombine,\n 'fnReset' => $this->fnReset,\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'endDateTime' => fn(ParseNode $n) => $o->setEndDateTime($n->getDateTimeValue()),\n 'startDateTime' => fn(ParseNode $n) => $o->setStartDateTime($n->getDateTimeValue()),\n ]);\n }", "private function getAvailableFormats()\n {\n return array(\n 'tab',\n 'xml',\n 'json',\n 'perl',\n 'php',\n 'vaml',\n 'html',\n );\n }", "public function toArray()\n {\n return [\n 'alias' => $this->getAlias(),\n 'type' => $this->getType(),\n 'label' => $this->getLabel(),\n ];\n }", "public function toArray()\n {\n $options = array();\n \n $fields = array_keys(get_object_vars($this));\n foreach ($fields as $field) {\n if (isset($this->{$field})) {\n if ($this->{$field} instanceof Setting\\Alpha) {\n $options[$field] = $this->{$field}->getValue();\n } elseif ($this->{$field} instanceof Setting\\Text) {\n $color = $this->{$field}->getColor();\n if ($color) {\n $options['color'] = $color->toString();\n }\n } else {\n $options[$field] = $this->{$field};\n }\n }\n }\n \n return $options;\n }", "public function toArray()\r\n\t{\r\n\t\t$attributes = parent::toArray();\r\n\r\n\t\tif (! $this->autoTranslations) return $attributes;\r\n\r\n\t\tforeach ($this->translatableAttributes as $field) {\r\n\t\t\t$attributes[$field] = $this->getTranslation($field);\r\n\t\t}\r\n\r\n\t\treturn $attributes;\r\n\t}", "public function toArray()\n {\n return [\n 'type' => $this->getType(),\n 'title' => $this->getTitle(),\n 'class' => $this->getClass(),\n 'icon' => $this->getIcon(),\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'comparisonValue' => fn(ParseNode $n) => $o->setComparisonValue($n->getStringValue()),\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'enforceSignatureCheck' => fn(ParseNode $n) => $o->setEnforceSignatureCheck($n->getBooleanValue()),\n 'operationType' => fn(ParseNode $n) => $o->setOperationType($n->getEnumValue(Win32LobAppPowerShellScriptRuleOperationType::class)),\n 'operator' => fn(ParseNode $n) => $o->setOperator($n->getEnumValue(Win32LobAppRuleOperator::class)),\n 'runAs32Bit' => fn(ParseNode $n) => $o->setRunAs32Bit($n->getBooleanValue()),\n 'runAsAccount' => fn(ParseNode $n) => $o->setRunAsAccount($n->getEnumValue(RunAsAccountType::class)),\n 'scriptContent' => fn(ParseNode $n) => $o->setScriptContent($n->getStringValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'recipientActionDateTime' => fn(ParseNode $n) => $o->setRecipientActionDateTime($n->getDateTimeValue()),\n 'recipientActionMessage' => fn(ParseNode $n) => $o->setRecipientActionMessage($n->getStringValue()),\n 'recipientUserId' => fn(ParseNode $n) => $o->setRecipientUserId($n->getStringValue()),\n 'senderShiftId' => fn(ParseNode $n) => $o->setSenderShiftId($n->getStringValue()),\n ]);\n }", "public function toArray()\n {\n return array(\n 'prefix' => $this->prefix,\n 'title' => $this->title,\n 'isdefault' => $this->isdefault,\n );\n }", "public static function getProperties()\n {\n return [\n 'Type' => [false, self::PROPERTY_TYPE_ENUM, null, false, false],\n 'Name' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'ABN' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'BSB' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'AccountNumber' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'AccountName' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'ElectronicServiceAddress' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'SuperFundID' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'EmployerNumber' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'SPIN' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n ];\n }", "public function toArray() {\n\t\treturn array(\n\t\t\tself::FIELD_ID=>$this->getId(),\n\t\t\tself::FIELD_GENRE=>$this->getGenre(),\n\t\t\tself::FIELD_JAAR=>$this->getJaar(),\n\t\t\tself::FIELD_MAAND=>$this->getMaand(),\n\t\t\tself::FIELD_NUMMER=>$this->getNummer(),\n\t\t\tself::FIELD_MUTUALITEIT=>$this->getMutualiteit(),\n\t\t\tself::FIELD_FACTUURDATUM=>$this->getFactuurdatum(),\n\t\t\tself::FIELD_FACTUURFILE=>$this->getFactuurFile(),\n\t\t\tself::FIELD_CREDITACTIEF=>$this->getCreditActief(),\n\t\t\tself::FIELD_VERVANGT=>$this->getVervangt());\n\t}", "public static function getProperties() : array {\r\n return self::$properties;\r\n }", "public static function _getPropertyNames(): array\n {\n return [\n 'name',\n ];\n }", "public static function _getPropertyNames(): array\n {\n return [\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'completionDateTime' => fn(ParseNode $n) => $o->setCompletionDateTime($n->getDateTimeValue()),\n 'creationDateTime' => fn(ParseNode $n) => $o->setCreationDateTime($n->getDateTimeValue()),\n 'error' => fn(ParseNode $n) => $o->setError($n->getObjectValue([ClassificationError::class, 'createFromDiscriminatorValue'])),\n 'lastUpdatedDateTime' => fn(ParseNode $n) => $o->setLastUpdatedDateTime($n->getDateTimeValue()),\n 'startDateTime' => fn(ParseNode $n) => $o->setStartDateTime($n->getDateTimeValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'assignmentFilterType' => fn(ParseNode $n) => $o->setAssignmentFilterType($n->getEnumValue(DeviceAndAppManagementAssignmentFilterType::class)),\n 'groupId' => fn(ParseNode $n) => $o->setGroupId($n->getStringValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'payloadId' => fn(ParseNode $n) => $o->setPayloadId($n->getStringValue()),\n 'payloadType' => fn(ParseNode $n) => $o->setPayloadType($n->getEnumValue(AssociatedAssignmentPayloadType::class)),\n ];\n }", "public function toArray()\n {\n return [\n 'type' => 'object',\n 'properties' => [\n 'email' => ['type' => 'string'],\n 'key' => ['type' => 'string'],\n 'name' => ['type' => 'string'],\n 'picture' => ['type' => 'string'],\n 'phone' => ['type' => 'string'],\n 'balance' => ['type' => 'integer', 'format' => 'int32'],\n 'codes' => ['type' => 'array', 'items' => ['type' => 'string']],\n 'order_comment_tracking_code' => ['type' => 'string'],\n 'title' => ['type' => 'string'],\n ],\n 'required' => ['email', 'key', 'name', 'phone', 'balance', 'codes', 'order_comment_tracking_code', 'title'],\n ];\n }" ]
[ "0.6369262", "0.6346422", "0.6287138", "0.6234832", "0.6135214", "0.60852677", "0.6045072", "0.60301864", "0.6028642", "0.60068315", "0.59978646", "0.5966637", "0.591387", "0.5900184", "0.5889949", "0.5855736", "0.5817106", "0.5792559", "0.57647765", "0.5756683", "0.57351196", "0.5725742", "0.57210386", "0.57182854", "0.5668076", "0.5650463", "0.56429553", "0.5639125", "0.5633307", "0.5611908", "0.56065154", "0.5605033", "0.5572229", "0.55593294", "0.5550409", "0.5537881", "0.55346376", "0.55174637", "0.55154073", "0.5514284", "0.5506191", "0.550154", "0.5487237", "0.5486153", "0.54829246", "0.5472373", "0.5469286", "0.54629916", "0.54563934", "0.54404205", "0.54404205", "0.54386795", "0.54319984", "0.54305077", "0.5424171", "0.54209304", "0.5420838", "0.5417373", "0.5407039", "0.5403105", "0.54003674", "0.5397603", "0.5396491", "0.53869236", "0.5382769", "0.5382765", "0.53797096", "0.5377974", "0.5365382", "0.53612393", "0.5358071", "0.534645", "0.53374994", "0.5335286", "0.5333585", "0.53305113", "0.53292865", "0.5325746", "0.5324717", "0.53232455", "0.53130776", "0.5311108", "0.5300064", "0.5292887", "0.5289644", "0.52894354", "0.52872366", "0.5286138", "0.52834606", "0.52834487", "0.5283183", "0.5281861", "0.52814287", "0.52803445", "0.52768457", "0.52721906", "0.52709985", "0.5270091", "0.5268801", "0.5264819", "0.52613205" ]
0.0
-1
Array of attributes where the key is the local name, and the value is the original name.
public static function attributeMap() : array { return self::$attributeMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function changedAttributesName(): array\n {\n $changedAttributes = [];\n $attributes = $this->toArray();\n foreach ($attributes as $key => $value) {\n if (isset($this->originals[$key]) && $value !== $this->originals[$key] && ! ((is_array($this->originals[$key]) || is_object($this->originals[$key])))) {\n $changedAttributes[] = $key;\n }\n }\n return $changedAttributes;\n }", "public function attributesToArray()\n {\n return Helper::toCamelCase($this->attributes());\n }", "private function getApiAttributeNamesArray()\n {\n $array = [\n 'firstname',\n 'lastname',\n 'email',\n 'id',\n 'website_id',\n 'group_id',\n 'prefix',\n 'middlename',\n 'suffix',\n 'dob',\n 'taxvat',\n 'gender',\n 'is_active',\n 'company',\n 'city',\n 'country_id',\n 'region',\n 'postcode',\n 'telephone',\n 'fax',\n 'vat_id',\n 'street_1',\n 'street_2',\n 'subaccounts',\n 'manage_subaccounts',\n 'account_data_modification_permission',\n 'account_order_history_view_permission',\n 'checkout_order_create_permission',\n 'checkout_order_approval_permission',\n 'checkout_cart_view_permission',\n 'checkout_view_permission',\n 'checkout_order_placed_notification_permission',\n 'force_usage_parent_company_name_permission',\n 'force_usage_parent_vat_permission',\n 'force_usage_parent_addresses_permission',\n 'password',\n 'parent_email',\n 'promote',\n 'can_manage_subaccounts',\n ];\n\n return $array;\n }", "public function attributeNames() {\n\t\treturn array(\n\t\t\t'name',\n\t\t\t'path',\n\t\t);\n\t}", "public function attributes(): array\n {\n return [\n $this->attributePrefix.'target' => $this->target(),\n $this->attributePrefix.'filterByType' => $this->filterByType,\n ];\n }", "public function getAttributes()\n {\n $return = [];\n foreach ($this->attr as $attr => $info) {\n $return[$attr] = $this->getAttribute($attr);\n }\n\n return $return;\n }", "public function attributes()\n {\n return collect(array_keys($this->rules()))\n ->mapWithKeys(function ($key) {\n return [$key => str_replace(['.', '_'], ' ', $key)];\n })\n ->toArray();\n }", "public function getAttributes($name);", "public function attributes() // atribūtu savi nosaukumi\n {\n return[ \n 'fname' => 'Vārds',\n 'lname' => 'Uzvārds',\n 'email' => 'E-pasts',\n 'oldpassword' => 'Paroles lauks',\n 'password' => 'Jaunas paroles lauks',\n 'buttontitle' => 'Pogas virsraksts',\n 'buttonlink' => 'Pogas links',\n 'reciever' => 'Saņēmēju lauks',\n 'emailtitle' => 'Ziņas virsrsksts',\n 'emailtext' => 'Ziņas teksts',\n 'transport' => 'Pasākumu lauks'\n ];\n }", "abstract public function attributeNames();", "public function attribute_names() {\n\t\n\t\treturn array_keys( $this->attributes );\n\t\t\n\t}", "public function separateTranslationsFromAttributes(): array\n\t{\n\t\t$attributes = collect($this->attributes);\n\n\t\t// Extract the translated values\n\t\t$translatables = $attributes->only($this->translatable);\n\t\t$this->translatedAttributes = $translatables->toArray();\n\n\t\t// Keep only the non-translatable attributes\n\t\t$this->attributes = $attributes->forget($this->translatable)->toArray();\n\n\t\treturn $this->translatedAttributes;\n\t}", "public static function dataAttributes(array $attributes): array {\n\t\treturn ArrayTools::flatten(ArrayTools::filterKeyPrefixes(ArrayTools::keysReplace(array_change_key_case($attributes), '_', '-'), 'data-', true));\n\t}", "public function getAttributes()\n {\n return array();\n }", "public function getAttributes()\n {\n return array();\n }", "public function getAttributes()\n {\n return array();\n }", "public function getAttributes()\n {\n return array();\n }", "public function getChanges(): array\n {\n $changes = [];\n\n foreach ($this->changedAttributesName() as $key) {\n $changes[$key] = $this->originals[$key];\n }\n\n return $changes;\n }", "public function getUnchangedAttributes()\n {\n $output = array();\n\n foreach ($this->attributes as $name => $value) {\n if (!$this->hasChanged($name)) {\n $output[$name] = $value;\n }\n }\n\n return $output;\n }", "public function getChangedAttributes()\n {\n $output = array();\n\n foreach ($this->attributes as $name => $value) {\n if ($this->hasChanged($name)) {\n $output[$name] = $value;\n }\n }\n\n return $output;\n }", "public function getValidNameAttributes(): array\n {\n return [\n 'Starts with _' => [\n 'attribute_name_0001.xsd', '_foo', \n ], \n 'Starts with letter' => [\n 'attribute_name_0002.xsd', 'f', \n ], \n 'Contains letter' => [\n 'attribute_name_0003.xsd', 'foo', \n ], \n 'Contains digit' => [\n 'attribute_name_0004.xsd', 'f00', \n ], \n 'Contains .' => [\n 'attribute_name_0005.xsd', 'f.bar', \n ], \n 'Contains -' => [\n 'attribute_name_0006.xsd', 'f-bar', \n ], \n 'Contains _' => [\n 'attribute_name_0007.xsd', 'f_bar', \n ], \n 'Surrounded by whitespaces' => [\n 'attribute_name_0008.xsd', 'foo_bar', \n ], \n ];\n }", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getAttributes(): array;", "private function attrNames()\n {\n $dimAttr = [\n 'length' => 'length',\n 'width' => 'width',\n 'height' => 'height',\n ];\n $dsAttr = [\n 'dropship' => 'dropship',\n 'dropship_location' => 'dropship_location'\n ];\n\n $this->attrNames = ($this->mageVersion >= '2.2.5') ? $dsAttr : array_merge($dsAttr, $dimAttr);\n }", "public function getAttributeNames ()\n {\n\n return array_keys($this->attributes);\n\n }", "public function attributeNames() {\n\t\t$attributeNames = array(\n\t\t\t'name',\n\t\t\t'width',\n\t\t\t'height',\n\t\t);\n\t\t$attributeNames = array_merge($attributeNames, $this->existAttributeNames());\n\t\treturn $attributeNames;\n\t}", "public function getAttributes() {\n $attr = array();\n \n $attr[\"id\"] = $this->id_;\n $attr[\"taxonId\"] = $this->taxonId_;\n $attr[\"dbh\"] = $this->dbh_;\n $attr[\"lat\"] = $this->lat_;\n $attr[\"lng\"] = $this->lng_;\n $attr[\"layers\"] = $this->layers_;\n \n return $attr;\n }", "public function attributeNames() {\n\t\t$attributeNames = array(\n\t\t\t'name',\n\t\t\t'category_name',\n\t\t\t'default_content',\n\t\t);\n\t\t$attributeNames = array_merge($attributeNames, $this->contentAttributeNames());\n\t\treturn $attributeNames;\n\t}", "public function getAttributes()\n {\n return array_merge(\n $this->attributes,\n [\n 'args' => $this->args(),\n 'type' => $this->type(),\n 'resolve' => $this->getResolver(),\n ]\n );\n }", "public function getOldAttributes()\n {\n return $this->_oldAttributes === null ? [] : $this->_oldAttributes;\n }", "public function toArray() {\n $attrs = $this->_private_attributes;\n $result = array();\n foreach ($attrs as $key => $attr) {\n if (method_exists($this, \"get\" . underscore_to_camel_case($key, true))) {\n eval('$result[\"' . $key . '\"] = $this->get' . underscore_to_camel_case($key, true) . '();');\n } else {\n $result[$key] = $attr;\n }\n }\n return $result;\n }", "public function toArray(): array\n {\n return [\n $this->attribute->getName(),\n $this->name,\n ];\n }", "public function attributes()\n {\n return [\n 'name' => __('main.name'),\n ];\n }", "protected function getAttributes()\n {\n return [];\n }", "public static function attributeMap()\n {\n return [\n 'status' => 'status',\n 'quota' => 'quota'\n ];\n }", "public function attributes()\n {\n return [\n 'external_id' => 'Third Party Identifier',\n 'name_first' => 'First Name',\n 'name_last' => 'Last Name',\n 'root_admin' => 'Root Administrator Status',\n ];\n }", "public static function attributeMap()\n {\n return [\n 'status' => 'status',\n 'time' => 'time'\n ];\n }", "public function attributeNames()\n {\n return array_merge_recursive(parent::attributeNames(), array(\n 'markup',\n 'name',\n 'plaintext_markup',\n 'subject_markup',\n 'base',\n ));\n }", "public function attributeNames()\n\t{\n\t\t$class = get_class($this);\n\t\tif(!isset(self::$_names[$class]))\n\t\t{\n\t\t\tself::$_names[$class] = array_merge(array('id'), $this->getNames($this->arrayStructure()));\n\t\t}\n\t\t\n\t\treturn self::$_names[$class];\n\t}", "public function attributes()\n {\n return [\n ];\n }", "public function getAttributes() {\n return $this->attributes->getArray();\n }", "public function attributes()\n {\n return [];\n }", "public function attributes()\n {\n return [];\n }", "public function attributes()\n {\n return [];\n }", "public function attributes() : array;", "public function attributeNames()\n {\n $className = get_class($this);\n if (!isset(self::$_names[$className])) {\n $class = new ReflectionClass(get_class($this));\n $names = array();\n foreach ($class->getProperties() as $property) {\n $name = $property->getName();\n if ($property->isPublic() && !$property->isStatic())\n $names[] = $name;\n }\n return self::$_names[$className] = $names;\n } else\n return self::$_names[$className];\n }", "public function attributesToArray()\n {\n $attributes = $this->getArrayableAttributes();\n\n return $attributes;\n }", "public function attributes()\n {\n return [\n 'client_id' => trans('financials.client'),\n 'name' => trans('persona.name'),\n 'email' => trans('persona.email'),\n 'password' => trans('auth.password'),\n 'password_confirmation' => trans('auth.password:confirmation'),\n 'role' => trans('persona.title'),\n 'stored_file' => trans('persona.image'),\n ];\n }", "public function attributes(): array\n {\n return [\n //\n ];\n }", "public function attributes(): array\n {\n return [\n //\n ];\n }", "public function attributes(): array\n {\n return [\n 'name' => '角色名称',\n 'staff' => '关联员工',\n 'brand' => '关联品牌',\n 'department' => '关联部门',\n ];\n }", "public function getAttributeNames()\n {\n return array_keys($this->attributes);\n }", "public function toArray()\n {\n $attributes = parent::toArray();\n \n foreach ($this->getTranslatableAttributes() as $name) {\n $attributes[$name] = $this->getTranslation($name, app()->getLocale());\n }\n \n return $attributes;\n }", "public function getAttributes()\n\t{\n\t\treturn array(\n\t\t\t'usuario' => $this->usuario,\n\t\t\t'correo' => $this->correo,\n\t\t\t'cedula'=>$this->cedula,\n\t\t\t//'firstName' => $this->firstName,\n\t\t\t//'lastName' => $this->lastName,\n\t\t);\n\t}", "public function getAttributes() : array\n {\n\n return $this->attributes;\n }", "public function getAttributes()\n {\n return [\n Attributes\\IdAttribute::make(),\n Attributes\\CreatedAtAttribute::make(),\n Attributes\\UpdatedAtAttribute::make(),\n ];\n }", "public function getAttributesNames(){\n\t\t$this->_connect();\n\t\treturn ActiveRecordMetaData::getAttributes($this->_source, $this->_schema);\n\t}", "public function attributeNames() {\n\t\treturn $this->getAttributeNames();\n\t}", "public function getAttributeNames()\n {\n $names = array_keys($this->_attrs);\n sort($names);\n return $names;\n }", "public function attributes()\n {\n return [\n 'name' => 'nombre',\n 'last_name' => 'apellido',\n 'num_id' => 'cédula',\n 'email' => 'correo',\n 'birthdate' => 'fecha',\n 'sex' => 'sexo',\n 'place_birthdate' => 'lugar de nacimiento',\n 'blood_group' => 'grupo sanguineo',\n 'phone_person' => 'telefono personal',\n 'location_home' => 'lugar donde vive',\n 'phone_home' => 'telefono de casa',\n 'location_work' => 'lugar de trabajo ',\n 'phone_work' => 'telefono de trabajo',\n 'profession' => 'profesión',\n 'current_occupation' => 'ocupación',\n 'observation' => 'observación',\n ];\n }", "protected function attributes()\n {\n return [];\n }", "public function getAttributes()\n {\n return collect(parent::getAttributes())\n ->except(array_keys($this->fieldAttributes()))\n ->toArray();\n }", "public function toArray()\r\n\t{\r\n\t\t$attributes = parent::toArray();\r\n\r\n\t\tif (! $this->autoTranslations) return $attributes;\r\n\r\n\t\tforeach ($this->translatableAttributes as $field) {\r\n\t\t\t$attributes[$field] = $this->getTranslation($field);\r\n\t\t}\r\n\r\n\t\treturn $attributes;\r\n\t}", "public function getAttributes()\n {\n $array = [];\n\n if ($this->getValueSet() === null) {\n return $array;\n }\n\n foreach ($this->getValueSet()->getValues() as $value) {\n $array[$value->getAttribute()->getName()] = $value;\n }\n\n return $array;\n }", "public function attributes()\n {\n return array_merge(\n parent::attributes(),\n ['date', 'origin', 'originName', 'total']\n );\n }", "public function getAttributes(): array\n {\n return $this->attributes;\n }", "public function getAttributes(): array\n {\n return $this->_attributes;\n }", "function getAttrList() {\n return array_keys($this->attributes);\n }", "public function attributesToArray()\n {\n $attributes = parent::attributesToArray();\n\n foreach ($attributes as $key => $value) {\n $attributes[$key] = $value instanceof ValueObject ? $this->fromValueObjectToArray($key, $value) : $value;\n }\n\n return $attributes;\n }", "function getAttributes()\r\n\t{\r\n\t\t$result = array();\r\n\t\t$attributes = $this->object->getAttributes();\r\n\t\t\r\n\t\tforeach( $attributes as $key => $attribute )\r\n\t\t{\r\n\t\t\tif ( $key == 'OrderNum' ) continue;\r\n\t\t\tif ( $key == 'RecordCreated' ) continue;\r\n\t\t\tif ( $key == 'RecordModified' ) continue;\r\n\t\t\t\t\r\n\t\t\tarray_push( $result, $key );\r\n\t\t}\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "public function getDirtyAttributes($names = null)\n {\n if ($names === null) {\n $names = $this->attributes();\n }\n $names = array_flip($names);\n $attributes = [];\n if ($this->_oldAttributes === null) {\n foreach ($this->getAttributes() as $name => $value) {\n if (isset($names[$name])) {\n $attributes[$name] = $value;\n }\n }\n } else {\n foreach ($this->getAttributes() as $name => $value) {\n if (isset($names[$name]) && (!array_key_exists($name, $this->_oldAttributes) || $value !== $this->_oldAttributes[$name])) {\n $attributes[$name] = $value;\n }\n }\n }\n return $attributes;\n }", "public function attributesToArray()\n {\n $attributes = $this->attributes;\n\n $mutatedAttributes = $this->getMutatedAttributes();\n\n // We want to spin through all the mutated attributes for this model and call\n // the mutator for the attribute. We cache off every mutated attributes so\n // we don't have to constantly check on attributes that actually change.\n foreach ($mutatedAttributes as $key) {\n if (!array_key_exists($key, $attributes)) {\n continue;\n }\n\n $attributes[$key] = $this->mutateAttributeForArray(\n $key, $attributes[$key]\n );\n }\n\n // Here we will grab all of the appended, calculated attributes to this model\n // as these attributes are not really in the attributes array, but are run\n // when we need to array or JSON the model for convenience to the coder.\n foreach ($this->getArrayableAppends() as $key) {\n $attributes[$key] = $this->mutateAttributeForArray($key, null);\n }\n\n return $attributes;\n }", "abstract function attributes(): array;", "public function getAttributes()\n {\n return array(\n 'id' => $this->id,\n 'email' => $this->email,\n 'first_name' => $this->first_name,\n 'last_name' => $this->last_name,\n 'role' => $this->role,\n 'status' => $this->status,\n 'created' => $this->created,\n 'modified' => $this->modified\n );\n }", "public function attributesToArray()\n {\n $attributes = $this->getArrayableAttributes();\n $mutatedAttributes = $this->getMutatedAttributes();\n\n foreach ($mutatedAttributes as $key)\n {\n if (!array_key_exists($key, $attributes))\n continue;\n\n $attributes[$key] = $this->mutateAttributeForArray(\n $key,\n $attributes[$key]\n );\n }\n\n foreach ($this->casts as $key => $value)\n {\n if (!array_key_exists($key, $attributes) ||\n in_array($key, $mutatedAttributes))\n {\n continue;\n }\n\n $attributes[$key] = $this->castAttribute(\n $key,\n $attributes[$key]\n );\n }\n\n foreach ($this->getArrayableAppends() as $key)\n $attributes[$key] = $this->mutateAttributeForArray($key, null);\n\n return $attributes;\n }", "protected function attributes(): array\n {\n try {\n $attributes = [];\n $i = 0;\n foreach (static::$db_columns as $column) {\n $attributes[$column] = $this->$column;\n $i++;\n }\n return $attributes;\n } catch (Exception $e) {\n die(\"Error \" . $e);\n }\n }", "public function getAttributes(): array\n {\n // Get all attributes using all the getters.\n $attributes = [];\n foreach(\\array_keys(\\get_object_vars($this)) as $attribute) {\n\n // Construct the getter name.\n $getter = \\lcfirst(\\str_replace('_', '', \\ucwords($attribute, '_')));\n\n // Get the attribute's value from the getter.\n $attributes[$attribute] = $this->{$getter}();\n }\n\n return $attributes;\n }", "public function getAttributes() {\n $toReturn = array();\n $toReturn[\"id\"] = $this->id_;\n $toReturn[\"username\"] = $this->username_;\n $toReturn[\"email\"] = $this->email_;\n $toReturn[\"displayName\"] = $this->displayName_;\n $toReturn[\"firstName\"] = $this->firstName_;\n $toReturn[\"lastName\"] = $this->lastName_;\n $toReturn[\"postalCode\"] = $this->postalCode_;\n if ($this->privileges_ !== null) {\n $toReturn[\"privileges\"] = $this->privileges_;\n } else {\n $toReturn[\"privileges\"] = array();\n }\n \n $toReturn[\"isVerified\"] = $this->isVerified_;\n return $toReturn;\n }", "private function mapAttributes() {\n\t\t$attributes = [];\n\t\t$originalAttrs = $this->subscribedTopic->getRoute()->getAttributes();\n\n\t\tif (!count($originalAttrs)) {\n\t\t\treturn $attributes;\n\t\t}\n\n\t\tforeach ($originalAttrs as $attr => $obj) {\n\t\t\t$routeParts = explode('/', $this->route);\n\n\t\t\tif (!isset($routeParts[$obj->index])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$attributes[$attr] = $routeParts[$obj->index];\n\t\t}\n\n\t\treturn $attributes;\n\t}", "public function toArray(): array\n {\n $attributes = get_object_vars($this);\n\n unset($attributes['originals']);\n\n return $attributes;\n }", "protected function getSerializableAttributeNames(): array {\n return array_keys(get_object_vars($this));\n }", "public function getAttributes(): array {\n return $this->attributes;\n }", "protected static function keyToAttributeMapping()\n {\n return array();\n }", "public static function attributeMap()\n {\n return [\n 'application_id' => 'application_id',\n 'is_default' => 'is_default',\n 'role' => 'role',\n 'type' => 'type',\n '_issues' => '_issues'\n ];\n }", "public function attributes()\n {\n return [\n 'name' => __('basic::elf.name'),\n 'slug' => __('basic::elf.slug'),\n 'image' => __('basic::elf.image'),\n 'preview' => __('basic::elf.preview'),\n 'thumbnail' => __('basic::elf.thumbnail'),\n 'description' => __('basic::elf.description'),\n 'additional_text' => __('gallery::elf.additional_text'),\n 'option' => __('gallery::elf.option'),\n 'active' => __('basic::elf.active'),\n 'link' => __('basic::elf.link'),\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n 'name' => 'nombres',\n 'lastname' => 'apellidos',\n 'email' => 'correo electrónico',\n 'document' => 'documento',\n 'document_type_id' => 'tipo de documento',\n 'role' => 'tipo de usuario'\n ];\n }", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();" ]
[ "0.7510785", "0.70173377", "0.6707434", "0.6631744", "0.662846", "0.6551837", "0.6509276", "0.64513093", "0.6426274", "0.6422142", "0.641162", "0.6410572", "0.6409657", "0.63873124", "0.63873124", "0.63873124", "0.63873124", "0.6351699", "0.6349291", "0.63108206", "0.62710226", "0.6262775", "0.6262775", "0.6262775", "0.6262775", "0.6248762", "0.6217475", "0.62143594", "0.62138927", "0.6208577", "0.6183691", "0.6171253", "0.61646456", "0.61622673", "0.61620903", "0.6146088", "0.6136269", "0.6127808", "0.61247593", "0.61162716", "0.61153495", "0.6095141", "0.6089602", "0.6087947", "0.6087947", "0.6087947", "0.6086211", "0.60780567", "0.60771394", "0.60751003", "0.6072296", "0.6072296", "0.60682666", "0.6065211", "0.60467714", "0.6046454", "0.6038811", "0.6036672", "0.60208464", "0.60205525", "0.60167223", "0.6016165", "0.60039455", "0.5991234", "0.5984979", "0.5982423", "0.597876", "0.59690404", "0.59654725", "0.5963094", "0.59604186", "0.5958808", "0.59569365", "0.59554046", "0.59545046", "0.5948896", "0.5945178", "0.5941319", "0.5940589", "0.594014", "0.5938919", "0.5931985", "0.59309894", "0.59278286", "0.59215474", "0.5909193", "0.59071773", "0.5906433", "0.5906433", "0.5906433", "0.5906433", "0.5906433", "0.5906433", "0.5906433", "0.5906433", "0.5906433", "0.5900419", "0.5892544", "0.5892544", "0.5892544", "0.5892544" ]
0.0
-1